{"type": "func", "start": 8356720, "end": 8357000, "name": "ENGINE_load_public_key", "pseudocode": "// \n// ENGINE_load_public_key from 0x7f8370 to 0x7f8488 (280 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x6259c\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\nint __fastcall ENGINE_load_public_key(int a1, int a2, int a3, int a4)\n{\n  int (__fastcall *v8)(int, int, int, int); // r4\n  int result; // r0\n\n  if ( a1 )\n  {\n    CRYPTO_THREAD_write_lock(global_engine_lock);\n    if ( *(_DWORD *)(a1 + 84) )\n    {\n      CRYPTO_THREAD_unlock(global_engine_lock);\n      v8 = *(int (__fastcall **)(int, int, int, int))(a1 + 64);\n      if ( v8 )\n      {\n        result = v8(a1, a2, a3, a4);\n        if ( !result )\n        {\n          ERR_put_error(38, 151, 129, \"crypto/engine/eng_pkey.c\", 108);\n          return 0;\n        }\n      }\n      else\n      {\n        ERR_put_error(38, 151, 125, \"crypto/engine/eng_pkey.c\", 102);\n        return 0;\n      }\n    }\n    else\n    {\n      CRYPTO_THREAD_unlock(global_engine_lock);\n      ERR_put_error(38, 151, 117, \"crypto/engine/eng_pkey.c\", 97);\n      return 0;\n    }\n  }\n  else\n  {\n    ERR_put_error(38, 151, 67, \"crypto/engine/eng_pkey.c\", 91);\n    return 0;\n  }\n  return result;\n}", "assembly": "; \n; ENGINE_load_public_key from 0x7f8370 to 0x7f8488 (280 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x6259c\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\nPUSH            {R4-R9,LR}                                             ; +0x0, 0x7f8370\nSUBS            R6, R0, #0                                             ; +0x4, 0x7f8374\nSUB             SP, SP, #0xC                                           ; +0x8, 0x7f8378\nBEQ             loc_7F8410                                             ; +0xc, 0x7f837c\nLDR             R5, =(global_engine_lock_ptr - 0x7F8390)               ; +0x10, 0x7f8380\nMOV             R9, R1                                                 ; +0x14, 0x7f8384\nLDR             R5, [PC,R5]; global_engine_lock                        ; +0x18, 0x7f8388\nMOV             R8, R2                                                 ; +0x1c, 0x7f838c\nLDR             R0, [R5]                                               ; +0x20, 0x7f8390\nMOV             R7, R3                                                 ; +0x24, 0x7f8394\nBL              CRYPTO_THREAD_write_lock                               ; +0x28, 0x7f8398\nLDR             R4, [R6,#0x54]                                         ; +0x2c, 0x7f839c\nLDR             R0, [R5]                                               ; +0x30, 0x7f83a0\nCMP             R4, #0                                                 ; +0x34, 0x7f83a4\nBEQ             loc_7F83E4                                             ; +0x38, 0x7f83a8\nBL              CRYPTO_THREAD_unlock                                   ; +0x3c, 0x7f83ac\nLDR             R4, [R6,#0x40]                                         ; +0x40, 0x7f83b0\nCMP             R4, #0                                                 ; +0x44, 0x7f83b4\nBEQ             loc_7F8438                                             ; +0x48, 0x7f83b8\nMOV             R0, R6                                                 ; +0x4c, 0x7f83bc\nMOV             R1, R9                                                 ; +0x50, 0x7f83c0\nMOV             R2, R8                                                 ; +0x54, 0x7f83c4\nMOV             R3, R7                                                 ; +0x58, 0x7f83c8\nBLX             R4                                                     ; +0x5c, 0x7f83cc\nSUBS            R4, R0, #0                                             ; +0x60, 0x7f83d0\nMOVNE           R0, R4                                                 ; +0x64, 0x7f83d4\nBEQ             loc_7F8460                                             ; +0x68, 0x7f83d8\nADD             SP, SP, #0xC                                           ; +0x6c, 0x7f83dc\nPOP             {R4-R9,PC}                                             ; +0x70, 0x7f83e0\nBL              CRYPTO_THREAD_unlock                                   ; +0x74, 0x7f83e4\nMOV             R3, #0x61 ; 'a'                                        ; +0x78, 0x7f83e8\nSTR             R3, [SP,#0xC+var_C]                                    ; +0x7c, 0x7f83ec\nLDR             R3, =(aCryptoEngineEn_5 - 0x7F8408); \"crypto/engine/eng_pkey.c\" ; +0x80, 0x7f83f0\nMOV             R0, #0x26 ; '&'                                        ; +0x84, 0x7f83f4\nMOV             R1, #0x97                                              ; +0x88, 0x7f83f8\nMOV             R2, #0x75 ; 'u'                                        ; +0x8c, 0x7f83fc\nADD             R3, PC, R3; \"crypto/engine/eng_pkey.c\"                 ; +0x90, 0x7f8400\nBL              ERR_put_error                                          ; +0x94, 0x7f8404\nMOV             R0, R4                                                 ; +0x98, 0x7f8408\nB               loc_7F83DC                                             ; +0x9c, 0x7f840c\nMOV             R3, #0x5B ; '['                                        ; +0xa0, 0x7f8410\nSTR             R3, [SP,#0xC+var_C]                                    ; +0xa4, 0x7f8414\nLDR             R3, =(aCryptoEngineEn_5 - 0x7F8430); \"crypto/engine/eng_pkey.c\" ; +0xa8, 0x7f8418\nMOV             R0, #0x26 ; '&'                                        ; +0xac, 0x7f841c\nMOV             R1, #0x97                                              ; +0xb0, 0x7f8420\nMOV             R2, #0x43 ; 'C'                                        ; +0xb4, 0x7f8424\nADD             R3, PC, R3; \"crypto/engine/eng_pkey.c\"                 ; +0xb8, 0x7f8428\nBL              ERR_put_error                                          ; +0xbc, 0x7f842c\nMOV             R0, R6                                                 ; +0xc0, 0x7f8430\nB               loc_7F83DC                                             ; +0xc4, 0x7f8434\nMOV             R3, #0x66 ; 'f'                                        ; +0xc8, 0x7f8438\nSTR             R3, [SP,#0xC+var_C]                                    ; +0xcc, 0x7f843c\nLDR             R3, =(aCryptoEngineEn_5 - 0x7F8458); \"crypto/engine/eng_pkey.c\" ; +0xd0, 0x7f8440\nMOV             R0, #0x26 ; '&'                                        ; +0xd4, 0x7f8444\nMOV             R1, #0x97                                              ; +0xd8, 0x7f8448\nMOV             R2, #0x7D ; '}'                                        ; +0xdc, 0x7f844c\nADD             R3, PC, R3; \"crypto/engine/eng_pkey.c\"                 ; +0xe0, 0x7f8450\nBL              ERR_put_error                                          ; +0xe4, 0x7f8454\nMOV             R0, R4                                                 ; +0xe8, 0x7f8458\nB               loc_7F83DC                                             ; +0xec, 0x7f845c\nMOV             R3, #0x6C ; 'l'                                        ; +0xf0, 0x7f8460\nSTR             R3, [SP,#0xC+var_C]                                    ; +0xf4, 0x7f8464\nLDR             R3, =(aCryptoEngineEn_5 - 0x7F8480); \"crypto/engine/eng_pkey.c\" ; +0xf8, 0x7f8468\nMOV             R0, #0x26 ; '&'                                        ; +0xfc, 0x7f846c\nMOV             R1, #0x97                                              ; +0x100, 0x7f8470\nMOV             R2, #0x81                                              ; +0x104, 0x7f8474\nADD             R3, PC, R3; \"crypto/engine/eng_pkey.c\"                 ; +0x108, 0x7f8478\nBL              ERR_put_error                                          ; +0x10c, 0x7f847c\nMOV             R0, R4                                                 ; +0x110, 0x7f8480\nB               loc_7F83DC                                             ; +0x114, 0x7f8484", "xrefs": ["<???> @ 0x6259c"], "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"}