Function at 0x404c10
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 0x424298
call fcn.00404b60
add esp, 8
mov eax, dword [ebp - 0x4c]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 0
mov edx, dword [ebp - 0x4c]
add edx, 0x18
push edx
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 edx, dword [ebp - 0x4c]
add edx, 0x20
push edx
call fcn.00410190
add esp, 0xc
push 8
mov eax, dword [ebp - 0x4c]
add eax, 0x14
push eax
mov ecx, dword [ebp - 0x4c]
add ecx, 0x20
push ecx
call fcn.0040f460
add esp, 0xc
mov edx, dword [ebp - 0x4c]
mov byte [edx + 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 edx, dword [ebp - 0x4c]
cmp dword [edx + 0x64], 0xffffffff
jne 0x404cae
xor al, al
jmp 0x404f53
mov dword [ebp - 0xc], 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
mov ecx, dword [ebp + 8]
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x24], eax
mov edx, dword [ebp - 0x24]
add edx, 1
push edx
call fcn.0040e960
add esp, 4
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x28], eax
push 0
push 0
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x28]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
mov ecx, dword [ebp + 8]
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edx, dword [ebp - 0x28]
add edx, dword [ebp - 0x24]
mov byte [edx], 0
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x48], ecx
mov edx, dword [ebp - 0x48]
push edx
call fcn.0040f3fb
add esp, 4
cmp dword [ebp - 0xc], 0
jne 0x404d4b
xor al, al
jmp 0x404f53
mov eax, 2
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]
movzx ecx, word [ebp + 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1a], ax
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
mov dword [ebp - 0x18], edx
push 0x10
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ecx + 0x64]
push edx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x404e2f
xor al, al
jmp 0x404f53
mov dword [ebp - 0x20], 0x40000
push 4
lea eax, [ebp - 0x20]
push eax
push 0x1001
push 0xffff
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ecx + 0x64]
push edx
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 ecx, dword [ebp - 0x4c]
mov edx, dword [ecx + 0x64]
push edx
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 ecx, dword [ebp - 0x4c]
mov edx, dword [ecx + 0x64]
push edx
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 ecx, dword [ebp - 0x4c]
mov edx, dword [ecx + 0x64]
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x404ef9
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 ecx, [ebp - 0x40]
push ecx
push 0x98000004
mov edx, dword [ebp - 0x4c]
mov eax, dword [edx + 0x64]
push eax
call dword [sym.imp.WS2_32.dll_WSAIoctl]
push 1
mov ecx, dword [ebp - 0x4c]
add ecx, 0x18
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov dword [ebp - 0x34], 0
lea edx, [ebp - 0x34]
push edx
push 0
mov eax, dword [ebp - 0x4c]
push eax
push 0x404f60
push 0
push 0
call fcn.00410692
add esp, 0x18
mov ecx, dword [ebp - 0x4c]
mov dword [ecx + 0x5c], eax
lea edx, [ebp - 0x30]
push edx
push 0
mov eax, dword [ebp - 0x4c]
push eax
push 0x405170
push 0
push 0
call fcn.00410692
add esp, 0x18
mov ecx, dword [ebp - 0x4c]
mov dword [ecx + 0x60], eax
mov al, 1
mov esp, ebp
pop ebp
ret 8