Function at 0x4a03b0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x290
mov eax, dword [esp + 0x294]
push ebx
push ebp
mov ebp, dword [eax]
xor ebx, ebx
push esi
mov dword [esp + 0x10], ebx
mov esi, dword [ebp + 0x9e4]
mov ecx, dword [ebp + 0x604]
push edi
movzx edi, word [ebp + 0x600]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], ecx
cmp esi, ebx
jne 0x4a03f5
cmp di, bx
je 0x4a0867
push 0x80
lea edx, [esp + 0x24]
push ebx
push edx
call fcn.004d92e0
add esp, 0xc
cmp esi, ebx
je 0x4a07ef
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4a0415
sub eax, edx
cmp eax, 0xff
jae 0x4a07ef
push 0xff
lea eax, [esp + 0xa5]
push ebx
push eax
mov byte [esp + 0xac], bl
call fcn.004d92e0
mov edx, dword [0x54ae88]
mov eax, edx
add esp, 0xc
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4a0451
sub eax, edi
push eax
push esi
push edx
call fcn.004d62ae
add esp, 0xc
test eax, eax
jne 0x4a04e1
mov eax, dword [0x54ae88]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4a0471
sub eax, edx
add esi, eax
mov ebx, 1
mov edx, dword [esp + 0x2a4]
mov eax, dword [edx + 0x2f4]
mov edi, dword [esp + 0x2ac]
push 0x100
lea ecx, [esp + 0xa4]
push ecx
mov ecx, dword [esp + 0x2b8]
push esi
push eax
push ecx
push edi
call fcn.0048fca0
add esp, 0x18
sub eax, 0
je 0x4a0531
dec eax
je 0x4a0521
dec eax
jne 0x4a0554
push edi
lea edx, [esp + 0xa4]
push edx
push esi
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push ebp
call fcn.00499d60
add esp, 0x14
jmp 0x4a0639
mov edx, dword [str.host_]
mov eax, edx
lea edi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4a04f0
sub eax, edi
push eax
push esi
push edx
call fcn.004d62ae
add esp, 0xc
test eax, eax
jne 0x4a0481
mov eax, dword [str.host_]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4a0514
sub eax, edx
add esi, eax
jmp 0x4a055c
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x290
ret
test ebx, ebx
je 0x4a055c
push esi
push str.Couldnt_bind_to_interface__s
push ebp
call fcn.00499e30
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x2d
pop ebx
add esp, 0x290
ret
test ebx, ebx
jne 0x4a07c6
mov eax, dword [esp + 0x2a4]
mov edi, dword [eax + 0x5f8]
mov eax, dword [esp + 0x2ac]
cmp eax, 2
jne 0x4a0588
mov ebx, dword [esp + 0x2a4]
mov dword [ebx + 0x5f8], 1
jmp 0x4a05a9
cmp eax, 0x17
jne 0x4a05a2
mov ecx, dword [esp + 0x2a4]
mov dword [ecx + 0x5f8], 2
mov ebx, ecx
jmp 0x4a05a9
mov ebx, dword [esp + 0x2a4]
lea edx, [esp + 0x14]
push edx
push 0
push 0
push esi
push ebx
call fcn.004c26d0
add esp, 0x14
cmp eax, 1
jne 0x4a05cf
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.00490190
add esp, 8
mov eax, dword [esp + 0x14]
mov dword [ebx + 0x5f8], edi
test eax, eax
je 0x4a07c6
mov edx, dword [eax]
push 0x100
lea ecx, [esp + 0xa4]
push ecx
push edx
call fcn.004c1ce0
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
mov edi, dword [esp + 0x2b8]
push edx
lea eax, [esp + 0xb0]
push eax
push edi
push esi
push str.Name__s_family__i_resolved_to__s_family__i_n
push ebp
call fcn.00499d60
mov ecx, dword [esp + 0x38]
push ecx
push ebp
call fcn.004c2980
mov edx, dword [esp + 0x40]
mov eax, dword [edx]
add esp, 0x2c
cmp edi, dword [eax + 4]
jne 0x4a0521
cmp edi, 0x17
jne 0x4a077b
lea ecx, [esp + 0xa0]
push 0x25
push ecx
call fcn.004d61f0
mov esi, eax
add esp, 8
test esi, esi
je 0x4a065e
mov byte [esi], 0
inc esi
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0xa4]
push eax
push 0x17
call fcn.004c8770
add esp, 0xc
test eax, eax
jle 0x4a06a4
mov edx, dword [esp + 0x18]
mov ecx, 0x17
push edx
mov word [esp + 0x24], cx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x22], ax
test esi, esi
je 0x4a06a4
push esi
call fcn.004d8326
add esp, 4
mov dword [esp + 0x38], eax
mov dword [esp + 0x10], 0x1c
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x2a8]
push eax
lea ecx, [esp + 0x24]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x4a0713
mov ebx, dword [sym.imp.WS2_32.dll_ntohs]
mov eax, dword [esp + 0x1c]
dec eax
mov dword [esp + 0x1c], eax
test eax, eax
jle 0x4a0874
movzx edx, di
push edx
push str.Bind_to_local_port__hu_failed__trying_next_n
push ebp
call fcn.00499d60
add esp, 0xc
inc edi
push edi
call ebx
mov word [esp + 0x22], ax
mov eax, dword [esp + 0x10]
push eax
lea ecx, [esp + 0x24]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x4a06d2
push 0x80
lea edx, [esp + 0xa4]
push 0
push edx
mov dword [esp + 0x28], 0x80
call fcn.004d92e0
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0xa4]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x4a0844
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0x100
lea edx, [esp + 0x1a4]
mov esi, eax
push edx
push esi
mov dword [ebp + 0xec4], esi
call fcn.0048f4e0
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
jmp 0x4a089c
cmp edi, 2
jne 0x4a06ac
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0xa4]
push ecx
push edi
call fcn.004c8770
add esp, 0xc
test eax, eax
jle 0x4a06ac
mov eax, dword [esp + 0x18]
mov edx, edi
push eax
mov word [esp + 0x24], dx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x22], ax
mov dword [esp + 0x10], 0x10
jmp 0x4a06ac
push esi
push str.Couldnt_bind_to__s
push ebp
mov dword [ebp + 0x1230], 0
call fcn.00499e30
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x2d
pop ebx
add esp, 0x290
ret
mov eax, dword [esp + 0x2ac]
cmp eax, 0x17
jne 0x4a081b
mov ecx, eax
push edi
mov word [esp + 0x24], cx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x22], ax
mov dword [esp + 0x10], 0x1c
jmp 0x4a06b0
cmp eax, 2
jne 0x4a06b0
mov edx, eax
push edi
mov word [esp + 0x24], dx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x22], ax
mov dword [esp + 0x10], 0x10
jmp 0x4a06b0
movzx eax, di
push eax
push str.Local_port:__hu_n
push ebp
call fcn.00499d60
mov ecx, dword [esp + 0x2b0]
add esp, 0xc
mov dword [ecx + 0x59c], 1
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x290
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0x100
lea edx, [esp + 0x1a4]
mov esi, eax
push edx
push esi
mov dword [ebp + 0xec4], esi
call fcn.0048f4e0
push eax
push esi
push str.bind_failed_with_errno__d:__s
push ebp
call fcn.00499e30
add esp, 0x1c
pop edi
pop esi
pop ebp
mov eax, 0x2d
pop ebx
add esp, 0x290
ret