Function at 0x45af96
Capabilities:
Check for time delay via gettickcount
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x48361b
mov eax, dword fs:[0]
push eax
sub esp, 0x120
mov eax, dword [0x4c058c]
xor eax, esp
mov dword [esp + 0x118], eax
push ebx
push esi
push edi
mov eax, dword [0x4c058c]
xor eax, esp
push eax
lea eax, [esp + 0x130]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0xc]
push eax
push str.ulBufferSize_lu
xor esi, esi
push esi
push esi
push 0x47
push str.NGIOStack::CIOCommon::Read
push 0x4c7748
push dword [0x4c28a8]
mov dword [esp + 0x54], eax
lea eax, [esp + 0xa4]
push eax
mov ebx, ecx
mov dword [esp + 0x3c], edi
call fcn.0041f1b8
add esp, 0x24
mov ecx, dword [ebp + 0x14]
lea eax, [esp + 0x4c]
xor edx, edx
push eax
inc edx
mov dword [esp + 0x13c], esi
call fcn.00428eed
mov byte [esp + 0x138], 1
mov dword [esp + 0x14], esi
cmp dword [esp + 0x1c], esi
je 0x45b3d0
cmp edi, esi
je 0x45b3d0
mov dword [edi], esi
cmp dword [ebx + 0x20], 0xffffffff
jne 0x45b076
push str.m_hIO__INVALID_HANDLE_VALUE__returning_IOError_Fail
push 0x5f
push 0x80
lea esi, [esp + 0x90]
call fcn.0041f441
add esp, 0xc
jmp 0x45b3f0
push esi
push esi
push 1
push esi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov ecx, eax
mov dword [esp + 0x20], ecx
cmp ecx, esi
jne 0x45b0b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateEvent_failed_with_err___d
push 0x67
push 0x80
lea esi, [esp + 0x94]
call fcn.0041f441
add esp, 0x10
jmp 0x45b3f0
xor eax, eax
lea edi, [esp + 0x38]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov edi, dword [ebx + 0xc]
lea esi, [esp + 0x24]
mov dword [esp + 0x48], ecx
call fcn.0046151a
mov byte [esp + 0x138], 2
mov edi, 0x80
mov esi, dword [esp + 0x18]
lea eax, [esp + 0x38]
push eax
push esi
push dword [esp + 0x3c]
mov byte [esp + 0x1f], 0
push dword [esp + 0x28]
push dword [ebx + 0x20]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x45b2d3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x45b29f
mov esi, dword [ebx + 0x14]
lea eax, [esp + 0x24]
call fcn.004615a5
cmp eax, esi
jae 0x45b12e
lea eax, [esp + 0x24]
call fcn.004615a5
jmp 0x45b130
mov eax, esi
cmp eax, 0xa
jae 0x45b13a
push 0xa
pop eax
jmp 0x45b157
mov esi, dword [ebx + 0x14]
lea eax, [esp + 0x24]
call fcn.004615a5
cmp eax, esi
jae 0x45b155
lea eax, [esp + 0x24]
call fcn.004615a5
jmp 0x45b157
mov eax, esi
push eax
push dword [esp + 0x4c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x45b17f
cmp eax, 0x102
je 0x45b1e5
push eax
push str.WaitForSingleObject_failed_with__d
push 0xa3
push 0x200
jmp 0x45b1ce
mov esi, dword [esp + 0x18]
push 1
push esi
lea eax, [esp + 0x40]
push eax
push dword [ebx + 0x20]
mov byte [esp + 0x23], 1
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x45b1bc
push dword [esi]
lea esi, [esp + 0x88]
push str.ReadFile__overlapped__succeeded__pulBytesRead___d
push 0x93
push 0x200
call fcn.0041f441
jmp 0x45b1e2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ReadFile_failed_with__d
push 0x98
push edi
lea esi, [esp + 0x94]
call fcn.0041f441
mov dword [esp + 0x24], 0x83e8f4ff
add esp, 0x10
lea eax, [esp + 0x4c]
push 0
push eax
call fcn.004290d7
pop ecx
pop ecx
test al, al
jne 0x45b1ff
mov dword [esp + 0x14], 0x83e8f4fd
lea esi, [esp + 0x24]
call fcn.00461581
test al, al
jne 0x45b21d
cmp dword [esp + 0x14], 0
jne 0x45b21d
cmp byte [esp + 0x13], al
je 0x45b113
cmp byte [esp + 0x13], 0
jne 0x45b293
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [ebx + 0x20]
call dword [sym.imp.KERNEL32.dll_CancelIo]
test eax, eax
je 0x45b272
push 0
push dword [esp + 0x1c]
lea eax, [esp + 0x40]
push eax
push dword [ebx + 0x20]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x45b258
and dword [esp + 0x14], 0
jmp 0x45b293
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e3
je 0x45b293
push eax
push str.GetOverlappedResult_returned___d_
push 0xcb
jmp 0x45b283
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CancelIO_failed_with_error___d_
push 0xd5
push edi
lea esi, [esp + 0x94]
call fcn.0041f441
add esp, 0x10
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
jmp 0x45b2f3
push eax
push str.ReadFile_failed_with__d
push 0xe5
push edi
lea esi, [esp + 0x94]
call fcn.0041f441
mov eax, dword [ebx + 0x24]
add esp, 0x10
mov dword [esp + 0x14], 0x83e8f4ff
cmp eax, 0xffffffff
je 0x45b2f3
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x45b2f3
push dword [esi]
lea esi, [esp + 0x88]
push str.ReadFile__immediate__succeeded__pulBytesRead___d
push 0xf6
push 0x200
call fcn.0041f441
add esp, 0x10
lea esi, [esp + 0x24]
call fcn.00461581
test al, al
jne 0x45b314
cmp dword [esp + 0x14], 0
jne 0x45b314
mov eax, dword [esp + 0x18]
cmp dword [eax], 0
je 0x45b0da
lea esi, [esp + 0x24]
call fcn.00461581
mov esi, dword [esp + 0x18]
test al, al
je 0x45b32a
cmp dword [esi], 0
je 0x45b336
cmp dword [esp + 0x14], 0
jne 0x45b33e
cmp dword [esi], 0
jne 0x45b33e
mov dword [esp + 0x14], 0x83e8f4fe
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi]
mov ecx, dword [esp + 0x1c]
lea esi, [esp + 0x10c]
call fcn.004080b0
mov byte [esp + 0x138], 3
cmp dword [eax + 0x14], 0x10
jb 0x45b36a
mov eax, dword [eax]
push eax
push str._r_n_S
push 0x10a
push 0x17
lea esi, [esp + 0x94]
call fcn.0041f441
add esp, 0x10
lea ecx, [esp + 0x10c]
mov byte [esp + 0x138], 2
call fcn.0040c180
mov byte [esp + 0x138], 1
lea ecx, [esp + 0x4c]
mov dword [esp + 0x24], vtable.NGUtils::CTickCountHelper.0
mov byte [esp + 0x138], 0
call fcn.00429108
or dword [esp + 0x138], 0xffffffff
mov ecx, esi
call fcn.0041f230
mov eax, dword [esp + 0x14]
jmp 0x45b41a
push edi
push dword [esp + 0x20]
lea esi, [esp + 0x8c]
push str.Invalid_argument__pBuffer___d__pulBytesRead___d
push 0x55
push 0x80
call fcn.0041f441
add esp, 0x14
lea ecx, [esp + 0x4c]
mov byte [esp + 0x138], 0
call fcn.00429108
or dword [esp + 0x138], 0xffffffff
lea ecx, [esp + 0x84]
call fcn.0041f230
mov eax, 0x83e8f4ff
mov ecx, dword [esp + 0x130]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x118]
xor ecx, esp
call fcn.00463bd7
mov esp, ebp
pop ebp
ret 0x10