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

Disassembly:
sub esp, 0x290
mov eax, dword [esp + 0x294]
push ebx
xor edx, edx
push ebp
mov ebx, dword [eax]
push esi
mov dword [esp + 0xc], edx
push edi
mov esi, dword [ebx + 0x99c]
mov ecx, dword [ebx + 0x5dc]
mov bp, word [ebx + 0x5d8]
cmp esi, edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], ecx
jne 0x413aba
cmp bp, dx
jne 0x413aba
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x290
ret
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0x20]
cmp esi, edx
rep stosd dword es:[edi], eax
je 0x413d3b
mov edi, esi
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0xff
jae 0x413d3b
mov al, byte [0xb8a6a4]
mov ecx, 0x3f
mov byte [esp + 0xa0], al
xor eax, eax
lea edi, [esp + 0xa1]
mov dword [esp + 0x14], edx
rep stosd dword es:[edi], eax
mov edx, dword [0xb7e348]
or ecx, 0xffffffff
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push esi
push edx
call fcn.00b3ff90
add esp, 0xc
test eax, eax
jne 0x413bb0
mov edi, dword [0xb7e348]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x14], 1
add esi, ecx
mov edi, dword [esp + 0x2a4]
mov eax, dword [esp + 0x2b0]
lea ecx, [esp + 0xa0]
push 0x100
mov edx, dword [edi + 0x2f4]
push ecx
mov ecx, dword [esp + 0x2b4]
push esi
push edx
push eax
push ecx
call fcn.00404ad0
add esp, 0x18
sub eax, 0
je 0x413bee
dec eax
je 0x413cd1
dec eax
jne 0x413c15
mov edx, dword [esp + 0x2ac]
lea eax, [esp + 0xa0]
push edx
push eax
push esi
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push ebx
call fcn.0040e110
add esp, 0x14
jmp 0x413ce1
mov edx, dword [str.host_]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push esi
push edx
call fcn.00b3ff90
add esp, 0xc
test eax, eax
jne 0x413b45
mov edi, dword [str.host_]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov edi, dword [esp + 0x2a4]
not ecx
dec ecx
add esi, ecx
jmp 0x413c21
mov eax, dword [esp + 0x14]
test eax, eax
je 0x413c21
push esi
push str.Couldnt_bind_to_interface__s
push ebx
call fcn.0040e1d0
add esp, 0xc
mov eax, 0x2d
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x290
ret
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x413d12
mov eax, dword [esp + 0x2ac]
mov ecx, dword [edi + 0x5b0]
cmp eax, 2
mov dword [esp + 0x14], ecx
jne 0x413c41
mov dword [edi + 0x5b0], 1
lea edx, [esp + 0x10]
push edx
push 0
push 0
push esi
push edi
call fcn.00434860
add esp, 0x14
cmp eax, 1
jne 0x413c67
lea eax, [esp + 0x10]
push eax
push edi
call fcn.00404db0
add esp, 8
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
test eax, eax
mov dword [edi + 0x5b0], ecx
je 0x413d12
mov eax, dword [eax]
lea edx, [esp + 0xa0]
push 0x100
push edx
push eax
call fcn.00434320
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x2b8]
mov edx, dword [ecx]
lea ecx, [esp + 0xac]
mov eax, dword [edx + 4]
push eax
push ecx
push edi
push esi
push str.Name__s_family__i_resolved_to__s_family__i_n
push ebx
call fcn.0040e110
mov edx, dword [esp + 0x34]
push edx
push ebx
call fcn.00434ac0
mov eax, dword [esp + 0x3c]
add esp, 0x2c
mov ecx, dword [eax]
cmp edi, dword [ecx + 4]
je 0x413ce1
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x290
ret
mov eax, dword [esp + 0x2ac]
mov esi, 2
cmp eax, esi
jne 0x413d60
lea edx, [esp + 0x24]
lea eax, [esp + 0xa0]
push edx
push eax
push esi
call fcn.0043bdb0
add esp, 0xc
test eax, eax
jle 0x413d60
mov word [esp + 0x20], si
jmp 0x413d4c
push esi
push str.Couldnt_bind_to__s
push ebx
mov dword [ebx + 0xff8], 0
call fcn.0040e1d0
add esp, 0xc
mov eax, 0x2d
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x290
ret
cmp dword [esp + 0x2ac], 2
jne 0x413d60
mov word [esp + 0x20], 2
push ebp
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x22], ax
mov dword [esp + 0x1c], 0x10
mov ecx, dword [esp + 0x1c]
mov esi, dword [esp + 0x2a8]
mov edi, dword [sym.imp.WS2_32.dll_bind]
lea edx, [esp + 0x20]
push ecx
push edx
push esi
call edi
test eax, eax
jge 0x413dcb
mov eax, dword [esp + 0x18]
dec eax
test eax, eax
mov dword [esp + 0x18], eax
jle 0x413e58
mov eax, ebp
and eax, 0xffff
push eax
push str.Bind_to_local_port__hu_failed__trying_next_n
push ebx
call fcn.0040e110
add esp, 0xc
inc ebp
cmp word [esp + 0x20], 2
jne 0x413dba
push ebp
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [esp + 0x22], ax
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x20]
push ecx
push edx
push esi
call edi
test eax, eax
jl 0x413d7e
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0xa0]
mov dword [esp + 0x18], 0x80
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
lea ecx, [esp + 0xa0]
push eax
push ecx
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x413e25
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea edx, [esp + 0x1a0]
mov esi, eax
push 0x100
push edx
push esi
mov dword [ebx + 0xdc4], esi
call fcn.0043a720
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
jmp 0x413e80
and ebp, 0xffff
push ebp
push str.Local_port:__hu_n
push ebx
call fcn.0040e110
mov eax, dword [esp + 0x2b0]
add esp, 0xc
pop edi
pop esi
mov dword [eax + 0x574], 1
pop ebp
xor eax, eax
pop ebx
add esp, 0x290
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea ecx, [esp + 0x1a0]
mov esi, eax
push 0x100
push ecx
push esi
mov dword [ebx + 0xdc4], esi
call fcn.0043a720
push eax
push esi
push str.bind_failed_with_errno__d:__s
push ebx
call fcn.0040e1d0
add esp, 0x1c
mov eax, 0x2d
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x290
ret