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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9b0
mov eax, dword [0x42b0a4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov edi, ecx
xor ecx, ecx
push 0x7fe
push ecx
lea edx, [ebp - 0x802]
push edx
mov dword [ebp - 0x9b0], eax
mov word [ebp - 0x804], cx
call fcn.00414340
xor eax, eax
add esp, 0xc
lea esi, [ebp - 0x804]
cmp edi, eax
je 0x40426c
mov esi, edi
lea edx, [ebp - 0x9a4]
push edx
xor ecx, ecx
push 0x101
mov word [esi], cx
mov dword [ebp - 0x9ac], eax
mov dword [ebp - 0x9a8], eax
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x404300
mov eax, 0x4272e4
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 0x4042a0
lea edi, [esi - 2]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4042b2
mov eax, dword [0x427304]
mov dword [edi], eax
add esi, 0xfffffffe
jmp 0x4042d0
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x4042d0
mov edi, esi
mov ecx, 0xf
mov esi, 0x427308
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00412317
mov esp, ebp
pop ebp
ret 8
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, dword [ebp - 0x9b0]
mov dword [edi], eax
cmp eax, 0xffffffff
jne 0x404361
mov eax, 0x4272e4
mov edx, esi
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x404322
lea edi, [esi - 2]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x404334
mov ecx, dword [0x427304]
mov dword [edi], ecx
add esi, 0xfffffffe
jmp 0x404350
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x404350
jmp 0x4042dc
push ebx
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x40441d
push ebx
call dword [sym.imp.WS2_32.dll_inet_addr]
push 2
push 4
lea edx, [ebp - 0x9ac]
push edx
mov dword [ebp - 0x9ac], eax
call dword [sym.imp.WS2_32.dll_gethostbyaddr]
test eax, eax
jne 0x40441d
mov eax, 0x4272e4
mov edx, esi
sub edx, eax
nop
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4043a0
lea edi, [esi - 2]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4043b2
mov eax, dword [0x427304]
mov dword [edi], eax
add esi, 0xfffffffe
jmp 0x4043d0
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x4043d0
mov edi, esi
mov ecx, 0xf
mov esi, 0x427308
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov esi, dword [ebp - 0x9b0]
mov eax, dword [esi]
test eax, eax
je 0x404405
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi], 0
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x9a8]
pop edi
xor ecx, ebp
pop esi
call fcn.00412317
mov esp, ebp
pop ebp
ret 8
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 [ebp - 0x810], eax
mov word [ebp - 0x814], cx
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [edi]
mov word [ebp - 0x812], ax
push 0x10
lea eax, [ebp - 0x814]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x4044b1
mov eax, 0x427348
mov edx, esi
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x404466
lea edi, [esi - 2]
jmp 0x404480
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x404480
mov edx, dword [0x427304]
mov dword [edi], edx
add esi, 0xfffffffe
jmp 0x4044a0
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x4044a0
jmp 0x4043dc
mov dword [ebp - 0x9a8], 1
jmp 0x404405