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

Disassembly:
sub esp, 0x218
mov eax, dword [0x1315d264]
xor eax, esp
mov dword [esp + 0x214], eax
mov eax, dword [esp + 0x21c]
push ebx
push ebp
push esi
push edi
mov edi, dword [eax]
xor ebx, ebx
mov dword [esp + 0x1c], ebx
movzx ebp, word [edi + 0x140]
mov esi, dword [edi + 0x354]
push 0xff
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0x144]
lea ecx, [esp + 0x129]
push ebx
push ecx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x2c], eax
mov byte [esp + 0x130], bl
call fcn.130309b0
add esp, 0xc
cmp esi, ebx
jne 0x13058f74
cmp bp, bx
je 0x13059342
push 0x80
lea edx, [esp + 0x28]
push ebx
push edx
call fcn.130309b0
add esp, 0xc
test esi, esi
je 0x13059209
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x13058f94
sub eax, edx
cmp eax, 0xff
jae 0x13059209
mov edx, dword [0x1315e4c8]
mov eax, edx
lea ebp, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x13058fb5
sub eax, ebp
push eax
push esi
push edx
call fcn.13042202
add esp, 0xc
test eax, eax
jne 0x1305903b
mov eax, dword [0x1315e4c8]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x13058fd7
sub eax, edx
add esi, eax
mov ebx, 1
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x70]
mov ebp, dword [esp + 0x234]
push pe_nt_image_headers32
lea eax, [esp + 0x128]
push eax
push esi
push edx
push ebp
call fcn.1307c580
add esp, 0x14
sub eax, 0
je 0x13059081
sub eax, 1
je 0x13059077
sub eax, 1
jne 0x13059099
push ebp
lea eax, [esp + 0x128]
push eax
push esi
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
push edi
call fcn.13057010
add esp, 0x14
jmp 0x1305915c
mov edx, dword [str.host_]
mov eax, edx
lea ebp, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x13059046
sub eax, ebp
push eax
push esi
push edx
call fcn.13042202
add esp, 0xc
test eax, eax
jne 0x13058fe9
mov eax, dword [str.host_]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x13059068
sub eax, edx
add esi, eax
jmp 0x130590a1
mov eax, 1
jmp 0x13059374
test ebx, ebx
je 0x130590a1
push esi
push str.Couldnt_bind_to_interface__s
push edi
call fcn.130570a0
add esp, 0xc
jmp 0x1305936f
test ebx, ebx
jne 0x130591f5
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x234]
cmp eax, 2
mov ebp, dword [ecx + 0x23c]
mov ebx, ecx
jne 0x130590c5
mov dword [ebx + 0x23c], 1
jmp 0x130590d6
cmp eax, 0x17
jne 0x130590d6
mov edx, ecx
mov dword [edx + 0x23c], 2
lea eax, [esp + 0x1c]
push eax
push 0
push esi
push ebx
call fcn.1304e340
add esp, 0x10
cmp eax, 1
jne 0x130590fa
lea ecx, [esp + 0x1c]
push ecx
push ebx
call fcn.1304d4c0
add esp, 8
mov eax, dword [esp + 0x1c]
test eax, eax
mov dword [ebx + 0x23c], ebp
je 0x130591f5
mov eax, dword [eax]
push pe_nt_image_headers32
lea edx, [esp + 0x128]
push edx
push eax
call fcn.1304e0a0
mov ecx, dword [esp + 0x28]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
mov edx, dword [esp + 0x240]
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.13057010
mov eax, dword [esp + 0x40]
push eax
push edi
call fcn.1304e530
mov ebp, dword [esp + 0x260]
add esp, 0x2c
cmp ebp, 0x17
jne 0x130591cf
lea ecx, [esp + 0x124]
push 0x25
push ecx
call fcn.1304a550
mov esi, eax
add esp, 8
test esi, esi
je 0x1305917f
mov byte [esi], 0
add esi, 1
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x128]
push eax
push 0x17
call fcn.1305ca70
add esp, 0xc
test eax, eax
jle 0x130591c2
mov ecx, dword [esp + 0x18]
push ecx
mov word [esp + 0x28], 0x17
call dword [sym.imp.WS2_32.dll_htons]
test esi, esi
mov word [esp + 0x26], ax
je 0x130591c2
push esi
call fcn.13045c9b
add esp, 4
mov dword [esp + 0x3c], eax
mov dword [esp + 0x14], 0x1c
jmp 0x1305924b
cmp ebp, 2
jne 0x1305924b
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x128]
push eax
push ebp
call fcn.1305ca70
add esp, 0xc
test eax, eax
jle 0x1305924b
mov ecx, dword [esp + 0x18]
push ecx
jmp 0x13059231
push esi
push str.Couldnt_bind_to__s
push edi
call fcn.130570a0
add esp, 0xc
jmp 0x1305936f
mov eax, dword [esp + 0x234]
cmp eax, 0x17
jne 0x1305922b
push ebp
mov word [esp + 0x28], ax
call dword [sym.imp.WS2_32.dll_htons]
mov dword [esp + 0x14], 0x1c
jmp 0x13059246
cmp eax, 2
jne 0x1305924b
push ebp
mov word [esp + 0x28], 2
call dword [sym.imp.WS2_32.dll_htons]
mov dword [esp + 0x14], 0x10
mov word [esp + 0x26], ax
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x230]
mov ebp, dword [sym.imp.WS2_32.dll_bind]
push edx
lea eax, [esp + 0x28]
push eax
push ecx
call ebp
test eax, eax
jge 0x130592c0
mov esi, dword [sym.imp.WS2_32.dll_ntohs]
nop
mov eax, dword [esp + 0x20]
sub eax, 1
test eax, eax
mov dword [esp + 0x20], eax
jle 0x13059346
mov ebx, dword [esp + 0x18]
movzx edx, bx
push edx
push str.Bind_to_local_port__hu_failed__trying_next_n
push edi
call fcn.13057010
add esp, 0xc
add ebx, 1
push ebx
mov dword [esp + 0x1c], ebx
call esi
mov edx, dword [esp + 0x230]
mov word [esp + 0x26], ax
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x28]
push ecx
push edx
call ebp
test eax, eax
jl 0x13059270
push 0x80
lea eax, [esp + 0xa8]
push 0
push eax
mov dword [esp + 0x2c], 0x80
call fcn.130309b0
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
jge 0x13059320
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esp + 0x10]
mov esi, eax
push esi
push ecx
mov dword [edi + 0x858c], esi
call fcn.1304c980
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
jmp 0x13059366
movzx edx, word [esp + 0x18]
push edx
push str.Local_port:__hu_n
push edi
call fcn.13057010
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov dword [eax + 0x21c], 1
xor eax, eax
jmp 0x13059374
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esp + 0x10]
mov esi, eax
push esi
push ecx
mov dword [edi + 0x858c], esi
call fcn.1304c980
push eax
push esi
push str.bind_failed_with_errno__d:__s
push edi
call fcn.130570a0
add esp, 0x18
mov eax, 0x2d
mov ecx, dword [esp + 0x224]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1303468b
add esp, 0x218
ret