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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
xor esi, esi
cmp dword [ebp + 0x10], esi
push esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
push 0x80
jne 0x1004acc
push 3
push esi
push 1
push 0xc0000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x1009480], eax
jmp 0x1004afc
push 4
push esi
push 3
push 0xc0000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [0x1009480], eax
je 0x1004b05
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 0xb7
setne cl
mov dword [ebp - 0x14], ecx
cmp dword [0x1009480], 0xffffffff
jne 0x1004b25
push 0x30
push dword [ebp + 0xc]
push dword [0x1008050]
push dword [0x100803c]
push dword [ebp + 8]
call fcn.01001f55
xor eax, eax
jmp 0x1004cff
cmp dword [0x1008830], esi
je 0x1004b32
call fcn.0100486d
push ebx
push edi
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push esi
push esi
push 0xe
push dword [0x1008818]
call edi
push esi
push esi
push 0xbd
push dword [0x1008818]
mov ebx, eax
call edi
cmp eax, esi
mov dword [ebp - 0xc], eax
je 0x1004cab
push eax
call dword [sym.imp.KERNEL32.dll_LocalLock]
cmp eax, esi
mov dword [ebp + 0x10], eax
je 0x1004cab
mov eax, dword [0x1009528]
dec eax
je 0x1004c6b
dec eax
je 0x1004c21
dec eax
jne 0x1004ba2
push esi
lea eax, [ebp - 4]
push eax
push 3
push 0x10081c8
push dword [0x1009480]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [0x1009528], 3
je 0x1004bbe
call dword [sym.imp.KERNEL32.dll_GetACP]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x10]
mov edi, 0x400
jmp 0x1004bc9
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 0x1004be8
cmp ebx, esi
je 0x1004c0c
cmp eax, esi
jne 0x1004c0c
push 0x31
push dword [ebp + 0xc]
push dword [0x1008088]
push dword [0x100803c]
push dword [ebp + 8]
call fcn.01001f55
cmp eax, 2
je 0x1004cb3
xor edi, edi
push ebx
push dword [ebp + 0x10]
push edi
push dword [ebp - 8]
push dword [0x1009480]
call fcn.010047c2
jmp 0x1004c99
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
lea eax, [ebp - 4]
push eax
push 2
push 0x10081d0
push dword [0x1009480]
call edi
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0x10]
call fcn.01004796
push esi
lea eax, [ebp - 4]
push eax
lea eax, [ebx + ebx]
push eax
push dword [ebp + 0x10]
push dword [0x1009480]
call edi
push ebx
push dword [ebp + 0x10]
mov edi, eax
push dword [ebp + 0x10]
call fcn.01004796
jmp 0x1004c9b
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
lea eax, [ebp - 4]
push eax
push 2
push 0x10081cc
push dword [0x1009480]
call edi
push esi
lea eax, [ebp - 4]
push eax
lea eax, [ebx + ebx]
push eax
push dword [ebp + 0x10]
push dword [0x1009480]
call edi
mov edi, eax
cmp edi, esi
jne 0x1004d04
push dword [0x1009b88]
call dword [sym.imp.USER32.dll_SetCursor]
push dword [ebp + 0xc]
call fcn.01004a24
push dword [0x1009b88]
call dword [sym.imp.USER32.dll_SetCursor]
push dword [0x1009480]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [0x1009480], 0xffffffff
cmp dword [ebp - 0xc], esi
je 0x1004ce0
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalUnlock]
cmp dword [ebp - 0x14], esi
je 0x1004cee
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [0x1008830], esi
je 0x1004cfb
call fcn.010048c8
xor eax, eax
pop edi
pop ebx
pop esi
leave
ret 0xc
push dword [0x1009480]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov eax, dword [0x1009528]
push esi
push esi
push 0xb9
push dword [0x1008818]
mov dword [0x1008018], eax
call dword [sym.imp.USER32.dll_SendMessageW]
push dword [ebp + 0xc]
call fcn.01001c5b
push dword [0x1009480]
mov dword [0x1008004], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0xc]
or dword [0x1009480], 0xffffffff
call dword [sym.imp.KERNEL32.dll_LocalUnlock]
cmp dword [0x1008830], esi
je 0x1004d64
call fcn.010048c8
push dword [0x1009b88]
call dword [sym.imp.USER32.dll_SetCursor]
xor eax, eax
inc eax
jmp 0x1004cfd