{"type": "func", "start": 16713184, "end": 16713748, "name": "BIO_lookup", "pseudocode": "// \n// BIO_lookup from 0xff05e0 to 0xff0814 (564 bytes)\n// \n// 7 xrefs:\n// > BIO_get_host_ip @ 0xff2f78\n// > BIO_get_port @ 0xff3090\n// > BIO_get_accept_socket @ 0xff31f4\n// > sub_FF571C @ 0xff57fc\n// > sub_FF5F74 @ 0xff6094\n// > sub_FF6400 @ 0xff6520\n// > <???> @ 0x9c0b8\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\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 13:15:45 +0000\n// \n\n__int64 __fastcall BIO_lookup(char *a1, const char *a2, int a3, int a4, int a5, struct addrinfo **a6)\n{\n  bool v10; // zf\n  __int64 result; // x0\n  size_t v12; // x24\n  struct addrinfo *v13; // x0\n  _WORD *v14; // x0\n  struct addrinfo *v15; // x19\n  struct sockaddr *v16; // x0\n  int v17; // w0\n  int v18; // w19\n  unsigned int *v19; // x0\n  const char *v20; // x0\n  __int64 v21; // x2\n  struct addrinfo v24; // [xsp+50h] [xbp+50h] BYREF\n\n  if ( a4 < 0 )\n    goto LABEL_14;\n  if ( a4 > 2 )\n  {\n    if ( a4 == 10 )\n      goto LABEL_4;\nLABEL_14:\n    ERR_put_error(32, 135, 131, \"crypto/bio/b_addr.c\", 649);\n    return 0;\n  }\n  if ( a4 != 1 )\n  {\nLABEL_4:\n    v10 = (unsigned int)BIO_sock_init() == 1;\n    result = 0;\n    if ( v10 )\n    {\n      memset(&v24.ai_protocol, 0, 36);\n      v24.ai_family = a4;\n      v24.ai_socktype = a5;\n      v24.ai_flags = a3 == 1;\n      v17 = getaddrinfo(a1, a2, &v24, a6);\n      v18 = v17;\n      if ( v17 )\n      {\n        if ( v17 == 11 )\n        {\n          v19 = (unsigned int *)__errno();\n          ERR_put_error(2, 12, *v19, \"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          v20 = gai_strerror(v18);\n          ERR_add_error_data(1, v20, v21);\n        }\n        return 0;\n      }\n      else\n      {\n        return 1;\n      }\n    }\n    return result;\n  }\n  v12 = strlen(a1);\n  if ( !a6 )\n    OPENSSL_die((int)\"assertion failed: bai != NULL\");\n  v13 = (struct addrinfo *)CRYPTO_zalloc(48, \"crypto/bio/b_addr.c\", 570);\n  *a6 = v13;\n  if ( !v13 )\n  {\nLABEL_13:\n    ERR_put_error(32, 135, 65, \"crypto/bio/b_addr.c\", 658);\n    return 0;\n  }\n  v13->ai_socktype = a5;\n  v13->ai_family = 1;\n  v13->ai_protocol = 0;\n  v14 = BIO_ADDR_new();\n  if ( v14 )\n  {\n    BIO_ADDR_rawmake((__int64)v14, 1, a1, v12, 0);\n    v15 = *a6;\n    BIO_ADDR_sockaddr_noconst();\n    v15->ai_addr = v16;\n  }\n  result = 1;\n  (*a6)->ai_next = nullptr;\n  if ( !(*a6)->ai_addr )\n  {\n    BIO_ADDRINFO_free(*a6);\n    *a6 = nullptr;\n    goto LABEL_13;\n  }\n  return result;\n}", "assembly": "; \n; BIO_lookup from 0xff05e0 to 0xff0814 (564 bytes)\n; \n; 7 xrefs:\n; > BIO_get_host_ip @ 0xff2f78\n; > BIO_get_port @ 0xff3090\n; > BIO_get_accept_socket @ 0xff31f4\n; > sub_FF571C @ 0xff57fc\n; > sub_FF5F74 @ 0xff6094\n; > sub_FF6400 @ 0xff6520\n; > <???> @ 0x9c0b8\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\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 13:15:45 +0000\n; \nSTP             X29, X30, [SP,#var_80]!                                ; +0x0, 0xff05e0\nMOV             X29, SP                                                ; +0x4, 0xff05e4\nSTP             X19, X20, [SP,#0x80+var_70]                            ; +0x8, 0xff05e8\nSTP             X21, X22, [SP,#0x80+var_60]                            ; +0xc, 0xff05ec\nSTP             X23, X24, [SP,#0x80+var_50]                            ; +0x10, 0xff05f0\nMOV             W19, W3                                                ; +0x14, 0xff05f4\nMOV             X22, X0                                                ; +0x18, 0xff05f8\nMOV             W21, W4                                                ; +0x1c, 0xff05fc\nMOV             X20, X5                                                ; +0x20, 0xff0600\nTBNZ            W19, #0x1F, loc_FF06FC                                 ; +0x24, 0xff0604\nCMP             W19, #2                                                ; +0x28, 0xff0608\nB.LE            loc_FF064C                                             ; +0x2c, 0xff060c\nCMP             W19, #0xA                                              ; +0x30, 0xff0610\nB.NE            loc_FF06FC                                             ; +0x34, 0xff0614\nSTR             X2, [X29,#0x80+var_40]                                 ; +0x38, 0xff0618\nSTR             X1, [X29,#0x80+var_38]                                 ; +0x3c, 0xff061c\nBL              BIO_sock_init                                          ; +0x40, 0xff0620\nCMP             W0, #1                                                 ; +0x44, 0xff0624\nLDR             X1, [X29,#0x80+var_38]; char *                         ; +0x48, 0xff0628\nMOV             W0, #0; char *                                         ; +0x4c, 0xff062c\nLDR             X2, [X29,#0x80+var_40]                                 ; +0x50, 0xff0630\nB.EQ            loc_FF0730                                             ; +0x54, 0xff0634\nLDP             X19, X20, [SP,#0x80+var_70]                            ; +0x58, 0xff0638\nLDP             X21, X22, [SP,#0x80+var_60]                            ; +0x5c, 0xff063c\nLDP             X23, X24, [SP,#0x80+var_50]                            ; +0x60, 0xff0640\nLDP             X29, X30, [SP+0x80+var_80],#0x80                       ; +0x64, 0xff0644\nRET                                                                    ; +0x68, 0xff0648\nCMP             W19, #1                                                ; +0x6c, 0xff064c\nB.NE            loc_FF0618                                             ; +0x70, 0xff0650\nBL              .strlen                                                ; +0x74, 0xff0654\nMOV             X24, X0                                                ; +0x78, 0xff0658\nCBZ             X20, loc_FF07FC                                        ; +0x7c, 0xff065c\nADRP            X23, #aCryptoBioBAddr@PAGE; \"crypto/bio/b_addr.c\"      ; +0x80, 0xff0660\nMOV             X0, #0x30 ; '0'                                        ; +0x84, 0xff0664\nADD             X1, X23, #aCryptoBioBAddr@PAGEOFF; \"crypto/bio/b_addr.c\" ; +0x88, 0xff0668\nMOV             W2, #0x23A                                             ; +0x8c, 0xff066c\nBL              CRYPTO_zalloc                                          ; +0x90, 0xff0670\nSTR             X0, [X20]                                              ; +0x94, 0xff0674\nCBZ             X0, loc_FF06DC                                         ; +0x98, 0xff0678\nSTR             W21, [X0,#8]                                           ; +0x9c, 0xff067c\nSTR             W19, [X0,#4]                                           ; +0xa0, 0xff0680\nSTR             WZR, [X0,#0xC]                                         ; +0xa4, 0xff0684\nBL              BIO_ADDR_new                                           ; +0xa8, 0xff0688\nMOV             X21, X0                                                ; +0xac, 0xff068c\nCBZ             X0, loc_FF06B8                                         ; +0xb0, 0xff0690\nMOV             W1, W19; int                                           ; +0xb4, 0xff0694\nMOV             X2, X22; char *                                        ; +0xb8, 0xff0698\nMOV             X3, X24                                                ; +0xbc, 0xff069c\nMOV             W4, #0                                                 ; +0xc0, 0xff06a0\nBL              BIO_ADDR_rawmake                                       ; +0xc4, 0xff06a4\nLDR             X19, [X20]                                             ; +0xc8, 0xff06a8\nMOV             X0, X21                                                ; +0xcc, 0xff06ac\nBL              BIO_ADDR_sockaddr_noconst                              ; +0xd0, 0xff06b0\nSTR             X0, [X19,#0x20]                                        ; +0xd4, 0xff06b4\nLDR             X1, [X20]                                              ; +0xd8, 0xff06b8\nMOV             W0, #1                                                 ; +0xdc, 0xff06bc\nSTR             XZR, [X1,#0x28]                                        ; +0xe0, 0xff06c0\nLDR             X1, [X20]                                              ; +0xe4, 0xff06c4\nLDR             X19, [X1,#0x20]                                        ; +0xe8, 0xff06c8\nCBNZ            X19, loc_FF0638                                        ; +0xec, 0xff06cc\nMOV             X0, X1                                                 ; +0xf0, 0xff06d0\nBL              BIO_ADDRINFO_free                                      ; +0xf4, 0xff06d4\nSTR             X19, [X20]                                             ; +0xf8, 0xff06d8\nMOV             W0, #0x20 ; ' '                                        ; +0xfc, 0xff06dc\nMOV             W1, #0x87                                              ; +0x100, 0xff06e0\nMOV             W2, #0x41 ; 'A'                                        ; +0x104, 0xff06e4\nADD             X3, X23, #aCryptoBioBAddr@PAGEOFF; \"crypto/bio/b_addr.c\" ; +0x108, 0xff06e8\nMOV             W4, #0x292                                             ; +0x10c, 0xff06ec\nBL              ERR_put_error                                          ; +0x110, 0xff06f0\nMOV             W0, #0                                                 ; +0x114, 0xff06f4\nB               loc_FF0638                                             ; +0x118, 0xff06f8\nADRP            X3, #aCryptoBioBAddr@PAGE; \"crypto/bio/b_addr.c\"       ; +0x11c, 0xff06fc\nMOV             W0, #0x20 ; ' '                                        ; +0x120, 0xff0700\nMOV             W1, #0x87                                              ; +0x124, 0xff0704\nMOV             W2, #0x83                                              ; +0x128, 0xff0708\nADD             X3, X3, #aCryptoBioBAddr@PAGEOFF; \"crypto/bio/b_addr.c\" ; +0x12c, 0xff070c\nMOV             W4, #0x289                                             ; +0x130, 0xff0710\nBL              ERR_put_error                                          ; +0x134, 0xff0714\nMOV             W0, #0                                                 ; +0x138, 0xff0718\nLDP             X19, X20, [SP,#0x80+var_70]                            ; +0x13c, 0xff071c\nLDP             X21, X22, [SP,#0x80+var_60]                            ; +0x140, 0xff0720\nLDP             X23, X24, [SP,#0x80+var_50]                            ; +0x144, 0xff0724\nLDP             X29, X30, [SP+0x80+var_80],#0x80                       ; +0x148, 0xff0728\nRET                                                                    ; +0x14c, 0xff072c\nSTP             XZR, XZR, [X29,#0x80+var_30]                           ; +0x150, 0xff0730\nSTP             XZR, XZR, [X29,#0x80+var_30.ai_addrlen]                ; +0x154, 0xff0734\nSTP             XZR, XZR, [X29,#0x80+var_30.ai_addr]                   ; +0x158, 0xff0738\nSTR             W19, [X29,#0x80+var_30.ai_family]; The file descriptor is available for read operations. ; +0x15c, 0xff073c\nCMP             W2, #1                                                 ; +0x160, 0xff0740\nSTR             W21, [X29,#0x80+var_30.ai_socktype]                    ; +0x164, 0xff0744\nB.EQ            loc_FF07F4                                             ; +0x168, 0xff0748\nMOV             X0, X22; char *                                        ; +0x16c, 0xff074c\nADD             X2, X29, #0x80+var_30; struct addrinfo *               ; +0x170, 0xff0750\nMOV             X3, X20; struct addrinfo **                            ; +0x174, 0xff0754\nBL              .getaddrinfo                                           ; +0x178, 0xff0758\nMOV             W19, W0                                                ; +0x17c, 0xff075c\nCBZ             W0, loc_FF07EC                                         ; +0x180, 0xff0760\nCMP             W0, #0xB                                               ; +0x184, 0xff0764\nB.NE            loc_FF07B4                                             ; +0x188, 0xff0768\nBL              .__errno                                               ; +0x18c, 0xff076c\nMOV             X2, X0                                                 ; +0x190, 0xff0770\nADRP            X19, #aCryptoBioBAddr@PAGE; \"crypto/bio/b_addr.c\"      ; +0x194, 0xff0774\nMOV             W0, #2                                                 ; +0x198, 0xff0778\nADD             X19, X19, #aCryptoBioBAddr@PAGEOFF; \"crypto/bio/b_addr.c\" ; +0x19c, 0xff077c\nMOV             W1, #0xC                                               ; +0x1a0, 0xff0780\nLDR             W2, [X2]                                               ; +0x1a4, 0xff0784\nMOV             X3, X19                                                ; +0x1a8, 0xff0788\nMOV             W4, #0x2AC                                             ; +0x1ac, 0xff078c\nBL              ERR_put_error                                          ; +0x1b0, 0xff0790\nMOV             W0, #0x20 ; ' '                                        ; +0x1b4, 0xff0794\nMOV             W1, #0x87                                              ; +0x1b8, 0xff0798\nMOV             W2, #2                                                 ; +0x1bc, 0xff079c\nMOV             X3, X19                                                ; +0x1c0, 0xff07a0\nMOV             W4, #0x2AD                                             ; +0x1c4, 0xff07a4\nBL              ERR_put_error                                          ; +0x1c8, 0xff07a8\nMOV             W0, #0                                                 ; +0x1cc, 0xff07ac\nB               loc_FF0638                                             ; +0x1d0, 0xff07b0\nADRP            X3, #aCryptoBioBAddr@PAGE; \"crypto/bio/b_addr.c\"       ; +0x1d4, 0xff07b4\nMOV             W1, #0x87                                              ; +0x1d8, 0xff07b8\nMOV             W2, #2                                                 ; +0x1dc, 0xff07bc\nADD             X3, X3, #aCryptoBioBAddr@PAGEOFF; \"crypto/bio/b_addr.c\" ; +0x1e0, 0xff07c0\nMOV             W4, #0x2B4                                             ; +0x1e4, 0xff07c4\nMOV             W0, #0x20 ; ' '                                        ; +0x1e8, 0xff07c8\nBL              ERR_put_error                                          ; +0x1ec, 0xff07cc\nMOV             W0, W19; int                                           ; +0x1f0, 0xff07d0\nBL              .gai_strerror                                          ; +0x1f4, 0xff07d4\nMOV             X1, X0                                                 ; +0x1f8, 0xff07d8\nMOV             W0, #1                                                 ; +0x1fc, 0xff07dc\nBL              ERR_add_error_data                                     ; +0x200, 0xff07e0\nMOV             W0, #0                                                 ; +0x204, 0xff07e4\nB               loc_FF0638                                             ; +0x208, 0xff07e8\nMOV             W0, #1                                                 ; +0x20c, 0xff07ec\nB               loc_FF0638                                             ; +0x210, 0xff07f0\nSTR             W2, [X29,#0x80+var_30]                                 ; +0x214, 0xff07f4\nB               loc_FF074C                                             ; +0x218, 0xff07f8\nADRP            X0, #aAssertionFaile_29@PAGE; \"assertion failed: bai != NULL\" ; +0x21c, 0xff07fc\nADRP            X1, #aCryptoBioBAddr@PAGE; \"crypto/bio/b_addr.c\"       ; +0x220, 0xff0800\nADD             X0, X0, #aAssertionFaile_29@PAGEOFF; \"assertion failed: bai != NULL\" ; +0x224, 0xff0804\nADD             X1, X1, #aCryptoBioBAddr@PAGEOFF; \"crypto/bio/b_addr.c\" ; +0x228, 0xff0808\nMOV             W2, #0x238                                             ; +0x22c, 0xff080c\nBL              OPENSSL_die                                            ; +0x230, 0xff0810", "xrefs": ["BIO_get_host_ip @ 0xff2f78", "BIO_get_port @ 0xff3090", "BIO_get_accept_socket @ 0xff31f4", "sub_FF571C @ 0xff57fc", "sub_FF5F74 @ 0xff6094", "sub_FF6400 @ 0xff6520", "<???> @ 0x9c0b8"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "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"}