{"type": "func", "start": 16893288, "end": 16893572, "name": "ENGINE_load_public_key", "pseudocode": "// \n// ENGINE_load_public_key from 0x101c568 to 0x101c684 (284 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0xd43c8\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_load_public_key(__int64 a1, __int64 a2, __int64 a3, __int64 a4)\n{\n  __int64 v4; // x19\n  __int64 (__fastcall *v5)(__int64, __int64, __int64, __int64); // x5\n\n  v4 = a1;\n  if ( a1 )\n  {\n    CRYPTO_THREAD_write_lock(global_engine_lock);\n    if ( *(_DWORD *)(v4 + 160) )\n    {\n      CRYPTO_THREAD_unlock(global_engine_lock);\n      v5 = *(__int64 (__fastcall **)(__int64, __int64, __int64, __int64))(v4 + 128);\n      if ( v5 )\n      {\n        v4 = v5(v4, a2, a3, a4);\n        if ( !v4 )\n          ERR_put_error(38, 151, 129, \"crypto/engine/eng_pkey.c\", 108);\n      }\n      else\n      {\n        v4 = 0;\n        ERR_put_error(38, 151, 125, \"crypto/engine/eng_pkey.c\", 102);\n      }\n    }\n    else\n    {\n      v4 = 0;\n      CRYPTO_THREAD_unlock(global_engine_lock);\n      ERR_put_error(38, 151, 117, \"crypto/engine/eng_pkey.c\", 97);\n    }\n  }\n  else\n  {\n    ERR_put_error(38, 151, 67, \"crypto/engine/eng_pkey.c\", 91);\n  }\n  return v4;\n}", "assembly": "; \n; ENGINE_load_public_key from 0x101c568 to 0x101c684 (284 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0xd43c8\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_40]!                                ; +0x0, 0x101c568\nMOV             X29, SP                                                ; +0x4, 0x101c56c\nSTP             X19, X20, [SP,#0x40+var_30]                            ; +0x8, 0x101c570\nMOV             X19, X0                                                ; +0xc, 0x101c574\nCBZ             X0, loc_101C620                                        ; +0x10, 0x101c578\nADRP            X20, #global_engine_lock_ptr@PAGE                      ; +0x14, 0x101c57c\nSTR             X3, [X29,#0x40+var_18]                                 ; +0x18, 0x101c580\nSTR             X2, [X29,#0x40+var_10]                                 ; +0x1c, 0x101c584\nSTR             X1, [X29,#0x40+var_8]                                  ; +0x20, 0x101c588\nLDR             X20, [X20,#global_engine_lock_ptr@PAGEOFF]; global_engine_lock ; +0x24, 0x101c58c\nLDR             X0, [X20]                                              ; +0x28, 0x101c590\nBL              CRYPTO_THREAD_write_lock                               ; +0x2c, 0x101c594\nLDR             W0, [X19,#0xA0]                                        ; +0x30, 0x101c598\nLDR             X1, [X29,#0x40+var_8]                                  ; +0x34, 0x101c59c\nLDR             X2, [X29,#0x40+var_10]                                 ; +0x38, 0x101c5a0\nLDR             X3, [X29,#0x40+var_18]                                 ; +0x3c, 0x101c5a4\nCBZ             W0, loc_101C5F4                                        ; +0x40, 0x101c5a8\nLDR             X0, [X20]                                              ; +0x44, 0x101c5ac\nSTR             X3, [X29,#0x40+var_18]                                 ; +0x48, 0x101c5b0\nSTR             X2, [X29,#0x40+var_10]                                 ; +0x4c, 0x101c5b4\nSTR             X1, [X29,#0x40+var_8]                                  ; +0x50, 0x101c5b8\nBL              CRYPTO_THREAD_unlock                                   ; +0x54, 0x101c5bc\nLDR             X5, [X19,#0x80]                                        ; +0x58, 0x101c5c0\nLDR             X1, [X29,#0x40+var_8]                                  ; +0x5c, 0x101c5c4\nLDR             X2, [X29,#0x40+var_10]                                 ; +0x60, 0x101c5c8\nLDR             X3, [X29,#0x40+var_18]                                 ; +0x64, 0x101c5cc\nCBZ             X5, loc_101C640                                        ; +0x68, 0x101c5d0\nMOV             X0, X19                                                ; +0x6c, 0x101c5d4\nBLR             X5                                                     ; +0x70, 0x101c5d8\nMOV             X19, X0                                                ; +0x74, 0x101c5dc\nCBZ             X0, loc_101C664                                        ; +0x78, 0x101c5e0\nMOV             X0, X19                                                ; +0x7c, 0x101c5e4\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0x80, 0x101c5e8\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x84, 0x101c5ec\nRET                                                                    ; +0x88, 0x101c5f0\nLDR             X0, [X20]                                              ; +0x8c, 0x101c5f4\nMOV             X19, #0                                                ; +0x90, 0x101c5f8\nBL              CRYPTO_THREAD_unlock                                   ; +0x94, 0x101c5fc\nADRP            X3, #aCryptoEngineEn_5@PAGE; \"crypto/engine/eng_pkey.c\" ; +0x98, 0x101c600\nMOV             W0, #0x26 ; '&'                                        ; +0x9c, 0x101c604\nMOV             W1, #0x97                                              ; +0xa0, 0x101c608\nMOV             W2, #0x75 ; 'u'                                        ; +0xa4, 0x101c60c\nADD             X3, X3, #aCryptoEngineEn_5@PAGEOFF; \"crypto/engine/eng_pkey.c\" ; +0xa8, 0x101c610\nMOV             W4, #0x61 ; 'a'                                        ; +0xac, 0x101c614\nBL              ERR_put_error                                          ; +0xb0, 0x101c618\nB               loc_101C5E4                                            ; +0xb4, 0x101c61c\nADRP            X3, #aCryptoEngineEn_5@PAGE; \"crypto/engine/eng_pkey.c\" ; +0xb8, 0x101c620\nMOV             W0, #0x26 ; '&'                                        ; +0xbc, 0x101c624\nMOV             W1, #0x97                                              ; +0xc0, 0x101c628\nMOV             W2, #0x43 ; 'C'                                        ; +0xc4, 0x101c62c\nADD             X3, X3, #aCryptoEngineEn_5@PAGEOFF; \"crypto/engine/eng_pkey.c\" ; +0xc8, 0x101c630\nMOV             W4, #0x5B ; '['                                        ; +0xcc, 0x101c634\nBL              ERR_put_error                                          ; +0xd0, 0x101c638\nB               loc_101C5E4                                            ; +0xd4, 0x101c63c\nADRP            X3, #aCryptoEngineEn_5@PAGE; \"crypto/engine/eng_pkey.c\" ; +0xd8, 0x101c640\nMOV             W0, #0x26 ; '&'                                        ; +0xdc, 0x101c644\nMOV             W1, #0x97                                              ; +0xe0, 0x101c648\nMOV             W2, #0x7D ; '}'                                        ; +0xe4, 0x101c64c\nADD             X3, X3, #aCryptoEngineEn_5@PAGEOFF; \"crypto/engine/eng_pkey.c\" ; +0xe8, 0x101c650\nMOV             W4, #0x66 ; 'f'                                        ; +0xec, 0x101c654\nMOV             X19, X5                                                ; +0xf0, 0x101c658\nBL              ERR_put_error                                          ; +0xf4, 0x101c65c\nB               loc_101C5E4                                            ; +0xf8, 0x101c660\nADRP            X3, #aCryptoEngineEn_5@PAGE; \"crypto/engine/eng_pkey.c\" ; +0xfc, 0x101c664\nMOV             W0, #0x26 ; '&'                                        ; +0x100, 0x101c668\nMOV             W1, #0x97                                              ; +0x104, 0x101c66c\nMOV             W2, #0x81                                              ; +0x108, 0x101c670\nADD             X3, X3, #aCryptoEngineEn_5@PAGEOFF; \"crypto/engine/eng_pkey.c\" ; +0x10c, 0x101c674\nMOV             W4, #0x6C ; 'l'                                        ; +0x110, 0x101c678\nBL              ERR_put_error                                          ; +0x114, 0x101c67c\nB               loc_101C5E4                                            ; +0x118, 0x101c680", "xrefs": ["<???> @ 0xd43c8"], "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"}