Function at 0x406c10
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x9b8
mov eax, dword [0x424044]
xor eax, esp
mov dword [esp + 0x9b4], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov edi, ecx
xor ecx, ecx
push 0x7fe
push ecx
lea edx, [esp + 0x1c2]
push edx
mov dword [esp + 0x1c], eax
mov word [esp + 0x1c4], cx
call fcn.00412cf0
xor eax, eax
add esp, 0xc
lea esi, [esp + 0x1b8]
cmp edi, eax
je 0x406c64
mov esi, edi
lea edx, [esp + 0x28]
push edx
xor ecx, ecx
push 0x101
mov word [esi], cx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], eax
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x406cf2
mov eax, 0x42000c
mov edx, esi
sub edx, eax
mov edi, edi
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x406c90
mov edi, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x406ca4
mov eax, dword [0x42002c]
mov dword [edi], eax
add esi, 0xfffffffe
lea ebx, [ebx]
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x406cc0
mov edi, esi
mov ecx, 0xf
mov esi, 0x420030
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x9b4]
xor ecx, esp
call fcn.0040bc96
mov esp, ebp
pop ebp
ret
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, dword [esp + 0x10]
mov dword [edi], eax
cmp eax, 0xffffffff
jne 0x406d51
mov eax, 0x42000c
mov edx, esi
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x406d12
mov edi, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x406d26
mov ecx, dword [0x42002c]
mov dword [edi], ecx
add esi, 0xfffffffe
lea ecx, [ecx]
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x406d40
jmp 0x406ccc
push ebx
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x406e0b
push ebx
call dword [sym.imp.WS2_32.dll_inet_addr]
push 2
push 4
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x20], eax
call dword [sym.imp.WS2_32.dll_gethostbyaddr]
test eax, eax
jne 0x406e0b
mov eax, 0x42000c
mov edx, esi
sub edx, eax
jmp 0x406d90
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x406d90
mov edi, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x406da4
mov eax, dword [0x42002c]
mov dword [edi], eax
add esi, 0xfffffffe
lea ebx, [ebx]
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x406dc0
mov edi, esi
mov ecx, 0xf
mov esi, 0x420030
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov esi, dword [esp + 0x10]
mov eax, dword [esi]
test eax, eax
je 0x406df3
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi], 0
mov eax, dword [esp + 0xc]
pop edi
pop esi
mov ecx, dword [esp + 0x9b4]
xor ecx, esp
call fcn.0040bc96
mov esp, ebp
pop ebp
ret
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
mov edx, dword [ebp + 8]
mov ecx, 2
push edx
mov dword [esp + 0x20], eax
mov word [esp + 0x1c], cx
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [edi]
mov word [esp + 0x1a], ax
push 0x10
lea eax, [esp + 0x1c]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x406e91
mov eax, 0x420070
mov edx, esi
sub edx, eax
lea esp, [esp]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x406e50
mov edi, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x406e64
mov edx, dword [0x42002c]
mov dword [edi], edx
add esi, 0xfffffffe
jmp 0x406e80
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x406e80
jmp 0x406dcc
mov ecx, dword [esp + 0x9bc]
pop edi
pop esi
mov dword [esp + 4], 1
mov eax, dword [esp + 4]
xor ecx, esp
call fcn.0040bc96
mov esp, ebp
pop ebp
ret