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

Disassembly:
push 0x678
mov eax, 0x4481a8
call fcn.0042f004
mov ebx, edx
mov dword [ebp - 0x680], ebx
mov esi, ecx
mov dword [ebp - 0x67c], esi
mov eax, dword [ebp + 8]
push eax
lea eax, [ebp - 0x218]
push 0x455280
push eax
call fcn.00428b3d
mov dword [ebp - 0x678], eax
xor edx, edx
xor eax, eax
mov dword [ebp - 0x66c], edx
add esp, 0xc
mov dword [ebp - 0x660], eax
cmp ebx, 0x1e
jbe 0x428b37
cmp dword [esi], 0x15145c61
je 0x42876b
cmp dword [esi], 0x4034b50
jne 0x428b31
movzx eax, word [esi + 0x1a]
movzx ecx, word [esi + 0x1c]
mov edi, dword [esi + 0x12]
add ecx, eax
add edi, 0x1e
mov eax, ebx
add edi, ecx
sub eax, edx
mov dword [ebp - 0x664], edi
cmp edi, eax
jg 0x428b31
or dword [ebp - 0x670], 0xffffffff
xor ebx, ebx
or dword [ebp - 0x674], 0xffffffff
and dword [ebp - 0x668], ebx
cmp dword [esi + 0x16], 0x100000
jbe 0x428860
xor eax, eax
xor edi, edi
push 0x206
mov word [ebp - 0x628], ax
lea eax, [ebp - 0x626]
push edi
push eax
call fcn.0042e7e0
add esp, 0xc
lea ecx, [ebp - 0x628]
call fcn.004285fb
push edi
push 0x4000100
push 2
push edi
push edi
push 0x10000000
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x670], edi
cmp edi, 0xffffffff
je 0x428ae7
push ebx
push ebx
push dword [esi + 0x16]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
xor eax, eax
push eax
push eax
push eax
push 4
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov edi, eax
mov dword [ebp - 0x674], edi
cmp edi, 0xffffffff
je 0x428ae7
xor eax, eax
push eax
push eax
push eax
push 0xf001f
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, dword [ebp - 0x664]
mov dword [ebp - 0x668], 1
jmp 0x428869
push dword [esi + 0x16]
call fcn.0042af74
pop ecx
mov ebx, eax
test ebx, ebx
je 0x428ad5
mov ecx, dword [esi + 0x12]
mov eax, edi
and dword [ebp - 0x65c], 0
sub eax, ecx
add eax, esi
cmp ecx, dword [esi + 0x16]
je 0x4288a7
lea edx, [ebp - 0x65c]
push edx
push dword [esi + 0x16]
mov edx, ecx
mov ecx, eax
push ebx
call fcn.0042ac3f
mov edi, dword [ebp - 0x65c]
add esp, 0xc
jmp 0x4288b8
mov edi, dword [esi + 0xe]
push ecx
push eax
push dword [esi + 0x16]
push ebx
call fcn.0042e599
add esp, 0x10
cmp dword [esi + 0xe], edi
jne 0x428ad5
movzx eax, word [esi + 0x1a]
lea ecx, [ebp - 0x658]
push eax
lea eax, [esi + 0x1e]
push eax
call fcn.0041dce0
xor edi, edi
xor eax, eax
mov dword [ebp - 4], edi
mov dword [ebp - 0x62c], 7
mov dword [ebp - 0x630], edi
mov word [ebp - 0x640], ax
push 0x44f998
mov byte [ebp - 4], 1
call fcn.00403d4e
pop ecx
push eax
push 0x44f998
lea ecx, [ebp - 0x640]
call fcn.00403cd5
cmp dword [ebp - 0x644], 0x10
lea eax, [ebp - 0x658]
mov ecx, dword [ebp - 0x648]
cmovae eax, dword [ebp - 0x658]
push edi
push edi
push ecx
push eax
push edi
push 0xfde9
mov dword [ebp - 0x65c], ecx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, eax
test edi, edi
je 0x428998
push 0
push edi
lea ecx, [ebp - 0x640]
call fcn.00406ca0
cmp dword [ebp - 0x62c], 8
lea ecx, [ebp - 0x640]
push edi
cmovae ecx, dword [ebp - 0x640]
lea eax, [ebp - 0x658]
cmp dword [ebp - 0x644], 0x10
push ecx
push dword [ebp - 0x65c]
cmovae eax, dword [ebp - 0x658]
xor edi, edi
push eax
push edi
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
jmp 0x42899a
xor edi, edi
cmp dword [ebp - 0x62c], 8
lea eax, [ebp - 0x640]
mov ecx, dword [ebp - 0x678]
cmovae eax, dword [ebp - 0x640]
push eax
mov eax, 0x104
sub eax, ecx
push 0x454ff8
push eax
lea eax, [ebp - 0x218]
lea eax, [eax + ecx*2]
push eax
call fcn.0042bfcb
lea eax, [ebp - 0x218]
add esp, 0x10
test eax, eax
je 0x428a0a
mov eax, edi
movzx ecx, word [ebp + eax*2 - 0x218]
xor edx, edx
cmp dx, cx
je 0x428a0a
push 0x2f
pop edx
cmp dx, cx
jne 0x428a02
push 0x5c
pop ecx
mov word [ebp + eax*2 - 0x218], cx
inc eax
cmp eax, 0x104
jl 0x4289e0
xor eax, eax
push 0x206
mov word [ebp - 0x420], ax
lea eax, [ebp - 0x41e]
push edi
push eax
call fcn.0042e7e0
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push 0x104
push eax
call fcn.0042c94f
add esp, 0xc
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 0x428a6f
lea eax, [ebp - 0x420]
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push edi
push 0x80
push 2
push edi
push edi
push 0x40000000
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x428aad
push 0
lea eax, [ebp - 0x684]
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]
inc dword [ebp - 0x660]
lea ecx, [ebp - 0x640]
push 0
push 1
call fcn.004040c8
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x658]
push 0
push 1
call fcn.004043b8
cmp dword [ebp - 0x668], 0
je 0x428ae7
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
jmp 0x428aee
push ebx
call fcn.0042c27a
pop ecx
push dword [ebp - 0x674]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [ebp - 0x670]
call edi
mov edx, dword [ebp - 0x66c]
add edx, dword [ebp - 0x664]
mov ebx, dword [ebp - 0x680]
mov ecx, ebx
mov esi, dword [ebp - 0x67c]
sub ecx, edx
add esi, edx
mov dword [ebp - 0x66c], edx
cmp ecx, 0x1e
ja 0x428757
mov eax, dword [ebp - 0x660]
call fcn.0042efc2
ret