Function at 0x4039a0
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.00414050
xor eax, eax
add esp, 0xc
lea esi, [ebp - 0x804]
cmp edi, eax
je 0x4039ec
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 0x403a80
mov eax, 0x427204
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 0x403a20
lea edi, [esi - 2]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x403a32
mov eax, dword [0x427224]
mov dword [edi], eax
add esi, 0xfffffffe
jmp 0x403a50
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x403a50
mov edi, esi
mov ecx, 0xf
mov esi, 0x427228
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.00412027
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 0x403ae1
mov eax, 0x427204
mov edx, esi
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x403aa2
lea edi, [esi - 2]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x403ab4
mov ecx, dword [0x427224]
mov dword [edi], ecx
add esi, 0xfffffffe
jmp 0x403ad0
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x403ad0
jmp 0x403a5c
push ebx
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x403b9d
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 0x403b9d
mov eax, 0x427204
mov edx, esi
sub edx, eax
nop
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x403b20
lea edi, [esi - 2]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x403b32
mov eax, dword [0x427224]
mov dword [edi], eax
add esi, 0xfffffffe
jmp 0x403b50
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x403b50
mov edi, esi
mov ecx, 0xf
mov esi, 0x427228
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 0x403b85
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.00412027
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 0x403c31
mov eax, 0x427268
mov edx, esi
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x403be6
lea edi, [esi - 2]
jmp 0x403c00
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x403c00
mov edx, dword [0x427224]
mov dword [edi], edx
add esi, 0xfffffffe
jmp 0x403c20
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x403c20
jmp 0x403b5c
mov dword [ebp - 0x9a8], 1
jmp 0x403b85