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

Disassembly:
sub esp, 0x9ac
mov eax, dword [0x42d0a4]
xor eax, esp
mov dword [esp + 0x9a8], eax
push ebp
mov ebp, dword [esp + 0x9b8]
push esi
push edi
push 0x7fe
lea eax, [esp + 0x1ba]
push 0
push eax
mov edi, ecx
mov word [esp + 0x1c0], 0
call fcn.00414720
xor eax, eax
add esp, 0xc
cmp edi, eax
lea esi, [esp + 0x1b4]
je 0x4038c0
mov esi, edi
lea ecx, [esp + 0x24]
push ecx
push 0x101
mov word [esi], ax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x403943
mov eax, 0x428be4
mov edx, esi
sub edx, eax
jmp 0x4038f0
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4038f0
mov edi, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x403904
mov edx, dword [0x428c04]
mov dword [edi], edx
add esi, 0xfffffffe
jmp 0x403920
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x403920
mov edi, esi
mov ecx, 0xf
mov esi, 0x428c08
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor eax, eax
jmp 0x403a45
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [ebp], eax
jne 0x40399e
mov eax, 0x428be4
mov edx, esi
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x403960
mov edi, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x403974
mov eax, dword [0x428c04]
mov dword [edi], eax
add esi, 0xfffffffe
lea ebx, [ebx]
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x403990
jmp 0x40392c
push ebx
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x403a5f
push ebx
call dword [sym.imp.WS2_32.dll_inet_addr]
push 2
push 4
lea ecx, [esp + 0x14]
push ecx
mov dword [esp + 0x18], eax
call dword [sym.imp.WS2_32.dll_gethostbyaddr]
test eax, eax
jne 0x403a5f
mov eax, 0x428be4
mov edx, esi
sub edx, eax
jmp 0x4039e0
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4039e0
mov edi, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4039f4
mov edx, dword [0x428c04]
mov dword [edi], edx
add esi, 0xfffffffe
jmp 0x403a10
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x403a10
mov edi, esi
mov ecx, 0xf
mov esi, 0x428c08
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov eax, dword [ebp]
test eax, eax
je 0x403a41
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebp], 0
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x9b4]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.004122be
add esp, 0x9ac
ret 8
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
mov eax, dword [esp + 0x9bc]
push eax
mov dword [esp + 0x1c], edx
mov word [esp + 0x18], 2
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [ebp]
push 0x10
lea ecx, [esp + 0x18]
push ecx
push edx
mov word [esp + 0x22], ax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x403ae1
mov eax, 0x428c48
mov edx, esi
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x403aa2
mov edi, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x403ab6
mov eax, dword [0x428c04]
mov dword [edi], eax
add esi, 0xfffffffe
lea esp, [esp]
mov ax, word [esi + 2]
add esi, 2
test ax, ax
jne 0x403ad0
jmp 0x403a1c
mov dword [esp + 0x10], 1
jmp 0x403a41