{"type": "func", "start": 14278892, "end": 14279176, "name": "ENGINE_load_private_key", "pseudocode": "// \n// ENGINE_load_private_key from 0xd9e0ec to 0xd9e208 (284 bytes)\n// \n// 2 xrefs:\n// > sub_BB78D0 @ 0xbb8aa0\n// > <???> @ 0xc4d40\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 __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 0xd9e0ec to 0xd9e208 (284 bytes)\n; \n; 2 xrefs:\n; > sub_BB78D0 @ 0xbb8aa0\n; > <???> @ 0xc4d40\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,#var_40]!                                ; +0x0, 0xd9e0ec\nMOV             X29, SP                                                ; +0x4, 0xd9e0f0\nSTP             X19, X20, [SP,#0x40+var_30]                            ; +0x8, 0xd9e0f4\nMOV             X19, X0                                                ; +0xc, 0xd9e0f8\nCBZ             X0, loc_D9E1A4                                         ; +0x10, 0xd9e0fc\nADRP            X20, #global_engine_lock_ptr@PAGE                      ; +0x14, 0xd9e100\nSTR             X3, [X29,#0x40+var_18]                                 ; +0x18, 0xd9e104\nSTR             X2, [X29,#0x40+var_10]                                 ; +0x1c, 0xd9e108\nSTR             X1, [X29,#0x40+var_8]                                  ; +0x20, 0xd9e10c\nLDR             X20, [X20,#global_engine_lock_ptr@PAGEOFF]; global_engine_lock ; +0x24, 0xd9e110\nLDR             X0, [X20]                                              ; +0x28, 0xd9e114\nBL              CRYPTO_THREAD_write_lock                               ; +0x2c, 0xd9e118\nLDR             W0, [X19,#0xA0]                                        ; +0x30, 0xd9e11c\nLDR             X1, [X29,#0x40+var_8]                                  ; +0x34, 0xd9e120\nLDR             X2, [X29,#0x40+var_10]                                 ; +0x38, 0xd9e124\nLDR             X3, [X29,#0x40+var_18]                                 ; +0x3c, 0xd9e128\nCBZ             W0, loc_D9E178                                         ; +0x40, 0xd9e12c\nLDR             X0, [X20]                                              ; +0x44, 0xd9e130\nSTR             X3, [X29,#0x40+var_18]                                 ; +0x48, 0xd9e134\nSTR             X2, [X29,#0x40+var_10]                                 ; +0x4c, 0xd9e138\nSTR             X1, [X29,#0x40+var_8]                                  ; +0x50, 0xd9e13c\nBL              CRYPTO_THREAD_unlock                                   ; +0x54, 0xd9e140\nLDR             X5, [X19,#0x78]                                        ; +0x58, 0xd9e144\nLDR             X1, [X29,#0x40+var_8]                                  ; +0x5c, 0xd9e148\nLDR             X2, [X29,#0x40+var_10]                                 ; +0x60, 0xd9e14c\nLDR             X3, [X29,#0x40+var_18]                                 ; +0x64, 0xd9e150\nCBZ             X5, loc_D9E1C4                                         ; +0x68, 0xd9e154\nMOV             X0, X19                                                ; +0x6c, 0xd9e158\nBLR             X5                                                     ; +0x70, 0xd9e15c\nMOV             X19, X0                                                ; +0x74, 0xd9e160\nCBZ             X0, loc_D9E1E8                                         ; +0x78, 0xd9e164\nMOV             X0, X19                                                ; +0x7c, 0xd9e168\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0x80, 0xd9e16c\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x84, 0xd9e170\nRET                                                                    ; +0x88, 0xd9e174\nLDR             X0, [X20]                                              ; +0x8c, 0xd9e178\nMOV             X19, #0                                                ; +0x90, 0xd9e17c\nBL              CRYPTO_THREAD_unlock                                   ; +0x94, 0xd9e180\nADRP            X3, #aCryptoEngineEn_5@PAGE; \"crypto/engine/eng_pkey.c\" ; +0x98, 0xd9e184\nMOV             W0, #0x26 ; '&'                                        ; +0x9c, 0xd9e188\nMOV             W1, #0x96                                              ; +0xa0, 0xd9e18c\nMOV             W2, #0x75 ; 'u'                                        ; +0xa4, 0xd9e190\nADD             X3, X3, #aCryptoEngineEn_5@PAGEOFF; \"crypto/engine/eng_pkey.c\" ; +0xa8, 0xd9e194\nMOV             W4, #0x42 ; 'B'                                        ; +0xac, 0xd9e198\nBL              ERR_put_error                                          ; +0xb0, 0xd9e19c\nB               loc_D9E168                                             ; +0xb4, 0xd9e1a0\nADRP            X3, #aCryptoEngineEn_5@PAGE; \"crypto/engine/eng_pkey.c\" ; +0xb8, 0xd9e1a4\nMOV             W0, #0x26 ; '&'                                        ; +0xbc, 0xd9e1a8\nMOV             W1, #0x96                                              ; +0xc0, 0xd9e1ac\nMOV             W2, #0x43 ; 'C'                                        ; +0xc4, 0xd9e1b0\nADD             X3, X3, #aCryptoEngineEn_5@PAGEOFF; \"crypto/engine/eng_pkey.c\" ; +0xc8, 0xd9e1b4\nMOV             W4, #0x3C ; '<'                                        ; +0xcc, 0xd9e1b8\nBL              ERR_put_error                                          ; +0xd0, 0xd9e1bc\nB               loc_D9E168                                             ; +0xd4, 0xd9e1c0\nADRP            X3, #aCryptoEngineEn_5@PAGE; \"crypto/engine/eng_pkey.c\" ; +0xd8, 0xd9e1c4\nMOV             W0, #0x26 ; '&'                                        ; +0xdc, 0xd9e1c8\nMOV             W1, #0x96                                              ; +0xe0, 0xd9e1cc\nMOV             W2, #0x7D ; '}'                                        ; +0xe4, 0xd9e1d0\nADD             X3, X3, #aCryptoEngineEn_5@PAGEOFF; \"crypto/engine/eng_pkey.c\" ; +0xe8, 0xd9e1d4\nMOV             W4, #0x48 ; 'H'                                        ; +0xec, 0xd9e1d8\nMOV             X19, X5                                                ; +0xf0, 0xd9e1dc\nBL              ERR_put_error                                          ; +0xf4, 0xd9e1e0\nB               loc_D9E168                                             ; +0xf8, 0xd9e1e4\nADRP            X3, #aCryptoEngineEn_5@PAGE; \"crypto/engine/eng_pkey.c\" ; +0xfc, 0xd9e1e8\nMOV             W0, #0x26 ; '&'                                        ; +0x100, 0xd9e1ec\nMOV             W1, #0x96                                              ; +0x104, 0xd9e1f0\nMOV             W2, #0x80                                              ; +0x108, 0xd9e1f4\nADD             X3, X3, #aCryptoEngineEn_5@PAGEOFF; \"crypto/engine/eng_pkey.c\" ; +0x10c, 0xd9e1f8\nMOV             W4, #0x4E ; 'N'                                        ; +0x110, 0xd9e1fc\nBL              ERR_put_error                                          ; +0x114, 0xd9e200\nB               loc_D9E168                                             ; +0x118, 0xd9e204", "xrefs": ["sub_BB78D0 @ 0xbb8aa0", "<???> @ 0xc4d40"], "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"}