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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x410d32
mov eax, dword fs:[0]
push eax
sub esp, 0x690
mov eax, dword [0x417030]
xor eax, esp
mov dword [esp + 0x688], eax
push ebx
push esi
push edi
mov eax, dword [0x417030]
xor eax, esp
push eax
lea eax, [esp + 0x6a0]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
push eax
lea eax, [esp + 0x288]
mov edi, ecx
push 0x412dc8
push eax
mov dword [esp + 0x48], edi
call fcn.004037b5
xor ebx, ebx
xor esi, esi
add esp, 0xc
cmp dword [ebp + 8], 0x1e
mov dword [esp + 0x38], eax
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], edi
jbe 0x403767
jmp 0x403482
mov edi, dword [esp + 0x20]
push dword [edi]
call fcn.004032b7
pop ecx
test eax, eax
je 0x403767
movzx ecx, word [edi + 0x1a]
movzx eax, word [edi + 0x1c]
add eax, ecx
mov ecx, dword [edi + 0x12]
lea eax, [eax + ecx + 0x1e]
mov ecx, dword [ebp + 8]
sub ecx, esi
cmp eax, ecx
mov dword [esp + 0x34], eax
jg 0x403767
mov eax, dword [edi + 0x16]
or dword [esp + 0x18], 0xffffffff
or dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0x14], ebx
mov dword [esp + 0x30], ebx
cmp eax, 0x100000
jbe 0x403571
xor eax, eax
push 0x206
mov word [esp + 0x490], ax
lea eax, [esp + 0x492]
push ebx
push eax
call fcn.00407180
add esp, 0xc
lea esi, [esp + 0x48c]
call fcn.00403301
push ebx
push 0x4000100
push 2
push ebx
push ebx
push 0x10000000
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
je 0x403727
push ebx
push ebx
push dword [edi + 0x16]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push ebx
push ebx
push ebx
push 4
push ebx
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esp + 0x1c], eax
cmp eax, 0xffffffff
je 0x403727
push ebx
push ebx
push ebx
push 0xf001f
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esp + 0x30], 1
jmp 0x403578
push eax
call fcn.00405b86
pop ecx
mov dword [esp + 0x14], eax
cmp eax, ebx
je 0x403715
mov ecx, dword [edi + 0x12]
mov eax, dword [esp + 0x34]
mov edx, dword [edi + 0x16]
sub eax, ecx
add eax, edi
mov dword [esp + 0x2c], ebx
cmp ecx, edx
je 0x4035bb
mov ebx, dword [esp + 0x14]
lea esi, [esp + 0x2c]
push esi
push ecx
push eax
mov edi, edx
call fcn.004055a4
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x2c]
add esp, 0xc
xor ebx, ebx
jmp 0x4035cd
mov esi, dword [edi + 0xe]
push ecx
push eax
push edx
push dword [esp + 0x20]
call fcn.00405c91
add esp, 0x10
cmp dword [edi + 0xe], esi
jne 0x403715
movzx eax, word [edi + 0x1a]
push eax
lea eax, [edi + 0x1e]
push eax
lea esi, [esp + 0x68]
call fcn.0040378f
mov dword [esp + 0x6a8], ebx
xor eax, eax
mov dword [esp + 0x5c], 7
mov dword [esp + 0x58], ebx
mov word [esp + 0x48], ax
lea eax, [esp + 0x44]
push eax
mov eax, esi
mov byte [esp + 0x6ac], 1
call fcn.004056d0
cmp dword [esp + 0x60], 8
mov eax, dword [esp + 0x4c]
pop ecx
jae 0x403626
lea eax, [esp + 0x48]
push eax
mov eax, dword [esp + 0x3c]
mov esi, 0x104
mov ecx, esi
sub ecx, eax
push 0x412dd0
push ecx
lea eax, [esp + eax*2 + 0x290]
push eax
call fcn.00405c73
lea edx, [esp + 0x294]
call fcn.004032d5
xor eax, eax
push 0x206
mov word [esp + 0x90], ax
lea eax, [esp + 0x92]
push ebx
push eax
call fcn.00407180
add esp, 0x1c
lea eax, [esp + 0x284]
push eax
lea eax, [esp + 0x80]
push esi
push eax
call fcn.0040632a
add esp, 0xc
lea eax, [esp + 0x7c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [esp + 0x7c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4036b2
lea eax, [esp + 0x7c]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
lea eax, [esp + 0x29c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4036f1
push ebx
lea eax, [esp + 0x44]
push eax
push dword [edi + 0x16]
push dword [esp + 0x20]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [esp + 0x24]
push ebx
push 1
lea esi, [esp + 0x4c]
call fcn.004012e9
or dword [esp + 0x6a8], 0xffffffff
push ebx
push 1
lea ecx, [esp + 0x68]
call fcn.00403162
cmp dword [esp + 0x30], ebx
je 0x403727
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
jmp 0x403731
push dword [esp + 0x14]
call fcn.0040607c
pop ecx
push dword [esp + 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [esp + 0x18]
call esi
mov esi, dword [esp + 0x28]
add esi, dword [esp + 0x34]
mov eax, dword [esp + 0x3c]
add eax, esi
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 8]
sub eax, esi
mov dword [esp + 0x28], esi
cmp eax, 0x1e
ja 0x40347e
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x6a0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x688]
xor ecx, esp
call fcn.00405b91
mov esp, ebp
pop ebp
ret