Function at 0x407127
Capabilities:
Check if file exists
Delete directory
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x760
and dword [ebp - 0x414], 0
and dword [ebp - 4], 0
and dword [ebp - 0x410], 0
or dword [ebp - 0x73c], 0xffffffff
and dword [ebp - 0x41c], 0
and dword [ebp - 0x418], 0
and dword [ebp - 0x40c], 0
push 0x104
push 0
lea eax, [ebp - 0x738]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push dword [ebp + 8]
lea eax, [ebp - 0x738]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x410d10
lea eax, [ebp - 0x738]
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
pop ecx
pop ecx
test eax, eax
jne 0x407249
mov dword [ebp - 0x41c], 1
lea eax, [ebp - 0x738]
push eax
call fcn.004070dd
mov dword [ebp - 0x744], eax
mov eax, dword [0x410cfc]
mov ax, word [eax]
mov word [ebp - 0x740], ax
mov eax, dword [0x4118ac]
mov dword [ebp - 0x40c], eax
and dword [ebp - 0x760], 0
jmp 0x4071ec
mov eax, dword [ebp - 0x760]
inc eax
mov dword [ebp - 0x760], eax
mov eax, dword [0x4118b0]
xor edx, edx
push 6
pop ecx
div ecx
cmp dword [ebp - 0x760], eax
jae 0x407249
mov eax, dword [ebp - 0x40c]
mov eax, dword [eax]
cmp eax, dword [ebp - 0x744]
jne 0x407238
mov eax, dword [ebp - 0x40c]
movzx eax, word [eax + 4]
movzx ecx, word [ebp - 0x740]
cmp eax, ecx
jl 0x40722c
xor eax, eax
jmp 0x40756a
mov dword [ebp - 0x418], 1
jmp 0x407249
mov eax, dword [ebp - 0x40c]
add eax, 6
mov dword [ebp - 0x40c], eax
jmp 0x4071df
push 0
push 0x80
push 3
push 0
push 3
push 0xc0000000
lea eax, [ebp - 0x738]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x73c], eax
push 0
push dword [ebp - 0x73c]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x414], eax
cmp dword [ebp - 0x414], 0
je 0x4072ac
cmp dword [ebp - 0x414], 0xffffffff
je 0x4072ac
cmp dword [ebp - 0x414], 0xa00000
ja 0x4072ac
cmp dword [ebp - 0x414], 0x2800
jae 0x4072c2
push dword [ebp - 0x73c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40752c
push 0
lea eax, [ebp - 0x75c]
push eax
push dword [ebp - 0x73c]
call fcn.00402d5a
push dword [ebp - 0x73c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x104
push 0
lea eax, [ebp - 0x630]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x5c
lea eax, [ebp - 0x738]
push eax
call dword [sym.imp.MSVCRT.dll_strrchr]
pop ecx
pop ecx
inc eax
push eax
push 0x410d10
push 0x40c534
lea eax, [ebp - 0x630]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 4
push 0
push 0x2e
lea eax, [ebp - 0x630]
push eax
call dword [sym.imp.MSVCRT.dll_strrchr]
pop ecx
pop ecx
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x400
push 0
lea eax, [ebp - 0x408]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x630]
push eax
lea eax, [ebp - 0x738]
push eax
push 0x411380
push 0x40cdd4
lea eax, [ebp - 0x408]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 4]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x408]
push eax
call fcn.004032a5
test eax, eax
je 0x4073a8
cmp dword [ebp - 4], 0
je 0x4073b2
jmp 0x40752c
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x104
push 0
lea eax, [ebp - 0x528]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x630]
push eax
push 0x40cdec
lea eax, [ebp - 0x528]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x528]
push eax
call fcn.0040773d
push 0x400
push 0
lea eax, [ebp - 0x408]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x630]
push eax
lea eax, [ebp - 0x630]
push eax
lea eax, [ebp - 0x738]
push eax
push 0x411380
push 0x40cdf0
lea eax, [ebp - 0x408]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 4]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x408]
push eax
call fcn.004032a5
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0x80
push 3
push 0
push 3
push 0xc0000000
lea eax, [ebp - 0x738]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x73c], eax
push 1
lea eax, [ebp - 0x75c]
push eax
push dword [ebp - 0x73c]
call fcn.00402d5a
push dword [ebp - 0x73c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x41c], 1
jne 0x40752c
cmp dword [0x40ea6c], 0xffffffff
je 0x40752c
cmp dword [ebp - 0x418], 0
jne 0x4074dc
push 2
push 0
push 0
push dword [0x40ea6c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x4074f9
push 0
push 0
mov eax, dword [ebp - 0x40c]
sub eax, dword [0x4118ac]
push eax
push dword [0x40ea6c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x410]
push eax
push 6
lea eax, [ebp - 0x744]
push eax
push dword [0x40ea6c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x418], 0
jne 0x40752c
push dword [0x40ea6c]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
lea eax, [ebp - 0x630]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
cmp eax, 1
jne 0x407568
mov dword [0x4118a8], 1
lea eax, [ebp - 0x528]
push eax
call fcn.0040773d
and dword [0x4118a8], 0
lea eax, [ebp - 0x630]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
xor eax, eax
leave
ret 4