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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x12b4
call fcn.00418b40
mov eax, dword [0x449260]
push ebx
push esi
push edi
mov dword [esp + 0x12bc], eax
mov esi, ecx
xor ebx, ebx
xor eax, eax
mov word [esp + 0x2b8], bx
mov ecx, 0x1ff
lea edi, [esp + 0x2ba]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0xc]
push eax
push 0x100
lea ecx, [esp + 0x2c0]
push ecx
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
call fcn.00402350
mov eax, dword [esp + 0x20]
add esp, 0x10
cmp eax, ebx
jne 0x407a5e
mov ecx, dword [ebp + 0xc]
push 0x3ff
lea eax, [esp + 0x2bc]
push eax
push 0xffffffffffffffff
push ecx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edx, dword [ebp + 0x14]
mov dword [esp + 0xc], edx
cmp dword [esp + 0xc], 0x50
sete al
xor ecx, ecx
mov dword [esp + 0x18], ecx
lea edx, [esp + 0x128]
mov dword [esp + 0x1c], ecx
push edx
mov dword [esp + 0x24], ecx
push 2
mov byte [esi + 5], al
mov dword [esp + 0x2c], ecx
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_htons]
push ebx
mov word [esp + 0x1e], ax
push ebx
mov byte [esp + 0x30], 0
xor eax, eax
mov ecx, 0x3f
lea edi, [esp + 0x31]
rep stosd dword es:[edi], eax
push 0xff
lea ecx, [esp + 0x34]
push ecx
push 0xffffffffffffffff
lea edx, [esp + 0x2cc]
stosw word es:[edi], ax
push edx
push ebx
mov word [esp + 0x34], 2
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetACP]
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edx, dword [ebp + 0xc]
mov ebx, eax
xor eax, eax
push 0x3ff
mov ecx, 0x200
lea edi, [esp + 0xabc]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xabc]
push ecx
push 0xffffffffffffffff
push edx
push eax
push eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [esp + 0xab8]
push eax
call fcn.00416f06
add esp, 4
push eax
lea ecx, [esp + 0xabc]
push ecx
lea ecx, [esi + 8]
call fcn.00401a30
cmp ebx, 0xffffffff
mov edx, dword [ebp + 0x14]
mov dword [esi + 0x24], edx
jne 0x407b59
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x407bec
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov ebx, dword [edx]
push 6
push 1
push 2
mov dword [esp + 0x28], ebx
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 0x28], eax
je 0x407bec
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea ecx, [esp + 0x18]
push ecx
push 0x1006
push 0xffff
push eax
mov dword [esp + 0x28], 0x12c
call edi
mov eax, dword [esi + 0x28]
push 4
lea edx, [esp + 0x18]
push edx
push 0x1005
push 0xffff
push eax
call edi
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
push ecx
mov ecx, dword [esi + 0x28]
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
cmp eax, 0xffffffff
je 0x407bec
mov eax, dword [esi + 0x28]
push 0x10
lea edx, [esp + 0x1c]
push edx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x407c03
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x407c03
cmp eax, 0x2733
je 0x407c03
xor al, al
mov ecx, dword [esp + 0x12bc]
call fcn.00417c0f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [esp + 0x12bc]
mov al, 1
call fcn.00417c0f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14