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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x28
push ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea eax, [esp + 0x10]
push eax
call edi
mov ebx, dword [0x7299fc]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov ecx, ebx
call fcn.006665b0
sub eax, dword [esi + 0xe0]
mov dword [esp + 0xc], eax
jns 0x5199c1
mov dword [esp + 0xc], 0
mov ecx, ebx
mov edx, 1
shl edx, cl
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fimul dword [esp + 0x10]
fmul dword [0x727a04]
fstp dword [esi + 0xdc]
call edi
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov ecx, dword [0x7299fc]
call fcn.006665b0
mov dword [esi + 0xe0], eax
mov eax, dword [0x7321a0]
test eax, eax
je 0x519ebb
mov eax, dword [esi + 0x14]
mov edi, dword [eax + 0x234]
fld dword [edi + 0x3d4]
fcom dword [0x6a8608]
fnstsw ax
test ah, 5
jp 0x519a35
fstp st(0)
fld dword [0x6a8608]
jmp 0x519a50
fcom dword [0x6a860c]
fnstsw ax
test ah, 0x41
jne 0x519a50
fstp st(0)
fld dword [0x6a860c]
fsub dword [0x6bdbb4]
fdiv dword [0x6a860c]
fld dword [0x6bde2c]
fmul st(1)
call fcn.00666390
fld dword [0x6bde28]
fmul st(1)
mov dword [esi + 0x314], eax
call fcn.00666390
fld dword [0x6bdb18]
fmul st(1)
mov ebx, 0x500
sub ebx, eax
call fcn.00666390
fsubr dword [0x6bda18]
mov ecx, dword [esi + 0x14]
mov dword [esi + 0xf0], eax
fmul dword [0x6a8604]
fst dword [esi + 0xec]
fcomp dword [ecx + 0x260]
fnstsw ax
test ah, 5
jp 0x519ac4
fld dword [0x6a8618]
fmul dword [ecx + 0x260]
fstp dword [esi + 0xec]
lea ecx, [ebx + 0x4000]
push ecx
call fcn.00546ea0
fstp dword [esp + 0x10]
push ebx
call fcn.00546ea0
fld dword [esp + 0x14]
fmul dword [edi + 0x90]
mov edx, 0x3fff
fld st(1)
sub edx, ebx
fmul dword [edi + 0x94]
push edx
fsubp st(1)
fmul dword [esi + 0xec]
fstp dword [esp + 0x1c]
fmul dword [edi + 0x90]
fld dword [esp + 0x18]
fmul dword [edi + 0x94]
faddp st(1)
fmul dword [esi + 0xec]
fstp dword [esp + 0x20]
call fcn.00546ea0
mov eax, 0xffff
fstp dword [esp + 0x18]
sub eax, ebx
push eax
call fcn.00546ea0
fld dword [esp + 0x1c]
fmul dword [edi + 0x90]
add esp, 0x10
fld st(1)
lea ebx, [esi + 0x100]
fmul dword [edi + 0x94]
fsubp st(1)
fmul dword [esi + 0xec]
fstp dword [esp + 0x20]
fmul dword [edi + 0x90]
fld dword [esp + 0xc]
mov dword [esp + 0xc], 2
fmul dword [edi + 0x94]
faddp st(1)
fmul dword [esi + 0xec]
fstp dword [esp + 0x24]
lea ecx, [ecx]
mov eax, dword [ebx + 0x210]
test eax, eax
push 0
jne 0x519bb3
fld dword [esp + 0x14]
lea eax, [esi + 0x80]
fadd dword [edi + 0x60]
fstp dword [eax]
fld dword [esp + 0x18]
fadd dword [edi + 0x64]
fstp dword [esi + 0x84]
mov ecx, dword [edi + 0x68]
mov dword [esi + 0x88], ecx
jmp 0x519bd8
fld dword [esp + 0x24]
lea eax, [esi + 0x90]
fadd dword [edi + 0x60]
fstp dword [eax]
fld dword [esp + 0x28]
fadd dword [edi + 0x64]
fstp dword [esi + 0x94]
mov ecx, dword [edi + 0x68]
mov dword [esi + 0x98], ecx
mov edx, dword [ebx]
mov ecx, ebx
push eax
call dword [edx + 0x28]
mov eax, dword [esp + 0xc]
add ebx, 0x220
dec eax
mov dword [esp + 0xc], eax
jne 0x519b80
cmp byte [esi + 0x11], 1
jne 0x519eb4
fld dword [esi + 0xd4]
mov al, byte [esi + 0xd0]
test al, al
fdiv dword [esi + 0xc8]
fmul dword [esi + 0xc0]
je 0x519c34
fld dword [esi + 0x94]
mov eax, dword [esi + 0x90]
fld dword [esi + 0x98]
mov dword [esi + 0x20], eax
fxch st(1)
fstp dword [esi + 0x24]
fstp dword [esi + 0x28]
fcomp dword [esi + 0xc0]
fnstsw ax
test ah, 0x41
jne 0x519cfc
mov al, byte [esi + 0xd0]
test al, al
jne 0x519cef
lea edi, [esi + 0x80]
lea ebx, [esi + 0x40]
push edi
push ebx
call fcn.00599d10
fstp dword [esp + 0x14]
fld dword [edi]
lea eax, [esi + 0xa0]
fsub dword [ebx]
add esp, 4
fld dword [edi + 4]
fsub dword [ebx + 4]
fld dword [edi + 8]
fsub dword [ebx + 8]
fstp dword [esp + 0x2c]
mov ecx, dword [esp + 0x2c]
fxch st(1)
fstp dword [eax]
mov dword [eax + 8], ecx
fstp dword [eax + 4]
fld dword [esp + 0x10]
fdiv dword [esi + 0xc0]
fmul dword [esi + 0xc8]
fst dword [esi + 0xc8]
fld dword [0x6bda18]
fdiv st(1)
fstp dword [esp]
push eax
push eax
fstp st(0)
call fcn.00407570
mov edx, dword [esp + 0x18]
mov dword [esi + 0xc0], edx
mov byte [esi + 0xd0], 1
mov dword [esi + 0xd4], 0
fld dword [edi + 4]
fld dword [edi + 8]
mov eax, dword [edi]
fxch st(1)
add esp, 0xc
fstp dword [esi + 0x24]
mov dword [esi + 0x20], eax
fstp dword [esi + 0x28]
jmp 0x519cfc
cmp byte [esi + 0xd1], 1
jne 0x519cfc
mov byte [esi + 0x11], 0
fld dword [esi + 0xa4]
fld dword [esi + 0xa8]
fld dword [esi + 0x40]
fadd dword [esi + 0xa0]
fstp dword [esi + 0x40]
fxch st(1)
fadd dword [esi + 0x44]
fstp dword [esi + 0x44]
fadd dword [esi + 0x48]
fstp dword [esi + 0x48]
mov al, byte [esi + 0xd1]
cmp al, 1
fld dword [esi + 0xd8]
fdiv dword [esi + 0xcc]
fmul dword [esi + 0xc4]
jne 0x519d5b
fld dword [esi + 0x94]
mov ecx, dword [esi + 0x90]
fld dword [esi + 0x98]
mov dword [esi + 0x30], ecx
fxch st(1)
fstp dword [esi + 0x34]
fstp dword [esi + 0x38]
fcomp dword [esi + 0xc4]
fnstsw ax
test ah, 0x41
jne 0x519e22
mov al, byte [esi + 0xd1]
test al, al
jne 0x519e15
lea edi, [esi + 0x90]
lea ebx, [esi + 0x50]
push edi
push ebx
call fcn.00599d10
fstp dword [esp + 0x14]
fld dword [edi]
lea eax, [esi + 0xb0]
fsub dword [ebx]
add esp, 4
fld dword [edi + 4]
fsub dword [ebx + 4]
fld dword [edi + 8]
fsub dword [ebx + 8]
fstp dword [esp + 0x2c]
mov edx, dword [esp + 0x2c]
fxch st(1)
fstp dword [eax]
mov dword [eax + 8], edx
fstp dword [eax + 4]
fld dword [esp + 0x10]
fdiv dword [esi + 0xc4]
fmul dword [esi + 0xcc]
fst dword [esi + 0xcc]
fld dword [0x6bda18]
fdiv st(1)
fstp dword [esp]
push eax
push eax
fstp st(0)
call fcn.00407570
mov eax, dword [esp + 0x18]
mov dword [esi + 0xc4], eax
mov byte [esi + 0xd1], 1
mov dword [esi + 0xd8], 0
fld dword [edi + 4]
fld dword [edi + 8]
mov ecx, dword [edi]
fxch st(1)
add esp, 0xc
fstp dword [edi + 4]
mov dword [edi], ecx
fstp dword [edi + 8]
jmp 0x519e22
cmp byte [esi + 0xd0], 1
jne 0x519e22
mov byte [esi + 0x11], 0
fld dword [esi + 0xb4]
lea ebx, [esi + 0x50]
fld dword [esi + 0xb8]
lea edi, [esi + 0x100]
fld dword [ebx]
mov dword [esp + 0xc], 2
fadd dword [esi + 0xb0]
fstp dword [ebx]
fxch st(1)
fadd dword [ebx + 4]
fstp dword [ebx + 4]
fadd dword [ebx + 8]
fstp dword [ebx + 8]
jmp 0x519e60
mov eax, dword [edi + 0x210]
test eax, eax
mov ecx, edi
push 0
jne 0x519e79
mov edx, dword [edi]
lea eax, [esi + 0x40]
push eax
call dword [edx + 0x28]
jmp 0x519e7f
mov eax, dword [edi]
push ebx
call dword [eax + 0x28]
mov eax, dword [esp + 0xc]
add edi, 0x220
dec eax
mov dword [esp + 0xc], eax
jne 0x519e60
fld dword [esi + 0xdc]
fadd dword [esi + 0xd8]
fstp dword [esi + 0xd8]
fld dword [esi + 0xd4]
fadd dword [esi + 0xdc]
fstp dword [esi + 0xd4]
mov eax, esi
call fcn.00519ed0
pop edi
pop ebx
mov esp, ebp
pop ebp
ret