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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x380
push esi
push edi
lea edi, [ebp - 0x380]
mov ecx, 0xe0
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x4c83a4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov dword [ebp - 8], ecx
lea edx, [ebp - 0x8c]
mov dword [ebp - 0x94], edx
mov dword [ebp - 0x98], 0
lea eax, [ebp - 0x8c]
mov dword [ebp - 0x9c], eax
lea ecx, [ebp - 0x8c]
mov dword [ebp - 0xa0], ecx
mov dword [ebp - 0xa8], 0
mov edx, dword [ebp - 8]
mov ax, word [edx + 0x5e8]
mov word [ebp - 0xb0], ax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x5ec]
mov dword [ebp - 0xb4], edx
mov eax, 4
shl eax, 3
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + eax + 0x92c]
mov dword [ebp - 0xb8], edx
cmp dword [ebp - 0xb8], 0
jne 0x42dd3a
movzx eax, word [ebp - 0xb0]
test eax, eax
jne 0x42dd3a
xor eax, eax
jmp 0x42e415
push 0x80
push 0
lea ecx, [ebp - 0x8c]
push ecx
call fcn.00487550
add esp, 0xc
cmp dword [ebp - 0xb8], 0
je 0x42e192
mov edx, dword [ebp - 0xb8]
push edx
call fcn.0048f060
add esp, 4
cmp eax, 0xff
jae 0x42e192
mov al, byte [0x4c952c]
mov byte [ebp - 0x1c0], al
push 0xff
push 0
lea ecx, [ebp - 0x1bf]
push ecx
call fcn.00487550
add esp, 0xc
mov dword [ebp - 0x1c8], 0
mov byte [ebp - 0x1c9], 0
mov byte [ebp - 0x1ca], 0
mov edx, dword [0x4bd540]
push edx
call fcn.0048f060
add esp, 4
push eax
mov eax, dword [ebp - 0xb8]
push eax
mov ecx, dword [0x4bd540]
push ecx
call fcn.00493f10
add esp, 0xc
test eax, eax
jne 0x42ddfe
mov edx, dword [0x4bd540]
push edx
call fcn.0048f060
add esp, 4
add eax, dword [ebp - 0xb8]
mov dword [ebp - 0xb8], eax
mov byte [ebp - 0x1c9], 1
jmp 0x42de48
mov eax, dword [str.host_]
push eax
call fcn.0048f060
add esp, 4
push eax
mov ecx, dword [ebp - 0xb8]
push ecx
mov edx, dword [str.host_]
push edx
call fcn.00493f10
add esp, 0xc
test eax, eax
jne 0x42de48
mov eax, dword [str.host_]
push eax
call fcn.0048f060
add esp, 4
add eax, dword [ebp - 0xb8]
mov dword [ebp - 0xb8], eax
mov byte [ebp - 0x1ca], 1
movzx ecx, byte [ebp - 0x1ca]
test ecx, ecx
jne 0x42df14
push 0x100
lea edx, [ebp - 0x1c0]
push edx
mov eax, dword [ebp - 0xb8]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x8c]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.00472c20
add esp, 0x18
mov dword [ebp - 0x380], eax
cmp dword [ebp - 0x380], 0
je 0x42dea7
cmp dword [ebp - 0x380], 1
je 0x42ded6
cmp dword [ebp - 0x380], 2
je 0x42dee0
jmp 0x42df14
movzx edx, byte [ebp - 0x1c9]
test edx, edx
je 0x42ded4
mov eax, dword [ebp - 0xb8]
push eax
push str.Couldnt_bind_to_interface__s
mov ecx, dword [ebp - 8]
push ecx
call fcn.0042abc0
add esp, 0xc
mov eax, 0x2d
jmp 0x42e415
jmp 0x42df14
mov eax, 1
jmp 0x42e415
mov byte [ebp - 0x1c9], 1
mov edx, dword [ebp + 0x10]
push edx
lea eax, [ebp - 0x1c0]
push eax
mov ecx, dword [ebp - 0xb8]
push ecx
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
mov edx, dword [ebp - 8]
push edx
call fcn.0042aa70
add esp, 0x14
mov dword [ebp - 0x1c8], 1
movzx eax, byte [ebp - 0x1c9]
test eax, eax
jne 0x42e025
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x2b0]
mov dword [ebp - 0x1d0], edx
cmp dword [ebp + 0x10], 2
jne 0x42df47
mov eax, dword [ebp + 8]
mov dword [eax + 0x2b0], 1
jmp 0x42df5a
cmp dword [ebp + 0x10], 0x17
jne 0x42df5a
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x2b0], 2
lea edx, [ebp - 0xa8]
push edx
push 0
mov eax, dword [ebp - 0xb8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004193f0
add esp, 0x10
mov dword [ebp - 0x1d4], eax
cmp dword [ebp - 0x1d4], 1
jne 0x42df98
lea edx, [ebp - 0xa8]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00418920
add esp, 8
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x1d0]
mov dword [ecx + 0x2b0], edx
cmp dword [ebp - 0xa8], 0
je 0x42e01b
push 0x100
lea eax, [ebp - 0x1c0]
push eax
mov ecx, dword [ebp - 0xa8]
mov edx, dword [ecx]
push edx
call fcn.00419910
add esp, 0xc
mov eax, dword [ebp - 0xa8]
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push edx
lea eax, [ebp - 0x1c0]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0xb8]
push edx
push str.Name__s_family__i_resolved_to__s_family__i_n
mov eax, dword [ebp - 8]
push eax
call fcn.0042aa70
add esp, 0x18
mov ecx, dword [ebp - 0xa8]
push ecx
mov edx, dword [ebp - 8]
push edx
call fcn.004196f0
add esp, 8
mov dword [ebp - 0x1c8], 1
jmp 0x42e025
mov dword [ebp - 0x1c8], 0xffffffff
cmp dword [ebp - 0x1c8], 0
jle 0x42e14d
cmp dword [ebp + 0x10], 0x17
jne 0x42e0ef
push 0x25
lea eax, [ebp - 0x1c0]
push eax
call fcn.00487c30
add esp, 8
mov dword [ebp - 0x1d8], eax
cmp dword [ebp - 0x1d8], 0
je 0x42e074
mov ecx, dword [ebp - 0x1d8]
mov byte [ecx], 0
mov edx, dword [ebp - 0x1d8]
add edx, 1
mov dword [ebp - 0x1d8], edx
mov eax, dword [ebp - 0xa0]
add eax, 8
push eax
lea ecx, [ebp - 0x1c0]
push ecx
push 0x17
call fcn.00444f40
add esp, 0xc
test eax, eax
jle 0x42e0e3
mov edx, 0x17
mov eax, dword [ebp - 0xa0]
mov word [eax], dx
mov esi, esp
movzx ecx, word [ebp - 0xb0]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
cmp esi, esp
call fcn.00485c0f
mov edx, dword [ebp - 0xa0]
mov word [edx + 2], ax
cmp dword [ebp - 0x1d8], 0
je 0x42e0e3
mov eax, dword [ebp - 0x1d8]
push eax
call fcn.004965f3
add esp, 4
mov ecx, dword [ebp - 0xa0]
mov dword [ecx + 0x18], eax
mov dword [ebp - 0x98], 0x1c
jmp 0x42e14d
cmp dword [ebp + 0x10], 2
jne 0x42e14d
mov edx, dword [ebp - 0x9c]
add edx, 4
push edx
lea eax, [ebp - 0x1c0]
push eax
push 2
call fcn.00444f40
add esp, 0xc
test eax, eax
jle 0x42e14d
mov ecx, 2
mov edx, dword [ebp - 0x9c]
mov word [edx], cx
mov esi, esp
movzx eax, word [ebp - 0xb0]
push eax
call dword [sym.imp.WS2_32.dll_htons]
cmp esi, esp
call fcn.00485c0f
mov ecx, dword [ebp - 0x9c]
mov word [ecx + 2], ax
mov dword [ebp - 0x98], 0x10
cmp dword [ebp - 0x1c8], 1
jge 0x42e18d
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0xf4c]
and eax, 0xfffffff7
mov ecx, dword [ebp - 8]
mov dword [ecx + 0xf4c], eax
mov edx, dword [ebp - 0xb8]
push edx
push str.Couldnt_bind_to__s
mov eax, dword [ebp - 8]
push eax
call fcn.0042abc0
add esp, 0xc
mov eax, 0x2d
jmp 0x42e415
jmp 0x42e212
cmp dword [ebp + 0x10], 0x17
jne 0x42e1d3
mov ecx, 0x17
mov edx, dword [ebp - 0xa0]
mov word [edx], cx
mov esi, esp
movzx eax, word [ebp - 0xb0]
push eax
call dword [sym.imp.WS2_32.dll_htons]
cmp esi, esp
call fcn.00485c0f
mov ecx, dword [ebp - 0xa0]
mov word [ecx + 2], ax
mov dword [ebp - 0x98], 0x1c
jmp 0x42e212
cmp dword [ebp + 0x10], 2
jne 0x42e212
mov edx, 2
mov eax, dword [ebp - 0x9c]
mov word [eax], dx
mov esi, esp
movzx ecx, word [ebp - 0xb0]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
cmp esi, esp
call fcn.00485c0f
mov edx, dword [ebp - 0x9c]
mov word [edx + 2], ax
mov dword [ebp - 0x98], 0x10
mov esi, esp
mov eax, dword [ebp - 0x98]
push eax
mov ecx, dword [ebp - 0x94]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_bind]
cmp esi, esp
call fcn.00485c0f
test eax, eax
jl 0x42e31a
mov dword [ebp - 0x268], 0x80
push 0x80
push 0
lea eax, [ebp - 0x25c]
push eax
call fcn.00487550
add esp, 0xc
mov esi, esp
lea ecx, [ebp - 0x268]
push ecx
lea edx, [ebp - 0x25c]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_getsockname]
cmp esi, esp
call fcn.00485c0f
test eax, eax
jge 0x42e2e2
mov esi, esp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp esi, esp
call fcn.00485c0f
mov dword [ebp - 0xbc], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0xbc]
mov dword [ecx + 0xcac], edx
push 0x80
lea eax, [ebp - 0x2f0]
push eax
mov ecx, dword [ebp - 0xbc]
push ecx
call fcn.00471b20
add esp, 0xc
push eax
mov edx, dword [ebp - 0xbc]
push edx
push 0x4bd5e8
mov eax, dword [ebp - 8]
push eax
call fcn.0042abc0
add esp, 0x10
mov eax, 0x2d
jmp 0x42e415
movzx ecx, word [ebp - 0xb0]
push ecx
push str.Local_port:__hu_n
mov edx, dword [ebp - 8]
push edx
call fcn.0042aa70
add esp, 0xc
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x284]
or ecx, 0x1000000
mov edx, dword [ebp + 8]
mov dword [edx + 0x284], ecx
xor eax, eax
jmp 0x42e415
mov eax, dword [ebp - 0xb4]
sub eax, 1
mov dword [ebp - 0xb4], eax
cmp dword [ebp - 0xb4], 0
jle 0x42e3b1
movzx ecx, word [ebp - 0xb0]
push ecx
push str.Bind_to_local_port__hu_failed__trying_next_n
mov edx, dword [ebp - 8]
push edx
call fcn.0042aa70
add esp, 0xc
mov ax, word [ebp - 0xb0]
add ax, 1
mov word [ebp - 0xb0], ax
mov ecx, dword [ebp - 0x94]
movzx edx, word [ecx]
cmp edx, 2
jne 0x42e38e
mov esi, esp
movzx eax, word [ebp - 0xb0]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
cmp esi, esp
call fcn.00485c0f
mov ecx, dword [ebp - 0x9c]
mov word [ecx + 2], ax
jmp 0x42e3af
mov esi, esp
movzx edx, word [ebp - 0xb0]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
cmp esi, esp
call fcn.00485c0f
mov ecx, dword [ebp - 0xa0]
mov word [ecx + 2], ax
jmp 0x42e3b3
jmp 0x42e3b8
jmp 0x42e212
mov esi, esp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp esi, esp
call fcn.00485c0f
mov dword [ebp - 0xbc], eax
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0xbc]
mov dword [edx + 0xcac], eax
push 0x80
lea ecx, [ebp - 0x378]
push ecx
mov edx, dword [ebp - 0xbc]
push edx
call fcn.00471b20
add esp, 0xc
push eax
mov eax, dword [ebp - 0xbc]
push eax
push str.bind_failed_with_errno__d:__s
mov ecx, dword [ebp - 8]
push ecx
call fcn.0042abc0
add esp, 0x10
mov eax, 0x2d
push edx
mov ecx, ebp
push eax
lea edx, [0x42e444]
call fcn.00485bbb
pop eax
pop edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004854a8
add esp, 0x380
cmp ebp, esp
call fcn.00485c0f
mov esp, ebp
pop ebp
ret