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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41198e
mov eax, dword fs:[0]
push eax
sub esp, 0x23c
mov eax, dword [0x450028]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x230]
push eax
mov dword [ebp - 0x248], 0x415178
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
lea ecx, [ebp - 0x240]
push ecx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, dword [ebp - 0x248]
push edx
push 0x414d5c
push 0x414d70
mov ecx, 0x25
call fcn.00406a00
add esp, 0xc
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp - 0x218]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push 0x455eac
push 0x500000
call fcn.00410c10
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x40360c
mov edx, dword [0x455ebc]
mov eax, dword [edx + 0xc]
mov ecx, 0x455ebc
call eax
add eax, 0x10
mov dword [ebp - 0x21c], eax
lea ecx, [ebp - 0x218]
push ecx
push 0x4150e0
lea edi, [ebp - 0x21c]
mov byte [ebp - 4], 1
call fcn.00406470
mov edx, dword [ebp - 0x21c]
add esp, 8
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x402d4e
push 0
push 0
push 0x2000
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x224], eax
je 0x402d47
cmp eax, 0x2000
jbe 0x402d47
xor edi, edi
push edi
lea eax, [ebp - 0x220]
push eax
push 0x500000
push ebx
push esi
mov dword [ebp - 0x220], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402d47
mov eax, dword [ebp - 0x220]
test eax, eax
jbe 0x402d47
mov ecx, dword [ebp - 0x224]
add ecx, 0xffffe000
cmp edi, ecx
ja 0x402d47
push 0
lea edx, [ebp - 0x220]
push edx
push 0x500000
push ebx
push esi
add edi, eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x402d11
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402d74
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [0x455ebc]
mov eax, dword [edx + 0xc]
mov ecx, 0x455ebc
call eax
add eax, 0x10
mov dword [ebp - 0x220], eax
lea ecx, [ebp - 0x218]
push ecx
push 0x415100
lea edi, [ebp - 0x220]
mov byte [ebp - 4], 2
call fcn.00406470
mov edx, dword [ebp - 0x220]
add esp, 8
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x402e5e
push 0
push 0
push 0x1000
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x224], eax
je 0x402e57
cmp eax, 0x1000
jbe 0x402e57
xor edi, edi
push edi
lea eax, [ebp - 0x21c]
push eax
push 0x500000
push ebx
push esi
mov dword [ebp - 0x21c], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402e57
mov eax, dword [ebp - 0x21c]
test eax, eax
jbe 0x402e57
mov ecx, dword [ebp - 0x224]
add ecx, 0xfffff000
cmp edi, ecx
ja 0x402e57
push 0
lea edx, [ebp - 0x21c]
push edx
push 0x500000
push ebx
push esi
add edi, eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x402e21
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x220]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402e84
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [0x455ebc]
mov eax, dword [edx + 0xc]
mov ecx, 0x455ebc
call eax
add eax, 0x10
mov dword [ebp - 0x220], eax
lea ecx, [ebp - 0x218]
push ecx
push str.c_rz_
lea edi, [ebp - 0x220]
mov byte [ebp - 4], 3
call fcn.00406470
mov edx, dword [ebp - 0x220]
add esp, 8
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x402f6e
push 0
push 0
push 0x1000
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x224], eax
je 0x402f67
cmp eax, 0x1000
jbe 0x402f67
xor edi, edi
push edi
lea eax, [ebp - 0x21c]
push eax
push 0x500000
push ebx
push esi
mov dword [ebp - 0x21c], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402f67
mov eax, dword [ebp - 0x21c]
test eax, eax
jbe 0x402f67
mov ecx, dword [ebp - 0x224]
add ecx, 0xfffff000
cmp edi, ecx
ja 0x402f67
push 0
lea edx, [ebp - 0x21c]
push edx
push 0x500000
push ebx
push esi
add edi, eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x402f31
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x220]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402f94
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [0x455ebc]
mov eax, dword [edx + 0xc]
mov ecx, 0x455ebc
call eax
add eax, 0x10
mov dword [ebp - 0x220], eax
lea ecx, [ebp - 0x218]
push ecx
push 0x41512c
lea edi, [ebp - 0x220]
mov byte [ebp - 4], 4
call fcn.00406470
mov edx, dword [ebp - 0x220]
add esp, 8
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40307e
push 1
push 0
push 0x1000
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x224], eax
je 0x403077
cmp eax, 0x1000
jbe 0x403077
xor edi, edi
push edi
lea eax, [ebp - 0x21c]
push eax
push 0x500000
push ebx
push esi
mov dword [ebp - 0x21c], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403077
mov eax, dword [ebp - 0x21c]
test eax, eax
jbe 0x403077
mov ecx, dword [ebp - 0x224]
add ecx, 0xfffff000
cmp edi, ecx
ja 0x403077
push 0
lea edx, [ebp - 0x21c]
push edx
push 0x500000
push ebx
push esi
add edi, eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403041
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x220]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4030a4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [0x455ebc]
mov eax, dword [edx + 0xc]
mov ecx, 0x455ebc
call eax
add eax, 0x10
mov dword [ebp - 0x220], eax
lea ecx, [ebp - 0x218]
push ecx
push 0x4151e8
lea edi, [ebp - 0x220]
mov byte [ebp - 4], 5
call fcn.00406470
mov edx, dword [ebp - 0x220]
add esp, 8
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40318e
push 1
push 0
push 0x1000
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x224], eax
je 0x403187
cmp eax, 0x1000
jbe 0x403187
xor edi, edi
push edi
lea eax, [ebp - 0x21c]
push eax
push 0x500000
push ebx
push esi
mov dword [ebp - 0x21c], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403187
mov eax, dword [ebp - 0x21c]
test eax, eax
jbe 0x403187
mov ecx, dword [ebp - 0x224]
add ecx, 0xfffff000
cmp edi, ecx
ja 0x403187
push 0
lea edx, [ebp - 0x21c]
push edx
push 0x500000
push ebx
push esi
add edi, eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403151
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x220]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4031b4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [0x455ebc]
mov eax, dword [edx + 0xc]
mov ecx, 0x455ebc
call eax
add eax, 0x10
mov dword [ebp - 0x220], eax
lea ecx, [ebp - 0x218]
push ecx
push 0x415150
lea edi, [ebp - 0x220]
mov byte [ebp - 4], 6
call fcn.00406470
mov edx, dword [ebp - 0x220]
add esp, 8
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40329e
push 1
push 0
push 0x1000
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x224], eax
je 0x403297
cmp eax, 0x1000
jbe 0x403297
xor edi, edi
push edi
lea eax, [ebp - 0x21c]
push eax
push 0x500000
push ebx
push esi
mov dword [ebp - 0x21c], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403297
mov eax, dword [ebp - 0x21c]
test eax, eax
jbe 0x403297
mov ecx, dword [ebp - 0x224]
add ecx, 0xfffff000
cmp edi, ecx
ja 0x403297
push 0
lea edx, [ebp - 0x21c]
push edx
push 0x500000
push ebx
push esi
add edi, eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403261
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x220]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4032c4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [0x455ebc]
mov eax, dword [edx + 0xc]
mov ecx, 0x455ebc
call eax
add eax, 0x10
mov dword [ebp - 0x220], eax
lea ecx, [ebp - 0x218]
push ecx
push 0x415200
lea edi, [ebp - 0x220]
mov byte [ebp - 4], 7
call fcn.00406470
mov edx, dword [ebp - 0x220]
add esp, 8
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4033ae
push 1
push 0
push 0x1000
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x224], eax
je 0x4033a7
cmp eax, 0x1000
jbe 0x4033a7
xor edi, edi
push edi
lea eax, [ebp - 0x21c]
push eax
push 0x500000
push ebx
push esi
mov dword [ebp - 0x21c], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4033a7
mov eax, dword [ebp - 0x21c]
test eax, eax
jbe 0x4033a7
mov ecx, dword [ebp - 0x224]
add ecx, 0xfffff000
cmp edi, ecx
ja 0x4033a7
push 0
lea edx, [ebp - 0x21c]
push edx
push 0x500000
push ebx
push esi
add edi, eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403371
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x220]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4033d4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [0x455ebc]
mov eax, dword [edx + 0xc]
mov ecx, 0x455ebc
call eax
add eax, 0x10
mov dword [ebp - 0x220], eax
lea ecx, [ebp - 0x218]
push ecx
push 0x415224
lea edi, [ebp - 0x220]
mov byte [ebp - 4], 8
call fcn.00406470
mov edx, dword [ebp - 0x220]
add esp, 8
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4034c2
push 1
push 0
push 0x1000
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x224], eax
je 0x4034bb
cmp eax, 0x1000
jbe 0x4034bb
xor edi, edi
push edi
lea eax, [ebp - 0x21c]
push eax
push 0x500000
push ebx
push esi
mov dword [ebp - 0x21c], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4034bb
mov eax, dword [ebp - 0x21c]
test eax, eax
jbe 0x4034bb
mov ecx, dword [ebp - 0x224]
add ecx, 0xfffff000
cmp edi, ecx
ja 0x4034bb
push 0
lea edx, [ebp - 0x21c]
push edx
push 0x500000
push ebx
push esi
add edi, eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403485
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x220]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4034e8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [0x455ebc]
mov eax, dword [edx + 0xc]
mov ecx, 0x455ebc
call eax
add eax, 0x10
mov dword [ebp - 0x220], eax
lea ecx, [ebp - 0x218]
push ecx
push 0x415244
lea edi, [ebp - 0x220]
mov byte [ebp - 4], 9
call fcn.00406470
mov edx, dword [ebp - 0x220]
add esp, 8
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4035dd
push 1
push 0
push 0x1000
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0x224], eax
je 0x4035d6
cmp eax, 0x1000
jbe 0x4035d6
xor edi, edi
push edi
lea eax, [ebp - 0x21c]
push eax
push 0x500000
push ebx
push esi
mov dword [ebp - 0x21c], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4035d6
lea esp, [esp]
mov eax, dword [ebp - 0x21c]
test eax, eax
jbe 0x4035d6
mov ecx, dword [ebp - 0x224]
add ecx, 0xfffff000
cmp edi, ecx
ja 0x4035d6
push 0
lea edx, [ebp - 0x21c]
push edx
push 0x500000
push ebx
push esi
add edi, eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4035a0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x220]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403603
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ebx
call fcn.00410c0a
add esp, 4
lea ecx, [ebp - 0x238]
push ecx
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edx, dword [ebp - 0x238]
sub edx, dword [ebp - 0x240]
mov eax, dword [ebp - 0x234]
sbb eax, dword [ebp - 0x23c]
mov dword [ebp - 0x228], edx
mov dword [ebp - 0x224], eax
fild qword [ebp - 0x228]
mov ecx, dword [ebp - 0x248]
fild qword [ebp - 0x230]
sub esp, 8
fdivp st(1)
fstp qword [esp]
push ecx
push 0x414d9c
push 0x414d70
mov ecx, 0x25
call fcn.00406a00
add esp, 0x14
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00410b3e
mov esp, ebp
pop ebp
ret