Function at 0x478230
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov byte [ebp - 2], dl
mov byte [ebp - 1], cl
call fcn.0046dec0
mov ebx, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, eax
mov al, byte [0x4f9b62]
test al, al
je 0x478261
push 0x4fe3f0
call ebx
mov al, byte [0x4f9b62]
mov edi, dword [edi + 0x320]
mov esi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test al, al
je 0x478278
push 0x4fe3f0
call esi
cmp byte [ebp - 1], 0
je 0x478281
inc edi
jmp 0x478282
dec edi
xor eax, eax
test edi, edi
cmovs edi, eax
call fcn.0046dec0
mov cl, byte [0x4f9b62]
mov dword [ebp - 0xc], eax
test cl, cl
je 0x4782ab
push 0x4fe3f0
call ebx
mov cl, byte [0x4f9b62]
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x320], edi
test cl, cl
je 0x4782bc
push 0x4fe3f0
call esi
call fcn.0046dec0
mov cl, byte [0x4f9b62]
mov dword [ebp - 0xc], eax
test cl, cl
je 0x4782de
push 0x4fe3f0
call ebx
mov cl, byte [0x4f9b62]
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax + 0x31c]
test cl, cl
je 0x4782ef
push 0x4fe3f0
call esi
cmp byte [ebp - 2], 0
je 0x4782f8
inc ebx
jmp 0x4782f9
dec ebx
xor eax, eax
test ebx, ebx
cmovs ebx, eax
call fcn.0046dec0
mov cl, byte [0x4f9b62]
mov dword [ebp - 0xc], eax
test cl, cl
je 0x478326
push 0x4fe3f0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov cl, byte [0x4f9b62]
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x31c], ebx
test cl, cl
je 0x478337
push 0x4fe3f0
call esi
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x500654]
test edi, edi
jle 0x4783c5
cmp eax, dword [ecx + 4]
jle 0x478378
push 0x500654
call fcn.00482a1f
add esp, 4
cmp dword [0x500654], 0xffffffff
jne 0x478378
call fcn.0047ab50
push 0x500654
call fcn.004829e0
add esp, 4
cmp byte [0x500659], 0
jne 0x478456
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
mov dword [ebp - 0xc], 0
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov dword [0x500668], ecx
mov dword [0x50066c], eax
mov dword [0x500670], ecx
mov dword [0x500674], eax
mov byte [0x500659], 1
jmp 0x478456
cmp eax, dword [ecx + 4]
jle 0x4783f5
push 0x500654
call fcn.00482a1f
add esp, 4
cmp dword [0x500654], 0xffffffff
jne 0x4783f5
call fcn.0047ab50
push 0x500654
call fcn.004829e0
add esp, 4
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
mov dword [ebp - 0xc], 0
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
cmp byte [0x500659], 0
mov edx, dword [ebp - 0xc]
je 0x478436
mov ecx, dword [ebp - 0x10]
mov eax, edx
sub ecx, dword [0x500668]
sbb eax, dword [0x50066c]
add dword [0x500678], ecx
adc dword [0x50067c], eax
mov eax, dword [ebp - 0x10]
xorps xmm0, xmm0
movlpd qword [0x500668], xmm0
mov dword [0x500670], eax
mov dword [0x500674], edx
mov byte [0x500659], 0
call fcn.0046dec0
mov cl, byte [0x4f9b62]
mov dword [ebp - 0xc], eax
test cl, cl
je 0x478479
push 0x4fe3f0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov cl, byte [0x4f9b62]
mov edx, dword [ebp - 0xc]
test ebx, ebx
setg al
mov byte [edx + 0x318], al
test cl, cl
je 0x478492
push 0x4fe3f0
call esi
call fcn.0046dec0
mov cl, byte [0x4f9b62]
mov ebx, eax
test cl, cl
je 0x4784b4
push 0x4fe3f0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov cl, byte [0x4f9b62]
test edi, edi
setg al
mov byte [ebx + 0x317], al
test cl, cl
je 0x4784ca
push 0x4fe3f0
call esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret