Function at 0x140005880
Capabilities:
Create directory
Delete file
Write file on windows

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x2b8
mov dword [rsp + 0x50], 0
lea rdx, [rsp + 0x44]
mov rcx, qword [rsp + 0x2c0]
call fcn.140005d80
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
je 0x140005b55
call fcn.1400056e0
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
je 0x140005b42
mov dword [rsp + 0x60], 0x18
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x68], rax
mov dword [rsp + 0x70], 0
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp eax, 1
je 0x14000590d
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x140005b2f
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [rsp + 0x58], 0
mov edx, 0xfffe
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x78], rax
cmp qword [rsp + 0x78], 0
je 0x140005b2f
mov rax, qword [rsp + 0x2c0]
add rax, 0xb6
mov r9, rax
mov r8, qword [rsp + 0x48]
lea rdx, [0x140026090]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.USER32.dll_wsprintfW]
mov qword [rsp + 0x298], 0
mov dword [rsp + 0x290], 0
mov r8d, 0x104
lea rdx, [rsp + 0x80]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x140005b1c
lea rdx, [rsp + 0x290]
lea rcx, [rsp + 0x80]
call fcn.14000fb20
mov qword [rsp + 0x298], rax
cmp qword [rsp + 0x298], 0
je 0x140005b1c
mov qword [rsp + 0x2a0], 0xffffffffffffffff
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x2a0], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + reloc.SHELL32.dll_IsUserAnAdmin], eax
cmp qword [rsp + 0x2a0], 0xffffffffffffffff
jne 0x140005a34
cmp dword [rsp + reloc.SHELL32.dll_IsUserAnAdmin], 0x50
jne 0x140005b03
cmp dword [rsp + reloc.SHELL32.dll_IsUserAnAdmin], 0x50
jne 0x140005a42
jmp 0x140005ab4
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x2ac]
mov r8d, dword [rsp + 0x290]
mov rdx, qword [rsp + 0x298]
mov rcx, qword [rsp + 0x2a0]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [rsp + 0x290]
cmp dword [rsp + 0x2ac], eax
jne 0x140005adf
mov rcx, qword [rsp + 0x2a0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x2a0], 0xffffffffffffffff
cmp qword [rsp + 0x2a0], 0xffffffffffffffff
je 0x140005ab4
mov rcx, qword [rsp + 0x2a0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x298]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, 1
jmp 0x140005b57
cmp qword [rsp + 0x2a0], 0xffffffffffffffff
je 0x140005af8
mov rcx, qword [rsp + 0x2a0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp qword [rsp + 0x298], 0
je 0x140005b1c
mov rcx, qword [rsp + 0x298]
call qword [sym.imp.KERNEL32.dll_LocalFree]
cmp qword [rsp + 0x78], 0
je 0x140005b2f
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_LocalFree]
cmp qword [rsp + 0x58], 0
je 0x140005b42
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_LocalFree]
cmp qword [rsp + 0x48], 0
je 0x140005b55
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
add rsp, 0x2b8
ret