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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a4
mov eax, dword [0x53b070]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x29c], edx
xor ecx, ecx
mov dword [ebp - 0x290], ecx
mov dword [ebp - 0x294], ecx
mov eax, dword [edi + 0xc]
mov esi, dword [edi + 0x540]
movzx ebx, word [edi + 0x190]
mov dword [ebp - 0x2a0], eax
mov eax, dword [edi + 0x194]
mov dword [ebp - 0x298], eax
test esi, esi
jne 0x403d15
test bx, bx
je 0x403fd6
push 0x80
push ecx
lea eax, [ebp - 0x288]
push eax
call fcn.004cd420
add esp, 0xc
test esi, esi
je 0x403eb7
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403d37
sub ecx, edx
cmp ecx, 0xff
jae 0x403eb7
push 0x100
lea eax, [ebp - 0x108]
push 0
push eax
call fcn.004cd420
add esp, 0xc
push 3
push esi
push 0x51900c
call fcn.004d6140
add esp, 0xc
test eax, eax
jne 0x403d90
add esi, 3
push esi
push str.Couldnt_bind_to_interface__s
push edi
call fcn.00416cbd
add esp, 0xc
push 0x2d
pop eax
jmp 0x403fd8
push 5
push esi
push str.host_
call fcn.004d6140
add esp, 0xc
test eax, eax
jne 0x403da7
add esi, 5
cmp dword [ebp + 8], 2
mov eax, dword [ebp - 0x2a0]
mov cl, byte [eax + 0xfc]
mov byte [ebp - 0x289], cl
jne 0x403dc6
mov byte [eax + 0xfc], 1
lea eax, [ebp - 0x294]
mov edx, esi
push eax
push 0
push 0
mov ecx, edi
call fcn.0040984e
add esp, 0xc
cmp eax, 1
jne 0x403df1
push eax
lea edx, [ebp - 0x294]
mov ecx, edi
call fcn.00402e2d
pop ecx
mov eax, dword [ebp - 0x2a0]
mov cl, byte [ebp - 0x289]
mov byte [eax + 0xfc], cl
mov eax, dword [ebp - 0x294]
test eax, eax
je 0x403ea5
mov ecx, dword [eax]
lea edx, [ebp - 0x108]
push 0x100
call fcn.00409314
mov eax, dword [ebp - 0x294]
pop ecx
mov eax, dword [eax]
push dword [eax + 4]
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 8]
push esi
push str.Name__s_family__i_resolved_to__s_family__i
push edi
call fcn.00416c42
mov esi, dword [ebp - 0x294]
add esp, 0x18
mov edx, esi
mov ecx, edi
call fcn.00409a38
mov ecx, dword [esi]
mov eax, dword [ebp + 8]
cmp eax, dword [ecx + 4]
je 0x403e69
xor eax, eax
inc eax
jmp 0x403fd8
push 2
pop esi
cmp eax, esi
jne 0x403ebf
lea edx, [ebp - 0x284]
lea ecx, [ebp - 0x108]
call fcn.0040f750
test eax, eax
jle 0x403ebf
push ebx
mov word [ebp - 0x288], si
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
mov word [ebp - 0x286], ax
pop eax
mov dword [ebp - 0x290], eax
jmp 0x403ec5
push esi
mov byte [edi + 0xd37], 0
push str.Couldnt_bind_to__s
jmp 0x403d7f
push 2
pop esi
cmp dword [ebp + 8], esi
je 0x403e85
mov eax, dword [ebp - 0x290]
push eax
jmp 0x403f0d
mov eax, dword [ebp - 0x298]
dec eax
mov dword [ebp - 0x298], eax
test eax, eax
jle 0x403f91
movzx eax, bx
push eax
push str.Bind_to_local_port__hu_failed__trying_next
push edi
call fcn.00416c42
add esp, 0xc
inc ebx
cmp word [ebp - 0x288], si
jne 0x403f07
push ebx
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [ebp - 0x286], ax
push dword [ebp - 0x290]
lea eax, [ebp - 0x288]
push eax
push dword [ebp - 0x29c]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x403ec8
mov eax, 0x80
push eax
mov dword [ebp - 0x298], eax
lea eax, [ebp - 0x88]
push 0
push eax
call fcn.004cd420
add esp, 0xc
lea eax, [ebp - 0x298]
push eax
lea eax, [ebp - 0x88]
push eax
push dword [ebp - 0x29c]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x403fb7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea edx, [ebp - 0x208]
push ecx
mov ecx, esi
mov dword [edi + 0x958], esi
call fcn.0041b637
pop ecx
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.00416cbd
add esp, 0x10
jmp 0x403d88
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea edx, [ebp - 0x108]
push ecx
mov ecx, esi
mov dword [edi + 0x958], esi
call fcn.0041b637
pop ecx
push eax
push esi
push str.bind_failed_with_errno__d:__s
jmp 0x403f83
movzx eax, bx
push eax
push str.Local_port:__hu
push edi
call fcn.00416c42
mov eax, dword [ebp - 0x2a0]
add esp, 0xc
mov byte [eax + 0x26b], 1
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004ca9dc
leave
ret