{"type": "func", "start": 10535980, "end": 10536148, "name": "ENGINE_get_first", "pseudocode": "// \n// ENGINE_get_first from 0xa0c42c to 0xa0c4d4 (168 bytes)\n// \n// 12 xrefs:\n// > sub_854AF8 @ 0x854afa\n// > ENGINE_register_all_complete @ 0xa0bc64\n// > ENGINE_register_all_pkey_asn1_meths @ 0xa0d300\n// > ENGINE_register_all_ciphers @ 0xa0d738\n// > ENGINE_register_all_DH @ 0xa0d8fc\n// > ENGINE_register_all_digests @ 0xa0da4c\n// > ENGINE_register_all_DSA @ 0xa0dc10\n// > ENGINE_register_all_EC @ 0xa0dd40\n// > ENGINE_register_all_pkey_meths @ 0xa0de90\n// > ENGINE_register_all_RAND @ 0xa0e0d8\n// > ENGINE_register_all_RSA @ 0xa0e208\n// > <???> @ 0x6845c\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 12:07:43 +0000\n// \n\nint ENGINE_get_first()\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_D34110;\n    if ( dword_D34110 )\n      ++*(_DWORD *)(dword_D34110 + 80);\n    CRYPTO_THREAD_unlock(v0);\n    return v1;\n  }\n  else\n  {\n    ERR_put_error(38, 195, 65, \"crypto/engine/eng_list.c\", 140);\n    return 0;\n  }\n}", "assembly": "; \n; ENGINE_get_first from 0xa0c42c to 0xa0c4d4 (168 bytes)\n; \n; 12 xrefs:\n; > sub_854AF8 @ 0x854afa\n; > ENGINE_register_all_complete @ 0xa0bc64\n; > ENGINE_register_all_pkey_asn1_meths @ 0xa0d300\n; > ENGINE_register_all_ciphers @ 0xa0d738\n; > ENGINE_register_all_DH @ 0xa0d8fc\n; > ENGINE_register_all_digests @ 0xa0da4c\n; > ENGINE_register_all_DSA @ 0xa0dc10\n; > ENGINE_register_all_EC @ 0xa0dd40\n; > ENGINE_register_all_pkey_meths @ 0xa0de90\n; > ENGINE_register_all_RAND @ 0xa0e0d8\n; > ENGINE_register_all_RSA @ 0xa0e208\n; > <???> @ 0x6845c\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 12:07:43 +0000\n; \nPUSH            {R4,R5,LR}                                             ; +0x0, 0xa0c42c\nLDR             R4, =(_GLOBAL_OFFSET_TABLE_ - 0xA0C444)                ; +0x4, 0xa0c430\nLDR             R2, =(engine_lock_init_ptr - 0xD1D93C)                 ; +0x8, 0xa0c434\nLDR             R3, =(do_engine_lock_init_ossl__ptr - 0xD1D93C)        ; +0xc, 0xa0c438\nADD             R4, PC, R4; _GLOBAL_OFFSET_TABLE_                      ; +0x10, 0xa0c43c\nSUB             SP, SP, #0xC                                           ; +0x14, 0xa0c440\nLDR             R0, [R4,R2]; engine_lock_init                          ; +0x18, 0xa0c444\nLDR             R1, [R4,R3]; do_engine_lock_init_ossl_                 ; +0x1c, 0xa0c448\nBL              CRYPTO_THREAD_run_once                                 ; +0x20, 0xa0c44c\nCMP             R0, #0                                                 ; +0x24, 0xa0c450\nBEQ             loc_A0C4A8                                             ; +0x28, 0xa0c454\nLDR             R3, =(do_engine_lock_init_ossl_ret__ptr - 0xD1D93C)    ; +0x2c, 0xa0c458\nLDR             R3, [R4,R3]; do_engine_lock_init_ossl_ret_             ; +0x30, 0xa0c45c\nLDR             R3, [R3]                                               ; +0x34, 0xa0c460\nCMP             R3, #0                                                 ; +0x38, 0xa0c464\nBEQ             loc_A0C4A8                                             ; +0x3c, 0xa0c468\nLDR             R3, =(global_engine_lock_ptr - 0xD1D93C)               ; +0x40, 0xa0c46c\nLDR             R5, [R4,R3]; global_engine_lock                        ; +0x44, 0xa0c470\nLDR             R0, [R5]                                               ; +0x48, 0xa0c474\nBL              CRYPTO_THREAD_write_lock                               ; +0x4c, 0xa0c478\nLDR             R3, =(dword_D34110 - 0xA0C48C)                         ; +0x50, 0xa0c47c\nLDR             R0, [R5]                                               ; +0x54, 0xa0c480\nLDR             R4, [PC,R3]; dword_D34110                              ; +0x58, 0xa0c484\nCMP             R4, #0                                                 ; +0x5c, 0xa0c488\nLDRNE           R3, [R4,#0x50]                                         ; +0x60, 0xa0c48c\nADDNE           R3, R3, #1                                             ; +0x64, 0xa0c490\nSTRNE           R3, [R4,#0x50]                                         ; +0x68, 0xa0c494\nBL              CRYPTO_THREAD_unlock                                   ; +0x6c, 0xa0c498\nMOV             R0, R4                                                 ; +0x70, 0xa0c49c\nADD             SP, SP, #0xC                                           ; +0x74, 0xa0c4a0\nPOP             {R4,R5,PC}                                             ; +0x78, 0xa0c4a4\nMOV             R3, #0x8C                                              ; +0x7c, 0xa0c4a8\nSTR             R3, [SP,#0xC+var_C]                                    ; +0x80, 0xa0c4ac\nLDR             R3, =(aCryptoEngineEn_4 - 0xA0C4C8); \"crypto/engine/eng_list.c\" ; +0x84, 0xa0c4b0\nMOV             R0, #0x26 ; '&'                                        ; +0x88, 0xa0c4b4\nMOV             R1, #0xC3                                              ; +0x8c, 0xa0c4b8\nMOV             R2, #0x41 ; 'A'                                        ; +0x90, 0xa0c4bc\nADD             R3, PC, R3; \"crypto/engine/eng_list.c\"                 ; +0x94, 0xa0c4c0\nBL              ERR_put_error                                          ; +0x98, 0xa0c4c4\nMOV             R0, #0                                                 ; +0x9c, 0xa0c4c8\nADD             SP, SP, #0xC                                           ; +0xa0, 0xa0c4cc\nPOP             {R4,R5,PC}                                             ; +0xa4, 0xa0c4d0", "xrefs": ["sub_854AF8 @ 0x854afa", "ENGINE_register_all_complete @ 0xa0bc64", "ENGINE_register_all_pkey_asn1_meths @ 0xa0d300", "ENGINE_register_all_ciphers @ 0xa0d738", "ENGINE_register_all_DH @ 0xa0d8fc", "ENGINE_register_all_digests @ 0xa0da4c", "ENGINE_register_all_DSA @ 0xa0dc10", "ENGINE_register_all_EC @ 0xa0dd40", "ENGINE_register_all_pkey_meths @ 0xa0de90", "ENGINE_register_all_RAND @ 0xa0e0d8", "ENGINE_register_all_RSA @ 0xa0e208", "<???> @ 0x6845c"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}