{"type": "func", "start": 16904928, "end": 16905092, "name": "ERR_peek_last_error_line", "pseudocode": "// \n// ERR_peek_last_error_line from 0x101f2e0 to 0x101f384 (164 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0xffcd0\n// \n// This function is hookable on this platform (idp: arm, 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 13:16:10 +0000\n// \n\n__int64 __fastcall ERR_peek_last_error_line(_QWORD *a1, _DWORD *a2)\n{\n  __int64 state; // x0\n  int v4; // w2\n  __int64 v5; // x3\n  __int64 v6; // x0\n  __int64 v7; // x4\n  __int64 v8; // x5\n  __int64 result; // x0\n\n  state = ERR_get_state();\n  v4 = *(_DWORD *)(state + 576);\n  v5 = state;\n  if ( *(_DWORD *)(state + 580) == v4 )\n    return 0;\n  v6 = state + 8LL * v4;\n  v7 = *(_QWORD *)(v6 + 64);\n  if ( !a1 || !a2 )\n    return *(_QWORD *)(v6 + 64);\n  v8 = *(_QWORD *)(v6 + 384);\n  if ( v8 )\n  {\n    *a1 = v8;\n    *a2 = *(_DWORD *)(v5 + 4 * (v4 + 128LL));\n    return v7;\n  }\n  else\n  {\n    result = *(_QWORD *)(v6 + 64);\n    *a1 = \"NA\";\n    *a2 = 0;\n  }\n  return result;\n}", "assembly": "; \n; ERR_peek_last_error_line from 0x101f2e0 to 0x101f384 (164 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0xffcd0\n; \n; This function is hookable on this platform (idp: arm, 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 13:16:10 +0000\n; \nSTP             X29, X30, [SP,#var_30]!                                ; +0x0, 0x101f2e0\nMOV             X29, SP                                                ; +0x4, 0x101f2e4\nSTR             X19, [SP,#0x30+var_20]                                 ; +0x8, 0x101f2e8\nMOV             X19, X0                                                ; +0xc, 0x101f2ec\nSTR             X1, [X29,#0x30+var_8]                                  ; +0x10, 0x101f2f0\nBL              ERR_get_state                                          ; +0x14, 0x101f2f4\nLDR             W2, [X0,#0x240]                                        ; +0x18, 0x101f2f8\nMOV             X3, X0                                                 ; +0x1c, 0x101f2fc\nLDR             W4, [X0,#0x244]                                        ; +0x20, 0x101f300\nCMP             W4, W2                                                 ; +0x24, 0x101f304\nB.EQ            loc_101F35C                                            ; +0x28, 0x101f308\nSXTW            X2, W2                                                 ; +0x2c, 0x101f30c\nADD             X0, X0, X2,LSL#3                                       ; +0x30, 0x101f310\nLDR             X4, [X0,#0x40]                                         ; +0x34, 0x101f314\nCBZ             X19, loc_101F34C                                       ; +0x38, 0x101f318\nLDR             X1, [X29,#0x30+var_8]                                  ; +0x3c, 0x101f31c\nCBZ             X1, loc_101F34C                                        ; +0x40, 0x101f320\nLDR             X5, [X0,#0x180]                                        ; +0x44, 0x101f324\nCBZ             X5, loc_101F36C                                        ; +0x48, 0x101f328\nADD             X2, X2, #0x80                                          ; +0x4c, 0x101f32c\nSTR             X5, [X19]                                              ; +0x50, 0x101f330\nMOV             X0, X4                                                 ; +0x54, 0x101f334\nLDR             X19, [SP,#0x30+var_20]                                 ; +0x58, 0x101f338\nLDR             W2, [X3,X2,LSL#2]                                      ; +0x5c, 0x101f33c\nSTR             W2, [X1]                                               ; +0x60, 0x101f340\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x64, 0x101f344\nRET                                                                    ; +0x68, 0x101f348\nMOV             X0, X4                                                 ; +0x6c, 0x101f34c\nLDR             X19, [SP,#0x30+var_20]                                 ; +0x70, 0x101f350\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x74, 0x101f354\nRET                                                                    ; +0x78, 0x101f358\nMOV             X0, #0                                                 ; +0x7c, 0x101f35c\nLDR             X19, [SP,#0x30+var_20]                                 ; +0x80, 0x101f360\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x84, 0x101f364\nRET                                                                    ; +0x88, 0x101f368\nADRP            X2, #aNa@PAGE; \"NA\"                                    ; +0x8c, 0x101f36c\nMOV             X0, X4                                                 ; +0x90, 0x101f370\nADD             X2, X2, #aNa@PAGEOFF; \"NA\"                             ; +0x94, 0x101f374\nSTR             X2, [X19]                                              ; +0x98, 0x101f378\nSTR             W5, [X1]                                               ; +0x9c, 0x101f37c\nB               loc_101F350                                            ; +0xa0, 0x101f380", "xrefs": ["<???> @ 0xffcd0"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "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"}