Function at 0x10017a50
Capabilities:
Check for time delay via gettickcount
Receive data
Receive data on socket

Disassembly:
sub esp, 8
test edi, edi
push ebx
push ebp
push esi
jne 0x10017a66
mov eax, 3
pop esi
pop ebp
pop ebx
add esp, 8
ret
cmp dword [edi], 0xffffffff
jne 0x10017a77
mov eax, 4
pop esi
pop ebp
pop ebx
add esp, 8
ret
lea esi, [edi + 0x10c]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [edi + 0x28]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp ebx, 4
je 0x10017c85
cmp byte [edi + 0x66], 0
mov ebp, dword [sym.imp.WS2_32.dll_recv]
jne 0x10017acc
call fcn.1001e4a1
push 0
mov dword [eax], 0
mov ecx, dword [edi]
push 1
lea eax, [esp + 0x1b]
push eax
push ecx
call ebp
cmp eax, 1
jne 0x10017b4d
mov dl, byte [esp + 0x13]
mov byte [edi + 0x66], dl
cmp byte [edi + 0x67], 0
jg 0x10017bc0
call fcn.1001e4a1
push 0
mov dword [eax], 0
mov ecx, dword [edi]
push 1
lea eax, [esp + 0x1b]
push eax
push ecx
call ebp
cmp eax, 1
jne 0x10017b4d
add byte [edi + 0x67], 0xff
mov cl, byte [edi + 0x67]
cmp cl, 0xfc
jl 0x10017bae
mov dl, byte [esp + 0x13]
mov eax, dword [edi + 0x50]
movzx ebx, dl
and ebx, 0x7f
imul ebx, eax
add dword [edi + 0x54], ebx
shl eax, 7
test dl, dl
mov dword [edi + 0x50], eax
js 0x10017ad6
mov eax, dword [edi + 0x54]
neg cl
test eax, eax
mov byte [edi + 0x67], cl
jbe 0x10017bc0
push eax
call fcn.1001dc24
add esp, 4
test eax, eax
mov dword [edi + 0x48], eax
jne 0x10017bba
mov eax, 1
pop esi
pop ebp
pop ebx
add esp, 8
ret
test eax, eax
jne 0x10017b5d
mov eax, 7
pop esi
pop ebp
pop ebx
add esp, 8
ret
call fcn.1001e4a1
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esi], eax
call fcn.1001e4a1
cmp dword [eax], 0xb
je 0x10017c85
call fcn.1001e4a1
cmp dword [eax], 0x2733
je 0x10017c85
call fcn.1001e4a1
mov eax, dword [eax]
sub eax, 0x2714
je 0x10017c85
sub eax, 0x32
je 0x10017b51
mov eax, 0xe
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov eax, 0x15
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov edx, dword [edi + 0x54]
mov dword [edi + 0x5c], edx
cmp dword [edi + 0x5c], 0
jbe 0x10017bf3
mov esi, dword [edi + 0x48]
mov ebx, dword [edi + 0x5c]
add esi, dword [edi + 0x60]
call fcn.1001e4a1
push 0
push ebx
mov dword [eax], 0
mov eax, dword [edi]
push esi
push eax
call ebp
test eax, eax
jle 0x10017c33
sub dword [edi + 0x5c], eax
add dword [edi + 0x60], eax
cmp dword [edi + 0x5c], 0
ja 0x10017bc6
mov eax, edi
mov dword [edi + 0x60], 0
call fcn.10019e20
lea esi, [edi + 0x48]
mov ebx, eax
call fcn.10017580
lea esi, [edi + 0xc4]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.10016900
push esi
mov dword [edi + 0x30], eax
mov dword [edi + 0x34], edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
pop esi
pop ebp
pop ebx
add esp, 8
ret
call fcn.1001e4a1
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esi], eax
call fcn.1001e4a1
cmp dword [eax], 0xb
je 0x10017c5d
call fcn.1001e4a1
cmp dword [eax], 0x2733
jne 0x10017b8b
cmp dword [edi + 0x5c], 0x3e8
jbe 0x10017c85
lea esi, [edi + 0xc4]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.10016900
push esi
mov dword [edi + 0x30], eax
mov dword [edi + 0x34], edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret