Function at 0x402d40
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, 0x3c
mov eax, dword [0x5d544c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
mov eax, dword [esi + 4]
push edi
mov edi, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea eax, [esi + 0x18]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [esi + 0x14], eax
xor eax, eax
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
mov word [esi + 0x28], ax
mov ecx, dword [esi + 0x14]
mov edx, dword [esi + 0x18]
push 6
push 1
push 2
mov dword [esi + 0x20], ecx
mov dword [esi + 0x24], edx
mov word [esi + 0x28], 0xca
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0x64], eax
cmp eax, 0xffffffff
jne 0x402dbc
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0054aaae
mov esp, ebp
pop ebp
ret 8
push ebx
push 0
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x24], eax
inc eax
push eax
call fcn.0040e1dc
add esp, 4
push 0
mov ebx, eax
mov eax, dword [ebp - 0x24]
push 0
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, dword [ebp - 0x24]
push ebx
mov byte [ebx + ecx], 0
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov edi, eax
push ebx
mov dword [ebp - 0x24], edi
call fcn.0040e1e7
add esp, 4
test edi, edi
je 0x402eb6
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, 2
push 1
mov word [ebp - 0x20], dx
call edi
push 1
call edi
push 1
call edi
push 1
call edi
push 1
call edi
push 1
call edi
push 1
call edi
push 1
call edi
push 1
call edi
push 1
call edi
push 1
call edi
push 1
call edi
push 1
call edi
push 1
call edi
push 1
call edi
push 1
call edi
push 1
call edi
push 1
call edi
push 1
call edi
push 1
call edi
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [ebp - 0x24]
mov word [ebp - 0x1e], ax
mov edx, dword [ecx + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
mov eax, dword [esi + 0x64]
push 0x10
lea edx, [ebp - 0x20]
push edx
push eax
mov dword [ebp - 0x1c], ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x402ecb
pop ebx
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0054aaae
mov esp, ebp
pop ebp
ret 8
mov edx, dword [esi + 0x64]
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea ecx, [ebp - 0x28]
push ecx
push 0x1001
push 0xffff
mov ebx, 0x40000
push edx
mov dword [ebp - 0x28], ebx
call edi
mov ecx, dword [esi + 0x64]
push 4
lea eax, [ebp - 0x28]
push eax
push 0x1002
push 0xffff
push ecx
mov dword [ebp - 0x28], ebx
call edi
mov eax, dword [esi + 0x64]
push 4
lea edx, [ebp - 0x30]
push edx
push 0x1006
push 0xffff
push eax
mov dword [ebp - 0x30], 0x7530
call edi
mov edx, dword [esi + 0x64]
push 4
lea ecx, [ebp - 0x34]
push ecx
push 8
push 0xffff
mov ebx, 1
push edx
mov dword [ebp - 0x34], ebx
call edi
test eax, eax
jne 0x402f74
mov edx, dword [esi + 0x64]
push eax
push eax
lea eax, [ebp - 0x3c]
push eax
push 0
push 0
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 0x98000004
push edx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], 0x2bf20
mov dword [ebp - 8], 0x1388
call dword [sym.imp.WS2_32.dll_WSAIoctl]
push ebx
lea eax, [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
lea eax, [ebp - 0x2c]
push eax
push 0
push esi
push 0x402fd0
push 0
push 0
mov dword [ebp - 0x2c], 0
call fcn.0054b41a
lea ecx, [ebp - 0x38]
push ecx
push 0
push esi
push 0x4030e0
push 0
push 0
mov dword [esi + 0x5c], eax
call fcn.0054b41a
mov ecx, dword [ebp - 4]
add esp, 0x30
mov dword [esi + 0x60], eax
mov al, bl
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.0054aaae
mov esp, ebp
pop ebp
ret 8