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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44c
mov eax, dword [0x6b8dd8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x430], ecx
lea edx, [ebp - 0x384]
mov dword [ebp - 0x444], edx
mov dword [ebp - 0x438], 0
lea eax, [ebp - 0x384]
mov dword [ebp - 0x42c], eax
lea ecx, [ebp - 0x384]
mov dword [ebp - 0x41c], ecx
mov dword [ebp - 0x424], 0
mov edx, dword [ebp + 8]
mov ax, word [edx + 0x190]
mov word [ebp - 0x408], ax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x194]
mov dword [ebp - 0x440], edx
mov eax, 4
shl eax, 3
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + eax + 0x52c]
mov dword [ebp - 0x410], edx
cmp dword [ebp - 0x410], 0
jne 0x489e8a
movzx eax, word [ebp - 0x408]
test eax, eax
jne 0x489e8a
xor eax, eax
jmp 0x48a518
push 0x80
push 0
lea ecx, [ebp - 0x384]
push ecx
call fcn.005f3cf0
add esp, 0xc
cmp dword [ebp - 0x410], 0
je 0x48a2e8
mov edx, dword [ebp - 0x410]
push edx
call fcn.00606e50
add esp, 4
cmp eax, 0xff
jae 0x48a2e8
mov al, byte [0x62cc00]
mov byte [ebp - 0x104], al
push 0xff
push 0
lea ecx, [ebp - 0x103]
push ecx
call fcn.005f3cf0
add esp, 0xc
mov dword [ebp - 0x434], 0
mov byte [ebp - 0x409], 0
mov byte [ebp - 0x411], 0
mov edx, dword [0x6b538c]
push edx
call fcn.00606e50
add esp, 4
push eax
mov eax, dword [ebp - 0x410]
push eax
mov ecx, dword [0x6b538c]
push ecx
call fcn.005fbc60
add esp, 0xc
test eax, eax
jne 0x489f4e
mov edx, dword [0x6b538c]
push edx
call fcn.00606e50
add esp, 4
add eax, dword [ebp - 0x410]
mov dword [ebp - 0x410], eax
mov byte [ebp - 0x409], 1
jmp 0x489f98
mov eax, dword [str.host_]
push eax
call fcn.00606e50
add esp, 4
push eax
mov ecx, dword [ebp - 0x410]
push ecx
mov edx, dword [str.host_]
push edx
call fcn.005fbc60
add esp, 0xc
test eax, eax
jne 0x489f98
mov eax, dword [str.host_]
push eax
call fcn.00606e50
add esp, 4
add eax, dword [ebp - 0x410]
mov dword [ebp - 0x410], eax
mov byte [ebp - 0x411], 1
movzx ecx, byte [ebp - 0x411]
test ecx, ecx
jne 0x48a064
push 0x100
lea edx, [ebp - 0x104]
push edx
mov eax, dword [ebp - 0x410]
push eax
mov ecx, dword [ebp - 0x430]
mov edx, dword [ecx + 0x54]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call fcn.00479310
add esp, 0x18
mov dword [ebp - 0x43c], eax
cmp dword [ebp - 0x43c], 0
je 0x489ff7
cmp dword [ebp - 0x43c], 1
je 0x48a026
cmp dword [ebp - 0x43c], 2
je 0x48a030
jmp 0x48a064
movzx edx, byte [ebp - 0x409]
test edx, edx
je 0x48a024
mov eax, dword [ebp - 0x410]
push eax
push str.Couldnt_bind_to_interface__s
mov ecx, dword [ebp + 8]
push ecx
call fcn.00487870
add esp, 0xc
mov eax, 0x2d
jmp 0x48a518
jmp 0x48a064
mov eax, 1
jmp 0x48a518
mov byte [ebp - 0x409], 1
mov edx, dword [ebp + 0x10]
push edx
lea eax, [ebp - 0x104]
push eax
mov ecx, dword [ebp - 0x410]
push ecx
push str.Local_Interface__s_is_ip__s_using_address_family__i
mov edx, dword [ebp + 8]
push edx
call fcn.00487990
add esp, 0x14
mov dword [ebp - 0x434], 1
movzx eax, byte [ebp - 0x409]
test eax, eax
jne 0x48a19b
mov ecx, dword [ebp - 0x430]
mov dl, byte [ecx + 0x100]
mov byte [ebp - 0x41d], dl
cmp dword [ebp + 0x10], 2
jne 0x48a09a
mov eax, dword [ebp - 0x430]
mov byte [eax + 0x100], 1
jmp 0x48a0ad
cmp dword [ebp + 0x10], 0x17
jne 0x48a0ad
mov ecx, dword [ebp - 0x430]
mov byte [ecx + 0x100], 2
lea edx, [ebp - 0x424]
push edx
push 0
push 0
mov eax, dword [ebp - 0x410]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00495c30
add esp, 0x14
mov dword [ebp - 0x44c], eax
cmp dword [ebp - 0x44c], 1
jne 0x48a0ed
lea edx, [ebp - 0x424]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00479560
add esp, 8
mov ecx, dword [ebp - 0x430]
mov dl, byte [ebp - 0x41d]
mov byte [ecx + 0x100], dl
cmp dword [ebp - 0x424], 0
je 0x48a191
push 0x100
lea eax, [ebp - 0x104]
push eax
mov ecx, dword [ebp - 0x424]
mov edx, dword [ecx]
push edx
call fcn.00495ba0
add esp, 0xc
mov eax, dword [ebp - 0x424]
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push edx
lea eax, [ebp - 0x104]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0x410]
push edx
push str.Name__s_family__i_resolved_to__s_family__i
mov eax, dword [ebp + 8]
push eax
call fcn.00487990
add esp, 0x18
mov ecx, dword [ebp - 0x424]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00496020
add esp, 8
mov eax, dword [ebp - 0x424]
mov ecx, dword [eax]
mov edx, dword [ebp + 0x10]
cmp edx, dword [ecx + 4]
je 0x48a185
mov eax, 1
jmp 0x48a518
mov dword [ebp - 0x434], 1
jmp 0x48a19b
mov dword [ebp - 0x434], 0xffffffff
cmp dword [ebp - 0x434], 0
jle 0x48a2b1
cmp dword [ebp + 0x10], 0x17
jne 0x48a25c
push 0x25
lea eax, [ebp - 0x104]
push eax
call fcn.005f52a0
add esp, 8
mov dword [ebp - 0x428], eax
cmp dword [ebp - 0x428], 0
je 0x48a1ea
mov ecx, dword [ebp - 0x428]
mov byte [ecx], 0
mov edx, dword [ebp - 0x428]
add edx, 1
mov dword [ebp - 0x428], edx
mov eax, dword [ebp - 0x41c]
add eax, 8
push eax
lea ecx, [ebp - 0x104]
push ecx
push 0x17
call fcn.004cbc10
add esp, 0xc
test eax, eax
jle 0x48a250
mov edx, 0x17
mov eax, dword [ebp - 0x41c]
mov word [eax], dx
movzx ecx, word [ebp - 0x408]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [ebp - 0x41c]
mov word [edx + 2], ax
cmp dword [ebp - 0x428], 0
je 0x48a250
mov eax, dword [ebp - 0x428]
push eax
call fcn.00605ded
add esp, 4
mov ecx, dword [ebp - 0x41c]
mov dword [ecx + 0x18], eax
mov dword [ebp - 0x438], 0x1c
jmp 0x48a2b1
cmp dword [ebp + 0x10], 2
jne 0x48a2b1
mov edx, dword [ebp - 0x42c]
add edx, 4
push edx
lea eax, [ebp - 0x104]
push eax
push 2
call fcn.004cbc10
add esp, 0xc
test eax, eax
jle 0x48a2b1
mov ecx, 2
mov edx, dword [ebp - 0x42c]
mov word [edx], cx
movzx eax, word [ebp - 0x408]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [ebp - 0x42c]
mov word [ecx + 2], ax
mov dword [ebp - 0x438], 0x10
cmp dword [ebp - 0x434], 1
jge 0x48a2e6
mov edx, dword [ebp + 8]
mov byte [edx + 0xd1f], 0
mov eax, dword [ebp - 0x410]
push eax
push str.Couldnt_bind_to__s
mov ecx, dword [ebp + 8]
push ecx
call fcn.00487870
add esp, 0xc
mov eax, 0x2d
jmp 0x48a518
jmp 0x48a356
cmp dword [ebp + 0x10], 0x17
jne 0x48a320
mov edx, 0x17
mov eax, dword [ebp - 0x41c]
mov word [eax], dx
movzx ecx, word [ebp - 0x408]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [ebp - 0x41c]
mov word [edx + 2], ax
mov dword [ebp - 0x438], 0x1c
jmp 0x48a356
cmp dword [ebp + 0x10], 2
jne 0x48a356
mov eax, 2
mov ecx, dword [ebp - 0x42c]
mov word [ecx], ax
movzx edx, word [ebp - 0x408]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [ebp - 0x42c]
mov word [ecx + 2], ax
mov dword [ebp - 0x438], 0x10
mov edx, dword [ebp - 0x438]
push edx
mov eax, dword [ebp - 0x444]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jl 0x48a438
mov dword [ebp - 0x448], 0x80
push 0x80
push 0
lea edx, [ebp - 0x404]
push edx
call fcn.005f3cf0
add esp, 0xc
lea eax, [ebp - 0x448]
push eax
lea ecx, [ebp - 0x404]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x48a40b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x418], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x418]
mov dword [eax + 0x96c], ecx
push 0x100
lea edx, [ebp - 0x304]
push edx
mov eax, dword [ebp - 0x418]
push eax
call fcn.004a2180
add esp, 0xc
push eax
mov ecx, dword [ebp - 0x418]
push ecx
push str.getsockname___failed_with_errno__d:__s
mov edx, dword [ebp + 8]
push edx
call fcn.00487870
add esp, 0x10
mov eax, 0x2d
jmp 0x48a518
movzx eax, word [ebp - 0x408]
push eax
push str.Local_port:__hu
mov ecx, dword [ebp + 8]
push ecx
call fcn.00487990
add esp, 0xc
mov edx, dword [ebp - 0x430]
mov byte [edx + 0x26f], 1
xor eax, eax
jmp 0x48a518
mov eax, dword [ebp - 0x440]
sub eax, 1
mov dword [ebp - 0x440], eax
cmp dword [ebp - 0x440], 0
jle 0x48a4bd
movzx ecx, word [ebp - 0x408]
push ecx
push str.Bind_to_local_port__hu_failed__trying_next
mov edx, dword [ebp + 8]
push edx
call fcn.00487990
add esp, 0xc
mov ax, word [ebp - 0x408]
add ax, 1
mov word [ebp - 0x408], ax
mov ecx, dword [ebp - 0x444]
movzx edx, word [ecx]
cmp edx, 2
jne 0x48a4a3
movzx eax, word [ebp - 0x408]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [ebp - 0x42c]
mov word [ecx + 2], ax
jmp 0x48a4bb
movzx edx, word [ebp - 0x408]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [ebp - 0x41c]
mov word [ecx + 2], ax
jmp 0x48a4bf
jmp 0x48a4c4
jmp 0x48a356
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x418], eax
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x418]
mov dword [edx + 0x96c], eax
push 0x100
lea ecx, [ebp - 0x204]
push ecx
mov edx, dword [ebp - 0x418]
push edx
call fcn.004a2180
add esp, 0xc
push eax
mov eax, dword [ebp - 0x418]
push eax
push str.bind_failed_with_errno__d:__s
mov ecx, dword [ebp + 8]
push ecx
call fcn.00487870
add esp, 0x10
mov eax, 0x2d
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005db6f9
mov esp, ebp
pop ebp
ret