emu_stubs
Redirects import slots to generated stubs and sets per-API return values, letting captured code keep running and take desired success paths without patching the binary.
Instructions
Redirect every import slot to a generated stub, so the code can keep running.
A snapshot holds the image, not the module it imports from, so
call qword ptr [rip+iat] would fault. This rewrites each IAT slot to a
mov eax, imm; ret stub in a mapped page and logs every hit.
returns sets per-API return values: "Sleep=0,GetTickCount=0x64" or
"kernel32.dll!CreateFileW=0x40"; unlisted imports return default.
Driving a return value is how you take the success path through a check
without patching the binary.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"key": "<key>"
},
"name": "emu_stubs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| default | No | ||
| returns | No | ||
| session | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |