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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x593b62
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
sub esp, 0xc4
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x14], ecx
push str.OnClientReading
lea ecx, [ebp - 0x48]
call fcn.0057731e
mov dword [ebp - 4], 0
lea eax, [ebp - 0x48]
push eax
push 0x6068a8
lea ecx, [ebp - 0x1c]
call fcn.004177d0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x48]
call fcn.005772b0
mov byte [ebp - 4], 3
xor ecx, ecx
mov cl, byte [0x606888]
and ecx, 1
test ecx, ecx
jne 0x416426
mov dl, byte [0x606888]
or dl, 1
mov byte [0x606888], dl
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x6068cc], eax
mov eax, dword [0x6068dc]
add eax, dword [ebp + 0xc]
mov dword [0x6068dc], eax
push str.InterlockedExchange
push 0x5a95f8
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [0x6068cc]
cmp eax, 0x3e8
jb 0x416486
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x6068cc], eax
mov ecx, dword [0x6068dc]
push ecx
mov edx, dword [ebp - 0x14]
add edx, 0x18
push edx
call dword [ebp - 0x20]
mov dword [0x6068dc], 0
cmp dword [ebp + 0xc], 0
jne 0x4164b5
push 0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x14]
call fcn.00416b30
mov byte [ebp - 0x4c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.00417840
mov al, byte [ebp - 0x4c]
jmp 0x416801
cmp dword [ebp + 0xc], 5
jne 0x416530
push 5
mov ecx, dword [ebp - 0x14]
add ecx, 0x26
push ecx
mov edx, dword [ebp + 8]
add edx, 0x60
push edx
call fcn.00452000
add esp, 0xc
test eax, eax
jne 0x416530
mov ecx, dword [ebp + 8]
add ecx, 0x34
call fcn.00402510
mov dword [ebp - 0x74], eax
push 0
mov ecx, dword [ebp + 8]
add ecx, 0x34
call fcn.00402740
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x74]
push eax
mov ecx, dword [ebp - 0x78]
push ecx
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp - 0x14]
call fcn.00416100
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x14]
call fcn.00416030
mov byte [ebp - 0x50], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.00417840
mov al, byte [ebp - 0x50]
jmp 0x416801
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
add edx, 0x58
push edx
mov ecx, dword [ebp + 8]
add ecx, 0x14
call fcn.004023e0
push 4
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 8]
push edx
mov eax, dword [ebp - 0x14]
call dword [eax + 4]
mov ecx, dword [ebp + 8]
add ecx, 0x14
call fcn.00402510
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x7c], 0xd
jbe 0x4167a9
push 8
mov ecx, dword [ebp + 8]
add ecx, 0x14
call fcn.00402740
mov dword [ebp - 0x80], eax
push 5
mov ecx, dword [ebp - 0x80]
push ecx
lea edx, [ebp - 0x28]
push edx
call fcn.00450bd0
add esp, 0xc
push 5
lea eax, [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x14]
add ecx, 0x26
push ecx
call fcn.00452000
add esp, 0xc
test eax, eax
je 0x4165c1
mov dword [ebp - 0x54], str.bad_buffer
push 0x5d02f8
lea edx, [ebp - 0x54]
push edx
call fcn.004520ac
mov dword [ebp - 0x2c], 0
push 0
mov ecx, dword [ebp + 8]
add ecx, 0x14
call fcn.00402740
mov dword [ebp - 0x84], eax
push 4
mov eax, dword [ebp - 0x84]
push eax
lea ecx, [ebp - 0x2c]
push ecx
call fcn.00450bd0
add esp, 0xc
mov ecx, dword [ebp + 8]
add ecx, 0x14
call fcn.00402510
mov dword [ebp - 0x88], eax
mov eax, dword [ebp - 0x88]
imul eax, eax, 0x64
xor edx, edx
div dword [ebp - 0x2c]
mov edx, dword [ebp + 8]
mov dword [edx + 0x4c], eax
cmp dword [ebp - 0x2c], 0
je 0x4167a2
mov ecx, dword [ebp + 8]
add ecx, 0x14
call fcn.00402510
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp - 0x8c]
cmp eax, dword [ebp - 0x2c]
jb 0x4167a2
mov dword [ebp - 0x30], 0
push 4
lea ecx, [ebp - 0x2c]
push ecx
mov ecx, dword [ebp + 8]
add ecx, 0x14
call fcn.00402440
push 4
lea edx, [ebp - 0x30]
push edx
mov ecx, dword [ebp + 8]
add ecx, 0x14
call fcn.00402440
push 5
lea eax, [ebp - 0x28]
push eax
mov ecx, dword [ebp + 8]
add ecx, 0x14
call fcn.00402440
mov ecx, dword [ebp - 0x2c]
sub ecx, 0xd
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x34]
push edx
call fcn.0057284c
add esp, 4
mov dword [ebp - 0x90], eax
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x58]
mov dword [ebp - 0x38], ecx
mov edx, dword [ebp - 0x30]
push edx
call fcn.0057284c
add esp, 4
mov dword [ebp - 0x94], eax
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x3c], ecx
cmp dword [ebp - 0x38], 0
je 0x4166d0
cmp dword [ebp - 0x3c], 0
jne 0x4166e5
mov dword [ebp - 0x60], 0x5a9760
push 0x5d02f8
lea edx, [ebp - 0x60]
push edx
call fcn.004520ac
mov eax, dword [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
mov ecx, dword [ebp + 8]
add ecx, 0x14
call fcn.00402440
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
lea edx, [ebp - 0x40]
push edx
mov eax, dword [ebp - 0x3c]
push eax
call fcn.0043cc90
add esp, 0x10
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
jne 0x416752
mov ecx, dword [ebp + 8]
add ecx, 0x24
call fcn.00402710
mov ecx, dword [ebp - 0x40]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
mov ecx, dword [ebp + 8]
add ecx, 0x24
call fcn.004023e0
push 5
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 8]
push edx
mov eax, dword [ebp - 0x14]
call dword [eax + 4]
jmp 0x416767
mov dword [ebp - 0x64], str.bad_buffer
push 0x5d02f8
lea ecx, [ebp - 0x64]
push ecx
call fcn.004520ac
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x68], edx
mov eax, dword [ebp - 0x68]
push eax
call fcn.00572875
add esp, 4
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x6c], ecx
mov edx, dword [ebp - 0x6c]
push edx
call fcn.00572875
add esp, 4
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x2064]
add ecx, 1
mov edx, dword [ebp + 8]
mov dword [edx + 0x2064], ecx
jmp 0x4167a4
jmp 0x4167a9
jmp 0x416559
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x14]
call fcn.00416030
jmp 0x4167e4
mov dword [ebp - 4], 2
mov byte [ebp - 0x70], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.00417840
mov al, byte [ebp - 0x70]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8