{"type": "func", "start": 8621556, "end": 8621636, "name": "CRYPTO_THREAD_lock_new", "pseudocode": "// \n// CRYPTO_THREAD_lock_new from 0x838df4 to 0x838e44 (80 bytes)\n// \n// 30 xrefs:\n// > ssl_cert_new @ 0x790c8c\n// > ssl_cert_dup @ 0x790ee0\n// > SSL_CTX_new @ 0x798934\n// > SSL_new @ 0x79a9d0\n// > SSL_SESSION_new @ 0x79d590\n// > ssl_session_dup @ 0x79d838\n// > asn1_do_lock @ 0x7ca3d8\n// > BIO_new @ 0x7d05c8\n// > sub_7D12E0 @ 0x7d12e4\n// > DH_new_method @ 0x7e05f8\n// > DSA_new_method @ 0x7e1f58\n// > DSO_new @ 0x7e3198\n// > DSO_load @ 0x7e3714\n// > EC_KEY_new_method @ 0x7e9bc4\n// > ec_wNAF_precompute_mult @ 0x7ecbac\n// > sub_7F1BA0 @ 0x7f1c10\n// > do_engine_lock_init_ossl_ @ 0x7f7350\n// > sub_7F9708 @ 0x7f971c\n// > EVP_PKEY_new @ 0x805084\n// > sub_8079D4 @ 0x8079e8\n// > sub_80AB64 @ 0x80ab8c\n// > CRYPTO_secure_malloc_init @ 0x80ecd8\n// > RSA_new_method @ 0x82d91c\n// > UI_new_method @ 0x83b308\n// > sub_83C6C4 @ 0x83c708\n// > X509_STORE_new @ 0x83f770\n// > BN_BLINDING_new @ 0x86ba08\n// > sub_8BC440 @ 0x8bc454\n// > sub_8BC440 @ 0x8bc464\n// > <???> @ 0x5b16c\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\npthread_rwlock_t *CRYPTO_THREAD_lock_new()\n{\n  pthread_rwlock_t *v0; // r0\n  pthread_rwlock_t *v1; // r4\n  bool v2; // zf\n  pthread_rwlock_t *result; // r0\n\n  v0 = (pthread_rwlock_t *)CRYPTO_zalloc(&word_28, (int)\"crypto/threads_pthread.c\", 16);\n  v1 = v0;\n  if ( !v0 )\n    return nullptr;\n  v2 = pthread_rwlock_init(v0, nullptr) == 0;\n  result = v1;\n  if ( !v2 )\n  {\n    CRYPTO_free(v1, (int)\"crypto/threads_pthread.c\", 21);\n    return nullptr;\n  }\n  return result;\n}", "assembly": "; \n; CRYPTO_THREAD_lock_new from 0x838df4 to 0x838e44 (80 bytes)\n; \n; 30 xrefs:\n; > ssl_cert_new @ 0x790c8c\n; > ssl_cert_dup @ 0x790ee0\n; > SSL_CTX_new @ 0x798934\n; > SSL_new @ 0x79a9d0\n; > SSL_SESSION_new @ 0x79d590\n; > ssl_session_dup @ 0x79d838\n; > asn1_do_lock @ 0x7ca3d8\n; > BIO_new @ 0x7d05c8\n; > sub_7D12E0 @ 0x7d12e4\n; > DH_new_method @ 0x7e05f8\n; > DSA_new_method @ 0x7e1f58\n; > DSO_new @ 0x7e3198\n; > DSO_load @ 0x7e3714\n; > EC_KEY_new_method @ 0x7e9bc4\n; > ec_wNAF_precompute_mult @ 0x7ecbac\n; > sub_7F1BA0 @ 0x7f1c10\n; > do_engine_lock_init_ossl_ @ 0x7f7350\n; > sub_7F9708 @ 0x7f971c\n; > EVP_PKEY_new @ 0x805084\n; > sub_8079D4 @ 0x8079e8\n; > sub_80AB64 @ 0x80ab8c\n; > CRYPTO_secure_malloc_init @ 0x80ecd8\n; > RSA_new_method @ 0x82d91c\n; > UI_new_method @ 0x83b308\n; > sub_83C6C4 @ 0x83c708\n; > X509_STORE_new @ 0x83f770\n; > BN_BLINDING_new @ 0x86ba08\n; > sub_8BC440 @ 0x8bc454\n; > sub_8BC440 @ 0x8bc464\n; > <???> @ 0x5b16c\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            {R3-R5,LR}                                             ; +0x0, 0x838df4\nLDR             R5, =(aCryptoThreadsP - 0x838E08); \"crypto/threads_pthread.c\" ; +0x4, 0x838df8\nMOV             R0, #0x28 ; '('                                        ; +0x8, 0x838dfc\nADD             R5, PC, R5; \"crypto/threads_pthread.c\"                 ; +0xc, 0x838e00\nMOV             R1, R5                                                 ; +0x10, 0x838e04\nMOV             R2, #0x10                                              ; +0x14, 0x838e08\nBL              CRYPTO_zalloc                                          ; +0x18, 0x838e0c\nSUBS            R4, R0, #0                                             ; +0x1c, 0x838e10\nBEQ             loc_838E3C                                             ; +0x20, 0x838e14\nMOV             R1, #0; attr                                           ; +0x24, 0x838e18\nBL              pthread_rwlock_init                                    ; +0x28, 0x838e1c\nCMP             R0, #0                                                 ; +0x2c, 0x838e20\nMOV             R0, R4                                                 ; +0x30, 0x838e24\nBNE             loc_838E30                                             ; +0x34, 0x838e28\nPOP             {R3-R5,PC}                                             ; +0x38, 0x838e2c\nMOV             R1, R5                                                 ; +0x3c, 0x838e30\nMOV             R2, #0x15                                              ; +0x40, 0x838e34\nBL              CRYPTO_free                                            ; +0x44, 0x838e38\nMOV             R0, #0                                                 ; +0x48, 0x838e3c\nPOP             {R3-R5,PC}                                             ; +0x4c, 0x838e40", "xrefs": ["ssl_cert_new @ 0x790c8c", "ssl_cert_dup @ 0x790ee0", "SSL_CTX_new @ 0x798934", "SSL_new @ 0x79a9d0", "SSL_SESSION_new @ 0x79d590", "ssl_session_dup @ 0x79d838", "asn1_do_lock @ 0x7ca3d8", "BIO_new @ 0x7d05c8", "sub_7D12E0 @ 0x7d12e4", "DH_new_method @ 0x7e05f8", "DSA_new_method @ 0x7e1f58", "DSO_new @ 0x7e3198", "DSO_load @ 0x7e3714", "EC_KEY_new_method @ 0x7e9bc4", "ec_wNAF_precompute_mult @ 0x7ecbac", "sub_7F1BA0 @ 0x7f1c10", "do_engine_lock_init_ossl_ @ 0x7f7350", "sub_7F9708 @ 0x7f971c", "EVP_PKEY_new @ 0x805084", "sub_8079D4 @ 0x8079e8", "sub_80AB64 @ 0x80ab8c", "CRYPTO_secure_malloc_init @ 0x80ecd8", "RSA_new_method @ 0x82d91c", "UI_new_method @ 0x83b308", "sub_83C6C4 @ 0x83c708", "X509_STORE_new @ 0x83f770", "BN_BLINDING_new @ 0x86ba08", "sub_8BC440 @ 0x8bc454", "sub_8BC440 @ 0x8bc464", "<???> @ 0x5b16c"], "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"}