Function at 0x487f74
Capabilities:
Check for time delay via queryperformancecounter
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc8
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x2c], ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x488259
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebx + 0xc], 0
je 0x488221
cmp dword [ebx + 8], 0
je 0x488221
cmp byte [ebx + 0x14], 0
je 0x488221
mov eax, ebx
call fcn.0048826c
mov ecx, dword [ebx + 8]
mov eax, ecx
xor edx, edx
sub dword [ebp + 8], eax
sbb dword [ebp + 0xc], edx
mov eax, ecx
imul dword [ebx + 0xc]
xor edx, edx
cmp edx, dword [ebp + 0xc]
jne 0x487fe2
cmp eax, dword [ebp + 8]
jbe 0x487fe8
jmp 0x488221
jg 0x488221
push 0
push 0x60000000
push 3
push 0
push 3
push 0xc0000000
mov eax, esi
call fcn.00404030
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x488221
xor eax, eax
mov al, byte [ebx + 0x14]
push eax
lea eax, [ebp - 0xc]
mov ecx, 1
mov edx, dword [0x487f4c]
call fcn.00405324
add esp, 4
xor eax, eax
mov al, byte [ebx + 0x14]
push eax
lea eax, [ebp - 8]
mov ecx, 1
mov edx, dword [0x487f38]
call fcn.00405324
add esp, 4
xor eax, eax
mov al, byte [ebx + 0x14]
push eax
lea eax, [ebp - 0x2c]
mov ecx, 1
mov edx, dword [0x487f60]
call fcn.00405324
add esp, 4
xor eax, eax
mov al, byte [ebx + 0x14]
mov edx, eax
shl edx, 2
lea edx, [edx + edx*4]
mov eax, dword [ebp - 8]
xor ecx, ecx
call fcn.00402bcc
movzx edi, byte [ebx + 0x14]
dec edi
test edi, edi
jl 0x4880c0
inc edi
xor esi, esi
push 0
push 0
push 0
push 0
call sub.kernel32.dll_CreateEventA
mov edx, dword [ebp - 0xc]
mov dword [edx + esi*4], eax
lea eax, [esi + esi*4]
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + esi*4]
mov dword [edx + eax*4 + 0x10], ecx
mov eax, dword [ebx + 8]
call fcn.00402714
mov edx, dword [ebp - 0x2c]
mov dword [edx + esi*4], eax
inc esi
dec edi
jne 0x48808b
mov eax, dword [ebx + 8]
call fcn.00402714
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x18]
push eax
call sub.kernel32.dll_QueryPerformanceCounter
xor eax, eax
mov al, byte [ebx + 0x14]
xor edx, edx
push edx
push eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
call fcn.004061fe
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edx
movzx edi, byte [ebx + 0x14]
dec edi
test edi, edi
jl 0x4881a2
inc edi
xor esi, esi
mov eax, esi
cdq
push edx
push eax
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
push edx
push eax
push 0
push 0x1000
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
call fcn.004062f1
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
call fcn.004061b8
push edx
push eax
lea eax, [esi + esi*4]
mov edx, dword [ebp - 8]
lea eax, [edx + eax*4 + 8]
pop dword [eax]
pop dword [eax + 4]
lea eax, [esi + esi*4]
mov edx, dword [ebp - 8]
lea eax, [edx + eax*4]
push eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebx + 8]
push eax
mov eax, dword [ebp - 0x30]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_ReadFile_1
inc esi
dec edi
jne 0x4880fe
jmp 0x4881a2
push 0x5dc0
push 0
mov eax, dword [ebp - 0xc]
push eax
xor eax, eax
mov al, byte [ebx + 0x14]
push eax
call sub.kernel32.dll_WaitForMultipleObjects
inc dword [ebx + 0x10]
xor edx, edx
mov dl, byte [ebx + 0x14]
cmp eax, edx
jae 0x4881a2
lea eax, [eax + eax*4]
mov edx, dword [ebp - 8]
lea eax, [edx + eax*4]
push eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebx + 8]
push eax
mov eax, dword [ebp - 0x30]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_ReadFile_1
mov eax, dword [ebx + 0x10]
cmp eax, dword [ebx + 0xc]
jb 0x488161
lea eax, [ebp - 0x20]
push eax
call sub.kernel32.dll_QueryPerformanceCounter
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
sub eax, dword [ebp - 0x18]
sbb edx, dword [ebp - 0x14]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
fild qword [ebp - 0x38]
fild qword [ebx + 0x30]
fdivp st(1)
add esp, 0xfffffff8
fstp qword [esp]
wait
mov eax, ebx
call fcn.00487cb8
push 0x5dc0
push 0xffffffffffffffff
mov eax, dword [ebp - 0xc]
push eax
xor eax, eax
mov al, byte [ebx + 0x14]
push eax
call sub.kernel32.dll_WaitForMultipleObjects
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_CloseHandle_1
movzx edi, byte [ebx + 0x14]
dec edi
test edi, edi
jl 0x488221
inc edi
xor esi, esi
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + esi*4]
call fcn.0040272c
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + esi*4]
push eax
call sub.kernel32.dll_CloseHandle_1
inc esi
dec edi
jne 0x488206
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x488260
lea eax, [ebp - 0x2c]
mov edx, dword [0x487f60]
call fcn.00405330
lea eax, [ebp - 0xc]
mov edx, dword [0x487f4c]
call fcn.00405330
lea eax, [ebp - 8]
mov edx, dword [0x487f38]
call fcn.00405330
ret