Function at 0x140038280
Capabilities:
Check if file exists
Clear file content
Get file attributes
Set file attributes
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rax - 0xa8]
sub rsp, 0x190
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x14029e8b8]
xor rax, rsp
mov qword [rbp + 0x80], rax
mov rbx, rcx
xor eax, eax
mov qword [rbp + 0x58], rax
mov qword [rbp + 0x60], rax
mov qword [rbp + 0x68], rax
mov qword [rbp + 0x70], rax
mov qword [rbp + 0x78], rax
xor edx, edx
lea rcx, [rbp + 0x58]
call fcn.1400c4ca0
nop
lea rcx, [rbp + 0x58]
call fcn.140037e80
test al, al
jne 0x1400382f7
xor ebx, ebx
mov esi, ebx
jmp 0x140038570
mov rdx, qword [rbx]
lea rcx, [rbp + 0x58]
call fcn.1400c5850
mov rcx, rax
call fcn.1400c6a50
lea rdx, [rbp + 0x30]
lea rcx, [rbp + 0x58]
call fcn.1400c86b0
nop
lea rax, [0x1401f5368]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], SafeArrayDestroy
movaps xmm0, xmmword [rsp + 0x60]
movdqa xmmword [rsp + 0x60], xmm0
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x78]
call fcn.140032b30
nop
cmp qword [rax + 0x18], 8
jb 0x140038353
mov rax, qword [rax]
lea rcx, [rbp - 0x58]
mov qword [rbp - 0x60], rcx
mov r8d, 3
mov rdx, rax
lea rcx, [rbp - 0x60]
call fcn.140033f00
nop
movdqa xmm0, xmmword [0x1401f5810]
movdqu xmmword [rsp + 0x50], xmm0
mov byte [rsp + 0x40], 0
mov rdx, qword [rbp - 0x60]
mov r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp byte [rdx + r8], 0
jne 0x140038390
lea rcx, [rsp + 0x40]
call fcn.14000d6b0
xor r14b, r14b
lea rcx, [rsp + 0x40]
cmp qword [rsp + 0x58], 0x10
cmovae rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov edi, eax
cmp eax, 0xffffffff
je 0x1400383ea
test dil, 1
je 0x1400383ea
mov r14b, 1
lea rcx, [rsp + 0x40]
cmp qword [rsp + 0x58], 0x10
cmovae rcx, qword [rsp + 0x40]
mov edx, eax
and edx, 0xfffffffe
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea rcx, [rsp + 0x40]
cmp qword [rsp + 0x58], 0x10
cmovae rcx, qword [rsp + 0x40]
xor ebx, ebx
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
xor r9d, r9d
mov esi, 1
mov r8d, esi
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x140038467
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
lea rdx, [rbp + 0x30]
cmp qword [rbp + 0x48], 0x10
cmovae rdx, qword [rbp + 0x30]
mov qword [rsp + 0x20], rbx
lea r9, [rbp + 0x50]
mov r8d, dword [rbp + 0x40]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r14b, r14b
je 0x140038485
lea rcx, [rsp + 0x40]
cmp qword [rsp + 0x58], 0x10
cmovae rcx, qword [rsp + 0x40]
mov edx, edi
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov rdx, qword [rsp + 0x58]
cmp rdx, 0x10
jb 0x1400384c2
inc rdx
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400384bd
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400385ad
call fcn.1401606e8
movdqa xmm0, xmmword [0x1401f5810]
movdqu xmmword [rsp + 0x50], xmm0
mov byte [rsp + 0x40], bl
lea rax, [rbp - 0x58]
mov rcx, qword [rbp - 0x60]
cmp rcx, rax
je 0x1400384e7
call fcn.1401b3018
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 8
jb 0x140038529
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140038523
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400385b3
call fcn.1401606e8
nop
mov rdx, qword [rbp + 0x48]
cmp rdx, 0x10
jb 0x140038560
inc rdx
mov rcx, qword [rbp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14003855b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400385a7
call fcn.1401606e8
mov qword [rbp + 0x40], rbx
mov qword [rbp + 0x48], reloc.OLEAUT32.dll_SafeArrayDestroy
mov byte [rbp + 0x30], 0
lea rcx, [rbp + 0x58]
call fcn.1400c51d0
mov eax, esi
mov rcx, qword [rbp + 0x80]
xor rcx, rsp
call fcn.140160a40
lea r11, [rsp + 0x190]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
call fcn.1401b3260
nop
call fcn.1401b3260
nop
call fcn.1401b3260
int3