Function at 0x406610
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x2b0
mov eax, dword [0x47b5b0]
xor eax, esp
mov dword [esp + 0x2ac], eax
push ebx
push ebp
push esi
push edi
mov ebx, edx
push 0xffffffffffffffff
mov esi, ecx
push 0
mov ecx, ebx
mov dword [esp + 0x18], ebx
call fcn.004150d0
push 0x103
lea eax, [esp + 0xb9]
push 0
push eax
mov byte [esp + 0xc0], 0
call fcn.00434200
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push esi
push 0x104
lea ecx, [esp + 0xc0]
push ecx
push 0
call fcn.004443da
lea edx, [esp + 0xc8]
push 0x46dfc8
push edx
call fcn.00448430
push 0x103
mov esi, eax
lea eax, [esp + 0x1d9]
push 0
push eax
mov byte [esp + 0x1e0], 0
call fcn.00434200
add esp, 0x28
push 0x2f
test esi, esi
je 0x4066de
add esi, 2
push esi
call fcn.00447930
add esp, 8
test eax, eax
je 0x4066db
sub eax, esi
push eax
push esi
lea ecx, [esp + 0x1c0]
push 0x104
push ecx
call fcn.00441c7d
add esp, 0x10
jmp 0x40672c
push esi
jmp 0x406717
lea eax, [esp + 0xb8]
push eax
call fcn.00447930
add esp, 8
lea ecx, [esp + 0xb4]
test eax, eax
je 0x406716
sub eax, ecx
push eax
mov edx, ecx
push edx
lea eax, [esp + 0x1c0]
push 0x104
push eax
call fcn.00441c7d
add esp, 0x10
jmp 0x40672c
push ecx
lea edx, [esp + 0x1bc]
push 0x104
push edx
call fcn.00437e95
add esp, 0xc
push 0x3c
xor esi, esi
lea eax, [esp + 0x1c]
push esi
push eax
call fcn.00434200
add esp, 0xc
lea ecx, [esp + 0x1b8]
push ecx
call sub.WSOCK32.dll_inet_addr
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
je 0x40675b
mov esi, 1
jmp 0x4067a3
lea edx, [esp + 0x1b8]
push edx
call sub.WSOCK32.dll_gethostbyname
mov ebp, eax
test ebp, ebp
je 0x4068fa
mov edi, dword [ebp + 0xc]
movzx eax, si
add eax, eax
add eax, eax
cmp dword [edi + eax], 0
je 0x40679f
movsx ecx, word [ebp + 0xa]
mov edx, dword [edi + eax]
push ecx
push edx
lea eax, [esp + eax + 0x1c]
push eax
call fcn.004377c0
inc esi
add esp, 0xc
cmp si, 0x10
jb 0x406775
mov eax, dword [esp + 0x14]
xor ecx, ecx
xor ebp, ebp
mov word [esp + 0x94], cx
mov dword [esp + 0x96], ecx
mov dword [esp + 0x9a], ecx
mov dword [esp + 0x9e], ecx
mov dword [esp + 0xa2], ecx
mov dword [esp + 0xa6], ecx
mov dword [esp + 0xaa], ecx
mov dword [esp + 0xae], ecx
mov word [esp + 0xb2], cx
cmp si, 2
jae 0x406836
push eax
call sub.WSOCK32.dll_inet_ntoa
mov ecx, eax
lea esi, [ecx + 1]
lea esp, [esp]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x406800
sub ecx, esi
push ecx
push eax
push 0x10
lea edx, [esp + 0xa0]
push edx
push ebp
call fcn.00433608
mov ecx, dword [ebx + 8]
add esp, 0x14
lea eax, [esp + 0x94]
push eax
push ecx
mov ecx, ebx
call fcn.00415351
jmp 0x4068fa
push 0x3c
lea edx, [esp + 0x5c]
push ebp
push edx
mov dword [esp + 0x60], ebp
call fcn.00434200
push ebp
call fcn.004486b9
push eax
call fcn.00448552
add esp, 0x14
cmp si, bp
jbe 0x40688f
movzx edi, si
lea ebx, [esp + edi*4 + 0x14]
call fcn.00448564
cdq
idiv edi
movzx ecx, bp
sub ebx, 4
add esi, 0xffff
inc ebp
dec edi
lea eax, [esp + edx*4 + 0x14]
mov edx, dword [eax]
mov dword [esp + ecx*4 + 0x54], edx
mov ecx, dword [ebx]
mov dword [eax], ecx
test si, si
ja 0x406862
mov ebx, dword [esp + 0x10]
xor edx, edx
mov ecx, 0x10
lea esi, [esp + 0x54]
lea edi, [esp + 0x14]
rep movsd dword es:[edi], dword [esi]
cmp dx, bp
jae 0x4068fa
lea esi, [esp + 0x14]
movzx ebp, bp
lea esp, [esp]
mov eax, dword [esi]
push eax
call sub.WSOCK32.dll_inet_ntoa
mov ecx, eax
lea edi, [ecx + 1]
lea ecx, [ecx]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x4068c0
sub ecx, edi
push ecx
push eax
push 0x10
lea eax, [esp + 0xa0]
push eax
push 0
call fcn.00433608
mov edx, dword [ebx + 8]
add esp, 0x14
lea ecx, [esp + 0x94]
push ecx
push edx
mov ecx, ebx
call fcn.00415351
add esi, 4
sub ebp, 1
jne 0x4068b0
mov ecx, dword [esp + 0x2bc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00431fec
add esp, 0x2b0
ret