Function at 0x45a82a
Capabilities:
Check if file exists
Write file on windows

Disassembly:
push 0x884
mov eax, 0x5d3994
call fcn.0056df1d
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
mov ebx, dword [ebp + 8]
push eax
lea eax, [ebp - 0x218]
mov dword [ebp - 0x88c], ebx
push 0x60b9f0
push eax
mov dword [ebp - 0x884], ecx
call fcn.0045b083
xor edi, edi
mov dword [ebp - 0x888], eax
add esp, 0xc
mov dword [ebp - 0x870], edi
xor edx, edx
mov esi, ebx
cmp dword [ebp + 0xc], 0x1e
jmp 0x45acea
mov ecx, dword [esi]
call fcn.0045a1a2
test eax, eax
je 0x45acf6
movzx eax, word [esi + 0x1a]
movzx ecx, word [esi + 0x1c]
add ecx, eax
mov eax, dword [esi + 0x12]
add eax, 0x1e
add ecx, eax
mov eax, dword [ebp + 0xc]
sub eax, edx
mov dword [ebp - 0x87c], ecx
cmp ecx, eax
jg 0x45acf6
or dword [ebp - 0x86c], 0xffffffff
xor ebx, ebx
or dword [ebp - 0x878], 0xffffffff
and dword [ebp - 0x874], ebx
cmp dword [esi + 0x16], 0x100000
jbe 0x45a97a
push 0x208
lea eax, [ebp - 0x830]
push ebx
push eax
call fcn.005713c0
add esp, 0xc
lea ecx, [ebp - 0x830]
call fcn.0045a1eb
xor eax, eax
push eax
push 0x4000100
push 2
push eax
push eax
push 0x10000000
lea eax, [ebp - 0x830]
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov dword [ebp - 0x86c], eax
cmp eax, 0xffffffff
je 0x45acb1
push ebx
push ebx
push dword [esi + 0x16]
push eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
push dword [ebp - 0x86c]
call dword [sym.imp.KERNEL32.DLL_SetEndOfFile]
xor eax, eax
push eax
push eax
push eax
push 4
push eax
push dword [ebp - 0x86c]
call dword [sym.imp.KERNEL32.DLL_CreateFileMappingW]
mov dword [ebp - 0x878], eax
cmp eax, 0xffffffff
je 0x45acb1
xor ecx, ecx
push ecx
push ecx
push ecx
push 0xf001f
push eax
call dword [sym.imp.KERNEL32.DLL_MapViewOfFile]
mov dword [ebp - 0x874], 1
jmp 0x45a983
push dword [esi + 0x16]
call fcn.0056d555
pop ecx
mov ebx, eax
test ebx, ebx
je 0x45ac9f
mov ecx, dword [esi + 0x12]
mov eax, dword [ebp - 0x87c]
and dword [ebp - 0x864], 0
sub eax, ecx
mov edx, dword [esi + 0x16]
add eax, esi
cmp ecx, edx
je 0x45a9c5
lea edi, [ebp - 0x864]
push edi
push edx
mov edx, ecx
mov ecx, eax
push ebx
call fcn.004646f5
mov edi, dword [ebp - 0x864]
add esp, 0xc
jmp 0x45a9d3
mov edi, dword [esi + 0xe]
push ecx
push eax
mov ecx, ebx
call fcn.0045b0bc
pop ecx
pop ecx
cmp dword [esi + 0xe], edi
jne 0x45ac99
movzx eax, word [esi + 0x1a]
xor ecx, ecx
push eax
mov dword [ebp - 0x860], ecx
lea eax, [esi + 0x1e]
mov dword [ebp - 0x850], ecx
mov byte [ebp - 0x860], cl
lea ecx, [ebp - 0x860]
push eax
mov dword [ebp - 0x84c], 0xf
call fcn.0043cf29
xor eax, eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x848], eax
mov dword [ebp - 0x838], eax
mov dword [ebp - 0x834], 7
mov word [ebp - 0x848], ax
lea eax, [ebp - 0x848]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x860]
push 0xfde9
push eax
call fcn.00441f14
mov edi, dword [ebp - 0x884]
add esp, 0xc
test edi, edi
je 0x45aab4
push 0x208
lea eax, [ebp - 0x628]
push 0
push eax
call fcn.005713c0
cmp dword [ebp - 0x834], 8
lea eax, [ebp - 0x848]
cmovae eax, dword [ebp - 0x848]
push eax
lea eax, [ebp - 0x628]
push 0x104
push eax
call fcn.0058f3c9
lea eax, [ebp - 0x628]
push eax
call edi
add esp, 0x1c
test al, al
je 0x45aab4
lea eax, [ebp - 0x628]
push eax
lea ecx, [ebp - 0x848]
call fcn.004089a4
cmp dword [ebp - 0x834], 8
lea eax, [ebp - 0x848]
mov ecx, dword [ebp - 0x888]
mov edi, 0x104
cmovae eax, dword [ebp - 0x848]
push eax
mov eax, edi
sub eax, ecx
push 0x60b9f8
push eax
lea eax, [ebp - 0x218]
lea eax, [eax + ecx*2]
push eax
call fcn.0040b185
add esp, 0x10
xor eax, eax
movzx ecx, word [ebp + eax*2 - 0x218]
xor edx, edx
cmp dx, cx
je 0x45ab19
push 0x2f
pop edx
cmp dx, cx
jne 0x45ab14
push 0x5c
pop ecx
mov word [ebp + eax*2 - 0x218], cx
inc eax
cmp eax, edi
jl 0x45aaf2
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.005713c0
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push edi
push eax
call fcn.0058f3c9
add esp, 0x18
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x45ab70
lea eax, [ebp - 0x420]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
xor eax, eax
push eax
push 0x80
push 2
push eax
push eax
push 0x40000000
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x45abb0
push 0
lea eax, [ebp - 0x890]
push eax
push dword [esi + 0x16]
push ebx
push edi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov edi, dword [ebp - 0x870]
mov eax, dword [ebp - 0x834]
inc edi
mov dword [ebp - 0x870], edi
cmp eax, 8
jb 0x45ac12
mov ecx, dword [ebp - 0x848]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x864], eax
mov dword [ebp - 0x868], ecx
cmp eax, 0x1000
jb 0x45ac09
lea eax, [ebp - 0x864]
push eax
lea eax, [ebp - 0x868]
push eax
call fcn.0040379f
mov eax, dword [ebp - 0x864]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x868]
push eax
push ecx
call fcn.0056d0c8
pop ecx
pop ecx
and dword [ebp - 0x838], 0
xor eax, eax
or dword [ebp - 4], 0xffffffff
mov word [ebp - 0x848], ax
mov eax, dword [ebp - 0x84c]
mov dword [ebp - 0x834], 7
cmp eax, 0x10
jb 0x45ac7f
mov ecx, dword [ebp - 0x860]
inc eax
mov dword [ebp - 0x868], eax
mov dword [ebp - 0x864], ecx
cmp eax, 0x1000
jb 0x45ac76
lea eax, [ebp - 0x868]
push eax
lea eax, [ebp - 0x864]
push eax
call fcn.0040379f
mov eax, dword [ebp - 0x868]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x864]
push eax
push ecx
call fcn.0056d0c8
pop ecx
pop ecx
and dword [ebp - 0x850], 0
mov dword [ebp - 0x84c], 0xf
mov byte [ebp - 0x860], 0
jmp 0x45ac9f
mov edi, dword [ebp - 0x870]
cmp dword [ebp - 0x874], 0
je 0x45acb1
push ebx
call dword [sym.imp.KERNEL32.DLL_UnmapViewOfFile]
jmp 0x45acb8
push ebx
call fcn.0056d55e
pop ecx
push dword [ebp - 0x878]
mov ebx, dword [sym.imp.KERNEL32.DLL_CloseHandle]
call ebx
push dword [ebp - 0x86c]
call ebx
mov edx, dword [ebp - 0x880]
add edx, dword [ebp - 0x87c]
mov ecx, dword [ebp + 0xc]
mov esi, dword [ebp - 0x88c]
sub ecx, edx
add esi, edx
cmp ecx, 0x1e
mov dword [ebp - 0x880], edx
ja 0x45a87e
mov eax, edi
call fcn.0056decc
ret