//
// capture_current_context from 0x1801201c8 to 0x180120235 (109 bytes)
//
// 3 xrefs:
// > __report_securityfailure @ 0x180120152
// > ??> @ 0x180202444
// > ??> @ 0x180202450
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 10:54:52 +0000
//
struct _IMAGE_RUNTIME_FUNCTION_ENTRY *__fastcall capture_current_context(PCONTEXT ContextRecord)
{
ULONG64 Rip; // rdi
struct _IMAGE_RUNTIME_FUNCTION_ENTRY *result; // rax
unsigned __int64 ImageBase; // [rsp+50h] [rbp+8h] BYREF
unsigned __int64 EstablisherFrame; // [rsp+58h] [rbp+10h] BYREF
PVOID HandlerData; // [rsp+60h] [rbp+18h] BYREF
RtlCaptureContext(ContextRecord);
Rip = ContextRecord->Rip;
result = RtlLookupFunctionEntry(Rip, &ImageBase, nullptr);
if ( result )
return (struct _IMAGE_RUNTIME_FUNCTION_ENTRY *)RtlVirtualUnwind(
0,
ImageBase,
Rip,
result,
ContextRecord,
&HandlerData,
&EstablisherFrame,
nullptr);
return result;
}