{"type": "func", "start": 10369616, "end": 10369884, "name": "BIO_get_port", "pseudocode": "// \n// BIO_get_port from 0x9e3a50 to 0x9e3b5c (268 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x7908c\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:22 +0000\n// \n\nint __fastcall BIO_get_port(const char *a1, _WORD *a2)\n{\n  int v4; // r5\n  int v6; // r0\n  _WORD *v7; // r0\n  unsigned int v8; // r0\n  struct addrinfo *v9; // [sp+Ch] [bp-4h] BYREF\n\n  v9 = nullptr;\n  if ( a1 )\n  {\n    if ( BIO_sock_init() != 1 )\n      return 0;\n    v6 = BIO_lookup(nullptr, a1, 0, 2u, 1, &v9);\n    v4 = v6;\n    if ( v6 )\n    {\n      if ( BIO_ADDRINFO_family((int)v9) == 2 )\n      {\n        v7 = (_WORD *)BIO_ADDRINFO_address((int)v9);\n        v8 = BIO_ADDR_rawport(v7);\n        v4 = 1;\n        *a2 = (v8 >> 8) | ((_WORD)v8 << 8);\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(v9);\n    }\n    else\n    {\n      ERR_add_error_data(2, \"host=\", a1);\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 0x9e3a50 to 0x9e3b5c (268 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x7908c\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:22 +0000\n; \nPUSH            {R4-R8,LR}                                             ; +0x0, 0x9e3a50\nMOV             R4, #0                                                 ; +0x4, 0x9e3a54\nSUB             SP, SP, #0x10                                          ; +0x8, 0x9e3a58\nSUBS            R7, R0, #0                                             ; +0xc, 0x9e3a5c\nSTR             R4, [SP,#0x10+var_4]                                   ; +0x10, 0x9e3a60\nBEQ             loc_9E3AF4                                             ; +0x14, 0x9e3a64\nMOV             R8, R1                                                 ; +0x18, 0x9e3a68\nBL              BIO_sock_init                                          ; +0x1c, 0x9e3a6c\nCMP             R0, #1                                                 ; +0x20, 0x9e3a70\nMOV             R6, R0                                                 ; +0x24, 0x9e3a74\nMOVNE           R5, R4                                                 ; +0x28, 0x9e3a78\nBEQ             loc_9E3A8C                                             ; +0x2c, 0x9e3a7c\nMOV             R0, R5                                                 ; +0x30, 0x9e3a80\nADD             SP, SP, #0x10                                          ; +0x34, 0x9e3a84\nPOP             {R4-R8,PC}                                             ; +0x38, 0x9e3a88\nADD             R3, SP, #0x10+var_4                                    ; +0x3c, 0x9e3a8c\nSTR             R0, [SP,#0x10+var_10]; int                             ; +0x40, 0x9e3a90\nSTR             R3, [SP,#0x10+var_C]; struct addrinfo **               ; +0x44, 0x9e3a94\nMOV             R0, R4; int                                            ; +0x48, 0x9e3a98\nMOV             R1, R7; int                                            ; +0x4c, 0x9e3a9c\nMOV             R2, R4; int                                            ; +0x50, 0x9e3aa0\nMOV             R3, #2; int                                            ; +0x54, 0x9e3aa4\nBL              BIO_lookup                                             ; +0x58, 0x9e3aa8\nSUBS            R5, R0, #0                                             ; +0x5c, 0x9e3aac\nBEQ             loc_9E3B24                                             ; +0x60, 0x9e3ab0\nLDR             R0, [SP,#0x10+var_4]                                   ; +0x64, 0x9e3ab4\nBL              BIO_ADDRINFO_family                                    ; +0x68, 0x9e3ab8\nCMP             R0, #2                                                 ; +0x6c, 0x9e3abc\nBEQ             loc_9E3B3C                                             ; +0x70, 0x9e3ac0\nMOV             R3, #0x4F ; 'O'                                        ; +0x74, 0x9e3ac4\nSTR             R3, [SP,#0x10+var_10]                                  ; +0x78, 0x9e3ac8\nLDR             R3, =(aCryptoBioBSock - 0x9E3AE4); \"crypto/bio/b_sock.c\" ; +0x7c, 0x9e3acc\nMOV             R0, #0x20 ; ' '                                        ; +0x80, 0x9e3ad0\nMOV             R1, #0x6B ; 'k'                                        ; +0x84, 0x9e3ad4\nMOV             R2, #0x8D                                              ; +0x88, 0x9e3ad8\nADD             R3, PC, R3; \"crypto/bio/b_sock.c\"                      ; +0x8c, 0x9e3adc\nMOV             R5, R4                                                 ; +0x90, 0x9e3ae0\nBL              ERR_put_error                                          ; +0x94, 0x9e3ae4\nLDR             R0, [SP,#0x10+var_4]                                   ; +0x98, 0x9e3ae8\nBL              BIO_ADDRINFO_free                                      ; +0x9c, 0x9e3aec\nB               loc_9E3A80                                             ; +0xa0, 0x9e3af0\nMOV             R3, #0x45 ; 'E'                                        ; +0xa4, 0x9e3af4\nSTR             R3, [SP,#0x10+var_10]                                  ; +0xa8, 0x9e3af8\nLDR             R3, =(aCryptoBioBSock - 0x9E3B14); \"crypto/bio/b_sock.c\" ; +0xac, 0x9e3afc\nMOV             R0, #0x20 ; ' '                                        ; +0xb0, 0x9e3b00\nMOV             R1, #0x6B ; 'k'                                        ; +0xb4, 0x9e3b04\nMOV             R2, #0x71 ; 'q'                                        ; +0xb8, 0x9e3b08\nADD             R3, PC, R3; \"crypto/bio/b_sock.c\"                      ; +0xbc, 0x9e3b0c\nBL              ERR_put_error                                          ; +0xc0, 0x9e3b10\nMOV             R5, R7                                                 ; +0xc4, 0x9e3b14\nMOV             R0, R5                                                 ; +0xc8, 0x9e3b18\nADD             SP, SP, #0x10                                          ; +0xcc, 0x9e3b1c\nPOP             {R4-R8,PC}                                             ; +0xd0, 0x9e3b20\nLDR             R1, =(aHost_2 - 0x9E3B38); \"host=\"                     ; +0xd4, 0x9e3b24\nMOV             R2, R7                                                 ; +0xd8, 0x9e3b28\nMOV             R0, #2                                                 ; +0xdc, 0x9e3b2c\nADD             R1, PC, R1; \"host=\"                                    ; +0xe0, 0x9e3b30\nBL              ERR_add_error_data                                     ; +0xe4, 0x9e3b34\nB               loc_9E3A80                                             ; +0xe8, 0x9e3b38\nLDR             R0, [SP,#0x10+var_4]                                   ; +0xec, 0x9e3b3c\nBL              BIO_ADDRINFO_address                                   ; +0xf0, 0x9e3b40\nBL              BIO_ADDR_rawport                                       ; +0xf4, 0x9e3b44\nMOV             R5, R6                                                 ; +0xf8, 0x9e3b48\nMOV             R3, R0,LSR#8                                           ; +0xfc, 0x9e3b4c\nORR             R0, R3, R0,LSL#8                                       ; +0x100, 0x9e3b50\nSTRH            R0, [R8]                                               ; +0x104, 0x9e3b54\nB               loc_9E3AE8                                             ; +0x108, 0x9e3b58", "xrefs": ["<???> @ 0x7908c"], "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"}