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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xcc
push esi
mov eax, dword [ebp + 8]
cmp dword [eax + 0xc], 0
jne 0x406c75
mov dword [0x411d88], 3
or eax, 0xffffffff
jmp 0x407195
cmp dword [ebp + 0x18], 0xc
jge 0x406c8d
mov dword [0x411d88], 0x16
or eax, 0xffffffff
jmp 0x407195
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 8]
and edx, 8
test edx, edx
jne 0x406caf
cmp dword [ebp + 0x10], 0x200
jg 0x406caf
mov dword [ebp - 0xcc], 0
jmp 0x406cb9
mov dword [ebp - 0xcc], 1
mov eax, dword [ebp - 0xcc]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0x274c
mov ecx, dword [ebp + 8]
xor edx, edx
mov dx, word [ecx + 0x1d0]
test edx, edx
je 0x406e0b
mov dword [ebp - 0xa0], 0
mov eax, dword [ebp + 8]
xor ecx, ecx
mov cx, word [eax + 0x1d0]
mov edx, dword [ebp + 8]
cmp ecx, dword [edx + 0xc]
je 0x406d16
mov eax, dword [ebp - 0xa0]
add eax, 1
mov dword [ebp - 0xa0], eax
jmp 0x406dea
mov dword [ebp - 4], 0
jmp 0x406d28
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
cmp eax, dword [edx + 0xc]
jge 0x406dea
mov ecx, dword [ebp - 4]
shl ecx, 4
mov edx, dword [ebp + 8]
movsx eax, word [edx + ecx + 0x10]
test eax, eax
je 0x406d5d
mov ecx, dword [ebp - 0xa0]
add ecx, 1
mov dword [ebp - 0xa0], ecx
jmp 0x406dea
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
cmp dword [eax + edx*4 + 0x1d8], 0xffffffff
jne 0x406d6f
jmp 0x406d1f
mov dword [ebp - 0xa4], 0x80
lea ecx, [ebp - 0xa4]
push ecx
lea edx, [ebp - 0x9c]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + eax*4 + 0x1d8]
push edx
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x406db0
mov eax, dword [ebp - 0xa0]
add eax, 1
mov dword [ebp - 0xa0], eax
jmp 0x406dea
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004068d0
add esp, 8
push eax
lea eax, [ebp - 0x9c]
push eax
call fcn.004071a0
add esp, 8
test eax, eax
jne 0x406de5
mov ecx, dword [ebp - 0xa0]
add ecx, 1
mov dword [ebp - 0xa0], ecx
jmp 0x406dea
jmp 0x406d1f
cmp dword [ebp - 0xa0], 0
je 0x406e0b
mov edx, dword [ebp + 8]
push edx
call fcn.00406580
add esp, 4
mov eax, dword [ebp + 8]
mov word [eax + 0x1d0], 0
mov ecx, dword [ebp + 8]
xor edx, edx
mov dx, word [ecx + 0x1d0]
test edx, edx
jne 0x406e80
mov dword [ebp - 4], 0
jmp 0x406e2d
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 4]
cmp edx, dword [ecx + 0xc]
jge 0x406e6f
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov word [ecx + eax*2 + 0x1d2], 0xffff
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
mov dword [eax + edx*4 + 0x1d8], 0xffffffff
mov ecx, dword [ebp - 4]
shl ecx, 4
mov edx, dword [ebp + 8]
movsx eax, word [edx + ecx + 0x10]
test eax, eax
jne 0x406e6d
jmp 0x406e24
jmp 0x406e24
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov ax, word [edx + 0xc]
mov word [ecx + 0x1d0], ax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 8]
and edx, 0x4000
test edx, edx
je 0x406fe9
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
and ecx, 0x20000
test ecx, ecx
jne 0x406fe9
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xc]
sub eax, 1
mov dword [ebp - 0xbc], eax
mov ecx, dword [ebp + 8]
add ecx, 0x10
mov edx, dword [ecx]
mov dword [ebp - 0xb8], edx
mov eax, dword [ecx + 4]
mov dword [ebp - 0xb4], eax
mov edx, dword [ecx + 8]
mov dword [ebp - 0xb0], edx
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0xac], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x1d8]
mov dword [ebp - 0xa8], edx
mov eax, dword [ebp + 8]
mov cx, word [eax + 0x1d2]
mov word [ebp - 0xc0], cx
mov dword [ebp - 4], 0
jmp 0x406f12
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0xbc]
jge 0x406f88
mov ecx, dword [ebp - 4]
add ecx, 1
shl ecx, 4
mov edx, dword [ebp + 8]
lea eax, [edx + ecx + 0x10]
mov ecx, dword [ebp - 4]
shl ecx, 4
mov edx, dword [ebp + 8]
lea ecx, [edx + ecx + 0x10]
mov edx, dword [eax]
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov edx, dword [eax + 8]
mov dword [ecx + 8], edx
mov eax, dword [eax + 0xc]
mov dword [ecx + 0xc], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
mov esi, dword [ebp + 8]
mov eax, dword [esi + eax*4 + 0x1dc]
mov dword [edx + ecx*4 + 0x1d8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
mov esi, dword [ebp + 8]
mov ax, word [esi + eax*2 + 0x1d4]
mov word [edx + ecx*2 + 0x1d2], ax
jmp 0x406f09
mov ecx, dword [ebp - 0xbc]
shl ecx, 4
mov edx, dword [ebp + 8]
lea eax, [edx + ecx + 0x10]
mov ecx, dword [ebp - 0xb8]
mov dword [eax], ecx
mov edx, dword [ebp - 0xb4]
mov dword [eax + 4], edx
mov ecx, dword [ebp - 0xb0]
mov dword [eax + 8], ecx
mov edx, dword [ebp - 0xac]
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 0xbc]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0xa8]
mov dword [ecx + eax*4 + 0x1d8], edx
mov eax, dword [ebp - 0xbc]
mov ecx, dword [ebp + 8]
mov dx, word [ebp - 0xc0]
mov word [ecx + eax*2 + 0x1d2], dx
mov dword [ebp - 0x1c], 0
jmp 0x406ffb
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x1c]
cmp edx, dword [ecx + 4]
jge 0x40713e
mov dword [ebp - 4], 0
jmp 0x40701c
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 4]
cmp edx, dword [ecx + 0xc]
jge 0x407139
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.004068d0
add esp, 8
mov dword [ebp - 0xc4], eax
mov edx, dword [ebp - 0xc4]
push edx
call fcn.00407220
add esp, 4
mov dword [ebp - 0xc8], eax
cmp dword [ebp - 0x18], 0
je 0x4070aa
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 4]
push edx
lea eax, [ebp - 0xc]
push eax
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00407240
add esp, 0x1c
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jge 0x407097
jmp 0x407193
cmp dword [ebp - 0x14], 0
jne 0x4070a2
jmp 0x407191
mov eax, dword [ebp - 0x14]
mov dword [ebp - 8], eax
jmp 0x407100
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 4]
push eax
lea ecx, [ebp - 0xc]
push ecx
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004076b0
add esp, 0x24
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jge 0x4070e4
jmp 0x40718f
cmp dword [ebp - 0x14], 0
jne 0x4070ef
jmp 0x40718d
cmp dword [ebp - 0x18], 0
je 0x4070fa
jmp 0x407056
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 8], ecx
cmp dword [ebp - 0x18], 0
je 0x407113
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
and eax, 8
test eax, eax
je 0x407123
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 8]
and edx, 0x100
test edx, edx
jne 0x40712f
mov eax, dword [ebp + 8]
push eax
call fcn.00406580
add esp, 4
mov eax, dword [ebp - 8]
jmp 0x407195
jmp 0x407013
jmp 0x406ff2
mov ecx, dword [ebp + 8]
push ecx
call fcn.00406580
add esp, 4
cmp dword [ebp - 0x18], 0
jne 0x40716e
cmp dword [ebp - 0x10], 0
jne 0x407162
mov dword [0x411d88], 0x274d
jmp 0x40716c
mov dword [0x411d88], 0x274c
jmp 0x407177
mov edx, dword [ebp - 0xc]
mov dword [0x411d88], edx
or eax, 0xffffffff
jmp 0x407195
mov eax, dword [ebp + 8]
push eax
call fcn.00406580
add esp, 4
or eax, 0xffffffff
jmp 0x407195
jmp 0x407134
jmp 0x40717c
jmp 0x407134
jmp 0x40717c
pop esi
mov esp, ebp
pop ebp
ret