frida hook函数模拟执行超时。
本帖最后由 wgf4242 于 2022-4-16 17:24 编辑就挺简单的一函数。模拟时就超时
程序和脚本都在这 https://wwi.lanzoup.com/itkXK03ayzfi
```js
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
```c
_DWORD *__cdecl sub_401000(_DWORD *a1, int a2)
{
int v3; //
int v4; //
int v5; //
int v6; //
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;
}```
页:
[1]