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

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x14
push 0
push 0
dec ecx
jne 0x5362c4
push ecx
push ebx
push esi
push edi
mov dword [ebp - 0x18], eax
xor eax, eax
push ebp
push 0x536abc
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0x3d], 0
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x3c0]
call fcn.004cf854
mov dword [0x54d474], eax
mov byte [0x54d46c], 0
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x3e4]
mov edx, 0xff
call fcn.0048d24c
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x3e4]
mov eax, dword [eax + 0x64]
mov edx, 0xffffff
call fcn.00451e08
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x3e4]
mov edx, 0x536ad8
call fcn.0048d0cc
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x38c]
mov eax, dword [eax + 0x270]
mov edx, 3
call fcn.00472a08
xor edx, edx
call fcn.00472964
mov eax, dword [0x547a08]
mov eax, dword [eax]
call fcn.004bcb18
lea edx, [ebp - 0x50]
xor eax, eax
call fcn.004045b8
mov eax, dword [ebp - 0x50]
lea edx, [ebp - 0x4c]
call fcn.00413b48
mov edx, dword [ebp - 0x4c]
mov eax, 0x54d708
call fcn.00406aa8
mov dl, 1
mov eax, dword [0x42c44c]
call fcn.00438784
mov dword [0x54d454], eax
mov byte [ebp - 0x19], 0
lea eax, [ebp - 0x28]
push eax
call sub.kernel32.dll_QueryPerformanceFrequency
test eax, eax
je 0x5363b3
lea eax, [ebp - 0x30]
push eax
call sub.kernel32.dll_QueryPerformanceCounter_1
mov dl, 1
mov eax, dword [0x42c44c]
call fcn.00438784
mov ebx, eax
mov byte [0x54d46e], 0
mov byte [0x54d46d], 0
mov eax, 0x536b14
call fcn.00413988
test al, al
je 0x536410
mov byte [ebp - 0x19], 1
lea eax, [ebp - 0x54]
mov ecx, 0x536b14
mov edx, dword [0x54d708]
call fcn.00406f8c
mov edx, dword [ebp - 0x54]
mov eax, dword [0x54d454]
mov ecx, dword [eax]
call dword [ecx + 0x68]
mov eax, dword [0x54d454]
mov edx, dword [eax]
call dword [edx + 0x14]
mov dword [0x54d458], eax
mov eax, 0x54d488
mov edx, dword [0x535a88]
call fcn.00408428
mov eax, 0x54d484
mov edx, dword [0x535a3c]
call fcn.00408428
mov eax, 0x54d498
mov edx, dword [0x535cb8]
call fcn.00408428
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x3c0]
call fcn.004cf854
dec eax
push eax
mov eax, dword [0x54d458]
inc eax
push eax
mov eax, 0x54d498
mov ecx, 2
mov edx, dword [0x535cb8]
call fcn.0040841c
add esp, 8
mov eax, dword [0x54d458]
push eax
mov eax, 0x54d484
mov ecx, 1
mov edx, dword [0x535a3c]
call fcn.0040841c
add esp, 4
lea eax, [ebp - 8]
xor edx, edx
call fcn.00406afc
lea eax, [ebp - 4]
xor edx, edx
call fcn.00406afc
mov eax, dword [0x54d454]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jl 0x5365c1
inc eax
mov dword [ebp - 0x44], eax
xor esi, esi
mov eax, dword [0x54d484]
lea eax, [eax + esi*4]
xor edx, edx
call fcn.00406aa8
lea ecx, [ebp - 0x58]
mov edx, esi
mov eax, dword [0x54d454]
mov edi, dword [eax]
call dword [edi + 0xc]
mov edx, dword [ebp - 0x58]
mov eax, dword [0x54d484]
lea eax, [eax + esi*4]
call fcn.00406aa8
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0x44]
push ebx
lea ecx, [ebp - 0x5c]
mov edx, esi
mov eax, dword [0x54d454]
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x5c]
call fcn.00406b34
mov ecx, eax
mov edx, 0x536b28
mov eax, 0x536b48
call fcn.00434a0c
mov byte [ebp - 0x1a], 0
mov eax, ebx
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jl 0x5365b7
inc eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x3c], 0
lea ecx, [ebp - 0x60]
xor edx, edx
mov eax, ebx
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x60]
call fcn.00413448
test eax, eax
jle 0x536575
lea ecx, [ebp - 0x64]
mov edx, dword [ebp - 0x3c]
mov eax, ebx
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x64]
call fcn.00413448
movzx edx, byte [ebp - 0x1a]
mov ecx, dword [0x54d498]
mov ecx, dword [ecx + esi*4]
mov byte [ecx + edx + 1], al
movzx eax, byte [ebp - 0x1a]
mov edx, dword [0x54d498]
mov edx, dword [edx + esi*4]
movzx eax, byte [edx + eax + 1]
cmp al, byte [0x54d46e]
jbe 0x536594
mov byte [0x54d46e], al
lea ecx, [ebp - 0x68]
xor edx, edx
mov eax, ebx
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x68]
call fcn.00413448
test eax, eax
jle 0x5365af
inc byte [ebp - 0x1a]
inc dword [ebp - 0x3c]
dec dword [ebp - 0x48]
jne 0x536537
inc esi
dec dword [ebp - 0x44]
jne 0x5364ba
lea eax, [ebp - 0x38]
push eax
call sub.kernel32.dll_QueryPerformanceCounter_1
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
sub eax, dword [ebp - 0x30]
sbb edx, dword [ebp - 0x2c]
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], edx
fild qword [ebp - 0x70]
fild qword [ebp - 0x28]
fdivp st(1)
fmul dword [0x536b68]
fcomp dword [0x536b68]
wait
fnstsw ax
sahf
jbe 0x5365fa
mov byte [ebp - 0x3d], 1
cmp byte [0x54d46c], 0
jne 0x536616
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x3e4]
mov edx, 0xffff00
call fcn.0048d24c
cmp byte [0x54d46c], 0
jne 0x536632
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x3e4]
mov eax, dword [eax + 0x64]
xor edx, edx
call fcn.00451e08
cmp byte [ebp - 0x19], 0
jne 0x53664b
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x3e4]
mov edx, 0x536b78
call fcn.0048d0cc
cmp byte [ebp - 0x19], 1
jne 0x5366f9
cmp byte [ebp - 0x3d], 1
jne 0x5366f9
push 0x536ba8
lea edx, [ebp - 0x78]
mov eax, dword [0x54d458]
call fcn.004131b4
push dword [ebp - 0x78]
push 0x536bc8
lea edx, [ebp - 0x7c]
movzx eax, byte [0x54d46e]
call fcn.004131b4
push dword [ebp - 0x7c]
push 0x536be0
lea edx, [ebp - 0x80]
movzx eax, byte [ebp - 0x1a]
call fcn.004131b4
push dword [ebp - 0x80]
push 0x536bf8
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
sub eax, dword [ebp - 0x30]
sbb edx, dword [ebp - 0x2c]
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], edx
fild qword [ebp - 0x70]
fild qword [ebp - 0x28]
fdivp st(1)
add esp, 0xfffffff4
fstp xword [esp]
wait
lea eax, [ebp - 0x84]
call fcn.00415980
push dword [ebp - 0x84]
push 0x536c3c
lea eax, [ebp - 0x74]
mov edx, 9
call fcn.00407070
mov edx, dword [ebp - 0x74]
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x3e4]
call fcn.0048d0cc
cmp byte [ebp - 0x19], 1
jne 0x5367c5
cmp byte [ebp - 0x3d], 0
jne 0x5367c5
push 0x536ba8
lea edx, [ebp - 0x8c]
mov eax, dword [0x54d458]
call fcn.004131b4
push dword [ebp - 0x8c]
push 0x536bc8
lea edx, [ebp - 0x90]
movzx eax, byte [0x54d46e]
call fcn.004131b4
push dword [ebp - 0x90]
push 0x536be0
lea edx, [ebp - 0x94]
movzx eax, byte [ebp - 0x1a]
call fcn.004131b4
push dword [ebp - 0x94]
push 0x536bf8
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
sub eax, dword [ebp - 0x30]
sbb edx, dword [ebp - 0x2c]
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], edx
fild qword [ebp - 0x70]
fild qword [ebp - 0x28]
fdivp st(1)
fmul dword [0x536b68]
add esp, 0xfffffff4
fstp xword [esp]
wait
lea eax, [ebp - 0x98]
call fcn.00415980
push dword [ebp - 0x98]
push 0x536c54
lea eax, [ebp - 0x88]
mov edx, 9
call fcn.00407070
mov edx, dword [ebp - 0x88]
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x3e4]
call fcn.0048d0cc
cmp byte [ebp - 0x19], 1
jne 0x5367de
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x3e4]
mov edx, 0xffff00
call fcn.0048d24c
mov eax, dword [0x54d454]
call fcn.00404e34
lea eax, [ebp - 0xc]
mov edx, 0x536c6c
call fcn.00406afc
movzx eax, byte [ebp - 0x1a]
test eax, eax
jle 0x536894
mov dword [ebp - 0x44], eax
mov esi, 1
movzx eax, byte [ebp - 0x1a]
cmp esi, eax
jne 0x53681b
lea eax, [ebp - 0xc]
xor edx, edx
call fcn.00406afc
push dword [ebp - 4]
mov eax, dword [0x54d498]
mov eax, dword [eax]
movzx eax, byte [eax + esi]
lea edx, [ebp - 0x9c]
call fcn.004131b4
push dword [ebp - 0x9c]
push dword [ebp - 0xc]
lea eax, [ebp - 4]
mov edx, 3
call fcn.00407070
cmp dword [0x54d458], 1
jle 0x53688a
push dword [ebp - 8]
mov eax, dword [0x54d498]
mov edx, dword [0x54d458]
mov eax, dword [eax + edx*4 - 4]
movzx eax, byte [eax + esi]
lea edx, [ebp - 0xa0]
call fcn.004131b4
push dword [ebp - 0xa0]
push dword [ebp - 0xc]
lea eax, [ebp - 8]
mov edx, 3
call fcn.00407070
inc esi
dec dword [ebp - 0x44]
jne 0x536809
lea eax, [ebp - 0x10]
mov ecx, dword [ebp - 4]
mov edx, 0x536c7c
call fcn.00406f8c
push 0x536cb0
lea edx, [ebp - 0xa4]
mov eax, dword [0x54d458]
call fcn.004131b4
push dword [ebp - 0xa4]
push 0x536cdc
push dword [ebp - 8]
lea eax, [ebp - 0x14]
mov edx, 4
call fcn.00407070
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x38c]
mov eax, dword [eax + 0x270]
xor edx, edx
call fcn.00472a08
mov edx, dword [ebp - 0x10]
call fcn.00472964
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x38c]
mov eax, dword [eax + 0x270]
mov edx, 3
call fcn.00472a08
mov edx, dword [ebp - 0x14]
call fcn.00472964
mov eax, ebx
call fcn.00404e34
mov byte [0x54d46c], 0
movzx edx, byte [0x54d46e]
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x3dc]
call fcn.004cf8dc
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x3d0]
call fcn.004cf854
cmp eax, dword [0x54d458]
je 0x536960
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x3d0]
mov edx, dword [0x54d458]
call fcn.004cf8dc
mov eax, dword [ebp - 0x18]
mov ebx, dword [eax + 0x38c]
mov eax, dword [ebx + 0x270]
xor edx, edx
call fcn.00472a08
mov edi, eax
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x536995
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x536995
lea eax, [ebp - 0x10]
mov edx, dword [ebp - 0x10]
call fcn.004062cc
mov esi, eax
test esi, esi
je 0x5369a0
sub esi, 4
mov esi, dword [esi]
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x3bc]
call fcn.004cf854
mov edx, esi
add edx, edx
lea edx, [edx + edx*2]
sub edx, eax
mov eax, edi
call fcn.0047298c
mov eax, dword [ebx + 0x270]
mov edx, 1
call fcn.00472a08
mov edx, 0xa
call fcn.0047298c
mov eax, dword [ebx + 0x270]
mov edx, 2
call fcn.00472a08
mov edx, 0xa
call fcn.0047298c
mov eax, dword [ebx + 0x270]
mov edx, 3
call fcn.00472a08
mov edi, eax
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x536a21
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x536a21
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 0x14]
call fcn.004062cc
mov esi, eax
test esi, esi
je 0x536a2c
sub esi, 4
mov esi, dword [esi]
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x3bc]
call fcn.004cf854
mov edx, esi
add edx, edx
lea edx, [edx + edx*2]
sub edx, eax
mov eax, edi
call fcn.0047298c
mov eax, dword [ebx + 0x270]
mov edx, 4
call fcn.00472a08
mov edx, 0xa
call fcn.0047298c
mov eax, 0x54d488
mov edx, dword [0x535a88]
call fcn.00408428
mov eax, 0x54d484
mov edx, dword [0x535a3c]
call fcn.00408428
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x536ac3
lea eax, [ebp - 0xa4]
mov edx, 0xd
call fcn.00406aa0
lea eax, [ebp - 0x68]
mov edx, 8
call fcn.00406aa0
lea eax, [ebp - 0x14]
mov edx, 5
call fcn.00406aa0
ret