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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24c
mov eax, dword [0x46e140]
xor eax, ebp
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov dword [ebp - 0x1b0], ecx
lea edx, [ebp - 0x1a8]
mov dword [ebp - 0x120], edx
mov dword [ebp - 0x11c], 0
lea eax, [ebp - 0x1a8]
mov dword [ebp - 0x128], eax
mov dword [ebp - 8], 0
mov ecx, dword [ebp - 0x1b0]
mov dx, word [ecx + 0x140]
mov word [ebp - 4], dx
mov eax, dword [ebp - 0x1b0]
mov ecx, dword [eax + 0x144]
mov dword [ebp - 0x114], ecx
mov edx, dword [ebp - 0x1b0]
mov eax, dword [edx + 0x354]
mov dword [ebp - 0x1b8], eax
mov cl, byte [0x46f580]
mov byte [ebp - 0x110], cl
push 0xff
push 0
lea edx, [ebp - 0x10f]
push edx
call fcn.00446c70
add esp, 0xc
mov dword [ebp - 0x1ac], 0
mov dword [ebp - 0x1b4], 0
mov dword [ebp - 0x118], 0
cmp dword [ebp - 0x1b8], 0
jne 0x406504
movzx eax, word [ebp - 4]
test eax, eax
jne 0x406504
xor eax, eax
jmp 0x4069d6
push 0x80
push 0
lea ecx, [ebp - 0x1a8]
push ecx
call fcn.00446c70
add esp, 0xc
cmp dword [ebp - 0x1b8], 0
je 0x406808
mov edx, dword [ebp - 0x1b8]
push edx
call fcn.00447580
add esp, 4
cmp eax, 0xff
jae 0x406808
mov eax, dword [0x4680d8]
push eax
call fcn.00447580
add esp, 4
push eax
mov ecx, dword [ebp - 0x1b8]
push ecx
mov edx, dword [0x4680d8]
push edx
call fcn.00448101
add esp, 0xc
test eax, eax
jne 0x406590
mov eax, dword [0x4680d8]
push eax
call fcn.00447580
add esp, 4
add eax, dword [ebp - 0x1b8]
mov dword [ebp - 0x1b8], eax
mov dword [ebp - 0x1b4], 1
jmp 0x4065de
mov ecx, dword [str.host_]
push ecx
call fcn.00447580
add esp, 4
push eax
mov edx, dword [ebp - 0x1b8]
push edx
mov eax, dword [str.host_]
push eax
call fcn.00448101
add esp, 0xc
test eax, eax
jne 0x4065de
mov ecx, dword [str.host_]
push ecx
call fcn.00447580
add esp, 4
add eax, dword [ebp - 0x1b8]
mov dword [ebp - 0x1b8], eax
mov dword [ebp - 0x118], 1
cmp dword [ebp - 0x118], 0
jne 0x4066a8
push 0x100
lea edx, [ebp - 0x110]
push edx
mov eax, dword [ebp - 0x1b8]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x70]
push edx
mov eax, dword [ebp + 0x10]
push eax
call fcn.004176d0
add esp, 0x14
mov dword [ebp - 0x24c], eax
cmp dword [ebp - 0x24c], 0
je 0x406634
cmp dword [ebp - 0x24c], 1
je 0x406664
cmp dword [ebp - 0x24c], 2
je 0x40666e
jmp 0x4066a8
cmp dword [ebp - 0x1b4], 0
je 0x406662
mov ecx, dword [ebp - 0x1b8]
push ecx
push str.Couldnt_bind_to_interface__s
mov edx, dword [ebp - 0x1b0]
push edx
call fcn.00420dd0
add esp, 0xc
mov eax, 0x2d
jmp 0x4069d6
jmp 0x4066a8
mov eax, 1
jmp 0x4069d6
mov dword [ebp - 0x1b4], 1
mov eax, dword [ebp + 0x10]
push eax
lea ecx, [ebp - 0x110]
push ecx
mov edx, dword [ebp - 0x1b8]
push edx
push str.Local_Interface__s_is_ip__s_using_address_family__i_n
mov eax, dword [ebp - 0x1b0]
push eax
call fcn.00420d30
add esp, 0x14
mov dword [ebp - 0x1ac], 1
cmp dword [ebp - 0x1b4], 0
jne 0x40677d
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x21c]
mov dword [ebp - 0x1c0], edx
cmp dword [ebp + 0x10], 2
jne 0x4066d7
mov eax, dword [ebp + 8]
mov dword [eax + 0x21c], 1
lea ecx, [ebp - 8]
push ecx
push 0
mov edx, dword [ebp - 0x1b8]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0040f490
add esp, 0x10
mov dword [ebp - 0x1bc], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x1c0]
mov dword [ecx + 0x21c], edx
cmp dword [ebp - 8], 0
je 0x406773
push 0x100
lea eax, [ebp - 0x110]
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
push edx
call fcn.0040f160
add esp, 0xc
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push edx
lea eax, [ebp - 0x110]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0x1b8]
push edx
push str.Name__s_family__i_resolved_to__s_family__i_n
mov eax, dword [ebp - 0x1b0]
push eax
call fcn.00420d30
add esp, 0x18
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x1b0]
push edx
call fcn.0040f750
add esp, 8
mov dword [ebp - 0x1ac], 1
jmp 0x40677d
mov dword [ebp - 0x1ac], 0xffffffff
cmp dword [ebp - 0x1ac], 0
jle 0x4067d8
cmp dword [ebp + 0x10], 2
jne 0x4067d8
mov eax, dword [ebp - 0x128]
add eax, 4
push eax
lea ecx, [ebp - 0x110]
push ecx
push 2
call fcn.004177d0
add esp, 0xc
test eax, eax
jle 0x4067d8
mov edx, 2
mov eax, dword [ebp - 0x128]
mov word [eax], dx
movzx ecx, word [ebp - 4]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [ebp - 0x128]
mov word [edx + 2], ax
mov dword [ebp - 0x11c], 0x10
cmp dword [ebp - 0x1ac], 1
jge 0x406806
mov eax, dword [ebp - 0x1b8]
push eax
push str.Couldnt_bind_to__s
mov ecx, dword [ebp - 0x1b0]
push ecx
call fcn.00420dd0
add esp, 0xc
mov eax, 0x2d
jmp 0x4069d6
jmp 0x40683b
cmp dword [ebp + 0x10], 2
jne 0x40683b
mov edx, 2
mov eax, dword [ebp - 0x128]
mov word [eax], dx
movzx ecx, word [ebp - 4]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [ebp - 0x128]
mov word [edx + 2], ax
mov dword [ebp - 0x11c], 0x10
mov eax, dword [ebp - 0x11c]
push eax
mov ecx, dword [ebp - 0x120]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jl 0x40691b
mov dword [ebp - 0x1c4], 0x80
push 0x80
push 0
lea eax, [ebp - 0x248]
push eax
call fcn.00446c70
add esp, 0xc
lea ecx, [ebp - 0x1c4]
push ecx
lea edx, [ebp - 0x248]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x4068ee
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x124], eax
mov ecx, dword [ebp - 0x1b0]
mov edx, dword [ebp - 0x124]
mov dword [ecx + 0x858c], edx
mov eax, dword [ebp - 0x124]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004243f0
add esp, 8
push eax
mov edx, dword [ebp - 0x124]
push edx
push 0x468188
mov eax, dword [ebp - 0x1b0]
push eax
call fcn.00420dd0
add esp, 0x10
mov eax, 0x2d
jmp 0x4069d6
movzx ecx, word [ebp - 4]
push ecx
push str.Local_port:__hu_n
mov edx, dword [ebp - 0x1b0]
push edx
call fcn.00420d30
add esp, 0xc
mov eax, dword [ebp + 8]
mov dword [eax + 0x1fc], 1
xor eax, eax
jmp 0x4069d6
mov ecx, dword [ebp - 0x114]
sub ecx, 1
mov dword [ebp - 0x114], ecx
cmp dword [ebp - 0x114], 0
jle 0x40697d
movzx edx, word [ebp - 4]
push edx
push str.Bind_to_local_port__hu_failed__trying_next_n
mov eax, dword [ebp - 0x1b0]
push eax
call fcn.00420d30
add esp, 0xc
mov cx, word [ebp - 4]
add cx, 1
mov word [ebp - 4], cx
mov edx, dword [ebp - 0x120]
movzx eax, word [edx]
cmp eax, 2
jne 0x40697b
movzx ecx, word [ebp - 4]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [ebp - 0x128]
mov word [edx + 2], ax
jmp 0x40697f
jmp 0x406984
jmp 0x40683b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x124], eax
mov eax, dword [ebp - 0x1b0]
mov ecx, dword [ebp - 0x124]
mov dword [eax + 0x858c], ecx
mov edx, dword [ebp - 0x124]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004243f0
add esp, 8
push eax
mov ecx, dword [ebp - 0x124]
push ecx
push str.bind_failed_with_errno__d:__s
mov edx, dword [ebp - 0x1b0]
push edx
call fcn.00420dd0
add esp, 0x10
mov eax, 0x2d
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.00446cea
mov esp, ebp
pop ebp
ret