Function at 0x4ff990
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d8752
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1e0
mov eax, dword [0x64aa84]
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x1c0], esi
xor edi, edi
mov dword [ebp - 0x1c4], edi
mov ebx, dword [ebp + 8]
lea eax, [ebx + 0x38]
mov ecx, dword [eax]
mov dword [ebp - 0x24], ecx
mov edx, dword [eax + 4]
mov dword [ebp - 0x20], edx
mov ecx, dword [eax + 8]
mov dword [ebp - 0x1c], ecx
mov edx, dword [eax + 0xc]
mov dword [ebp - 0x18], edx
mov eax, dword [esi + 0x8b4]
cmp eax, dword [esi + 0x8b0]
jle 0x4ffa15
cmp dword [esi + 0x86c], edi
jne 0x4ffa15
dec dword [ebx + 0xc]
jne 0x4ffa0b
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x30]
mov eax, 1
jmp 0x4ffbc9
mov eax, dword [ebx + 0x30]
push str.Init
push eax
call fcn.0057a418
add esp, 8
test eax, eax
jne 0x4ffa34
mov dword [ebp - 0x1c4], 1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x1d4], eax
mov eax, 3
mov ecx, eax
dec eax
mov dword [ebp - 0x1cc], eax
test ecx, ecx
jle 0x4ffb62
test edi, edi
jne 0x4ffb6c
mov eax, dword [ebx + 0x30]
sub eax, 0x10
push eax
call fcn.004026e0
add esp, 4
add eax, 0x10
mov dword [ebp - 0x1b8], eax
mov dword [ebp - 4], 1
push 6
push 1
push 2
mov edi, dword [sym.imp.WS2_32.dll_socket]
call edi
mov dword [esi + 0x48], eax
cmp eax, 0xffffffff
jne 0x4ffaba
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x276d
jne 0x4ffaba
lea edx, [ebp - 0x1b4]
push edx
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
push 6
push 1
push 2
call edi
mov dword [esi + 0x48], eax
mov dword [ebp - 0x1d0], 1
lea eax, [ebp - 0x1d0]
push eax
push 0x8004667e
mov ecx, dword [esi + 0x48]
push ecx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov edi, dword [ebp - 0x1d4]
mov dword [esi + 0x8b4], edi
push 0
push 0
push 0
push 0
push 0x10
lea edx, [esi + 0x10]
push edx
mov eax, dword [esi + 0x48]
push eax
call dword [sym.imp.WS2_32.dll_WSAConnect]
cmp eax, 0xffffffff
jne 0x4ffdef
mov byte [ebp - 4], 2
push 0x5dc0
push 0x5dc0
push 1
push 0
mov ecx, dword [esi + 0x48]
push ecx
call fcn.0051e7f0
add esp, 0x14
mov dword [ebp - 4], 1
mov dword [esi + 0x8b0], edi
push ebx
mov ecx, esi
call fcn.004fdab0
mov edi, eax
test edi, edi
jne 0x4ffbe4
mov edx, dword [esi + 0x48]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
mov dword [esi + 0x48], eax
mov dword [ebp - 4], eax
lea ecx, [ebp - 0x1b8]
call fcn.00401b70
test edi, edi
jne 0x4ffb6c
inc dword [esi + 0x830]
test ebx, ebx
je 0x4ffb7c
dec dword [ebx + 0xc]
jne 0x4ffb7c
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x30]
mov ecx, dword [esi + 0x48]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
or ebx, 0xffffffff
mov dword [esi + 0x48], ebx
mov eax, dword [ebp - 0x1c4]
test eax, eax
je 0x4ffbc7
push 1
push 0x661678
lea ecx, [ebp - 0x1ec]
call fcn.005789d4
mov dword [ebp - 4], 0xb
mov dword [0x661670], 0
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x1ec]
call fcn.0057897a
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x14]
call fcn.0057981f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x5ff880
mov eax, dword [ebp - 0x1b8]
push eax
call fcn.0057a418
add esp, 8
test eax, eax
jne 0x4ffc2c
mov edi, 1
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esi + 0x48]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
mov dword [esi + 0x48], eax
mov dword [ebp - 4], eax
lea ecx, [ebp - 0x1b8]
call fcn.00401b70
jmp 0x4ffb6c
mov byte [ebp - 4], 5
mov ecx, dword [esi + 0x4c]
call fcn.00412c20
push 0x78
mov edx, dword [esi + 0x4c]
push edx
mov eax, dword [esi + 0x48]
push eax
call fcn.004edf60
add esp, 0xc
mov eax, 1
mov dword [ebp - 4], eax
mov dword [ebp - 0x1bc], eax
mov ecx, dword [esi + 0x48]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x48], 0xffffffff
push ecx
mov ecx, esp
mov dword [ebp - 0x1e0], esp
lea edx, [ebp - 0x1b8]
push edx
call fcn.00402dc0
mov byte [ebp - 4], 1
mov eax, dword [esi + 0x4c]
push eax
call fcn.00501040
add esp, 8
mov ebx, eax
mov dword [ebp - 0x1c8], ebx
inc dword [esi + 0x7e0]
mov ecx, dword [esi + 0x4c]
call fcn.00412c20
test ebx, ebx
je 0x4ffd6b
lea ecx, [ebx + 0x38]
mov edx, dword [ebp - 0x24]
mov dword [ecx], edx
mov eax, dword [ebp - 0x20]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x1c]
mov dword [ecx + 8], edx
mov eax, dword [ebp - 0x18]
mov dword [ecx + 0xc], eax
mov byte [ebp - 4], 8
push ebx
push ecx
mov ecx, esp
mov dword [ebp - 0x1dc], esp
lea edx, [ebp - 0x1b8]
push edx
call fcn.00402dc0
mov byte [ebp - 4], 8
mov ecx, esi
call fcn.004ff5a0
mov edi, eax
mov dword [ebp - 0x1bc], edi
jmp 0x4ffd38
mov dword [ebp - 4], 1
dec dword [ebx + 0xc]
jne 0x4ffd4b
mov edx, dword [ebx]
mov ecx, ebx
call dword [edx + 0x30]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1b8]
call fcn.00401b70
mov eax, dword [ebp - 0x1cc]
mov ebx, dword [ebp + 8]
jmp 0x4ffa45
xor edi, edi
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1b8]
call fcn.00401b70
mov ebx, dword [ebp + 8]
jmp 0x4ffb66
xor edi, edi
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1b8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4ffb66
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
jmp 0x4ffb66