Function at 0x42f030
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Create thread
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ba76f
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x4eac74]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [0x4ffd78]
mov ebx, dword [ebp + 8]
cmp dword [edi + 0x5c], 0
mov dword [edi + 0x24], 0xe5e
je 0x42f078
mov ecx, edi
call fcn.0042f2b0
push 0x28
call fcn.00495ca1
mov esi, eax
mov dword [ebp - 0x38], esi
mov dword [ebp - 4], 0
push 0x18
mov dword [esi], 0xffffffff
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 0
call fcn.00495ca1
add esp, 8
mov dword [esi + 0x24], eax
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [edi + 0x5c], esi
mov eax, dword [esi]
mov dword [ebp - 0x34], eax
mov dword [esi + 0x18], 0x20000
cmp eax, 0xffffffff
jne 0x42f101
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x42f281
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [esi + 8], eax
test eax, eax
je 0x42f281
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [esi + 0xc], eax
mov eax, dword [esi + 8]
test eax, eax
je 0x42f281
cmp dword [ebp - 0x34], 0xffffffff
je 0x42f166
push 0x23
push eax
push dword [esi]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
je 0x42f281
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 0x10
push eax
lea eax, [ebp - 0x30]
push eax
push dword [esi]
call dword [sym.imp.WS2_32.dll_getpeername]
cmp eax, 0xffffffff
je 0x42f281
mov eax, dword [ebp - 0x2c]
mov dword [esi + 4], eax
lea eax, [esi + 0x14]
push eax
push 0
push esi
push 0x430b40
push 0x10000
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x10], eax
test eax, eax
je 0x42f281
mov dword [esi + 0x1c], 0x42f4a0
mov dword [esi + 0x20], edi
cmp byte [0x4ffd10], 0
mov eax, dword [edi + 0x5c]
mov dword [ebp - 0x38], eax
je 0x42f1e3
cmp dword [ebx + 0x14], 0x10
mov eax, ebx
jb 0x42f1ad
mov eax, dword [ebx]
mov ecx, 0x4ffd10
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x42f1d2
test dl, dl
je 0x42f1ce
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x42f1d2
add ecx, 2
add eax, 2
test dl, dl
jne 0x42f1b2
xor eax, eax
jmp 0x42f1d7
sbb eax, eax
or eax, 1
test eax, eax
jne 0x42f1e3
mov esi, dword [0x4ffd50]
jmp 0x42f21a
cmp dword [ebx + 0x14], 0x10
mov eax, ebx
jb 0x42f1ed
mov eax, dword [ebx]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov esi, eax
test esi, esi
je 0x42f281
cmp dword [ebx + 0x14], 0x10
jb 0x42f206
mov ebx, dword [ebx]
push ebx
push 0x4ffd10
call fcn.00430d00
add esp, 8
mov dword [0x4ffd50], esi
mov ebx, dword [ebp - 0x38]
push 0x33
push dword [ebx + 8]
push dword [ebx]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
je 0x42f281
mov eax, dword [esi + 0xc]
mov ecx, 2
push 0xe5e
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebx + 4], eax
mov word [ebp - 0x20], cx
mov dword [ebp - 0x1c], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1e], ax
lea eax, [ebp - 0x20]
push 0x10
push eax
push dword [ebx]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x42f274
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x42f281
mov eax, dword [edi + 0x5c]
mov eax, dword [eax + 4]
mov dword [edi + 0x28], eax
mov al, 1
jmp 0x42f28a
mov ecx, edi
call fcn.0042f2b0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00495a90
mov esp, ebp
pop ebp
ret 8