{"type": "func", "start": 16891728, "end": 16892048, "name": "ENGINE_remove", "pseudocode": "// \n// ENGINE_remove from 0x101bf50 to 0x101c090 (320 bytes)\n// \n// 2 xrefs:\n// > sub_101C090 @ 0x101c0a8\n// > <???> @ 0x8bc18\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:08 +0000\n// \n\n__int64 __fastcall ENGINE_remove(__int64 a1)\n{\n  __int64 v2; // x1\n  __int64 i; // x5\n  __int64 v4; // x2\n  __int64 v5; // x3\n  __int64 v6; // x0\n  unsigned int v7; // w19\n\n  if ( a1 )\n  {\n    CRYPTO_THREAD_write_lock(global_engine_lock);\n    v2 = qword_1566400;\n    for ( i = qword_1566400; a1 != i && i; i = *(_QWORD *)(i + 184) )\n      ;\n    if ( i )\n    {\n      v4 = *(_QWORD *)(a1 + 184);\n      if ( v4 )\n        *(_QWORD *)(v4 + 176) = *(_QWORD *)(a1 + 176);\n      v5 = *(_QWORD *)(a1 + 176);\n      if ( v5 )\n        *(_QWORD *)(v5 + 184) = v4;\n      if ( a1 == v2 )\n        qword_1566400 = *(_QWORD *)(a1 + 184);\n      if ( a1 == qword_1566408 )\n        qword_1566408 = v5;\n      v6 = a1;\n      v7 = 1;\n      engine_free_util(v6, 0);\n    }\n    else\n    {\n      v7 = 0;\n      ERR_put_error(38, 121, 105, \"crypto/engine/eng_list.c\", 117);\n      ERR_put_error(38, 123, 110, \"crypto/engine/eng_list.c\", 245);\n    }\n    CRYPTO_THREAD_unlock(global_engine_lock);\n    return v7;\n  }\n  else\n  {\n    ERR_put_error(38, 123, 67, \"crypto/engine/eng_list.c\", 240);\n    return 0;\n  }\n}", "assembly": "; \n; ENGINE_remove from 0x101bf50 to 0x101c090 (320 bytes)\n; \n; 2 xrefs:\n; > sub_101C090 @ 0x101c0a8\n; > <???> @ 0x8bc18\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:08 +0000\n; \nSTP             X29, X30, [SP,#var_30]!                                ; +0x0, 0x101bf50\nMOV             X29, SP                                                ; +0x4, 0x101bf54\nSTP             X19, X20, [SP,#0x30+var_20]                            ; +0x8, 0x101bf58\nSTR             X21, [SP,#0x30+var_10]                                 ; +0xc, 0x101bf5c\nMOV             X19, X0                                                ; +0x10, 0x101bf60\nCBZ             X0, loc_101C060                                        ; +0x14, 0x101bf64\nADRP            X20, #global_engine_lock_ptr@PAGE                      ; +0x18, 0x101bf68\nLDR             X0, [X20,#global_engine_lock_ptr@PAGEOFF]; global_engine_lock ; +0x1c, 0x101bf6c\nLDR             X0, [X0]                                               ; +0x20, 0x101bf70\nBL              CRYPTO_THREAD_write_lock                               ; +0x24, 0x101bf74\nADRP            X0, #qword_1566400@PAGE                                ; +0x28, 0x101bf78\nLDR             X1, [X0,#qword_1566400@PAGEOFF]                        ; +0x2c, 0x101bf7c\nCMP             X19, X1                                                ; +0x30, 0x101bf80\nMOV             X5, X1                                                 ; +0x34, 0x101bf84\nB.EQ            loc_101BFA4                                            ; +0x38, 0x101bf88\nCBNZ            X1, loc_101BF98                                        ; +0x3c, 0x101bf8c\nB               loc_101BFA4                                            ; +0x40, 0x101bf90\nCBZ             X5, loc_101BFA4                                        ; +0x44, 0x101bf94\nLDR             X5, [X5,#0xB8]                                         ; +0x48, 0x101bf98\nCMP             X19, X5                                                ; +0x4c, 0x101bf9c\nB.NE            loc_101BF94                                            ; +0x50, 0x101bfa0\nCBZ             X5, loc_101C00C                                        ; +0x54, 0x101bfa4\nLDR             X2, [X19,#0xB8]                                        ; +0x58, 0x101bfa8\nCBZ             X2, loc_101BFB8                                        ; +0x5c, 0x101bfac\nLDR             X3, [X19,#0xB0]                                        ; +0x60, 0x101bfb0\nSTR             X3, [X2,#0xB0]                                         ; +0x64, 0x101bfb4\nLDR             X3, [X19,#0xB0]                                        ; +0x68, 0x101bfb8\nCBZ             X3, loc_101BFC4                                        ; +0x6c, 0x101bfbc\nSTR             X2, [X3,#0xB8]                                         ; +0x70, 0x101bfc0\nCMP             X19, X1                                                ; +0x74, 0x101bfc4\nB.EQ            loc_101C054                                            ; +0x78, 0x101bfc8\nADD             X0, X0, #qword_1566400@PAGEOFF                         ; +0x7c, 0x101bfcc\nLDR             X1, [X0,#(qword_1566408 - 0x1566400)]                  ; +0x80, 0x101bfd0\nCMP             X19, X1                                                ; +0x84, 0x101bfd4\nB.EQ            loc_101C04C                                            ; +0x88, 0x101bfd8\nMOV             X0, X19                                                ; +0x8c, 0x101bfdc\nMOV             W1, #0                                                 ; +0x90, 0x101bfe0\nMOV             W19, #1                                                ; +0x94, 0x101bfe4\nBL              engine_free_util                                       ; +0x98, 0x101bfe8\nLDR             X20, [X20,#global_engine_lock_ptr@PAGEOFF]; global_engine_lock ; +0x9c, 0x101bfec\nLDR             X0, [X20]                                              ; +0xa0, 0x101bff0\nBL              CRYPTO_THREAD_unlock                                   ; +0xa4, 0x101bff4\nLDR             X21, [SP,#0x30+var_10]                                 ; +0xa8, 0x101bff8\nMOV             W0, W19                                                ; +0xac, 0x101bffc\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0xb0, 0x101c000\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0xb4, 0x101c004\nRET                                                                    ; +0xb8, 0x101c008\nADRP            X21, #aCryptoEngineEn_4@PAGE; \"crypto/engine/eng_list.c\" ; +0xbc, 0x101c00c\nMOV             W0, #0x26 ; '&'                                        ; +0xc0, 0x101c010\nADD             X21, X21, #aCryptoEngineEn_4@PAGEOFF; \"crypto/engine/eng_list.c\" ; +0xc4, 0x101c014\nMOV             W1, #0x79 ; 'y'                                        ; +0xc8, 0x101c018\nMOV             X3, X21                                                ; +0xcc, 0x101c01c\nMOV             W2, #0x69 ; 'i'                                        ; +0xd0, 0x101c020\nMOV             W4, #0x75 ; 'u'                                        ; +0xd4, 0x101c024\nMOV             W19, W5                                                ; +0xd8, 0x101c028\nBL              ERR_put_error                                          ; +0xdc, 0x101c02c\nMOV             W0, #0x26 ; '&'                                        ; +0xe0, 0x101c030\nMOV             W1, #0x7B ; '{'                                        ; +0xe4, 0x101c034\nMOV             W2, #0x6E ; 'n'                                        ; +0xe8, 0x101c038\nMOV             X3, X21                                                ; +0xec, 0x101c03c\nMOV             W4, #0xF5                                              ; +0xf0, 0x101c040\nBL              ERR_put_error                                          ; +0xf4, 0x101c044\nB               loc_101BFEC                                            ; +0xf8, 0x101c048\nSTR             X3, [X0,#(qword_1566408 - 0x1566400)]                  ; +0xfc, 0x101c04c\nB               loc_101BFDC                                            ; +0x100, 0x101c050\nLDR             X1, [X19,#0xB8]                                        ; +0x104, 0x101c054\nSTR             X1, [X0,#qword_1566400@PAGEOFF]                        ; +0x108, 0x101c058\nB               loc_101BFCC                                            ; +0x10c, 0x101c05c\nADRP            X3, #aCryptoEngineEn_4@PAGE; \"crypto/engine/eng_list.c\" ; +0x110, 0x101c060\nMOV             W0, #0x26 ; '&'                                        ; +0x114, 0x101c064\nMOV             W1, #0x7B ; '{'                                        ; +0x118, 0x101c068\nMOV             W2, #0x43 ; 'C'                                        ; +0x11c, 0x101c06c\nADD             X3, X3, #aCryptoEngineEn_4@PAGEOFF; \"crypto/engine/eng_list.c\" ; +0x120, 0x101c070\nMOV             W4, #0xF0                                              ; +0x124, 0x101c074\nBL              ERR_put_error                                          ; +0x128, 0x101c078\nLDR             X21, [SP,#0x30+var_10]                                 ; +0x12c, 0x101c07c\nMOV             W0, W19                                                ; +0x130, 0x101c080\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x134, 0x101c084\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x138, 0x101c088\nRET                                                                    ; +0x13c, 0x101c08c", "xrefs": ["sub_101C090 @ 0x101c0a8", "<???> @ 0x8bc18"], "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"}