Function at 0x1004ece
Capabilities:
Clear file content
Delete file
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push esi
xor esi, esi
cmp dword [ebp + 0x10], esi
push esi
push 0x80
push 4
mov dword [ebp - 0x10], esi
push esi
jne 0x1004eee
push 1
jmp 0x1004ef0
push 3
push 0xc0000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [0x100a780], eax
je 0x1004f24
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 0xb7
setne cl
cmp dword [0x100a780], 0xffffffff
mov dword [ebp - 0x14], ecx
jne 0x1004f44
push 0x30
push dword [ebp + 0xc]
push dword [0x1009050]
push dword [0x100903c]
push dword [ebp + 8]
call fcn.01001f90
xor eax, eax
jmp 0x100511e
cmp dword [0x1009830], esi
je 0x1004f51
call fcn.01004c69
push ebx
push edi
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push esi
push esi
push 0xe
push dword [0x1009818]
call edi
push esi
push esi
push 0xbd
push dword [0x1009818]
mov ebx, eax
call edi
cmp eax, esi
mov dword [ebp - 0xc], eax
je 0x10050ca
push eax
call dword [sym.imp.KERNEL32.dll_LocalLock]
cmp eax, esi
mov dword [ebp + 0x10], eax
je 0x10050ca
mov eax, dword [0x100a828]
dec eax
je 0x100508a
dec eax
je 0x1005040
dec eax
jne 0x1004fc1
push esi
lea eax, [ebp - 4]
push eax
push 3
push 0x10091c8
push dword [0x100a780]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [0x100a828], 3
je 0x1004fdd
call dword [sym.imp.KERNEL32.dll_GetACP]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x10]
mov edi, 0x400
jmp 0x1004fe8
xor eax, eax
mov dword [ebp - 8], 0xfde9
xor edi, edi
push eax
push esi
push esi
push esi
push ebx
push dword [ebp + 0x10]
push edi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp dword [ebp - 0x10], esi
jne 0x1005007
cmp ebx, esi
je 0x100502b
cmp eax, esi
jne 0x100502b
push 0x31
push dword [ebp + 0xc]
push dword [0x1009088]
push dword [0x100903c]
push dword [ebp + 8]
call fcn.01001f90
cmp eax, 2
je 0x10050d2
xor edi, edi
push ebx
push dword [ebp + 0x10]
push edi
push dword [ebp - 8]
push dword [0x100a780]
call fcn.01004bb9
jmp 0x10050b8
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
lea eax, [ebp - 4]
push eax
push 2
push 0x10091d0
push dword [0x100a780]
call edi
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0x10]
call fcn.01004b85
push esi
lea eax, [ebp - 4]
push eax
lea eax, [ebx + ebx]
push eax
push dword [ebp + 0x10]
push dword [0x100a780]
call edi
push ebx
push dword [ebp + 0x10]
mov edi, eax
push dword [ebp + 0x10]
call fcn.01004b85
jmp 0x10050ba
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
lea eax, [ebp - 4]
push eax
push 2
push 0x10091cc
push dword [0x100a780]
call edi
push esi
lea eax, [ebp - 4]
push eax
lea eax, [ebx + ebx]
push eax
push dword [ebp + 0x10]
push dword [0x100a780]
call edi
mov edi, eax
cmp edi, esi
jne 0x1005123
push dword [0x100ae88]
call dword [sym.imp.USER32.dll_SetCursor]
push dword [ebp + 0xc]
call fcn.01004e40
push dword [0x100ae88]
call dword [sym.imp.USER32.dll_SetCursor]
push dword [0x100a780]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [0x100a780], 0xffffffff
cmp dword [ebp - 0xc], esi
je 0x10050ff
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalUnlock]
cmp dword [ebp - 0x14], esi
je 0x100510d
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [0x1009830], esi
je 0x100511a
call fcn.01004ccb
xor eax, eax
pop edi
pop ebx
pop esi
leave
ret 0xc
push dword [0x100a780]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov eax, dword [0x100a828]
push esi
push esi
push 0xb9
push dword [0x1009818]
mov dword [0x1009018], eax
call dword [sym.imp.USER32.dll_SendMessageW]
push dword [ebp + 0xc]
call fcn.01002a75
push dword [0x100a780]
mov dword [0x1009004], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0xc]
or dword [0x100a780], 0xffffffff
call dword [sym.imp.KERNEL32.dll_LocalUnlock]
cmp dword [0x1009830], esi
je 0x1005183
call fcn.01004ccb
push dword [0x100ae88]
call dword [sym.imp.USER32.dll_SetCursor]
xor eax, eax
inc eax
jmp 0x100511c