{"type": "func", "start": 14292496, "end": 14292736, "name": "ERR_pop_to_mark", "pseudocode": "// \n// ERR_pop_to_mark from 0xda1610 to 0xda1700 (240 bytes)\n// \n// 6 xrefs:\n// > PKCS12_parse @ 0xdca76c\n// > PKCS12_parse @ 0xdca808\n// > X509_print_ex @ 0xde5b08\n// > sub_DF1EF0 @ 0xdf1f4c\n// > engine_table_select @ 0xe5e578\n// > <???> @ 0x88950\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\n__int64 ERR_pop_to_mark()\n{\n  __int64 state; // x19\n  int v1; // w0\n  int v2; // w8\n  __int64 v3; // x3\n  __int64 v4; // x2\n  __int64 v5; // x5\n  int v6; // w4\n\n  state = ERR_get_state();\n  v1 = *(_DWORD *)(state + 576);\n  v2 = *(_DWORD *)(state + 580);\n  while ( 1 )\n  {\n    v4 = v1;\n    v5 = state + 8LL * v1;\n    if ( v2 == v1 )\n      break;\n    v6 = *(_DWORD *)(state + 4LL * v1);\n    if ( (v6 & 1) != 0 )\n    {\n      *(_DWORD *)(state + 4LL * v1) = v6 & 0xFFFFFFFE;\n      return 1;\n    }\n    *(_DWORD *)(state + 4LL * v1) = 0;\n    *(_QWORD *)(v5 + 64) = 0;\n    if ( (*(_DWORD *)(state + 4LL * v1 + 320) & 1) != 0 )\n    {\n      CRYPTO_free(*(_QWORD *)(v5 + 192), \"crypto/err/err.c\", 759);\n      v1 = *(_DWORD *)(state + 576);\n      v2 = *(_DWORD *)(state + 580);\n      v4 = v1;\n      *(_QWORD *)(state + 8 * (v1 + 24LL)) = 0;\n    }\n    v3 = state + 4 * v4;\n    --v1;\n    *(_DWORD *)(v3 + 320) = 0;\n    *(_QWORD *)(state + 8 * (v4 + 48)) = 0;\n    *(_DWORD *)(v3 + 512) = -1;\n    *(_DWORD *)(state + 576) = v1;\n    if ( v1 == -1 )\n    {\n      *(_DWORD *)(state + 576) = 15;\n      v1 = 15;\n    }\n  }\n  return 0;\n}", "assembly": "; \n; ERR_pop_to_mark from 0xda1610 to 0xda1700 (240 bytes)\n; \n; 6 xrefs:\n; > PKCS12_parse @ 0xdca76c\n; > PKCS12_parse @ 0xdca808\n; > X509_print_ex @ 0xde5b08\n; > sub_DF1EF0 @ 0xdf1f4c\n; > engine_table_select @ 0xe5e578\n; > <???> @ 0x88950\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\nSTP             X29, X30, [SP,#-0x30+var_s0]!                          ; +0x0, 0xda1610\nMOV             X29, SP                                                ; +0x4, 0xda1614\nSTP             X19, X20, [SP,#var_s10]                                ; +0x8, 0xda1618\nSTP             X21, X22, [SP,#var_s20]                                ; +0xc, 0xda161c\nBL              ERR_get_state                                          ; +0x10, 0xda1620\nMOV             X19, X0                                                ; +0x14, 0xda1624\nADRP            X21, #aCryptoErrErrC@PAGE; \"crypto/err/err.c\"          ; +0x18, 0xda1628\nMOV             W20, #0xFFFFFFFF                                       ; +0x1c, 0xda162c\nADD             X21, X21, #aCryptoErrErrC@PAGEOFF; \"crypto/err/err.c\"  ; +0x20, 0xda1630\nMOV             W22, #0xF                                              ; +0x24, 0xda1634\nLDR             W0, [X0,#0x240]                                        ; +0x28, 0xda1638\nLDR             W8, [X19,#0x244]                                       ; +0x2c, 0xda163c\nB               loc_DA1668                                             ; +0x30, 0xda1640\nADD             X3, X19, X2,LSL#2                                      ; +0x34, 0xda1644\nADD             X2, X2, #0x30 ; '0'                                    ; +0x38, 0xda1648\nSUB             W0, W0, #1                                             ; +0x3c, 0xda164c\nCMN             W0, #1                                                 ; +0x40, 0xda1650\nSTR             WZR, [X3,#0x140]                                       ; +0x44, 0xda1654\nSTR             XZR, [X19,X2,LSL#3]                                    ; +0x48, 0xda1658\nSTR             W20, [X3,#0x200]                                       ; +0x4c, 0xda165c\nSTR             W0, [X19,#0x240]                                       ; +0x50, 0xda1660\nB.EQ            loc_DA16F4                                             ; +0x54, 0xda1664\nSXTW            X2, W0                                                 ; +0x58, 0xda1668\nCMP             W8, W0                                                 ; +0x5c, 0xda166c\nLSL             X3, X2, #2                                             ; +0x60, 0xda1670\nADD             X5, X19, X2,LSL#3                                      ; +0x64, 0xda1674\nB.EQ            loc_DA16E0                                             ; +0x68, 0xda1678\nLDR             W4, [X19,X3]                                           ; +0x6c, 0xda167c\nADD             X7, X19, X3                                            ; +0x70, 0xda1680\nAND             W6, W4, #1                                             ; +0x74, 0xda1684\nTBNZ            W4, #0, loc_DA16C4                                     ; +0x78, 0xda1688\nSTR             W6, [X19,X3]                                           ; +0x7c, 0xda168c\nSTR             XZR, [X5,#0x40]                                        ; +0x80, 0xda1690\nLDR             W3, [X7,#0x140]                                        ; +0x84, 0xda1694\nTBZ             W3, #0, loc_DA1644                                     ; +0x88, 0xda1698\nLDR             X0, [X5,#0xC0]                                         ; +0x8c, 0xda169c\nMOV             W2, #0x2F7                                             ; +0x90, 0xda16a0\nMOV             X1, X21                                                ; +0x94, 0xda16a4\nBL              CRYPTO_free                                            ; +0x98, 0xda16a8\nLDR             W0, [X19,#0x240]                                       ; +0x9c, 0xda16ac\nLDR             W8, [X19,#0x244]                                       ; +0xa0, 0xda16b0\nSXTW            X2, W0                                                 ; +0xa4, 0xda16b4\nADD             X3, X2, #0x18                                          ; +0xa8, 0xda16b8\nSTR             XZR, [X19,X3,LSL#3]                                    ; +0xac, 0xda16bc\nB               loc_DA1644                                             ; +0xb0, 0xda16c0\nAND             W4, W4, #0xFFFFFFFE                                    ; +0xb4, 0xda16c4\nSTR             W4, [X19,X2,LSL#2]                                     ; +0xb8, 0xda16c8\nMOV             W0, #1                                                 ; +0xbc, 0xda16cc\nLDP             X19, X20, [SP,#var_s10]                                ; +0xc0, 0xda16d0\nLDP             X21, X22, [SP,#var_s20]                                ; +0xc4, 0xda16d4\nLDP             X29, X30, [SP+var_s0],#0x30                            ; +0xc8, 0xda16d8\nRET                                                                    ; +0xcc, 0xda16dc\nMOV             W0, #0                                                 ; +0xd0, 0xda16e0\nLDP             X19, X20, [SP,#var_s10]                                ; +0xd4, 0xda16e4\nLDP             X21, X22, [SP,#var_s20]                                ; +0xd8, 0xda16e8\nLDP             X29, X30, [SP+var_s0],#0x30                            ; +0xdc, 0xda16ec\nRET                                                                    ; +0xe0, 0xda16f0\nSTR             W22, [X19,#0x240]                                      ; +0xe4, 0xda16f4\nMOV             W0, #0xF                                               ; +0xe8, 0xda16f8\nB               loc_DA1668                                             ; +0xec, 0xda16fc", "xrefs": ["PKCS12_parse @ 0xdca76c", "PKCS12_parse @ 0xdca808", "X509_print_ex @ 0xde5b08", "sub_DF1EF0 @ 0xdf1f4c", "engine_table_select @ 0xe5e578", "<???> @ 0x88950"], "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"}