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

Disassembly:
sub esp, 0x218
mov eax, dword [0x456130]
xor eax, esp
mov dword [esp + 0x214], eax
mov eax, dword [esp + 0x21c]
push ebx
push ebp
mov ebp, dword [esp + 0x22c]
push esi
push edi
mov edi, dword [eax]
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0x14], eax
mov ecx, dword [edi + 0x17c]
movzx ebx, word [edi + 0x178]
mov esi, dword [edi + 0x38c]
push 0xff
push eax
lea edx, [esp + 0x12d]
push edx
mov dword [esp + 0x28], ebp
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], ecx
mov byte [esp + 0x130], al
call fcn.00432be0
add esp, 0xc
test esi, esi
jne 0x40f14b
test bx, bx
je 0x40f44c
push 0x80
lea eax, [esp + 0x28]
push 0
push eax
call fcn.00432be0
add esp, 0xc
test esi, esi
je 0x40f334
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40f170
sub eax, edx
cmp eax, 0xff
jae 0x40f334
mov edx, dword [0x45606c]
mov eax, edx
lea ebp, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40f190
sub eax, ebp
push eax
push esi
push edx
call fcn.00434472
add esp, 0xc
test eax, eax
jne 0x40f1c0
mov eax, dword [0x45606c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40f1b0
sub eax, edx
add esi, eax
jmp 0x40f2e3
mov edx, dword [str.host_]
mov eax, edx
lea ebp, [eax + 1]
jmp 0x40f1d0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40f1d0
sub eax, ebp
push eax
push esi
push edx
call fcn.00434472
add esp, 0xc
test eax, eax
jne 0x40f2d2
mov eax, dword [str.host_]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40f1f4
sub eax, edx
add esi, eax
cmp dword [esp + 0x1c], 2
mov eax, dword [esp + 0x10]
mov ebp, dword [eax + 0x21c]
jne 0x40f21a
mov dword [eax + 0x21c], 1
lea ecx, [esp + 0x14]
push ecx
push 0
push esi
push eax
call fcn.00403e80
add esp, 0x10
cmp eax, 1
jne 0x40f242
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
push eax
call fcn.00403840
add esp, 8
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x21c], ebp
test eax, eax
je 0x40f320
mov eax, dword [eax]
push 0x100
lea edx, [esp + 0x128]
push edx
push eax
call fcn.00403bf0
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
mov edx, dword [esp + 0x28]
push eax
lea ecx, [esp + 0x134]
push ecx
push edx
push esi
push str.Name__s_family__i_resolved_to__s_family__i_n
push edi
call fcn.0040e940
mov eax, dword [esp + 0x38]
push eax
push edi
call fcn.00404070
mov ebp, dword [esp + 0x48]
add esp, 0x2c
cmp ebp, 2
jne 0x40f354
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x128]
push edx
push ebp
call fcn.00413250
add esp, 0xc
test eax, eax
jle 0x40f354
mov eax, ebp
mov word [esp + 0x24], ax
jmp 0x40f340
push esi
call fcn.00403a30
add esp, 4
test eax, eax
je 0x40f1ff
mov ebp, dword [esp + 0x1c]
push 0x100
lea ecx, [esp + 0x128]
push ecx
push esi
push ebp
call fcn.00403a30
add esp, 0x10
test eax, eax
je 0x40f479
push ebp
lea edx, [esp + 0x128]
push edx
push esi
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push edi
call fcn.0040e940
add esp, 0x14
jmp 0x40f2a2
push esi
push str.Couldnt_bind_to__s
push edi
call fcn.0040e9d0
add esp, 0xc
jmp 0x40f479
cmp ebp, 2
jne 0x40f354
mov ecx, ebp
mov word [esp + 0x24], cx
push ebx
call dword [sym.imp.WS2_32.dll_htons]
mov dword [esp + 0x18], 0x10
mov word [esp + 0x26], ax
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x230]
mov esi, dword [sym.imp.WS2_32.dll_bind]
push edx
lea eax, [esp + 0x28]
push eax
push ecx
call esi
test eax, eax
jns 0x40f3cc
mov ebp, dword [sym.imp.WS2_32.dll_ntohs]
jmp 0x40f380
mov eax, dword [esp + 0x20]
dec eax
mov dword [esp + 0x20], eax
test eax, eax
jle 0x40f450
movzx edx, bx
push edx
push str.Bind_to_local_port__hu_failed__trying_next_n
push edi
call fcn.0040e940
add esp, 0xc
inc ebx
cmp word [esp + 0x24], 2
jne 0x40f3b4
push ebx
call ebp
mov word [esp + 0x26], ax
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x230]
push eax
lea ecx, [esp + 0x28]
push ecx
push edx
call esi
test eax, eax
js 0x40f380
push 0x80
lea eax, [esp + 0xa8]
push 0
push eax
mov dword [esp + 0x2c], 0x80
call fcn.00432be0
mov eax, dword [esp + 0x23c]
add esp, 0xc
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0xa8]
push edx
push eax
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x40f42c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esp + 0x10]
mov esi, eax
push esi
push ecx
mov dword [edi + 0x85c4], esi
call fcn.00412440
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
jmp 0x40f470
movzx edx, bx
push edx
push str.Local_port:__hu_n
push edi
call fcn.0040e940
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov dword [eax + 0x1fc], 1
xor eax, eax
jmp 0x40f47e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esp + 0x10]
mov esi, eax
push esi
push ecx
mov dword [edi + 0x85c4], esi
call fcn.00412440
push eax
push esi
push str.bind_failed_with_errno__d:__s
push edi
call fcn.0040e9d0
add esp, 0x18
mov eax, 0x2d
mov ecx, dword [esp + 0x224]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00431acd
add esp, 0x218
ret