Function at 0x140155010
Capabilities:
Clear file content
Set file attributes

Disassembly:
push rsi
sub rsp, 0x70
or rsi, 0xffffffffffffffff
call fcn.140153ea0
test eax, eax
je 0x140155041
mov rcx, qword [0x1404cbfb0]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__get_osfhandle]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov rcx, qword [0x1404cbfb0]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
cmp dword [0x1403dbd5c], 0
jne 0x140155313
cmp dword [0x1403dbd64], 1
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x58], rdi
jg 0x1401550bf
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0x98]
lea rcx, [rsp + 0x90]
call fcn.1401558f0
xor ebx, ebx
lea rcx, [0x1404cbfdc]
mov qword [rsp + 0x30], rbx
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
mov edx, 0x40000000
mov edi, eax
mov dword [rsp + 0x20], 3
lea r8d, [rbx + 2]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
jmp 0x1401550c3
xor ebx, ebx
mov edi, ebx
mov rax, qword [0x1404bbe30]
mov edx, dword [rax + 0x24]
test dl, 0x5f
je 0x14015511f
and edx, 0x7f
lea rcx, [0x1404cbfdc]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x14015511f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str._nwarning___d_:_could_not_set_file_attributes_n
lea rcx, [0x1404bbe38]
call fcn.1401066c0
mov r8d, eax
lea rdx, [0x1404bbe38]
mov r9d, 1
lea rcx, [0x1403dbd40]
call qword [0x1404cc1f8]
mov rcx, qword [0x1404cbea0]
test rcx, rcx
je 0x140155232
movzx edx, word [0x1404cbed0]
lea r9, [rsp + 0x80]
lea r8, [rsp + 0x88]
call fcn.140153dc0
test eax, eax
je 0x140155232
mov rax, qword [0x1404bbe30]
lea rcx, [0x1404cbfdc]
mov r8, qword [rsp + 0x88]
mov qword [rsp + 0x60], rbp
mov ebp, dword [rsp + 0x80]
mov r9d, ebp
mov edx, dword [rax + 0x24]
call fcn.1401543e0
cmp eax, 0x4f
jne 0x14015522d
mov eax, dword [0x1403dbd84]
test eax, eax
je 0x1401551e5
mov r8d, 0x4000
lea rdx, [0x1404c3e38]
lea rcx, [0x1404cbfdc]
call fcn.14019d4e0
mov r8, rax
lea rdx, [0x1402902e0]
lea rcx, [0x1404bbe38]
call fcn.1401066c0
mov r8d, eax
lea rdx, [0x1404bbe38]
mov r9d, 1
lea rcx, [0x1403dbd40]
call qword [0x1404cc1f8]
mov eax, dword [0x1403dbd84]
test eax, eax
lea rcx, [0x14032eb94]
lea r9, [0x140329b42]
cmovne r9, rcx
lea r8d, [rbp - 0xb]
lea rcx, [0x1404bbe38]
lea rdx, str._compressed_WinNT_security_data_missing___d_bytes__s
call fcn.1401066c0
mov r8d, eax
lea rdx, [0x1404bbe38]
mov r9d, 1
lea rcx, [0x1403dbd40]
call qword [0x1404cc1f8]
mov rbp, qword [rsp + 0x60]
cmp dword [0x1403dbd64], 1
jg 0x140155309
cmp rsi, 0xffffffffffffffff
jne 0x14015528c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str._nCreateFile___error__d_when_trying_set_file_time_n
lea rcx, [0x1404bbe38]
call fcn.1401066c0
mov r8d, eax
lea r9d, [rsi + 2]
lea rdx, [0x1404bbe38]
lea rcx, [0x1403dbd40]
call qword [0x1404cc1f8]
mov rbx, qword [rsp + 0x68]
mov rdi, qword [rsp + 0x58]
add rsp, 0x70
pop rsi
ret
test edi, edi
je 0x140155300
mov eax, edi
lea r9, [rsp + 0x90]
and al, 1
lea r8, [rsp + 0x98]
mov eax, edi
lea rdx, [rsp + 0x40]
cmove r9, rbx
mov rcx, rsi
and al, 2
cmove r8, rbx
and dil, 4
cmove rdx, rbx
call qword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
jne 0x140155300
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str._nSetFileTime_failed:__d_n
lea rcx, [0x1404bbe38]
call fcn.1401066c0
mov r8d, eax
lea rdx, [0x1404bbe38]
xor r9d, r9d
lea rcx, [0x1403dbd40]
call qword [0x1404cc1f8]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rsp + 0x68]
mov rdi, qword [rsp + 0x58]
add rsp, 0x70
pop rsi
ret