Function at 0x404378
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create thread
Create udp socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov dword [ebp - 0x4c], ecx
push str.CTcpSocket::Connect
push 0x4222a4
call fcn.00408ff1
pop ecx
pop ecx
mov eax, dword [ebp - 0x4c]
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 0
mov eax, dword [ebp - 0x4c]
add eax, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, dword [ebp - 0x4c]
mov dword [ecx + 0x14], eax
push 0xa
push 0
mov eax, dword [ebp - 0x4c]
add eax, 0x20
push eax
call fcn.0040e810
add esp, 0xc
push 8
mov eax, dword [ebp - 0x4c]
add eax, 0x14
push eax
mov eax, dword [ebp - 0x4c]
add eax, 0x20
push eax
call fcn.0040da30
add esp, 0xc
mov eax, dword [ebp - 0x4c]
mov byte [eax + 0x28], 0xca
mov eax, dword [ebp - 0x4c]
mov byte [eax + 0x29], 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp - 0x4c]
mov dword [ecx + 0x64], eax
mov eax, dword [ebp - 0x4c]
cmp dword [eax + 0x64], 0xffffffff
jne 0x404414
xor al, al
jmp 0x404699
and dword [ebp - 0xc], 0
push 0
push 0
push 0
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push dword [ebp + 8]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
inc eax
push eax
call fcn.0040cf36
pop ecx
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x28], eax
push 0
push 0
push dword [ebp - 0x24]
push dword [ebp - 0x28]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push dword [ebp + 8]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, dword [ebp - 0x28]
add eax, dword [ebp - 0x24]
mov byte [eax], 0
push dword [ebp - 0x28]
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x48], eax
push dword [ebp - 0x48]
call fcn.0040d9d3
pop ecx
cmp dword [ebp - 0xc], 0
jne 0x4044a0
xor al, al
jmp 0x404699
push 2
pop eax
mov word [ebp - 0x1c], ax
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1a], ax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x18], eax
push 0x10
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x4c]
push dword [eax + 0x64]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x40457f
xor al, al
jmp 0x404699
mov dword [ebp - 0x20], 0x40000
push 4
lea eax, [ebp - 0x20]
push eax
push 0x1001
push 0xffff
mov eax, dword [ebp - 0x4c]
push dword [eax + 0x64]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov dword [ebp - 0x20], 0x40000
push 4
lea eax, [ebp - 0x20]
push eax
push 0x1002
push 0xffff
mov eax, dword [ebp - 0x4c]
push dword [eax + 0x64]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov dword [ebp - 8], 0x7530
push 4
lea eax, [ebp - 8]
push eax
push 0x1006
push 0xffff
mov eax, dword [ebp - 0x4c]
push dword [eax + 0x64]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov dword [ebp - 0x2c], 1
push 4
lea eax, [ebp - 0x2c]
push eax
push 8
push 0xffff
mov eax, dword [ebp - 0x4c]
push dword [eax + 0x64]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x404644
mov dword [ebp - 0x40], 1
mov dword [ebp - 0x3c], 0x2bf20
mov dword [ebp - 0x38], 0x1388
push 0
push 0
lea eax, [ebp - 4]
push eax
push 0
push 0
push 0xc
lea eax, [ebp - 0x40]
push eax
push 0x98000004
mov eax, dword [ebp - 0x4c]
push dword [eax + 0x64]
call dword [sym.imp.WS2_32.dll_WSAIoctl]
push 1
mov eax, dword [ebp - 0x4c]
add eax, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
and dword [ebp - 0x34], 0
lea eax, [ebp - 0x34]
push eax
push 0
push dword [ebp - 0x4c]
push 0x40469d
push 0
push 0
call fcn.0040ed12
add esp, 0x18
mov ecx, dword [ebp - 0x4c]
mov dword [ecx + 0x5c], eax
lea eax, [ebp - 0x30]
push eax
push 0
push dword [ebp - 0x4c]
push 0x404878
push 0
push 0
call fcn.0040ed12
add esp, 0x18
mov ecx, dword [ebp - 0x4c]
mov dword [ecx + 0x60], eax
mov al, 1
leave
ret 8