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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5e38b8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x144
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x10], esp
push str.OnClientReading
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x14], esi
call fcn.005c4bce
mov eax, dword [0x65290c]
mov dword [ebp - 4], 0
mov dword [ebp - 0x1c], eax
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 1
push ecx
lea ecx, [ebp - 0x1c]
call fcn.005c4c99
push 0x667780
mov dword [ebp - 0x20], 0x667780
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 3
call fcn.005c4b60
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
push edx
mov byte [ebp - 4], 4
lea ebx, [eax + 0x78]
lea ecx, [eax + 0x44]
push ebx
call fcn.00401d40
add esi, 0x2f
mov ecx, 0x40
lea edi, [ebp - 0x150]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp + 0xc]
cmp edi, 9
jb 0x412a84
mov ecx, dword [ebp - 0x14]
push 0x11
lea eax, [ebp - 0x150]
push ebx
push eax
call fcn.00437aa0
mov ecx, dword [ebp + 8]
push edi
push ebx
lea esi, [ecx + 0x54]
mov ecx, esi
call fcn.00401d40
push 5
mov ecx, esi
mov dword [ebp - 0x18], 0
call fcn.00401fb0
push 4
lea edx, [ebp - 0x18]
push eax
push edx
call fcn.00494590
add esp, 0xc
mov ecx, esi
push 0
call fcn.00401fb0
mov ecx, dword [ebp - 0x14]
mov esi, eax
xor edx, edx
lea edi, [ecx + 0x2a]
mov ecx, 5
mov dword [ebp - 0x3c], edi
repe cmpsb byte [esi], byte es:[edi]
je 0x412af3
mov eax, dword [ebp + 8]
lea ecx, [eax + 0x54]
call fcn.00401f90
mov ecx, dword [ebp + 8]
add ecx, 0x44
call fcn.00401f90
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 0x14]
push edx
jmp 0x412c83
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x412ebf
mov edx, dword [ebp + 8]
lea esi, [edx + 0x44]
mov ecx, esi
call fcn.00401e10
mov ecx, dword [ebp - 0x18]
cmp eax, ecx
jb 0x412ebf
push ecx
call fcn.005c00fd
add esp, 4
mov ebx, eax
mov ecx, esi
mov dword [ebp - 0x34], ebx
push 0
call fcn.00401fb0
mov ecx, dword [ebp - 0x18]
push ecx
push eax
push ebx
call fcn.00494590
mov edx, dword [ebp + 8]
add esp, 0xc
lea ecx, [edx + 0x54]
call fcn.00401f90
mov ecx, esi
call fcn.00401f90
mov eax, dword [ebp - 0x14]
mov ecx, 0x40
lea edi, [ebp - 0x150]
lea edx, [ebp - 0x150]
lea esi, [eax + 0x2f]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x18]
push ecx
push ebx
push edx
mov ecx, eax
call fcn.00437aa0
mov al, byte [0x6677ac]
test al, 1
jne 0x412b92
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
or al, 1
mov byte [0x6677ac], al
call esi
mov dword [0x667760], eax
jmp 0x412b98
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov eax, dword [ebp - 0x18]
mov edi, dword [0x6677b4]
add edi, eax
mov dword [0x6677b4], edi
call esi
sub eax, dword [0x667760]
cmp eax, 0x3e8
jb 0x412bf2
push str.InterlockedExchange
push str.KERNEL32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
call esi
mov edx, dword [ebp - 0x14]
mov ecx, dword [0x6677b4]
add edx, 0x18
push ecx
push edx
mov dword [0x667760], eax
call edi
mov dword [0x6677b4], 0
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x412c3e
push ebx
call fcn.005c0126
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x14]
add esp, 4
push 0
push eax
call fcn.004131b0
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 4], 0xffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ecx, [ebp - 0x1c]
call fcn.005c4b60
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 eax, 5
jne 0x412cb6
mov edi, dword [ebp - 0x3c]
mov ecx, eax
mov esi, ebx
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x412cb6
push ebx
call fcn.005c0126
mov edi, dword [ebp + 8]
add esp, 4
lea esi, [edi + 0x34]
mov ecx, esi
call fcn.00401e10
push 0
mov ecx, esi
mov ebx, eax
call fcn.00401fb0
mov esi, dword [ebp - 0x14]
push 1
push ebx
push eax
push edi
mov ecx, esi
call fcn.004127d0
push edi
mov ecx, esi
call fcn.00412750
mov eax, dword [ebp - 0x20]
mov dword [ebp - 4], 0xffffffff
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ecx, [ebp - 0x1c]
call fcn.005c4b60
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
mov esi, dword [ebp + 8]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x34]
push ecx
lea ebx, [esi + 0x14]
push edx
mov ecx, ebx
call fcn.00401d40
mov eax, dword [ebp - 0x14]
push 4
push esi
mov ecx, dword [eax + 8]
push ecx
call dword [eax + 4]
mov ecx, ebx
call fcn.00401e10
cmp eax, 0x11
jbe 0x412eb3
push 0
mov ecx, ebx
call fcn.00401fb0
push 5
lea edx, [ebp - 0x44]
push eax
push edx
call fcn.00494590
mov esi, dword [ebp - 0x3c]
add esp, 0xc
mov ecx, 5
lea edi, [ebp - 0x44]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x412d26
lea ecx, [ebp - 0x50]
push 0x62b768
push ecx
mov dword [ebp - 0x50], str.bad_buffer
call fcn.00495a12
xor esi, esi
push 5
mov ecx, ebx
mov dword [ebp + 0xc], esi
call fcn.00401fb0
push 4
lea edx, [ebp + 0xc]
push eax
push edx
call fcn.00494590
add esp, 0xc
mov ecx, ebx
call fcn.00401e10
mov ecx, dword [ebp + 0xc]
lea eax, [eax + eax*4]
xor edx, edx
lea eax, [eax + eax*4]
shl eax, 2
div ecx
mov edx, dword [ebp + 8]
cmp ecx, esi
mov dword [edx + 0x6c], eax
je 0x412eb3
mov ecx, ebx
call fcn.00401e10
cmp eax, dword [ebp + 0xc]
jb 0x412eb3
lea eax, [ebp - 0x44]
push 5
push eax
mov ecx, ebx
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x30], esi
call fcn.00401d80
lea ecx, [ebp + 0xc]
push 4
push ecx
mov ecx, ebx
call fcn.00401d80
lea edx, [ebp - 0x24]
push 4
push edx
mov ecx, ebx
call fcn.00401d80
mov eax, dword [ebp + 0xc]
lea esi, [eax - 0x11]
push esi
call fcn.005c00fd
mov ecx, dword [ebp - 0x24]
add esp, 4
mov edi, eax
push ecx
call fcn.005c00fd
add esp, 4
mov dword [ebp - 0x28], eax
test edi, edi
je 0x412e9e
test eax, eax
je 0x412e9e
push esi
push edi
mov ecx, ebx
call fcn.00401d80
lea edx, [ebp - 0x30]
push 4
push edx
mov ecx, ebx
call fcn.00401d80
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x14]
push esi
push edi
mov dword [ebp - 0x2c], eax
call fcn.004138f0
mov eax, dword [ebp - 0x30]
cmp eax, 0x2189
jne 0x412e54
mov edx, dword [ebp - 0x28]
push esi
lea ecx, [ebp - 0x2c]
push edi
push ecx
push edx
call fcn.004af920
add esp, 0x10
test eax, eax
jne 0x412e3f
mov eax, dword [ebp + 8]
lea esi, [eax + 0x24]
mov ecx, esi
call fcn.00401f90
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
push ecx
push edx
mov ecx, esi
call fcn.00401d40
mov eax, dword [ebp + 8]
push 5
push eax
jmp 0x412e7a
lea edx, [ebp - 0x48]
push 0x62b768
push edx
mov dword [ebp - 0x48], str.bad_buffer
call fcn.00495a12
cmp eax, 0x1c03
jne 0x412e84
mov eax, dword [ebp + 8]
lea esi, [eax + 0x24]
mov ecx, esi
call fcn.00401f90
mov ecx, dword [ebp - 0x2c]
push ecx
push edi
mov ecx, esi
call fcn.00401d40
mov edx, dword [ebp + 8]
push 5
push edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 8]
push ecx
call dword [eax + 4]
push edi
call fcn.005c0126
mov edx, dword [ebp - 0x28]
add esp, 4
push edx
call fcn.005c0126
add esp, 4
jmp 0x412cd8
lea eax, [ebp - 0x4c]
push 0x62b768
push eax
mov dword [ebp - 0x4c], str.bad_Allocate
call fcn.00495a12
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.005c0126
add esp, 4
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 0x14]
push edx
jmp 0x412c83