-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
There are two types of function names. One of them is a string, and the other is a memory address. I didn't find how deepbindiff handles them. Thank you.
push eax
call memsetpush eax
call sub_8084480Does the function 'normalization' handle that?
def normalization(opstr, offsetStrMapping):
optoken = ''
opstrNum = ""
if opstr.startswith("0x") or opstr.startswith("0X"):
opstrNum = str(int(opstr, 16))
# normalize ptr
if "ptr" in opstr:
optoken = 'ptr'
# nodeToIndex.write("ptr\n")
# substitude offset with strings
elif opstrNum in offsetStrMapping:
optoken = offsetStrMapping[opstrNum]
# nodeToIndex.write("str\n")
# nodeToIndex.write(offsetStrMapping[opstr] + "\n")
elif opstr.startswith("0x") or opstr.startswith("-0x") or opstr.replace('.','',1).replace('-','',1).isdigit():
optoken = 'imme'
# nodeToIndex.write("IMME\n")
elif opstr in register_list_1_byte:
optoken = 'reg1'
elif opstr in register_list_2_byte:
optoken = 'reg2'
elif opstr in register_list_4_byte:
optoken = 'reg4'
elif opstr in register_list_8_byte:
optoken = 'reg8'
else:
optoken = str(opstr)
# nodeToIndex.write(opstr + "\n")
return optokenReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels