MCPcopy
hub / github.com/mandiant/flare-floss / prehook

Method prehook

floss/function_argument_getter.py:30–35  ·  view source on GitHub ↗
(self, emu, op, pc)

Source from the content-addressed store, hash-verified

28 self.function_contexts: List[FunctionContext] = list()
29
30 def prehook(self, emu, op, pc):
31 logger.trace("%s: %s", hex(pc), op)
32 if pc == self.call_site_va:
33 # strictly calls here, return address should always be next instruction
34 return_address = pc + len(op)
35 self.function_contexts.append(FunctionContext(emu.getEmuSnap(), return_address, pc))
36
37 def get_contexts(self) -> List[FunctionContext]:
38 return self.function_contexts

Callers

nothing calls this directly

Calls 2

hexFunction · 0.85
traceMethod · 0.80

Tested by

no test coverage detected