{"type": "func", "start": 8368580, "end": 8368704, "name": "ERR_peek_last_error_line", "pseudocode": "// \n// ERR_peek_last_error_line from 0x7fb1c4 to 0x7fb240 (124 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x6297c\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nint __fastcall ERR_peek_last_error_line(_DWORD *a1, _DWORD *a2)\n{\n  int state; // r0\n  int v5; // r2\n  _DWORD *v6; // r3\n  bool v7; // zf\n  int v8; // r2\n  int v9; // r1\n  int result; // r0\n\n  state = ERR_get_state();\n  v5 = *(_DWORD *)(state + 384);\n  if ( *(_DWORD *)(state + 388) == v5 )\n    return 0;\n  v6 = (_DWORD *)(state + 4 * v5);\n  v7 = a1 == nullptr;\n  if ( a1 )\n    v7 = a2 == nullptr;\n  v8 = v6[16];\n  if ( v7 )\n    return v6[16];\n  v9 = v6[64];\n  if ( v9 )\n  {\n    *a1 = v9;\n    *a2 = v6[80];\n    return v8;\n  }\n  else\n  {\n    result = v6[16];\n    *a1 = \"NA\";\n    *a2 = 0;\n  }\n  return result;\n}", "assembly": "; \n; ERR_peek_last_error_line from 0x7fb1c4 to 0x7fb240 (124 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x6297c\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nPUSH            {R3-R5,LR}                                             ; +0x0, 0x7fb1c4\nMOV             R5, R0                                                 ; +0x4, 0x7fb1c8\nMOV             R4, R1                                                 ; +0x8, 0x7fb1cc\nBL              ERR_get_state                                          ; +0xc, 0x7fb1d0\nLDR             R2, [R0,#0x180]                                        ; +0x10, 0x7fb1d4\nLDR             R12, [R0,#0x184]                                       ; +0x14, 0x7fb1d8\nCMP             R12, R2                                                ; +0x18, 0x7fb1dc\nBEQ             loc_7FB220                                             ; +0x1c, 0x7fb1e0\nADD             R3, R0, R2,LSL#2                                       ; +0x20, 0x7fb1e4\nCMP             R5, #0                                                 ; +0x24, 0x7fb1e8\nCMPNE           R4, #0                                                 ; +0x28, 0x7fb1ec\nLDR             R2, [R3,#0x40]                                         ; +0x2c, 0x7fb1f0\nBEQ             loc_7FB218                                             ; +0x30, 0x7fb1f4\nLDR             R1, [R3,#0x100]                                        ; +0x34, 0x7fb1f8\nCMP             R1, #0                                                 ; +0x38, 0x7fb1fc\nBEQ             loc_7FB228                                             ; +0x3c, 0x7fb200\nSTR             R1, [R5]                                               ; +0x40, 0x7fb204\nLDR             R3, [R3,#0x140]                                        ; +0x44, 0x7fb208\nSTR             R3, [R4]                                               ; +0x48, 0x7fb20c\nMOV             R0, R2                                                 ; +0x4c, 0x7fb210\nPOP             {R3-R5,PC}                                             ; +0x50, 0x7fb214\nMOV             R0, R2                                                 ; +0x54, 0x7fb218\nPOP             {R3-R5,PC}                                             ; +0x58, 0x7fb21c\nMOV             R0, #0                                                 ; +0x5c, 0x7fb220\nPOP             {R3-R5,PC}                                             ; +0x60, 0x7fb224\nLDR             R3, =(aNa_2 - 0x7FB238); \"NA\"                          ; +0x64, 0x7fb228\nMOV             R0, R2                                                 ; +0x68, 0x7fb22c\nADD             R3, PC, R3; \"NA\"                                       ; +0x6c, 0x7fb230\nSTR             R3, [R5]                                               ; +0x70, 0x7fb234\nSTR             R1, [R4]                                               ; +0x74, 0x7fb238\nPOP             {R3-R5,PC}                                             ; +0x78, 0x7fb23c", "xrefs": ["<???> @ 0x6297c"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}