I am converting BN code into IDA Pro and stuck at this point, following are lines in the code which gives the symbol call
#####Get call symbol (if it exists)
dr.get_symbol(inst.tokens)
and
####### NOTE: Might contain FPs. E.g., "call [ebx + 0x4]"
#####Extract call symbol if it exists
def get_symbol(self, token):
token = [str(t) for t in token]
if '[' not in token:
return
start = token.index('[')
end = token.index(']')
symbol = ' '.join(token[start+1:end])
self.api.append(symbol)
I want to convert the above code and want the following output in TXT file, but I am getting only strings and not in the register format like below.
Sample output:
---------------** ++++++ API Features ++++++ APIs: ebp + 0x8 { arg2 };eax;ecx;ecx + esi;ebp - 0x18 { var_1c } ++++++ API Features ++++++ APIs: ebp + 0x8 { arg1 };edi