{"type": "func", "start": 16724016, "end": 16724288, "name": "BIO_get_port", "pseudocode": "// \n// BIO_get_port from 0xff3030 to 0xff3140 (272 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x82588\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:46 +0000\n// \n\n__int64 __fastcall BIO_get_port(const char *a1, _WORD *a2)\n{\n  unsigned int v4; // w19\n  _WORD *v6; // x0\n  struct addrinfo *v7; // [xsp+38h] [xbp+38h] BYREF\n\n  v7 = nullptr;\n  if ( a1 )\n  {\n    v4 = 0;\n    if ( (unsigned int)BIO_sock_init() == 1 )\n    {\n      v4 = BIO_lookup(nullptr, a1, 0, 2, 1, &v7);\n      if ( v4 )\n      {\n        if ( (unsigned int)BIO_ADDRINFO_family((__int64)v7) == 2 )\n        {\n          v6 = (_WORD *)BIO_ADDRINFO_address((__int64)v7);\n          *a2 = __rev16(BIO_ADDR_rawport(v6));\n          v4 = 1;\n        }\n        else\n        {\n          v4 = 0;\n          ERR_put_error(32, 107, 141, \"crypto/bio/b_sock.c\", 79);\n        }\n        BIO_ADDRINFO_free(v7);\n      }\n      else\n      {\n        ERR_add_error_data(2, \"host=\", a1);\n      }\n    }\n    return v4;\n  }\n  else\n  {\n    ERR_put_error(32, 107, 113, \"crypto/bio/b_sock.c\", 69);\n    return 0;\n  }\n}", "assembly": "; \n; BIO_get_port from 0xff3030 to 0xff3140 (272 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x82588\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:46 +0000\n; \nSTP             X29, X30, [SP,#var_40]!                                ; +0x0, 0xff3030\nMOV             X29, SP                                                ; +0x4, 0xff3034\nSTP             X19, X20, [SP,#0x40+var_30]                            ; +0x8, 0xff3038\nSTP             X21, X22, [SP,#0x40+var_20]                            ; +0xc, 0xff303c\nSTR             XZR, [X29,#0x40+var_8]                                 ; +0x10, 0xff3040\nMOV             X20, X0                                                ; +0x14, 0xff3044\nMOV             X22, X1                                                ; +0x18, 0xff3048\nCBZ             X0, loc_FF30D8                                         ; +0x1c, 0xff304c\nBL              BIO_sock_init                                          ; +0x20, 0xff3050\nCMP             W0, #1                                                 ; +0x24, 0xff3054\nMOV             W21, W0                                                ; +0x28, 0xff3058\nMOV             W19, #0                                                ; +0x2c, 0xff305c\nB.EQ            loc_FF3078                                             ; +0x30, 0xff3060\nMOV             W0, W19                                                ; +0x34, 0xff3064\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0x38, 0xff3068\nLDP             X21, X22, [SP,#0x40+var_20]                            ; +0x3c, 0xff306c\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0x40, 0xff3070\nRET                                                                    ; +0x44, 0xff3074\nMOV             W2, W19                                                ; +0x48, 0xff3078\nMOV             X0, #0                                                 ; +0x4c, 0xff307c\nMOV             X1, X20                                                ; +0x50, 0xff3080\nMOV             W3, #2                                                 ; +0x54, 0xff3084\nMOV             W4, W21                                                ; +0x58, 0xff3088\nADD             X5, X29, #0x40+var_8                                   ; +0x5c, 0xff308c\nBL              BIO_lookup                                             ; +0x60, 0xff3090\nMOV             W19, W0                                                ; +0x64, 0xff3094\nCBZ             W0, loc_FF310C                                         ; +0x68, 0xff3098\nLDR             X0, [X29,#0x40+var_8]                                  ; +0x6c, 0xff309c\nBL              BIO_ADDRINFO_family                                    ; +0x70, 0xff30a0\nCMP             W0, #2                                                 ; +0x74, 0xff30a4\nB.EQ            loc_FF3124                                             ; +0x78, 0xff30a8\nADRP            X3, #aCryptoBioBSock@PAGE; \"crypto/bio/b_sock.c\"       ; +0x7c, 0xff30ac\nMOV             W0, #0x20 ; ' '                                        ; +0x80, 0xff30b0\nMOV             W1, #0x6B ; 'k'                                        ; +0x84, 0xff30b4\nMOV             W2, #0x8D                                              ; +0x88, 0xff30b8\nADD             X3, X3, #aCryptoBioBSock@PAGEOFF; \"crypto/bio/b_sock.c\" ; +0x8c, 0xff30bc\nMOV             W4, #0x4F ; 'O'                                        ; +0x90, 0xff30c0\nMOV             W19, #0                                                ; +0x94, 0xff30c4\nBL              ERR_put_error                                          ; +0x98, 0xff30c8\nLDR             X0, [X29,#0x40+var_8]                                  ; +0x9c, 0xff30cc\nBL              BIO_ADDRINFO_free                                      ; +0xa0, 0xff30d0\nB               loc_FF3064                                             ; +0xa4, 0xff30d4\nADRP            X3, #aCryptoBioBSock@PAGE; \"crypto/bio/b_sock.c\"       ; +0xa8, 0xff30d8\nMOV             W0, #0x20 ; ' '                                        ; +0xac, 0xff30dc\nMOV             W1, #0x6B ; 'k'                                        ; +0xb0, 0xff30e0\nMOV             W2, #0x71 ; 'q'                                        ; +0xb4, 0xff30e4\nADD             X3, X3, #aCryptoBioBSock@PAGEOFF; \"crypto/bio/b_sock.c\" ; +0xb8, 0xff30e8\nMOV             W4, #0x45 ; 'E'                                        ; +0xbc, 0xff30ec\nMOV             W19, W20                                               ; +0xc0, 0xff30f0\nBL              ERR_put_error                                          ; +0xc4, 0xff30f4\nMOV             W0, W19                                                ; +0xc8, 0xff30f8\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0xcc, 0xff30fc\nLDP             X21, X22, [SP,#0x40+var_20]                            ; +0xd0, 0xff3100\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0xd4, 0xff3104\nRET                                                                    ; +0xd8, 0xff3108\nADRP            X1, #aHost_2@PAGE; \"host=\"                             ; +0xdc, 0xff310c\nMOV             W0, #2                                                 ; +0xe0, 0xff3110\nADD             X1, X1, #aHost_2@PAGEOFF; \"host=\"                      ; +0xe4, 0xff3114\nMOV             X2, X20                                                ; +0xe8, 0xff3118\nBL              ERR_add_error_data                                     ; +0xec, 0xff311c\nB               loc_FF3064                                             ; +0xf0, 0xff3120\nLDR             X0, [X29,#0x40+var_8]                                  ; +0xf4, 0xff3124\nBL              BIO_ADDRINFO_address                                   ; +0xf8, 0xff3128\nBL              BIO_ADDR_rawport                                       ; +0xfc, 0xff312c\nREV16           X0, X0                                                 ; +0x100, 0xff3130\nSTRH            W0, [X22]                                              ; +0x104, 0xff3134\nMOV             W19, W21                                               ; +0x108, 0xff3138\nB               loc_FF30CC                                             ; +0x10c, 0xff313c", "xrefs": ["<???> @ 0x82588"], "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"}