{"type": "func", "start": 8176212, "end": 8176812, "name": "BIO_lookup", "pseudocode": "// \n// BIO_lookup from 0x7cc254 to 0x7cc4ac (600 bytes)\n// \n// 7 xrefs:\n// > BIO_get_host_ip @ 0x7ced84\n// > BIO_get_port @ 0x7ceea8\n// > BIO_get_accept_socket @ 0x7cf01c\n// > sub_7D14BC @ 0x7d15b8\n// > sub_7D1D44 @ 0x7d1eac\n// > sub_7D2244 @ 0x7d23b4\n// > <???> @ 0x5f48c\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 BIO_lookup(const char *a1, const char *a2, int a3, unsigned int a4, int a5, struct addrinfo **a6)\n{\n  size_t v9; // r7\n  struct addrinfo *v10; // r0\n  _WORD *v11; // r0\n  struct addrinfo *v12; // r4\n  struct sockaddr *v13; // r0\n  int v14; // r0\n  int v15; // r4\n  _DWORD *v16; // r0\n  const char *v17; // r0\n  int v18; // r2\n  struct addrinfo v21; // [sp+10h] [bp-20h] BYREF\n\n  if ( a4 > 0xA || ((1 << a4) & 0x407) == 0 )\n  {\n    ERR_put_error(32, 135, 131, \"crypto/bio/b_addr.c\", 649);\n    return 0;\n  }\n  if ( a4 == 1 )\n  {\n    v9 = strlen(a1);\n    if ( !a6 )\n      OPENSSL_die(\"assertion failed: bai != NULL\", \"crypto/bio/b_addr.c\", 568);\n    v10 = (struct addrinfo *)CRYPTO_zalloc(32, \"crypto/bio/b_addr.c\", 570);\n    *a6 = v10;\n    if ( v10 )\n    {\n      v10->ai_family = 1;\n      v10->ai_socktype = a5;\n      v10->ai_protocol = 0;\n      v11 = BIO_ADDR_new();\n      if ( v11 )\n      {\n        BIO_ADDR_rawmake(v11, 1, (int)a1, v9, 0);\n        v12 = *a6;\n        BIO_ADDR_sockaddr_noconst();\n        v12->ai_addr = v13;\n      }\n      (*a6)->ai_next = nullptr;\n      if ( (*a6)->ai_addr )\n        return 1;\n      BIO_ADDRINFO_free(*a6);\n      *a6 = nullptr;\n    }\n    ERR_put_error(32, 135, 65, \"crypto/bio/b_addr.c\", 658);\n    return 0;\n  }\n  if ( BIO_sock_init() != 1 )\n    return 0;\n  v21.ai_socktype = a5;\n  v21.ai_flags = a3 == 1;\n  memset(&v21.ai_protocol, 0, 20);\n  v21.ai_family = a4;\n  v14 = getaddrinfo(a1, a2, &v21, a6);\n  v15 = v14;\n  if ( !v14 )\n    return 1;\n  if ( v14 == 11 )\n  {\n    v16 = (_DWORD *)_errno();\n    ERR_put_error(2, 12, *v16, \"crypto/bio/b_addr.c\", 684);\n    ERR_put_error(32, 135, 2, \"crypto/bio/b_addr.c\", 685);\n  }\n  else\n  {\n    ERR_put_error(32, 135, 2, \"crypto/bio/b_addr.c\", 692);\n    v17 = gai_strerror(v15);\n    ERR_add_error_data(1, v17, v18);\n  }\n  return 0;\n}", "assembly": "; \n; BIO_lookup from 0x7cc254 to 0x7cc4ac (600 bytes)\n; \n; 7 xrefs:\n; > BIO_get_host_ip @ 0x7ced84\n; > BIO_get_port @ 0x7ceea8\n; > BIO_get_accept_socket @ 0x7cf01c\n; > sub_7D14BC @ 0x7d15b8\n; > sub_7D1D44 @ 0x7d1eac\n; > sub_7D2244 @ 0x7d23b4\n; > <???> @ 0x5f48c\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\nCMP             R3, #0xA                                               ; +0x0, 0x7cc254\nPUSH            {R4-R8,LR}                                             ; +0x4, 0x7cc258\nMOV             R4, R3                                                 ; +0x8, 0x7cc25c\nSUB             SP, SP, #0x30                                          ; +0xc, 0x7cc260\nBHI             loc_7CC280                                             ; +0x10, 0x7cc264\nMOV             R12, #1                                                ; +0x14, 0x7cc268\nMOV             R12, R12,LSL R3                                        ; +0x18, 0x7cc26c\nLDR             R3, =0x407                                             ; +0x1c, 0x7cc270\nAND             R3, R3, R12                                            ; +0x20, 0x7cc274\nCMP             R3, #0                                                 ; +0x24, 0x7cc278\nBNE             loc_7CC2AC                                             ; +0x28, 0x7cc27c\nLDR             R3, =0x289                                             ; +0x2c, 0x7cc280\nSTR             R3, [SP,#0x30+var_30]                                  ; +0x30, 0x7cc284\nLDR             R3, =(aCryptoBioBAddr - 0x7CC2A0); \"crypto/bio/b_addr.c\" ; +0x34, 0x7cc288\nMOV             R0, #0x20 ; ' '                                        ; +0x38, 0x7cc28c\nMOV             R1, #0x87                                              ; +0x3c, 0x7cc290\nMOV             R2, #0x83                                              ; +0x40, 0x7cc294\nADD             R3, PC, R3; \"crypto/bio/b_addr.c\"                      ; +0x44, 0x7cc298\nBL              ERR_put_error                                          ; +0x48, 0x7cc29c\nMOV             R0, #0                                                 ; +0x4c, 0x7cc2a0\nADD             SP, SP, #0x30 ; '0'                                    ; +0x50, 0x7cc2a4\nPOP             {R4-R8,PC}                                             ; +0x54, 0x7cc2a8\nCMP             R4, #1                                                 ; +0x58, 0x7cc2ac\nMOV             R5, R0                                                 ; +0x5c, 0x7cc2b0\nBEQ             loc_7CC2E0                                             ; +0x60, 0x7cc2b4\nSTR             R2, [SP,#0x30+var_24]                                  ; +0x64, 0x7cc2b8\nSTR             R1, [SP,#0x30+var_28]                                  ; +0x68, 0x7cc2bc\nBL              BIO_sock_init                                          ; +0x6c, 0x7cc2c0\nLDR             R1, [SP,#0x30+var_28]; char *                          ; +0x70, 0x7cc2c4\nLDR             R2, [SP,#0x30+var_24]                                  ; +0x74, 0x7cc2c8\nCMP             R0, #1                                                 ; +0x78, 0x7cc2cc\nBEQ             loc_7CC38C                                             ; +0x7c, 0x7cc2d0\nMOV             R0, #0; char *                                         ; +0x80, 0x7cc2d4\nADD             SP, SP, #0x30 ; '0'                                    ; +0x84, 0x7cc2d8\nPOP             {R4-R8,PC}                                             ; +0x88, 0x7cc2dc\nBL              strlen                                                 ; +0x8c, 0x7cc2e0\nLDR             R3, [SP,#0x30+arg_4]                                   ; +0x90, 0x7cc2e4\nCMP             R3, #0                                                 ; +0x94, 0x7cc2e8\nMOV             R7, R0                                                 ; +0x98, 0x7cc2ec\nBEQ             loc_7CC494                                             ; +0x9c, 0x7cc2f0\nLDR             R1, =(aCryptoBioBAddr - 0x7CC304); \"crypto/bio/b_addr.c\" ; +0xa0, 0x7cc2f4\nMOV             R0, #0x20 ; ' '                                        ; +0xa4, 0x7cc2f8\nADD             R1, PC, R1; \"crypto/bio/b_addr.c\"                      ; +0xa8, 0x7cc2fc\nLDR             R2, =0x23A                                             ; +0xac, 0x7cc300\nBL              CRYPTO_zalloc                                          ; +0xb0, 0x7cc304\nLDR             R3, [SP,#0x30+arg_4]                                   ; +0xb4, 0x7cc308\nCMP             R0, #0                                                 ; +0xb8, 0x7cc30c\nSTR             R0, [R3]                                               ; +0xbc, 0x7cc310\nBEQ             loc_7CC434                                             ; +0xc0, 0x7cc314\nLDR             R3, [SP,#0x30+arg_0]                                   ; +0xc4, 0x7cc318\nMOV             R6, #0                                                 ; +0xc8, 0x7cc31c\nSTR             R4, [R0,#4]                                            ; +0xcc, 0x7cc320\nSTR             R3, [R0,#8]                                            ; +0xd0, 0x7cc324\nSTR             R6, [R0,#0xC]                                          ; +0xd4, 0x7cc328\nBL              BIO_ADDR_new                                           ; +0xd8, 0x7cc32c\nSUBS            R8, R0, #0                                             ; +0xdc, 0x7cc330\nBEQ             loc_7CC360                                             ; +0xe0, 0x7cc334\nMOV             R1, R4                                                 ; +0xe4, 0x7cc338\nMOV             R2, R5                                                 ; +0xe8, 0x7cc33c\nMOV             R3, R7                                                 ; +0xec, 0x7cc340\nSTR             R6, [SP,#0x30+var_30]                                  ; +0xf0, 0x7cc344\nBL              BIO_ADDR_rawmake                                       ; +0xf4, 0x7cc348\nLDR             R3, [SP,#0x30+arg_4]                                   ; +0xf8, 0x7cc34c\nMOV             R0, R8                                                 ; +0xfc, 0x7cc350\nLDR             R4, [R3]                                               ; +0x100, 0x7cc354\nBL              BIO_ADDR_sockaddr_noconst                              ; +0x104, 0x7cc358\nSTR             R0, [R4,#0x18]                                         ; +0x108, 0x7cc35c\nLDR             R3, [SP,#0x30+arg_4]                                   ; +0x10c, 0x7cc360\nMOV             R2, #0                                                 ; +0x110, 0x7cc364\nLDR             R3, [R3]                                               ; +0x114, 0x7cc368\nSTR             R2, [R3,#0x1C]                                         ; +0x118, 0x7cc36c\nLDR             R3, [SP,#0x30+arg_4]                                   ; +0x11c, 0x7cc370\nLDR             R0, [R3]                                               ; +0x120, 0x7cc374\nLDR             R4, [R0,#0x18]                                         ; +0x124, 0x7cc378\nCMP             R4, R2                                                 ; +0x128, 0x7cc37c\nBEQ             loc_7CC428                                             ; +0x12c, 0x7cc380\nMOV             R0, #1                                                 ; +0x130, 0x7cc384\nB               loc_7CC2A4                                             ; +0x134, 0x7cc388\nMOV             R3, #0                                                 ; +0x138, 0x7cc38c\nCMP             R2, #1                                                 ; +0x13c, 0x7cc390\nLDR             R0, [SP,#0x30+arg_0]                                   ; +0x140, 0x7cc394\nSTR             R3, [SP,#0x30+var_20]                                  ; +0x144, 0x7cc398\nSTR             R0, [SP,#0x30+var_20.ai_socktype]                      ; +0x148, 0x7cc39c\nSTREQ           R2, [SP,#0x30+var_20]                                  ; +0x14c, 0x7cc3a0\nSTR             R3, [SP,#0x30+var_20.ai_protocol]                      ; +0x150, 0x7cc3a4\nSTR             R3, [SP,#0x30+var_20.ai_addrlen]                       ; +0x154, 0x7cc3a8\nSTR             R3, [SP,#0x30+var_20.ai_canonname]                     ; +0x158, 0x7cc3ac\nSTR             R3, [SP,#0x30+var_20.ai_addr]                          ; +0x15c, 0x7cc3b0\nSTR             R3, [SP,#0x30+var_20.ai_next]                          ; +0x160, 0x7cc3b4\nMOV             R0, R5; char *                                         ; +0x164, 0x7cc3b8\nADD             R2, SP, #0x30+var_20; struct addrinfo *                ; +0x168, 0x7cc3bc\nLDR             R3, [SP,#0x30+arg_4]; struct addrinfo **               ; +0x16c, 0x7cc3c0\nSTR             R4, [SP,#0x30+var_20.ai_family]                        ; +0x170, 0x7cc3c4\nBL              getaddrinfo                                            ; +0x174, 0x7cc3c8\nSUBS            R4, R0, #0                                             ; +0x178, 0x7cc3cc\nBEQ             loc_7CC384                                             ; +0x17c, 0x7cc3d0\nCMP             R4, #0xB                                               ; +0x180, 0x7cc3d4\nBNE             loc_7CC458                                             ; +0x184, 0x7cc3d8\nBL              __errno                                                ; +0x188, 0x7cc3dc\nLDR             R4, =(aCryptoBioBAddr - 0x7CC3F0); \"crypto/bio/b_addr.c\" ; +0x18c, 0x7cc3e0\nMOV             R1, #0x2AC                                             ; +0x190, 0x7cc3e4\nADD             R4, PC, R4; \"crypto/bio/b_addr.c\"                      ; +0x194, 0x7cc3e8\nMOV             R3, R4                                                 ; +0x198, 0x7cc3ec\nLDR             R2, [R0]                                               ; +0x19c, 0x7cc3f0\nSTR             R1, [SP,#0x30+var_30]                                  ; +0x1a0, 0x7cc3f4\nMOV             R0, #2                                                 ; +0x1a4, 0x7cc3f8\nMOV             R1, #0xC                                               ; +0x1a8, 0x7cc3fc\nBL              ERR_put_error                                          ; +0x1ac, 0x7cc400\nLDR             R2, =0x2AD                                             ; +0x1b0, 0x7cc404\nSTR             R2, [SP,#0x30+var_30]                                  ; +0x1b4, 0x7cc408\nMOV             R0, #0x20 ; ' '                                        ; +0x1b8, 0x7cc40c\nMOV             R3, R4                                                 ; +0x1bc, 0x7cc410\nMOV             R1, #0x87                                              ; +0x1c0, 0x7cc414\nMOV             R2, #2                                                 ; +0x1c4, 0x7cc418\nBL              ERR_put_error                                          ; +0x1c8, 0x7cc41c\nMOV             R0, #0                                                 ; +0x1cc, 0x7cc420\nB               loc_7CC2A4                                             ; +0x1d0, 0x7cc424\nBL              BIO_ADDRINFO_free                                      ; +0x1d4, 0x7cc428\nLDR             R3, [SP,#0x30+arg_4]                                   ; +0x1d8, 0x7cc42c\nSTR             R4, [R3]                                               ; +0x1dc, 0x7cc430\nLDR             R3, =0x292                                             ; +0x1e0, 0x7cc434\nSTR             R3, [SP,#0x30+var_30]                                  ; +0x1e4, 0x7cc438\nLDR             R3, =(aCryptoBioBAddr - 0x7CC454); \"crypto/bio/b_addr.c\" ; +0x1e8, 0x7cc43c\nMOV             R0, #0x20 ; ' '                                        ; +0x1ec, 0x7cc440\nMOV             R1, #0x87                                              ; +0x1f0, 0x7cc444\nMOV             R2, #0x41 ; 'A'                                        ; +0x1f4, 0x7cc448\nADD             R3, PC, R3; \"crypto/bio/b_addr.c\"                      ; +0x1f8, 0x7cc44c\nBL              ERR_put_error                                          ; +0x1fc, 0x7cc450\nB               loc_7CC2D4                                             ; +0x200, 0x7cc454\nMOV             R3, #0x2B4                                             ; +0x204, 0x7cc458\nSTR             R3, [SP,#0x30+var_30]                                  ; +0x208, 0x7cc45c\nLDR             R3, =(aCryptoBioBAddr - 0x7CC474); \"crypto/bio/b_addr.c\" ; +0x20c, 0x7cc460\nMOV             R1, #0x87                                              ; +0x210, 0x7cc464\nMOV             R2, #2                                                 ; +0x214, 0x7cc468\nADD             R3, PC, R3; \"crypto/bio/b_addr.c\"                      ; +0x218, 0x7cc46c\nMOV             R0, #0x20 ; ' '                                        ; +0x21c, 0x7cc470\nBL              ERR_put_error                                          ; +0x220, 0x7cc474\nMOV             R0, R4; int                                            ; +0x224, 0x7cc478\nBL              gai_strerror                                           ; +0x228, 0x7cc47c\nMOV             R1, R0                                                 ; +0x22c, 0x7cc480\nMOV             R0, #1                                                 ; +0x230, 0x7cc484\nBL              ERR_add_error_data                                     ; +0x234, 0x7cc488\nMOV             R0, #0                                                 ; +0x238, 0x7cc48c\nB               loc_7CC2A4                                             ; +0x23c, 0x7cc490\nLDR             R0, =(aAssertionFaile_28 - 0x7CC4A4); \"assertion failed: bai != NULL\" ; +0x240, 0x7cc494\nLDR             R1, =(aCryptoBioBAddr - 0x7CC4A8); \"crypto/bio/b_addr.c\" ; +0x244, 0x7cc498\nADD             R0, PC, R0; \"assertion failed: bai != NULL\"            ; +0x248, 0x7cc49c\nADD             R1, PC, R1; \"crypto/bio/b_addr.c\"                      ; +0x24c, 0x7cc4a0\nMOV             R2, #0x238                                             ; +0x250, 0x7cc4a4\nBL              OPENSSL_die                                            ; +0x254, 0x7cc4a8", "xrefs": ["BIO_get_host_ip @ 0x7ced84", "BIO_get_port @ 0x7ceea8", "BIO_get_accept_socket @ 0x7cf01c", "sub_7D14BC @ 0x7d15b8", "sub_7D1D44 @ 0x7d1eac", "sub_7D2244 @ 0x7d23b4", "<???> @ 0x5f48c"], "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"}