Function at 0x401660
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, 0x38
mov eax, dword [0x44f040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
mov edi, ecx
mov dword [ebp - 0x34], eax
mov eax, dword [edi + 0x44]
mov byte [edi + 0x78], 0
test eax, eax
je 0x4016a8
cmp eax, 0xffffffff
je 0x4016a8
push 0xffffffffffffffff
push eax
call ebx
push dword [edi + 0x44]
call esi
mov dword [edi + 0x44], 0
mov eax, dword [edi + 0x74]
test eax, eax
je 0x4016c5
cmp eax, 0xffffffff
je 0x4016c5
push 0xffffffffffffffff
push eax
call ebx
push dword [edi + 0x74]
call esi
mov dword [edi + 0x74], 0
lea esi, [edi + 0x58]
xor eax, eax
xchg dword [esi], eax
mov eax, dword [edi + 0x48]
cmp eax, 0xffffffff
je 0x4016e6
push 1
push eax
call dword [sym.imp.WS2_32.dll_shutdown]
push dword [edi + 0x48]
call dword [sym.imp.WS2_32.dll_closesocket]
push dword [edi + 0x4c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push dword [edi + 0x4c]
mov dword [edi + 0x48], 0xffffffff
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 6
push 1
push 2
mov byte [esi], 0
call dword [sym.imp.WS2_32.dll_socket]
push dword [ebp - 0x34]
mov dword [edi + 0x48], eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x34], eax
test eax, eax
je 0x401884
push dword [ebp + 0xc]
mov eax, 2
mov word [ebp - 0x30], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x2e], ax
mov eax, dword [ebp - 0x34]
push 0x10
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x30]
push eax
push dword [edi + 0x48]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x401884
push 4
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], 1
push eax
push 8
push 0xffff
push dword [edi + 0x48]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x4017c4
push eax
push eax
mov dword [ebp - 8], eax
xorps xmm0, xmm0
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x34]
push eax
push 0xc
lea eax, [ebp - 0x10]
movq qword [ebp - 0x10], xmm0
push eax
push 0xc
lea eax, [ebp - 0x20]
mov dword [ebp - 0x1c], 0xea60
push eax
push 0x98000004
push dword [edi + 0x48]
mov dword [ebp - 0x18], 0x1388
mov dword [ebp - 0x20], 1
call dword [sym.imp.WS2_32.dll_WSAIoctl]
mov byte [esi], 1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0
push 0
push 0
push 0
mov dword [edi + 0x70], eax
mov dword [ebp - 0x14], 0x4018a0
mov dword [ebp - 0x10], edi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0
push 0
mov dword [ebp - 8], eax
lea eax, [ebp - 0x14]
push eax
push 0x412ef0
push 0
push 0
call fcn.00424b5a
add esp, 0x18
mov esi, eax
push 0xffffffffffffffff
push dword [ebp - 8]
call ebx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [edi + 0x78], 0
mov dword [edi + 0x44], esi
je 0x401868
push 0
push 0
push 0
push 0
mov dword [ebp - 0x14], 0x4019c0
mov dword [ebp - 0x10], edi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0
push 0
mov dword [ebp - 8], eax
lea eax, [ebp - 0x14]
push eax
push 0x412ef0
push 0
push 0
call fcn.00424b5a
add esp, 0x18
mov esi, eax
push 0xffffffffffffffff
push dword [ebp - 8]
call ebx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x74], esi
mov dword [edi + 0x50], 0
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00419df9
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00419df9
mov esp, ebp
pop ebp
ret 0xc