Function at 0x45b440
Capabilities:
Check for time delay via gettickcount
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x484745
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 esi, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
push 0x114
push str.NGIOStack::CIOCommon::Write
push 0x4c7748
push dword [0x4c28a8]
lea eax, [esp + 0x94]
push eax
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], esi
call fcn.0041f145
mov ecx, dword [ebp + 0x14]
lea eax, [esp + 0x4c]
xor edx, edx
xor edi, edi
push eax
inc edx
mov dword [esp + 0x13c], edi
call fcn.00428eed
mov byte [esp + 0x138], 1
mov dword [esp + 0x18], edi
cmp esi, edi
je 0x45b8ba
cmp ebx, edi
je 0x45b8ba
mov esi, dword [esp + 0x1c]
mov dword [ebx], edi
cmp dword [esi + 0x20], 0xffffffff
jne 0x45b540
push str.m_hIO__INVALID_HANDLE_VALUE__returning_IOError_Fail
push 0x12a
push 0x80
lea esi, [esp + 0x90]
call fcn.0041f441
mov esi, 0x83e8f4ff
add esp, 0xc
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, esi
jmp 0x45b8ff
lea eax, [esp + 0x4c]
push edi
push eax
call fcn.004290d7
pop ecx
pop ecx
test al, al
jne 0x45b570
push str.Operation_was_aborted_before_CIOCommon::Write
push 0x132
push 0x10
lea esi, [esp + 0x90]
call fcn.0041f441
mov esi, 0x83e8f4fd
jmp 0x45b511
push edi
push edi
push 1
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov ecx, eax
mov dword [esp + 0x24], ecx
cmp ecx, edi
jne 0x45b5b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateEvent_failed_with_err___d
push 0x13a
push 0x80
lea esi, [esp + 0x94]
call fcn.0041f441
add esp, 0x10
mov esi, 0x83e8f4ff
jmp 0x45b514
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 [esi + 0x10]
lea esi, [esp + 0x28]
mov dword [esp + 0x48], ecx
call fcn.0046151a
mov byte [esp + 0x138], 2
mov edi, 0x200
lea eax, [esp + 0x38]
push eax
mov eax, dword [esp + 0x20]
push ebx
push dword [ebp + 0xc]
mov byte [esp + 0x23], 0
push dword [esp + 0x2c]
push dword [eax + 0x20]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x45b7c9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x45b791
mov eax, dword [esp + 0x1c]
mov esi, dword [eax + 0x18]
lea eax, [esp + 0x28]
call fcn.004615a5
cmp eax, esi
jae 0x45b633
lea eax, [esp + 0x28]
call fcn.004615a5
jmp 0x45b635
mov eax, esi
push eax
push dword [esp + 0x4c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x45b658
cmp eax, 0x102
je 0x45b6ba
push eax
push str.WaitForSingleObject_failed_with__d
push 0x174
jmp 0x45b6a2
push 1
push ebx
lea eax, [esp + 0x40]
push eax
mov eax, dword [esp + 0x28]
push dword [eax + 0x20]
mov byte [esp + 0x27], 1
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x45b691
push dword [ebx]
lea esi, [esp + 0x88]
push str.WriteFile_succeeded__pulBytesWritten___d
push 0x166
push edi
call fcn.0041f441
jmp 0x45b6b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WriteFile_failed_with__d
push 0x16b
push edi
lea esi, [esp + 0x94]
call fcn.0041f441
mov dword [esp + 0x28], 0x83e8f4ff
add esp, 0x10
lea eax, [esp + 0x4c]
push 0
push eax
call fcn.004290d7
pop ecx
pop ecx
test al, al
jne 0x45b6d4
mov dword [esp + 0x18], 0x83e8f4fd
lea esi, [esp + 0x28]
call fcn.00461581
test al, al
jne 0x45b6f2
cmp dword [esp + 0x18], 0
jne 0x45b6f2
cmp byte [esp + 0x17], al
je 0x45b614
cmp byte [esp + 0x17], 0
jne 0x45b785
mov esi, dword [esp + 0x1c]
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_CancelIo]
test eax, eax
je 0x45b760
push 0
push ebx
lea eax, [esp + 0x40]
push eax
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x45b746
push dword [ebx]
lea esi, [esp + 0x88]
push str.WriteFile_succeeded__pulBytesWritten___d
push 0x191
push edi
call fcn.0041f441
add esp, 0x10
and dword [esp + 0x18], 0
jmp 0x45b785
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e3
je 0x45b785
push eax
push str.GetOverlappedResult_returned___d_
push 0x19a
jmp 0x45b771
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CancelIO_failed_with_error___d_
push 0x1a2
push 0x80
lea esi, [esp + 0x94]
call fcn.0041f441
add esp, 0x10
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
jmp 0x45b7e5
push eax
push str.WriteFile_failed_with__d
push 0x1b0
push edi
lea esi, [esp + 0x94]
call fcn.0041f441
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 0x24]
add esp, 0x10
mov dword [esp + 0x18], 0x83e8f4ff
cmp eax, 0xffffffff
je 0x45b7e5
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x45b7e5
push dword [ebx]
lea esi, [esp + 0x88]
push str.WriteFile_succeeded__pulBytesWritten___d
push 0x1bf
push edi
call fcn.0041f441
add esp, 0x10
lea esi, [esp + 0x28]
call fcn.00461581
test al, al
jne 0x45b802
cmp dword [esp + 0x18], 0
jne 0x45b802
cmp dword [ebx], 0
je 0x45b5dc
lea esi, [esp + 0x28]
call fcn.00461581
test al, al
je 0x45b814
cmp dword [ebx], 0
je 0x45b820
cmp dword [esp + 0x18], 0
jne 0x45b828
cmp dword [ebx], 0
jne 0x45b828
mov dword [esp + 0x18], 0x83e8f4fe
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebx]
mov ecx, dword [esp + 0x20]
lea esi, [esp + 0x10c]
call fcn.004080b0
mov byte [esp + 0x138], 3
cmp dword [eax + 0x14], 0x10
jb 0x45b854
mov eax, dword [eax]
push eax
push str._r_n_S
push 0x1ce
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 + 0x28], 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 + 0x18]
jmp 0x45b8ff
push ebx
push esi
push str.Invalid_argument__pBuffer___d__pulBytesWritten___d
push 0x120
push 0x80
lea esi, [esp + 0x98]
call fcn.0041f441
add esp, 0x14
lea ecx, [esp + 0x4c]
mov byte [esp + 0x138], 0
call fcn.00429108
or dword [esp + 0x138], 0xffffffff
mov ecx, esi
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