{"type": "func", "start": 8354032, "end": 8354204, "name": "ENGINE_get_last", "pseudocode": "// \n// ENGINE_get_last from 0x7f78f0 to 0x7f799c (172 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x624fc\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 ENGINE_get_last()\n{\n  int v0; // r0\n  int v1; // r4\n\n  if ( CRYPTO_THREAD_run_once(&engine_lock_init, do_engine_lock_init_ossl_) && do_engine_lock_init_ossl_ret_ )\n  {\n    CRYPTO_THREAD_write_lock(global_engine_lock);\n    v0 = global_engine_lock;\n    v1 = dword_AD2E88;\n    if ( dword_AD2E88 )\n      ++*(_DWORD *)(dword_AD2E88 + 80);\n    CRYPTO_THREAD_unlock(v0);\n    return v1;\n  }\n  else\n  {\n    ERR_put_error(38, 196, 65, \"crypto/engine/eng_list.c\", 159);\n    return 0;\n  }\n}", "assembly": "; \n; ENGINE_get_last from 0x7f78f0 to 0x7f799c (172 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x624fc\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,R5,LR}                                             ; +0x0, 0x7f78f0\nLDR             R4, =(_GLOBAL_OFFSET_TABLE_ - 0x7F7908)                ; +0x4, 0x7f78f4\nLDR             R2, =(engine_lock_init_ptr - 0xAB8990)                 ; +0x8, 0x7f78f8\nLDR             R3, =(do_engine_lock_init_ossl__ptr - 0xAB8990)        ; +0xc, 0x7f78fc\nADD             R4, PC, R4; _GLOBAL_OFFSET_TABLE_                      ; +0x10, 0x7f7900\nSUB             SP, SP, #0xC                                           ; +0x14, 0x7f7904\nLDR             R0, [R4,R2]; engine_lock_init                          ; +0x18, 0x7f7908\nLDR             R1, [R4,R3]; do_engine_lock_init_ossl_                 ; +0x1c, 0x7f790c\nBL              CRYPTO_THREAD_run_once                                 ; +0x20, 0x7f7910\nCMP             R0, #0                                                 ; +0x24, 0x7f7914\nBEQ             loc_7F7970                                             ; +0x28, 0x7f7918\nLDR             R3, =(do_engine_lock_init_ossl_ret__ptr - 0xAB8990)    ; +0x2c, 0x7f791c\nLDR             R3, [R4,R3]; do_engine_lock_init_ossl_ret_             ; +0x30, 0x7f7920\nLDR             R3, [R3]                                               ; +0x34, 0x7f7924\nCMP             R3, #0                                                 ; +0x38, 0x7f7928\nBEQ             loc_7F7970                                             ; +0x3c, 0x7f792c\nLDR             R3, =(global_engine_lock_ptr - 0xAB8990)               ; +0x40, 0x7f7930\nLDR             R5, [R4,R3]; global_engine_lock                        ; +0x44, 0x7f7934\nLDR             R0, [R5]                                               ; +0x48, 0x7f7938\nBL              CRYPTO_THREAD_write_lock                               ; +0x4c, 0x7f793c\nLDR             R3, =(dword_AD2E84 - 0x7F7950)                         ; +0x50, 0x7f7940\nLDR             R0, [R5]                                               ; +0x54, 0x7f7944\nADD             R3, PC, R3; dword_AD2E84                               ; +0x58, 0x7f7948\nLDR             R4, [R3,#(dword_AD2E88 - 0xAD2E84)]                    ; +0x5c, 0x7f794c\nCMP             R4, #0                                                 ; +0x60, 0x7f7950\nLDRNE           R3, [R4,#0x50]                                         ; +0x64, 0x7f7954\nADDNE           R3, R3, #1                                             ; +0x68, 0x7f7958\nSTRNE           R3, [R4,#0x50]                                         ; +0x6c, 0x7f795c\nBL              CRYPTO_THREAD_unlock                                   ; +0x70, 0x7f7960\nMOV             R0, R4                                                 ; +0x74, 0x7f7964\nADD             SP, SP, #0xC                                           ; +0x78, 0x7f7968\nPOP             {R4,R5,PC}                                             ; +0x7c, 0x7f796c\nMOV             R3, #0x9F                                              ; +0x80, 0x7f7970\nSTR             R3, [SP,#0xC+var_C]                                    ; +0x84, 0x7f7974\nLDR             R3, =(aCryptoEngineEn_4 - 0x7F7990); \"crypto/engine/eng_list.c\" ; +0x88, 0x7f7978\nMOV             R0, #0x26 ; '&'                                        ; +0x8c, 0x7f797c\nMOV             R1, #0xC4                                              ; +0x90, 0x7f7980\nMOV             R2, #0x41 ; 'A'                                        ; +0x94, 0x7f7984\nADD             R3, PC, R3; \"crypto/engine/eng_list.c\"                 ; +0x98, 0x7f7988\nBL              ERR_put_error                                          ; +0x9c, 0x7f798c\nMOV             R0, #0                                                 ; +0xa0, 0x7f7990\nADD             SP, SP, #0xC                                           ; +0xa4, 0x7f7994\nPOP             {R4,R5,PC}                                             ; +0xa8, 0x7f7998", "xrefs": ["<???> @ 0x624fc"], "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"}