{"type": "func", "start": 16893004, "end": 16893288, "name": "ENGINE_load_private_key", "pseudocode": "// \n// ENGINE_load_private_key from 0x101c44c to 0x101c568 (284 bytes)\n// \n// 2 xrefs:\n// > sub_E2DA90 @ 0xe2ec60\n// > <???> @ 0x100228\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_private_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 + 120);\n      if ( v5 )\n      {\n        v4 = v5(v4, a2, a3, a4);\n        if ( !v4 )\n          ERR_put_error(38, 150, 128, \"crypto/engine/eng_pkey.c\", 78);\n      }\n      else\n      {\n        v4 = 0;\n        ERR_put_error(38, 150, 125, \"crypto/engine/eng_pkey.c\", 72);\n      }\n    }\n    else\n    {\n      v4 = 0;\n      CRYPTO_THREAD_unlock(global_engine_lock);\n      ERR_put_error(38, 150, 117, \"crypto/engine/eng_pkey.c\", 66);\n    }\n  }\n  else\n  {\n    ERR_put_error(38, 150, 67, \"crypto/engine/eng_pkey.c\", 60);\n  }\n  return v4;\n}", "assembly": "; \n; ENGINE_load_private_key from 0x101c44c to 0x101c568 (284 bytes)\n; \n; 2 xrefs:\n; > sub_E2DA90 @ 0xe2ec60\n; > <???> @ 0x100228\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, 0x101c44c\nMOV             X29, SP                                                ; +0x4, 0x101c450\nSTP             X19, X20, [SP,#0x40+var_30]                            ; +0x8, 0x101c454\nMOV             X19, X0                                                ; +0xc, 0x101c458\nCBZ             X0, loc_101C504                                        ; +0x10, 0x101c45c\nADRP            X20, #global_engine_lock_ptr@PAGE                      ; +0x14, 0x101c460\nSTR             X3, [X29,#0x40+var_18]                                 ; +0x18, 0x101c464\nSTR             X2, [X29,#0x40+var_10]                                 ; +0x1c, 0x101c468\nSTR             X1, [X29,#0x40+var_8]                                  ; +0x20, 0x101c46c\nLDR             X20, [X20,#global_engine_lock_ptr@PAGEOFF]; global_engine_lock ; +0x24, 0x101c470\nLDR             X0, [X20]                                              ; +0x28, 0x101c474\nBL              CRYPTO_THREAD_write_lock                               ; +0x2c, 0x101c478\nLDR             W0, [X19,#0xA0]                                        ; +0x30, 0x101c47c\nLDR             X1, [X29,#0x40+var_8]                                  ; +0x34, 0x101c480\nLDR             X2, [X29,#0x40+var_10]                                 ; +0x38, 0x101c484\nLDR             X3, [X29,#0x40+var_18]                                 ; +0x3c, 0x101c488\nCBZ             W0, loc_101C4D8                                        ; +0x40, 0x101c48c\nLDR             X0, [X20]                                              ; +0x44, 0x101c490\nSTR             X3, [X29,#0x40+var_18]                                 ; +0x48, 0x101c494\nSTR             X2, [X29,#0x40+var_10]                                 ; +0x4c, 0x101c498\nSTR             X1, [X29,#0x40+var_8]                                  ; +0x50, 0x101c49c\nBL              CRYPTO_THREAD_unlock                                   ; +0x54, 0x101c4a0\nLDR             X5, [X19,#0x78]                                        ; +0x58, 0x101c4a4\nLDR             X1, [X29,#0x40+var_8]                                  ; +0x5c, 0x101c4a8\nLDR             X2, [X29,#0x40+var_10]                                 ; +0x60, 0x101c4ac\nLDR             X3, [X29,#0x40+var_18]                                 ; +0x64, 0x101c4b0\nCBZ             X5, loc_101C524                                        ; +0x68, 0x101c4b4\nMOV             X0, X19                                                ; +0x6c, 0x101c4b8\nBLR             X5                                                     ; +0x70, 0x101c4bc\nMOV             X19, X0                                                ; +0x74, 0x101c4c0\nCBZ             X0, loc_101C548                                        ; +0x78, 0x101c4c4\nMOV             X0, X19                                                ; +0x7c, 0x101c4c8\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0x80, 0x101c4cc\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x84, 0x101c4d0\nRET                                                                    ; +0x88, 0x101c4d4\nLDR             X0, [X20]                                              ; +0x8c, 0x101c4d8\nMOV             X19, #0                                                ; +0x90, 0x101c4dc\nBL              CRYPTO_THREAD_unlock                                   ; +0x94, 0x101c4e0\nADRP            X3, #aCryptoEngineEn_5@PAGE; \"crypto/engine/eng_pkey.c\" ; +0x98, 0x101c4e4\nMOV             W0, #0x26 ; '&'                                        ; +0x9c, 0x101c4e8\nMOV             W1, #0x96                                              ; +0xa0, 0x101c4ec\nMOV             W2, #0x75 ; 'u'                                        ; +0xa4, 0x101c4f0\nADD             X3, X3, #aCryptoEngineEn_5@PAGEOFF; \"crypto/engine/eng_pkey.c\" ; +0xa8, 0x101c4f4\nMOV             W4, #0x42 ; 'B'                                        ; +0xac, 0x101c4f8\nBL              ERR_put_error                                          ; +0xb0, 0x101c4fc\nB               loc_101C4C8                                            ; +0xb4, 0x101c500\nADRP            X3, #aCryptoEngineEn_5@PAGE; \"crypto/engine/eng_pkey.c\" ; +0xb8, 0x101c504\nMOV             W0, #0x26 ; '&'                                        ; +0xbc, 0x101c508\nMOV             W1, #0x96                                              ; +0xc0, 0x101c50c\nMOV             W2, #0x43 ; 'C'                                        ; +0xc4, 0x101c510\nADD             X3, X3, #aCryptoEngineEn_5@PAGEOFF; \"crypto/engine/eng_pkey.c\" ; +0xc8, 0x101c514\nMOV             W4, #0x3C ; '<'                                        ; +0xcc, 0x101c518\nBL              ERR_put_error                                          ; +0xd0, 0x101c51c\nB               loc_101C4C8                                            ; +0xd4, 0x101c520\nADRP            X3, #aCryptoEngineEn_5@PAGE; \"crypto/engine/eng_pkey.c\" ; +0xd8, 0x101c524\nMOV             W0, #0x26 ; '&'                                        ; +0xdc, 0x101c528\nMOV             W1, #0x96                                              ; +0xe0, 0x101c52c\nMOV             W2, #0x7D ; '}'                                        ; +0xe4, 0x101c530\nADD             X3, X3, #aCryptoEngineEn_5@PAGEOFF; \"crypto/engine/eng_pkey.c\" ; +0xe8, 0x101c534\nMOV             W4, #0x48 ; 'H'                                        ; +0xec, 0x101c538\nMOV             X19, X5                                                ; +0xf0, 0x101c53c\nBL              ERR_put_error                                          ; +0xf4, 0x101c540\nB               loc_101C4C8                                            ; +0xf8, 0x101c544\nADRP            X3, #aCryptoEngineEn_5@PAGE; \"crypto/engine/eng_pkey.c\" ; +0xfc, 0x101c548\nMOV             W0, #0x26 ; '&'                                        ; +0x100, 0x101c54c\nMOV             W1, #0x96                                              ; +0x104, 0x101c550\nMOV             W2, #0x80                                              ; +0x108, 0x101c554\nADD             X3, X3, #aCryptoEngineEn_5@PAGEOFF; \"crypto/engine/eng_pkey.c\" ; +0x10c, 0x101c558\nMOV             W4, #0x4E ; 'N'                                        ; +0x110, 0x101c55c\nBL              ERR_put_error                                          ; +0x114, 0x101c560\nB               loc_101C4C8                                            ; +0x118, 0x101c564", "xrefs": ["sub_E2DA90 @ 0xe2ec60", "<???> @ 0x100228"], "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"}