Function at 0x409e80
Capabilities:
Check for time delay via queryperformancecounter
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2ac
mov eax, dword [0x468600]
xor eax, esp
mov dword [esp + 0x2a8], eax
xor eax, eax
push ebx
mov ebx, ecx
push esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
push edi
mov eax, ebx
mov dword [esp + 0x5c], ebx
or edi, 0xffffffff
call fcn.00409830
test eax, eax
jne 0x409f55
mov esi, 1
lea esp, [esp]
push esi
lea eax, [ebx + 8]
push eax
lea eax, [esp + 0xb0]
push str._s_d.h2w
push eax
call fcn.00429b26
add esp, 0x10
push 0
push 0x20000000
push 3
push 0
push 3
push SysReAllocStringLen
lea ecx, [esp + 0xc0]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x409f4b
lea edx, [esp + 0x38]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x40a30e
mov eax, dword [esp + 0x38]
add dword [esp + 0x20], eax
mov ecx, dword [esp + 0x3c]
push edi
adc dword [esp + 0x28], ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
or edi, 0xffffffff
inc esi
call fcn.00409830
test eax, eax
je 0x409ed0
mov edx, dword [esp + 0x20]
or edx, dword [esp + 0x24]
jne 0x409f62
mov dword [esp + 0x10], 4
jmp 0x40a38d
push 0x100000
call fcn.0040b46c
mov dword [esp + 0x34], eax
add esp, 4
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x409fa3
lea ecx, [esp + 0x50]
push ecx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x409fa3
fild qword [esp + 0x50]
fild qword [esp + 0x28]
fdivp st(1)
fmul qword [0x45e578]
jmp 0x409fbb
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
test eax, eax
jge 0x409fbb
fadd qword [0x45e570]
fstp qword [esp + 0x50]
xor esi, esi
fldz
mov dword [esp + 0x18], esi
fstp qword [esp + 0x60]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x34], 1
jmp 0x409fe0
mov edx, dword [esp + 0x1c]
cmp edx, dword [esp + 0x24]
ja 0x40a2de
jb 0x409ffa
cmp esi, dword [esp + 0x20]
jae 0x40a2de
mov eax, ebx
call fcn.00409830
test eax, eax
jne 0x40a2de
mov eax, dword [esp + 0x34]
push eax
lea eax, [ebx + 8]
push eax
lea ecx, [esp + 0xb0]
push str._s_d.h2w
push ecx
call fcn.00429b26
add esp, 0x10
push 0
push 0x20000000
push 3
push 0
push 3
push SysReAllocStringLen
lea edx, [esp + 0xc0]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40a2d6
lea eax, [esp + 0x38]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x40a30e
lea ecx, [esp + 0x90]
push ecx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x40a0a2
lea edx, [esp + 0x88]
push edx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x40a0a2
fild qword [esp + 0x88]
fild qword [esp + 0x90]
fdivp st(1)
fmul qword [0x45e578]
jmp 0x40a0ba
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
test eax, eax
jge 0x40a0ba
fadd qword [0x45e570]
fstp qword [esp + 0x80]
xor eax, eax
cmp dword [esp + 0x3c], eax
fldz
fstp qword [esp + 0x48]
mov dword [esp + 0x44], eax
mov dword [esp + 0x40], eax
jl 0x40a2b3
jg 0x40a0e7
cmp dword [esp + 0x38], eax
jbe 0x40a2b3
mov eax, ebx
call fcn.00409830
test eax, eax
jne 0x40a2b3
xor esi, esi
mov eax, ebx
call fcn.00409830
test eax, eax
jne 0x40a141
mov edx, dword [esp + 0x30]
push eax
lea eax, [esp + 0x80]
push eax
mov ecx, 0x100000
sub ecx, esi
push ecx
lea eax, [esi + edx]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40a30e
mov eax, dword [esp + 0x7c]
test eax, eax
je 0x40a30e
add esi, eax
cmp esi, 0x100000
jb 0x40a0f8
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x30]
push esi
push ecx
push edx
push eax
call fcn.0040a430
add esp, 0x10
test eax, eax
je 0x40a318
add dword [esp + 0x18], esi
lea ecx, [esp + 0xa0]
push ecx
adc dword [esp + 0x20], 0
add dword [esp + 0x48], esi
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x40a1aa
lea edx, [esp + 0x98]
push edx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x40a1aa
fild qword [esp + 0x98]
fild qword [esp + 0xa0]
fdivp st(1)
fmul qword [0x45e578]
jmp 0x40a1c2
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
test eax, eax
jge 0x40a1c2
fadd qword [0x45e570]
fst qword [esp + 0x28]
fsub qword [esp + 0x80]
fsub qword [esp + 0x48]
fld1
fcom st(1)
fnstsw ax
test ah, 0x41
jne 0x40a1e0
fstp st(1)
jmp 0x40a1e2
fstp st(0)
mov eax, dword [ebx + 0x240]
test eax, eax
je 0x40a23d
mov ecx, dword [esp + 0x44]
fild dword [esp + 0x44]
mov eax, dword [eax]
test ecx, ecx
jge 0x40a200
fadd qword [0x45e570]
fmul qword [0x45e578]
mov dword [esp + 0x14], eax
fdivrp st(1)
call fcn.0042c6a6
mov ecx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x5c]
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x28]
push edx
mov edx, dword [esp + 0x24]
push eax
mov eax, dword [esp + 0x24]
mov eax, dword [eax]
push ecx
mov ecx, dword [ebx + 0x240]
push edx
push 2
call eax
jmp 0x40a23f
fstp st(0)
lea ecx, [esp + 0x68]
push ecx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x40a26f
lea edx, [esp + 0x70]
push edx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x40a26f
fild qword [esp + 0x70]
fild qword [esp + 0x68]
fdivp st(1)
fmul qword [0x45e578]
jmp 0x40a287
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
test eax, eax
jge 0x40a287
fadd qword [0x45e570]
fsub qword [esp + 0x28]
add dword [esp + 0x40], esi
xor eax, eax
cmp eax, dword [esp + 0x3c]
fadd qword [esp + 0x48]
fstp qword [esp + 0x48]
jl 0x40a0e7
jg 0x40a2b3
mov eax, dword [esp + 0x40]
cmp eax, dword [esp + 0x38]
jb 0x40a0e7
fld qword [esp + 0x48]
push edi
fadd qword [esp + 0x64]
fstp qword [esp + 0x64]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x18]
or edi, 0xffffffff
inc dword [esp + 0x34]
jmp 0x409fe0
mov dword [esp + 0x10], 4
lea ecx, [esp + 0x70]
push ecx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x40a322
lea edx, [esp + 0x68]
push edx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x40a322
fild qword [esp + 0x68]
fild qword [esp + 0x70]
fdivp st(1)
fmul qword [0x45e578]
jmp 0x40a33a
mov dword [esp + 0x10], 6
jmp 0x40a38d
mov dword [esp + 0x10], 7
jmp 0x40a38d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
test eax, eax
jge 0x40a33a
fadd qword [0x45e570]
mov eax, dword [esp + 0x1c]
mov ecx, eax
and eax, 0x7fffffff
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], eax
fild qword [esp + 0x28]
and ecx, 0x80000000
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], 0
fild qword [esp + 0x28]
fchs
faddp st(1)
fld qword [0x45e580]
fmul st(1), st(0)
fmulp st(1)
fmul qword [0x45e578]
fxch st(1)
fsub qword [esp + 0x50]
fsub qword [esp + 0x60]
fdivp st(1)
fstp qword [ebx + 0x238]
cmp edi, 0xffffffff
je 0x40a399
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x30]
test eax, eax
je 0x40a3aa
push eax
call fcn.0040b49b
add esp, 4
mov ecx, dword [esp + 0x2b4]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00427f57
mov esp, ebp
pop ebp
ret