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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff7c
mov dword [ebp - 4], eax
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
xor eax, eax
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
xor eax, eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
call sub.kernel32.dll_GetCurrentThread
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
lea eax, [ebp - 0x20]
push eax
call sub.kernel32.dll_QueryPerformanceFrequency
cmp eax, 1
sbb eax, eax
inc eax
test al, al
je 0x41c9b7
jmp 0x41c792
inc dword [ebp - 0x74]
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
lea eax, [ebp - 0x10]
push eax
call sub.kernel32.dll_QueryPerformanceCounter
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x7c]
push eax
call sub.kernel32.dll_GetThreadPriority
mov dword [ebp - 0x78], eax
cmp dword [ebp - 0x78], 0x7fffffff
je 0x41c61b
push 0xf
mov eax, dword [ebp - 0x7c]
push eax
call sub.kernel32.dll_SetThreadPriority
xor eax, eax
push ebp
push 0x41c6bb
push dword fs:[eax]
mov dword fs:[eax], esp
jmp 0x41c63f
lea eax, [ebp - 0x18]
push eax
call sub.kernel32.dll_QueryPerformanceCounter
call sym.P_Interface.bpl__Jclsysinfo_ReadTimeStampCounter_qqrv
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
sub eax, dword [ebp - 0x10]
sbb edx, dword [ebp - 0xc]
cmp edx, 0
jne 0x41c657
cmp eax, 0x32
jb 0x41c62b
jmp 0x41c659
jl 0x41c62b
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0xc], eax
jmp 0x41c67b
lea eax, [ebp - 0x18]
push eax
call sub.kernel32.dll_QueryPerformanceCounter
call sym.P_Interface.bpl__Jclsysinfo_ReadTimeStampCounter_qqrv
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], edx
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
sub eax, dword [ebp - 0x10]
sbb edx, dword [ebp - 0xc]
cmp edx, 0
jne 0x41c695
cmp eax, 0x3e8
jb 0x41c667
jmp 0x41c697
jl 0x41c667
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x41c6c2
cmp dword [ebp - 0x78], 0x7fffffff
je 0x41c6ba
mov eax, dword [ebp - 0x78]
push eax
mov eax, dword [ebp - 0x7c]
push eax
call sub.kernel32.dll_SetThreadPriority
ret
cmp dword [ebp - 0x74], 3
jl 0x41c5bd
cmp dword [ebp - 0x74], 0x14
jge 0x41c851
push dword [ebp - 0x24]
push dword [ebp - 0x28]
mov eax, 3
xor edx, edx
call sub.rtl70.bpl__System___llmul_qqrv
sub eax, dword [ebp - 0x40]
sbb edx, dword [ebp - 0x3c]
test edx, edx
jge 0x41c7c9
neg eax
adc edx, 0
neg edx
cmp edx, 0
jne 0x41c7d9
cmp eax, 3
ja 0x41c5bd
jmp 0x41c7df
jg 0x41c5bd
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
mov eax, 3
xor edx, edx
call sub.rtl70.bpl__System___llmul_qqrv
sub eax, dword [ebp - 0x40]
sbb edx, dword [ebp - 0x3c]
test edx, edx
jge 0x41c802
neg eax
adc edx, 0
neg edx
cmp edx, 0
jne 0x41c812
cmp eax, 3
ja 0x41c5bd
jmp 0x41c818
jg 0x41c5bd
push dword [ebp - 0x34]
push dword [ebp - 0x38]
mov eax, 3
xor edx, edx
call sub.rtl70.bpl__System___llmul_qqrv
sub eax, dword [ebp - 0x40]
sbb edx, dword [ebp - 0x3c]
test edx, edx
jge 0x41c83b
neg eax
adc edx, 0
neg edx
cmp edx, 0
jne 0x41c84b
cmp eax, 3
ja 0x41c5bd
jmp 0x41c851
jg 0x41c5bd
push dword [ebp - 0x64]
push dword [ebp - 0x68]
push 0
push 0
call sub.rtl70.bpl__Math_IsZero_qqrxdd
test al, al
je 0x41c892
mov dword [ebp - 0x38], 0xffffffff
mov dword [ebp - 0x34], 0x7fffffff
mov dword [ebp - 0x30], 0xffffffff
mov dword [ebp - 0x2c], 0x7fffffff
mov eax, dword [ebp - 4]
mov dword [eax], 0xffffffff
mov dword [eax + 4], 0x7fffffff
jmp 0x41c8fd
push 0
push 0xa
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x44]
call sub.rtl70.bpl__System___llmul_qqrv
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x80], edx
fild qword [ebp - 0x84]
fdiv qword [ebp - 0x68]
call sub.rtl70.bpl__System__ROUND_qqrv
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
push 0
push 0x64
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x44]
call sub.rtl70.bpl__System___llmul_qqrv
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x80], edx
fild qword [ebp - 0x84]
fdiv qword [ebp - 0x68]
call sub.rtl70.bpl__System__ROUND_qqrv
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edx
fild qword [ebp - 0x48]
fdiv qword [ebp - 0x68]
call sub.rtl70.bpl__System__ROUND_qqrv
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 4]
mov ecx, dword [edx]
mov dword [eax + 8], ecx
mov ecx, dword [edx + 4]
mov dword [eax + 0xc], ecx
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
push edx
push eax
push 0
push 0xa
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
call sub.rtl70.bpl__System___llmul_qqrv
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
cmp edx, 0
jne 0x41c93a
cmp eax, 6
jb 0x41c944
jmp 0x41c93c
jl 0x41c944
add dword [ebp - 0x38], 1
adc dword [ebp - 0x34], 0
push 0
push 0xa
mov eax, dword [ebp - 4]
mov edx, dword [eax + 4]
mov eax, dword [eax]
call sub.rtl70.bpl__System___llmul_qqrv
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
sub eax, dword [ebp - 0x28]
sbb edx, dword [ebp - 0x24]
cmp edx, 0
jne 0x41c973
cmp eax, 6
jb 0x41c980
jmp 0x41c975
jl 0x41c980
mov eax, dword [ebp - 4]
add dword [eax + 8], 1
adc dword [eax + 0xc], 0
fld qword [ebp - 0x68]
call sub.rtl70.bpl__System__ROUND_qqrv
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x18], eax
mov dword [ecx + 0x1c], edx
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x48]
mov dword [eax + 0x10], edx
mov edx, dword [ebp - 0x44]
mov dword [eax + 0x14], edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
call sym.P_Interface.bpl__Jclsysinfo_RoundFrequency_qqrxi
cdq
mov ecx, dword [ebp - 4]
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], edx
mov al, 1
mov esp, ebp
pop ebp
ret