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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
xor esi, esi
push edi
cmp dword [ebp + 0x10], esi
push esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], esi
push 0x80
jne 0x10059dc
push 3
push esi
push 1
push 0xc0000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x1008bd0], eax
jmp 0x1005a0c
push 4
push esi
push 3
push 0xc0000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [0x1008bd0], eax
je 0x1005a0c
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 0xb7
setne cl
mov dword [ebp - 0x14], ecx
cmp dword [0x1008bd0], 0xffffffff
jne 0x1005a3c
cmp dword [ebp + 0x10], esi
je 0x1005bff
push 0x30
push dword [ebp + 0xc]
push dword [0x1008060]
push dword [0x1008050]
push dword [ebp + 8]
call fcn.01002cf5
jmp 0x1005bff
cmp dword [0x10087e4], esi
je 0x1005a49
call fcn.0100592e
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push esi
push esi
push 0xe
push dword [0x10087d4]
call edi
push esi
push esi
push 0xbd
mov ebx, eax
push dword [0x10087d4]
call edi
cmp eax, esi
mov dword [ebp - 0xc], eax
je 0x1005baf
push eax
call dword [sym.imp.KERNEL32.dll_LocalLock]
cmp eax, esi
mov dword [ebp + 0x10], eax
je 0x1005baf
mov eax, dword [0x1008bcc]
dec eax
je 0x1005b6f
dec eax
je 0x1005b25
dec eax
jne 0x1005abe
lea eax, [ebp - 8]
push esi
push eax
push 3
push 0x10085a8
push dword [0x1008bd0]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 4], 0xfde9
xor eax, eax
cmp dword [0x1008bcc], 3
je 0x1005ad5
call dword [sym.imp.KERNEL32.dll_GetACP]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x10]
push eax
push esi
push esi
push esi
push ebx
push dword [ebp + 0x10]
push esi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp dword [ebp - 0x10], esi
mov edi, eax
je 0x1005b10
push 0x31
push dword [ebp + 0xc]
push dword [0x1008090]
push dword [0x1008050]
push dword [ebp + 8]
call fcn.01002cf5
cmp eax, 2
je 0x1005bb7
push edi
push ebx
push dword [ebp + 0x10]
push dword [ebp - 4]
push dword [0x1008bd0]
call fcn.010058b8
jmp 0x1005b9d
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 8]
push esi
push eax
push 2
push 0x10085b0
push dword [0x1008bd0]
call edi
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0x10]
call fcn.01005887
lea eax, [ebp - 8]
push esi
push eax
lea eax, [ebx + ebx]
push eax
push dword [ebp + 0x10]
push dword [0x1008bd0]
call edi
push ebx
mov edi, eax
push dword [ebp + 0x10]
push dword [ebp + 0x10]
call fcn.01005887
jmp 0x1005b9f
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 8]
push esi
push eax
push 2
push 0x10085ac
push dword [0x1008bd0]
call edi
lea eax, [ebp - 8]
push esi
push eax
lea eax, [ebx + ebx]
push eax
push dword [ebp + 0x10]
push dword [0x1008bd0]
call edi
mov edi, eax
cmp edi, esi
jne 0x1005c08
push dword [0x1008f40]
call dword [sym.imp.USER32.dll_SetCursor]
push dword [ebp + 0xc]
call fcn.010062f0
push dword [0x1008f40]
call dword [sym.imp.USER32.dll_SetCursor]
push dword [0x1008bd0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [0x1008bd0], 0xffffffff
cmp dword [ebp - 0xc], esi
je 0x1005be4
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalUnlock]
cmp dword [ebp - 0x14], esi
je 0x1005bf2
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [0x10087e4], esi
je 0x1005bff
call fcn.01005970
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0xc
push dword [0x1008bd0]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push esi
push esi
push 0xb9
push dword [0x10087d4]
call dword [sym.imp.USER32.dll_SendMessageW]
push dword [ebp + 0xc]
call fcn.01002a91
push dword [0x1008bd0]
mov dword [0x1008014], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0xc]
or dword [0x1008bd0], 0xffffffff
call dword [sym.imp.KERNEL32.dll_LocalUnlock]
cmp dword [0x10087e4], esi
je 0x1005c5e
call fcn.01005970
push dword [0x1008f40]
call dword [sym.imp.USER32.dll_SetCursor]
push 1
pop eax
jmp 0x1005c01