Function at 0x402df0
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:
sub esp, 0x38
mov eax, dword [0x5e14a4]
xor eax, esp
mov dword [esp + 0x34], eax
push esi
mov esi, ecx
mov eax, dword [esi + 4]
push edi
mov edi, dword [esp + 0x44]
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 0x402e6c
pop edi
xor al, al
pop esi
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.0054df46
add esp, 0x38
ret 8
push ebx
push ebp
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 ebx, eax
lea eax, [ebx + 1]
push eax
call fcn.00411689
add esp, 4
push 0
push 0
push ebx
mov ebp, eax
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebp
mov byte [ebx + ebp], 0
call dword [sym.imp.WS2_32.dll_gethostbyname]
push ebp
mov ebx, eax
call fcn.00411694
add esp, 4
test ebx, ebx
je 0x402f52
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, 2
mov ebp, 1
push ebp
mov word [esp + 0x38], cx
call edi
push ebp
call edi
push ebp
call edi
push ebp
call edi
push ebp
call edi
push ebp
call edi
push ebp
call edi
push ebp
call edi
push ebp
call edi
push ebp
call edi
push ebp
call edi
push ebp
call edi
push ebp
call edi
push ebp
call edi
push ebp
call edi
push ebp
call edi
push ebp
call edi
push ebp
call edi
push ebp
call edi
push ebp
call edi
mov edx, dword [esp + 0x50]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x36], ax
mov eax, dword [ebx + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
mov ecx, dword [esi + 0x64]
push 0x10
lea eax, [esp + 0x38]
push eax
push ecx
mov dword [esp + 0x44], edx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x402f69
pop ebp
pop ebx
pop edi
xor al, al
pop esi
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.0054df46
add esp, 0x38
ret 8
mov eax, dword [esi + 0x64]
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea edx, [esp + 0x14]
push edx
push 0x1001
push 0xffff
mov ebx, 0x40000
push eax
mov dword [esp + 0x24], ebx
call edi
mov edx, dword [esi + 0x64]
push 4
lea ecx, [esp + 0x14]
push ecx
push 0x1002
push 0xffff
push edx
mov dword [esp + 0x24], ebx
call edi
mov ecx, dword [esi + 0x64]
push 4
lea eax, [esp + 0x20]
push eax
push 0x1006
push 0xffff
push ecx
mov dword [esp + 0x30], 0x7530
call edi
mov eax, dword [esi + 0x64]
push 4
lea edx, [esp + 0x1c]
push edx
push 8
push 0xffff
push eax
mov dword [esp + 0x2c], ebp
call edi
test eax, eax
jne 0x403018
push eax
push eax
lea ecx, [esp + 0x28]
push ecx
push eax
push eax
mov eax, dword [esi + 0x64]
push 0xc
lea edx, [esp + 0x40]
push edx
push 0x98000004
push eax
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x50], 0x2bf20
mov dword [esp + 0x54], 0x1388
call dword [sym.imp.WS2_32.dll_WSAIoctl]
push ebp
lea eax, [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
lea ecx, [esp + 0x14]
push ecx
push 0
push esi
push 0x403080
push 0
push 0
mov dword [esp + 0x2c], 0
call fcn.0054e906
lea edx, [esp + 0x3c]
push edx
push 0
push esi
push 0x403190
push 0
push 0
mov dword [esi + 0x5c], eax
call fcn.0054e906
mov ecx, dword [esp + 0x74]
add esp, 0x30
pop ebp
pop ebx
mov dword [esi + 0x60], eax
pop edi
pop esi
xor ecx, esp
mov al, 1
call fcn.0054df46
add esp, 0x38
ret 8