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

Disassembly:
push 0x884
mov eax, 0x5c3666
call fcn.00542a0f
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 0x600a40
push eax
mov dword [ebp - 0x884], ecx
call fcn.00456027
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 0x455c8e
mov ecx, dword [esi]
call fcn.00455146
test eax, eax
je 0x455c9a
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 0x455c9a
or dword [ebp - 0x86c], 0xffffffff
xor ebx, ebx
or dword [ebp - 0x878], 0xffffffff
and dword [ebp - 0x874], ebx
cmp dword [esi + 0x16], 0x100000
jbe 0x45591e
push 0x208
lea eax, [ebp - 0x830]
push ebx
push eax
call fcn.00548bf0
add esp, 0xc
lea ecx, [ebp - 0x830]
call fcn.0045518f
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 0x455c55
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 0x455c55
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 0x455927
push dword [esi + 0x16]
call fcn.00542041
pop ecx
mov ebx, eax
test ebx, ebx
je 0x455c43
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 0x455969
lea edi, [ebp - 0x864]
push edi
push edx
mov edx, ecx
mov ecx, eax
push ebx
call fcn.004618b7
mov edi, dword [ebp - 0x864]
add esp, 0xc
jmp 0x455977
mov edi, dword [esi + 0xe]
push ecx
push eax
mov ecx, ebx
call fcn.00456060
pop ecx
pop ecx
cmp dword [esi + 0xe], edi
jne 0x455c3d
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.0043f8cc
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.004448b7
mov edi, dword [ebp - 0x884]
add esp, 0xc
test edi, edi
je 0x455a58
push 0x208
lea eax, [ebp - 0x628]
push 0
push eax
call fcn.00548bf0
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.00567229
lea eax, [ebp - 0x628]
push eax
call edi
add esp, 0x1c
test al, al
je 0x455a58
lea eax, [ebp - 0x628]
push eax
lea ecx, [ebp - 0x848]
call fcn.00409240
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 0x600a48
push eax
lea eax, [ebp - 0x218]
lea eax, [eax + ecx*2]
push eax
call fcn.0040bb95
add esp, 0x10
xor eax, eax
movzx ecx, word [ebp + eax*2 - 0x218]
xor edx, edx
cmp dx, cx
je 0x455abd
push 0x2f
pop edx
cmp dx, cx
jne 0x455ab8
push 0x5c
pop ecx
mov word [ebp + eax*2 - 0x218], cx
inc eax
cmp eax, edi
jl 0x455a96
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.00548bf0
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push edi
push eax
call fcn.00567229
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 0x455b14
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 0x455b54
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 0x455bb6
mov ecx, dword [ebp - 0x848]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x864], eax
mov dword [ebp - 0x868], ecx
cmp eax, 0x1000
jb 0x455bad
lea eax, [ebp - 0x864]
push eax
lea eax, [ebp - 0x868]
push eax
call fcn.00403fef
mov eax, dword [ebp - 0x864]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x868]
push eax
push ecx
call fcn.00541bf5
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 0x455c23
mov ecx, dword [ebp - 0x860]
inc eax
mov dword [ebp - 0x868], eax
mov dword [ebp - 0x864], ecx
cmp eax, 0x1000
jb 0x455c1a
lea eax, [ebp - 0x868]
push eax
lea eax, [ebp - 0x864]
push eax
call fcn.00403fef
mov eax, dword [ebp - 0x868]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x864]
push eax
push ecx
call fcn.00541bf5
pop ecx
pop ecx
and dword [ebp - 0x850], 0
mov dword [ebp - 0x84c], 0xf
mov byte [ebp - 0x860], 0
jmp 0x455c43
mov edi, dword [ebp - 0x870]
cmp dword [ebp - 0x874], 0
je 0x455c55
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
jmp 0x455c5c
push ebx
call fcn.0054204a
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 0x455822
mov eax, edi
call fcn.005429be
ret