{"type": "func", "start": 6443391200, "end": 6443391316, "name": "capture_previous_context", "pseudocode": "// \n// capture_previous_context from 0x1800e58e0 to 0x1800e5954 (116 bytes)\n// \n// 2 xrefs:\n// > __report_gsfailure @ 0x1800e5832\n// > <???> @ 0x1801c5610\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:22:38 +0000\n// \n\nstruct _IMAGE_RUNTIME_FUNCTION_ENTRY *__fastcall capture_previous_context(PCONTEXT ContextRecord)\n{\n  ULONG64 Rip; // rsi\n  int i; // edi\n  struct _IMAGE_RUNTIME_FUNCTION_ENTRY *result; // rax\n  unsigned __int64 ImageBase; // [rsp+60h] [rbp+8h] BYREF\n  unsigned __int64 EstablisherFrame; // [rsp+68h] [rbp+10h] BYREF\n  PVOID HandlerData; // [rsp+70h] [rbp+18h] BYREF\n\n  RtlCaptureContext(ContextRecord);\n  Rip = ContextRecord->Rip;\n  for ( i = 0; i < 2; ++i )\n  {\n    result = RtlLookupFunctionEntry(Rip, &ImageBase, nullptr);\n    if ( !result )\n      break;\n    result = (struct _IMAGE_RUNTIME_FUNCTION_ENTRY *)RtlVirtualUnwind(\n                                                       0,\n                                                       ImageBase,\n                                                       Rip,\n                                                       result,\n                                                       ContextRecord,\n                                                       &HandlerData,\n                                                       &EstablisherFrame,\n                                                       nullptr);\n  }\n  return result;\n}", "assembly": "; \n; capture_previous_context from 0x1800e58e0 to 0x1800e5954 (116 bytes)\n; \n; 2 xrefs:\n; > __report_gsfailure @ 0x1800e5832\n; > <???> @ 0x1801c5610\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:22:38 +0000\n; \npush    rbx                                                            ; +0x0, 0x1800e58e0\npush    rsi                                                            ; +0x2, 0x1800e58e2\npush    rdi                                                            ; +0x3, 0x1800e58e3\nsub     rsp, 40h                                                       ; +0x4, 0x1800e58e4\nmov     rbx, rcx                                                       ; +0x8, 0x1800e58e8\ncall    cs:RtlCaptureContext                                           ; +0xb, 0x1800e58eb\nmov     rsi, [rbx+0F8h]                                                ; +0x11, 0x1800e58f1\nxor     edi, edi                                                       ; +0x18, 0x1800e58f8\nxor     r8d, r8d; HistoryTable                                         ; +0x1a, 0x1800e58fa\nlea     rdx, [rsp+58h+ImageBase]; ImageBase                            ; +0x1d, 0x1800e58fd\nmov     rcx, rsi; ControlPc                                            ; +0x22, 0x1800e5902\ncall    cs:RtlLookupFunctionEntry                                      ; +0x25, 0x1800e5905\ntest    rax, rax                                                       ; +0x2b, 0x1800e590b\njz      short loc_1800E594C                                            ; +0x2e, 0x1800e590e\nmov     rdx, [rsp+58h+ImageBase]; ImageBase                            ; +0x30, 0x1800e5910\nlea     rcx, [rsp+58h+arg_8]                                           ; +0x35, 0x1800e5915\nmov     [rsp+58h+ContextPointers], 0; ContextPointers                  ; +0x3a, 0x1800e591a\nmov     r9, rax; FunctionEntry                                         ; +0x43, 0x1800e5923\nmov     [rsp+58h+EstablisherFrame], rcx; EstablisherFrame              ; +0x46, 0x1800e5926\nmov     r8, rsi; ControlPc                                             ; +0x4b, 0x1800e592b\nlea     rcx, [rsp+58h+arg_10]                                          ; +0x4e, 0x1800e592e\nmov     [rsp+58h+HandlerData], rcx; HandlerData                        ; +0x53, 0x1800e5933\nxor     ecx, ecx; HandlerType                                          ; +0x58, 0x1800e5938\nmov     [rsp+58h+ContextRecord], rbx; ContextRecord                    ; +0x5a, 0x1800e593a\ncall    cs:RtlVirtualUnwind                                            ; +0x5f, 0x1800e593f\ninc     edi                                                            ; +0x65, 0x1800e5945\ncmp     edi, 2                                                         ; +0x67, 0x1800e5947\njl      short loc_1800E58FA                                            ; +0x6a, 0x1800e594a\nadd     rsp, 40h                                                       ; +0x6c, 0x1800e594c\npop     rdi                                                            ; +0x70, 0x1800e5950\npop     rsi                                                            ; +0x71, 0x1800e5951\npop     rbx                                                            ; +0x72, 0x1800e5952\nretn                                                                   ; +0x73, 0x1800e5953", "xrefs": ["__report_gsfailure @ 0x1800e5832", "<???> @ 0x1801c5610"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}