Function at 0x42f060
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 0x4ba5bf
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 0x42f0a8
mov ecx, edi
call fcn.0042f2e0
push 0x28
call fcn.00495af1
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.00495af1
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 0x42f131
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x42f2b1
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [esi + 8], eax
test eax, eax
je 0x42f2b1
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [esi + 0xc], eax
mov eax, dword [esi + 8]
test eax, eax
je 0x42f2b1
cmp dword [ebp - 0x34], 0xffffffff
je 0x42f196
push 0x23
push eax
push dword [esi]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
je 0x42f2b1
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 0x42f2b1
mov eax, dword [ebp - 0x2c]
mov dword [esi + 4], eax
lea eax, [esi + 0x14]
push eax
push 0
push esi
push 0x430c80
push 0x10000
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x10], eax
test eax, eax
je 0x42f2b1
mov dword [esi + 0x1c], 0x42f4d0
mov dword [esi + 0x20], edi
cmp byte [0x4ffd10], 0
mov eax, dword [edi + 0x5c]
mov dword [ebp - 0x38], eax
je 0x42f213
cmp dword [ebx + 0x14], 0x10
mov eax, ebx
jb 0x42f1dd
mov eax, dword [ebx]
mov ecx, 0x4ffd10
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x42f202
test dl, dl
je 0x42f1fe
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x42f202
add ecx, 2
add eax, 2
test dl, dl
jne 0x42f1e2
xor eax, eax
jmp 0x42f207
sbb eax, eax
or eax, 1
test eax, eax
jne 0x42f213
mov esi, dword [0x4ffd50]
jmp 0x42f24a
cmp dword [ebx + 0x14], 0x10
mov eax, ebx
jb 0x42f21d
mov eax, dword [ebx]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov esi, eax
test esi, esi
je 0x42f2b1
cmp dword [ebx + 0x14], 0x10
jb 0x42f236
mov ebx, dword [ebx]
push ebx
push 0x4ffd10
call fcn.00430ee0
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 0x42f2b1
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 0x42f2a4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x42f2b1
mov eax, dword [edi + 0x5c]
mov eax, dword [eax + 4]
mov dword [edi + 0x28], eax
mov al, 1
jmp 0x42f2ba
mov ecx, edi
call fcn.0042f2e0
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.004958e0
mov esp, ebp
pop ebp
ret 8