Function at 0x40c970
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44ce40
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 0x10], esp
push str.OnClientReading
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x14], ebx
call fcn.0043899c
mov eax, dword [0x46453c]
mov dword [ebp - 4], 0
mov dword [ebp - 0x30], eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
push ecx
lea ecx, [ebp - 0x30]
call fcn.00438a67
push 0x4687e0
mov dword [ebp - 0x34], 0x4687e0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call fcn.0043892e
mov al, byte [0x4687d9]
mov byte [ebp - 4], 4
test al, 1
jne 0x40ca03
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
or al, 1
mov byte [0x4687d9], al
call edi
mov dword [0x4687f8], eax
jmp 0x40ca09
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [ebp + 0xc]
mov eax, dword [0x468804]
add eax, esi
mov dword [0x468804], eax
call edi
sub eax, dword [0x4687f8]
cmp eax, 0x3e8
jb 0x40ca49
call edi
mov edx, dword [0x468804]
mov dword [0x4687f8], eax
lea eax, [ebx + 0x18]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov dword [0x468804], 0
test esi, esi
jne 0x40ca87
mov ecx, dword [ebp + 8]
push esi
push ecx
mov ecx, ebx
call fcn.0040ceb0
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ecx, [ebp - 0x30]
mov dword [ebp - 4], 0xffffffff
call fcn.0043892e
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp esi, 5
jne 0x40cad0
lea edi, [ebx + 0x26]
mov ebx, dword [ebp + 8]
mov ecx, esi
xor eax, eax
lea esi, [ebx + 0x64]
repe cmpsb byte [esi], byte es:[edi]
jne 0x40cad5
lea esi, [ebx + 0x34]
mov ecx, esi
call fcn.00401c40
push 0
mov ecx, esi
mov edi, eax
call fcn.00401e00
mov esi, dword [ebp - 0x14]
push edi
push eax
push ebx
mov ecx, esi
call fcn.0040c7a0
push ebx
mov ecx, esi
call fcn.0040c720
mov ecx, dword [ebp - 0x34]
push ecx
jmp 0x40cc2a
mov ebx, dword [ebp + 8]
jmp 0x40cad8
mov esi, dword [ebp + 0xc]
lea edi, [ebx + 0x14]
lea edx, [ebx + 0x58]
push esi
push edx
mov ecx, edi
call fcn.00401b50
mov eax, dword [ebp - 0x14]
push 4
push ebx
mov ecx, dword [eax + 8]
push ecx
call dword [eax + 4]
mov ecx, edi
call fcn.00401c40
cmp eax, 0xd
jbe 0x40cc1d
push 0xc
mov ecx, edi
call fcn.00401e00
mov edx, dword [eax]
xor esi, esi
mov dword [ebp - 0x2c], edx
mov al, byte [eax + 4]
push esi
mov ecx, edi
mov byte [ebp - 0x28], al
mov dword [ebp + 0xc], esi
call fcn.00401e00
mov ecx, dword [eax]
mov dword [ebp + 0xc], ecx
mov ecx, edi
call fcn.00401c40
mov ecx, dword [ebp + 0xc]
lea eax, [eax + eax*4]
xor edx, edx
lea eax, [eax + eax*4]
shl eax, 2
div ecx
cmp ecx, esi
mov dword [ebx + 0x4c], eax
je 0x40cc1d
mov ecx, edi
call fcn.00401c40
cmp eax, dword [ebp + 0xc]
jb 0x40cc1d
lea edx, [ebp + 0xc]
push 4
push edx
mov ecx, edi
mov dword [ebp - 0x18], esi
call fcn.00401ba0
lea eax, [ebp - 0x2c]
push 5
push eax
mov ecx, edi
call fcn.00401ba0
lea ecx, [ebp - 0x18]
push 4
push ecx
mov ecx, edi
call fcn.00401ba0
mov edx, dword [ebp + 0xc]
lea esi, [edx - 0xd]
push esi
call fcn.004342ef
add esp, 4
mov ebx, eax
mov eax, dword [ebp - 0x18]
push eax
call fcn.004342ef
add esp, 4
mov ecx, edi
mov dword [ebp - 0x1c], eax
push esi
push ebx
call fcn.00401ba0
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
push esi
lea edx, [ebp - 0x24]
push ebx
push edx
push eax
mov dword [ebp - 0x24], ecx
call fcn.00414fc0
mov esi, dword [ebp + 8]
add esp, 0x10
test eax, eax
jne 0x40cbf3
lea ecx, [esi + 0x24]
call fcn.00401de0
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x1c]
push ecx
push edx
lea ecx, [esi + 0x24]
call fcn.00401b50
mov eax, dword [ebp - 0x14]
push 5
push esi
mov ecx, dword [eax + 8]
push ecx
call dword [eax + 4]
push ebx
call fcn.00434318
mov edx, dword [ebp - 0x1c]
add esp, 4
push edx
call fcn.00434318
mov eax, dword [esi + 0x2064]
mov ebx, dword [ebp + 8]
add esp, 4
inc eax
mov dword [esi + 0x2064], eax
jmp 0x40caf4
mov ecx, dword [ebp - 0x14]
push ebx
call fcn.0040c720
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ecx, [ebp - 0x30]
mov dword [ebp - 4], 0xffffffff
call fcn.0043892e
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov al, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8