Created
September 24, 2018 10:44
-
-
Save a1ext/f0d0b779228e553720144e823789fa5c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__result__ = list() | |
for item in __extern__: | |
ref = item['ref'] | |
push_args_list = item['push_args_list'] | |
# prepare stack | |
for i in range(len(push_args_list), 0, -1): | |
ll.api.Register_SetEIP(push_args_list[i - 1]) | |
ll.api.Debug_StepOver() | |
# call the API resolver routine | |
ll.api.Register_SetEIP(ref) | |
ll.api.Debug_StepOver() | |
# get the address of resolved function from EAX | |
eax = ll.api.Register_GetEAX() | |
# something went wrong | |
if not eax: | |
continue | |
api_name = ll.api.DbgGetLabelAt(eax, ll.api.SEG_DEFAULT) | |
if api_name: | |
__result__.append({'ref': ref, 'api_name': api_name}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment