本帖最后由 wgf4242 于 2022-4-16 17:24 编辑
就挺简单的一函数。模拟时就超时
程序和脚本都在这 https://wwi.lanzoup.com/itkXK03ayzfi
var baseaddr = Module.getBaseAddress('Newbie_calculations.exe')
var ptr_func_1000 = baseaddr.add(0x1000)
var buf = Memory.alloc(4)
var func_1000 = new NativeFunction(ptr_func_1000, 'pointer', ['pointer', 'int'])
buf.writeS32(12)
func_1000(buf, 14)
console.log('func_1000(&123,456) = ', buf.readS32())
1000
_DWORD *__cdecl sub_401000(_DWORD *a1, int a2)
{
int v3; // [esp+Ch] [ebp-18h]
int v4; // [esp+10h] [ebp-14h]
int v5; // [esp+18h] [ebp-Ch]
int v6; // [esp+1Ch] [ebp-8h]
v4 = -1;
v3 = -1 - a2 + 1;
v6 = 1231;
v5 = a2 + 1231;
while ( v3 )
{
++v6;
--*a1;
--v3;
--v5;
}
while ( v4 )
{
--v5;
++*a1;
--v4;
}
++*a1;
return a1;
}```
|