Function at 0x1004eae
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 0x1004ece
push 1
jmp 0x1004ed0
push 3
push 0xc0000000
push dword [ebp + 0xc]
call dword [sym.imp.kernel32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [0x100a480], eax
je 0x1004f04
call dword [sym.imp.kernel32.dll_GetLastError]
xor ecx, ecx
cmp eax, 0xb7
setne cl
cmp dword [0x100a480], 0xffffffff
mov dword [ebp - 0x14], ecx
jne 0x1004f24
push 0x30
push dword [ebp + 0xc]
push dword [0x1009068]
push dword [0x1009054]
push dword [ebp + 8]
call main
xor eax, eax
jmp 0x10050fe
cmp dword [0x1009850], esi
je 0x1004f31
call fcn.01004c49
push ebx
push edi
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push esi
push esi
push 0xe
push dword [0x1009838]
call edi
push esi
push esi
push 0xbd
push dword [0x1009838]
mov ebx, eax
call edi
cmp eax, esi
mov dword [ebp - 0xc], eax
je 0x10050aa
push eax
call dword [sym.imp.kernel32.dll_LocalLock]
cmp eax, esi
mov dword [ebp + 0x10], eax
je 0x10050aa
mov eax, dword [0x100a528]
dec eax
je 0x100506a
dec eax
je 0x1005020
dec eax
jne 0x1004fa1
push esi
lea eax, [ebp - 4]
push eax
push 3
push 0x10091e0
push dword [0x100a480]
call dword [sym.imp.kernel32.dll_WriteFile]
cmp dword [0x100a528], 3
je 0x1004fbd
call dword [sym.imp.kernel32.dll_GetACP]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x10]
mov edi, 0x400
jmp 0x1004fc8
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 0x1004fe7
cmp ebx, esi
je 0x100500b
cmp eax, esi
jne 0x100500b
push 0x31
push dword [ebp + 0xc]
push dword [0x10090a0]
push dword [0x1009054]
push dword [ebp + 8]
call main
cmp eax, 2
je 0x10050b2
xor edi, edi
push ebx
push dword [ebp + 0x10]
push edi
push dword [ebp - 8]
push dword [0x100a480]
call main
jmp 0x1005098
mov edi, dword [sym.imp.kernel32.dll_WriteFile]
push esi
lea eax, [ebp - 4]
push eax
push 2
push 0x10091e8
push dword [0x100a480]
call edi
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0x10]
call main
push esi
lea eax, [ebp - 4]
push eax
lea eax, [ebx + ebx]
push eax
push dword [ebp + 0x10]
push dword [0x100a480]
call edi
push ebx
push dword [ebp + 0x10]
mov edi, eax
push dword [ebp + 0x10]
call main
jmp 0x100509a
mov edi, dword [sym.imp.kernel32.dll_WriteFile]
push esi
lea eax, [ebp - 4]
push eax
push 2
push 0x10091e4
push dword [0x100a480]
call edi
push esi
lea eax, [ebp - 4]
push eax
lea eax, [ebx + ebx]
push eax
push dword [ebp + 0x10]
push dword [0x100a480]
call edi
mov edi, eax
cmp edi, esi
jne 0x1005103
push dword [0x100ab88]
call dword [sym.imp.USER32.dll_SetCursor]
push dword [ebp + 0xc]
call main
push dword [0x100ab88]
call dword [sym.imp.USER32.dll_SetCursor]
push dword [0x100a480]
call dword [sym.imp.kernel32.dll_CloseHandle]
or dword [0x100a480], 0xffffffff
cmp dword [ebp - 0xc], esi
je 0x10050df
push dword [ebp - 0xc]
call dword [sym.imp.kernel32.dll_LocalUnlock]
cmp dword [ebp - 0x14], esi
je 0x10050ed
push dword [ebp + 0xc]
call dword [sym.imp.kernel32.dll_DeleteFileW]
cmp dword [0x1009850], esi
je 0x10050fa
call fcn.01004cab
xor eax, eax
pop edi
pop ebx
pop esi
leave
ret 0xc
push dword [0x100a480]
call dword [sym.imp.kernel32.dll_SetEndOfFile]
mov eax, dword [0x100a528]
push esi
push esi
push 0xb9
push dword [0x1009838]
mov dword [0x1009030], eax
call dword [sym.imp.USER32.dll_SendMessageW]
push dword [ebp + 0xc]
call main
push dword [0x100a480]
mov dword [0x100901c], esi
call dword [sym.imp.kernel32.dll_CloseHandle]
push dword [ebp - 0xc]
or dword [0x100a480], 0xffffffff
call dword [sym.imp.kernel32.dll_LocalUnlock]
cmp dword [0x1009850], esi
je 0x1005163
call fcn.01004cab
push dword [0x100ab88]
call dword [sym.imp.USER32.dll_SetCursor]
xor eax, eax
inc eax
jmp 0x10050fc