Function at 0x407a50
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, 0xa40
mov eax, dword [0x422044]
xor eax, ebp
mov dword [ebp - 8], eax
push esi
push edi
xor eax, eax
mov word [ebp - 0x9c0], ax
push 0x7fe
push 0
lea ecx, [ebp - 0x9be]
push ecx
call fcn.0040fe70
add esp, 0xc
lea edx, [ebp - 0x9c0]
mov dword [ebp - 0x19c], edx
cmp dword [ebp + 0x14], 0
je 0x407a9f
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x19c], eax
xor ecx, ecx
mov edx, dword [ebp - 0x19c]
mov word [edx], cx
mov dword [ebp - 0x1bc], 0
mov dword [ebp - 0x1b8], 0
mov dword [ebp - 0x1b4], 0
lea eax, [ebp - 0x198]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x407bdb
mov dword [ebp - 0x9c4], 0x41eaa8
mov ecx, dword [ebp - 0x19c]
mov dword [ebp - 0x9c8], ecx
mov edx, dword [ebp - 0x9c8]
mov dword [ebp - 0x9cc], edx
mov eax, dword [ebp - 0x9c4]
mov cx, word [eax]
mov word [ebp - 0x9ce], cx
mov edx, dword [ebp - 0x9c8]
mov ax, word [ebp - 0x9ce]
mov word [edx], ax
mov ecx, dword [ebp - 0x9c4]
add ecx, 2
mov dword [ebp - 0x9c4], ecx
mov edx, dword [ebp - 0x9c8]
add edx, 2
mov dword [ebp - 0x9c8], edx
cmp word [ebp - 0x9ce], 0
jne 0x407b09
mov eax, dword [ebp - 0x19c]
add eax, 0xfffffffe
mov dword [ebp - 0x9d4], eax
mov ecx, dword [ebp - 0x9d4]
mov dx, word [ecx + 2]
mov word [ebp - 0x9d6], dx
add dword [ebp - 0x9d4], 2
cmp word [ebp - 0x9d6], 0
jne 0x407b60
mov edi, dword [ebp - 0x9d4]
mov eax, dword [0x41eac8]
mov dword [edi], eax
mov ecx, dword [ebp - 0x19c]
add ecx, 0xfffffffe
mov dword [ebp - 0x9dc], ecx
mov edx, dword [ebp - 0x9dc]
mov ax, word [edx + 2]
mov word [ebp - 0x9de], ax
add dword [ebp - 0x9dc], 2
cmp word [ebp - 0x9de], 0
jne 0x407b9e
mov edi, dword [ebp - 0x9dc]
mov ecx, 0xf
mov esi, 0x41eacc
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor eax, eax
jmp 0x407fa8
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
mov edx, dword [ebp + 0x10]
cmp dword [edx], 0xffffffff
jne 0x407ced
mov dword [ebp - 0x9e4], 0x41eb0c
mov eax, dword [ebp - 0x19c]
mov dword [ebp - 0x9e8], eax
mov ecx, dword [ebp - 0x9e8]
mov dword [ebp - 0x9ec], ecx
mov edx, dword [ebp - 0x9e4]
mov ax, word [edx]
mov word [ebp - 0x9ee], ax
mov ecx, dword [ebp - 0x9e8]
mov dx, word [ebp - 0x9ee]
mov word [ecx], dx
mov eax, dword [ebp - 0x9e4]
add eax, 2
mov dword [ebp - 0x9e4], eax
mov ecx, dword [ebp - 0x9e8]
add ecx, 2
mov dword [ebp - 0x9e8], ecx
cmp word [ebp - 0x9ee], 0
jne 0x407c1a
mov edx, dword [ebp - 0x19c]
add edx, 0xfffffffe
mov dword [ebp - 0x9f4], edx
mov eax, dword [ebp - 0x9f4]
mov cx, word [eax + 2]
mov word [ebp - 0x9f6], cx
add dword [ebp - 0x9f4], 2
cmp word [ebp - 0x9f6], 0
jne 0x407c71
mov edi, dword [ebp - 0x9f4]
mov edx, dword [0x41eb2c]
mov dword [edi], edx
mov eax, dword [ebp - 0x19c]
add eax, 0xfffffffe
mov dword [ebp - 0x9fc], eax
mov ecx, dword [ebp - 0x9fc]
mov dx, word [ecx + 2]
mov word [ebp - 0x9fe], dx
add dword [ebp - 0x9fc], 2
cmp word [ebp - 0x9fe], 0
jne 0x407cb0
mov edi, dword [ebp - 0x9fc]
mov ecx, 0xf
mov esi, 0x41eb30
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor eax, eax
jmp 0x407fa8
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x1b0], eax
cmp dword [ebp - 0x1b0], 0
jne 0x407d2d
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x1bc], eax
push 2
push 4
lea edx, [ebp - 0x1bc]
push edx
call dword [sym.imp.WS2_32.dll_gethostbyaddr]
mov dword [ebp - 0x1b0], eax
cmp dword [ebp - 0x1b0], 0
jne 0x407e32
mov dword [ebp - 0xa04], 0x41eb70
mov eax, dword [ebp - 0x19c]
mov dword [ebp - 0xa08], eax
mov ecx, dword [ebp - 0xa08]
mov dword [ebp - 0xa0c], ecx
mov edx, dword [ebp - 0xa04]
mov ax, word [edx]
mov word [ebp - 0xa0e], ax
mov ecx, dword [ebp - 0xa08]
mov dx, word [ebp - 0xa0e]
mov word [ecx], dx
mov eax, dword [ebp - 0xa04]
add eax, 2
mov dword [ebp - 0xa04], eax
mov ecx, dword [ebp - 0xa08]
add ecx, 2
mov dword [ebp - 0xa08], ecx
cmp word [ebp - 0xa0e], 0
jne 0x407d5c
mov edx, dword [ebp - 0x19c]
add edx, 0xfffffffe
mov dword [ebp - 0xa14], edx
mov eax, dword [ebp - 0xa14]
mov cx, word [eax + 2]
mov word [ebp - 0xa16], cx
add dword [ebp - 0xa14], 2
cmp word [ebp - 0xa16], 0
jne 0x407db3
mov edi, dword [ebp - 0xa14]
mov edx, dword [0x41eb90]
mov dword [edi], edx
mov eax, dword [ebp - 0x19c]
add eax, 0xfffffffe
mov dword [ebp - 0xa1c], eax
mov ecx, dword [ebp - 0xa1c]
mov dx, word [ecx + 2]
mov word [ebp - 0xa1e], dx
add dword [ebp - 0xa1c], 2
cmp word [ebp - 0xa1e], 0
jne 0x407df2
mov edi, dword [ebp - 0xa1c]
mov ecx, 0xf
mov esi, 0x41eb94
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
jmp 0x407f7c
mov eax, dword [ebp - 0x1b0]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
mov dword [ebp - 0x1a8], eax
mov ecx, 2
mov word [ebp - 0x1ac], cx
movzx edx, word [ebp + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1aa], ax
push 0x10
lea eax, [ebp - 0x1ac]
push eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x407f72
mov dword [ebp - 0xa24], 0x41ebd4
mov eax, dword [ebp - 0x19c]
mov dword [ebp - 0xa28], eax
mov ecx, dword [ebp - 0xa28]
mov dword [ebp - 0xa2c], ecx
mov edx, dword [ebp - 0xa24]
mov ax, word [edx]
mov word [ebp - 0xa2e], ax
mov ecx, dword [ebp - 0xa28]
mov dx, word [ebp - 0xa2e]
mov word [ecx], dx
mov eax, dword [ebp - 0xa24]
add eax, 2
mov dword [ebp - 0xa24], eax
mov ecx, dword [ebp - 0xa28]
add ecx, 2
mov dword [ebp - 0xa28], ecx
cmp word [ebp - 0xa2e], 0
jne 0x407ea2
mov edx, dword [ebp - 0x19c]
add edx, 0xfffffffe
mov dword [ebp - 0xa34], edx
mov eax, dword [ebp - 0xa34]
mov cx, word [eax + 2]
mov word [ebp - 0xa36], cx
add dword [ebp - 0xa34], 2
cmp word [ebp - 0xa36], 0
jne 0x407ef9
mov edi, dword [ebp - 0xa34]
mov edx, dword [0x41ebf4]
mov dword [edi], edx
mov eax, dword [ebp - 0x19c]
add eax, 0xfffffffe
mov dword [ebp - 0xa3c], eax
mov ecx, dword [ebp - 0xa3c]
mov dx, word [ecx + 2]
mov word [ebp - 0xa3e], dx
add dword [ebp - 0xa3c], 2
cmp word [ebp - 0xa3e], 0
jne 0x407f38
mov edi, dword [ebp - 0xa3c]
mov ecx, 0xf
mov esi, 0x41ebf8
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
jmp 0x407f7c
mov dword [ebp - 0x1b8], 1
cmp dword [ebp - 0x1b8], 0
jne 0x407fa2
mov eax, dword [ebp + 0x10]
cmp dword [eax], 0
je 0x407fa2
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
mov eax, dword [ebp - 0x1b8]
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00408ed1
mov esp, ebp
pop ebp
ret