Function at 0x4a5470
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov dword [ebp - 0x10], 0
mov ecx, 0x4ea380
call fcn.004392b0
mov dword [ebp - 0x40], eax
mov ecx, 0x4ea378
call fcn.004392b0
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax + 0x12]
and ecx, 1
je 0x4a54a9
xor eax, eax
jmp 0x4a56bc
mov edx, dword [ebp + 0x10]
add edx, 0x16
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
add eax, 0x10
xor ecx, ecx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x34]
cmp edx, dword [0x4ea638]
jb 0x4a54e2
ja 0x4a54d8
mov eax, dword [ebp - 0x38]
cmp eax, dword [0x4ea634]
jbe 0x4a54e2
mov eax, 0xfffffffc
jmp 0x4a56bc
movzx ecx, byte [0x4ea4bc]
test ecx, ecx
je 0x4a550a
mov ecx, 0x4ea4b8
call fcn.004392b0
cmp eax, 0xffffffff
je 0x4a550a
mov edx, dword [0x4ea62c]
or edx, dword [0x4ea630]
jne 0x4a5514
mov eax, 0xfffffffd
jmp 0x4a56bc
push 0x4ea468
lea ecx, [ebp - 0x30]
call fcn.004a0770
mov eax, dword [0x4ea62c]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov dword [ecx + 4], 0
mov dword [ecx + 8], 0
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
mov dword [edx], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
mov dword [ecx + 0xc], edx
push 0x16
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp - 4]
add ecx, 0x10
push ecx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 4]
add ecx, 0x26
push ecx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
push 0x14
push 0
lea edx, [ebp - 0x54]
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov ecx, 0x4ea380
call fcn.004392b0
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x54]
push eax
push 0
push 8
lea ecx, [ebp - 0x38]
push ecx
mov ecx, 0x4ea4b8
call fcn.004392b0
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4a55d9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x4a55d9
mov dword [ebp - 0x18], 0xfffffffc
lea ecx, [ebp - 0x30]
call fcn.004a0a90
mov eax, dword [ebp - 0x18]
jmp 0x4a56bc
push 0xffffffffffffffff
push 0
lea edx, [ebp - 0x40]
push edx
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x4a561a
mov ecx, 0x4ea4b8
call fcn.004392b0
push eax
call dword [sym.imp.KERNEL32.dll_CancelIo]
mov dword [ebp - 0x1c], 0xffffffff
lea ecx, [ebp - 0x30]
call fcn.004a0a90
mov eax, dword [ebp - 0x1c]
jmp 0x4a56bc
push 0
mov ecx, 0x4ea378
call fcn.004392b0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x4a565b
mov ecx, 0x4ea4b8
call fcn.004392b0
push eax
call dword [sym.imp.KERNEL32.dll_CancelIo]
mov dword [ebp - 0x20], 0xffffffff
lea ecx, [ebp - 0x30]
call fcn.004a0a90
mov eax, dword [ebp - 0x20]
jmp 0x4a56bc
push 0
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x54]
push ecx
mov ecx, 0x4ea4b8
call fcn.004392b0
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x4a568e
mov dword [ebp - 0x24], 0xffffffff
lea ecx, [ebp - 0x30]
call fcn.004a0a90
mov eax, dword [ebp - 0x24]
jmp 0x4a56bc
jmp 0x4a5695
cmp dword [ebp - 0x10], 0
je 0x4a56a4
mov dword [ebp - 0x14], 0
jmp 0x4a56ab
mov dword [ebp - 0x14], 0xffffffff
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x28], edx
lea ecx, [ebp - 0x30]
call fcn.004a0a90
mov eax, dword [ebp - 0x28]
mov esp, ebp
pop ebp
ret