下你所需,载你所想!
汇集开发技术源码资料

API动态调用方法

:1.906KB :1 :2020-09-19 11:54:22

部分简介

听说动态调用,就是即用即释放,而且这个是无限参数的(勿喷)。

局_模块地址 = API_GetModuleHandleA (参_模块名称)
.如果真 (局_模块地址 = 0)
局_模块地址 = API_LoadLibraryA (参_模块名称)
.如果真结束
局_函数地址 = API_GetProcAddress (局_模块地址, 参_函数名称)
' *** 缩略程序块 ***
' push ebp
' mov ebp, esp
' push esi
' mov esi, dword [ebp+0x10]
' lea ecx, dword [esi-0x01]
' test ecx, ecx
' jl label2
' mov eax, dword [ebp+0x0C]
' lea eax, dword [eax+ecx*4]
' inc ecx
' label1:
' mov edx, dword [eax]
' mov dword [ebp+0x10], edx
' push dword [ebp+0x10]
' sub eax, 0x04
' dec ecx
' jne label1
' label2:
' call dword [ebp+0x08]
' mov dword [ebp+0x0C], eax
' mov eax, dword [ebp+0x14]
' test eax, eax
' je label3
' lea eax, dword [0x00000000+esi*4]
' mov dword [ebp+0x10], eax
' add esp, dword [ebp+0x10]
' label3:
' mov eax, dword [ebp+0x0C]
' pop esi
' pop ebp
' retn 0x0010
局_编程接口 = { 85, 139, 236, 86, 139, 117, 16, 141, 78, 255, 133, 201, 124, 21, 139, 69, 12, 141, 4, 136, 65, 139, 16, 137, 85, 16, 255, 117, 16, 131, 232, 4, 73, 117, 242, 255, 85, 8, 137, 69, 12, 139, 69, 20, 133, 192, 116, 13, 141, 4, 181, 0, 0, 0, 0, 137, 69, 16, 3, 101, 16, 139, 69, 12, 94, 93, 194, 16, 0 }
局_返回数据 = API_CallWindowProcA (局_编程接口, 局_函数地址, 参_赋予参数, 取数组成员数 (参_赋予参数), 0)
API_FreeLibrary (局_模块地址)

API动态调用方法

热门推荐

相关文章