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

Disassembly:
sub esp, 0x9b8
mov eax, dword [0x414044]
xor eax, esp
mov dword [esp + 0x9b0], eax
push ebp
mov ebp, dword [esp + 0x9c4]
push esi
push edi
xor eax, eax
push 0x7fe
mov edi, ecx
push eax
lea ecx, [esp + 0x1c2]
push ecx
mov word [esp + 0x1c4], ax
call fcn.0040b3e0
xor eax, eax
add esp, 0xc
lea esi, [esp + 0x1b8]
cmp edi, eax
je 0x403fef
mov esi, edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
lea eax, [esp + 0x28]
push eax
xor edx, edx
push 0x101
mov word [esi], dx
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x404086
mov eax, 0x412cfc
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 0x404020
mov edi, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x404034
mov ecx, dword [0x412d1c]
mov dword [edi], ecx
add esi, 0xfffffffe
jmp 0x404050
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x404050
mov edi, esi
mov ecx, 0xf
mov esi, 0x412d20
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor eax, eax
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x9b0]
xor ecx, esp
call fcn.00404b06
add esp, 0x9b8
ret
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp], eax
cmp eax, 0xffffffff
jne 0x4040f1
mov eax, 0x412cfc
mov edx, esi
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4040a3
mov edi, esi
add edi, 0xfffffffe
jmp 0x4040c0
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4040c0
mov edx, dword [0x412d1c]
mov dword [edi], edx
add esi, 0xfffffffe
jmp 0x4040e0
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x4040e0
jmp 0x40405c
push ebx
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x4041ad
push ebx
call dword [sym.imp.WS2_32.dll_inet_addr]
push 2
mov dword [esp + 0x14], eax
push 4
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyaddr]
test eax, eax
jne 0x4041ad
mov eax, 0x412cfc
mov edx, esi
sub edx, eax
jmp 0x404130
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x404130
mov edi, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x404144
mov ecx, dword [0x412d1c]
mov dword [edi], ecx
add esi, 0xfffffffe
jmp 0x404160
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x404160
mov edi, esi
mov ecx, 0xf
mov esi, 0x412d20
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov eax, dword [ebp]
test eax, eax
je 0x404191
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebp], 0
mov ecx, dword [esp + 0x9bc]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.00404b06
add esp, 0x9b8
ret
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
mov eax, dword [esp + 0x9c8]
mov edx, 2
push eax
mov dword [esp + 0x20], ecx
mov word [esp + 0x1c], dx
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [ebp]
push 0x10
lea ecx, [esp + 0x1c]
push ecx
push edx
mov word [esp + 0x26], ax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x404237
mov eax, 0x412d60
mov edx, esi
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4041f3
mov edi, esi
add edi, 0xfffffffe
jmp 0x404210
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x404210
mov eax, dword [0x412d1c]
mov dword [edi], eax
add esi, 0xfffffffe
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x404226
jmp 0x40416c
mov dword [esp + 0x14], 1
jmp 0x404191