Function at 0x140072830
Capabilities:
Check if file exists
Create directory
Delete file
Encode data using xor
Get file attributes
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xa0
mov r13, rdx
mov rdi, rcx
xor r14d, r14d
mov qword [rbp - 0x39], r14
mov qword [rbp - 0x29], r14
mov qword [rbp - 0x21], 7
mov word [rbp - 0x39], r14w
mov r12d, 1
mov r8d, r12d
lea rdx, [0x1400b9cac]
lea rcx, [rbp - 0x39]
call fcn.140060b60
nop
lea r8, [rbp - 0x39]
mov rdx, rdi
lea rcx, [rbp + 0xf]
call fcn.140064d60
nop
mov rdx, qword [rbp - 0x21]
cmp rdx, 8
jb 0x1400728df
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x39]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400728da
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140072d10
call fcn.140077488
mov rbx, qword [rbp + 0x17]
cmp qword [rbp + 0xf], rbx
jne 0x14007293b
movdqa xmm0, xmmword [0x1400bb130]
movdqu xmmword [rbp - 0x39], xmm0
mov dword [rbp - 0x29], 0x88d3cfc9
mov dword [rbp - 0x25], 0xc4dfcbd9
mov word [rbp - 0x21], 0xa7
nop word [rax + rax]
movsxd rax, r14d
lea rcx, [rbp - 0x39]
add rcx, rax
lea eax, [r14 - 0x6b]
xor byte [rcx], al
inc r14d
cmp r14d, 0x19
jb 0x140072910
mov byte [rbp - 0x20], 0
lea rcx, [rbp - 0x39]
call fcn.14006df70
jmp 0x140072c99
mov rdx, qword [rbx - 8]
cmp rdx, 8
jb 0x14007297b
mov rcx, qword [rbx - 0x20]
lea rdx, [rdx*2 + 2]
cmp rdx, 0x1000
jb 0x140072976
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140072d10
mov rcx, r8
call fcn.140077488
mov word [rbx - 0x20], r14w
mov qword [rbx - 0x10], r14
mov qword [rbx - 8], 7
mov rsi, qword [rbp + 0x17]
sub rsi, 0x20
mov qword [rbp + 0x77], rsi
mov qword [rbp + 0x17], rsi
mov qword [rbp - 0x11], r14
mov qword [rbp - 1], r14
mov qword [rbp + 7], 7
mov word [rbp - 0x11], r14w
mov r15, qword [rbp + 0xf]
cmp r15, rsi
je 0x140072b09
movzx ebx, byte [rbp + 0x77]
movabs rax, 0x7ffffffffffffffe
mov rcx, qword [r15 + 0x10]
sub rax, rcx
cmp rax, 1
jb 0x140072d0a
mov r9, r15
cmp qword [r15 + 0x18], 8
jb 0x1400729ea
mov r9, qword [r15]
mov qword [rsp + 0x30], r12
lea rax, [0x1400b9cac]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea rcx, [rbp - 0x39]
call fcn.140068460
nop
lea r9, [rbp - 0x39]
mov r13, qword [rbp - 0x39]
mov r12, qword [rbp - 0x21]
cmp r12, 8
cmovae r9, r13
mov rcx, qword [rbp - 1]
mov r8, qword [rbp + 7]
mov rax, r8
sub rax, rcx
mov rdx, qword [rbp - 0x29]
cmp rdx, rax
ja 0x140072a65
lea rsi, [rdx + rcx]
mov qword [rbp - 1], rsi
lea rdi, [rbp - 0x11]
cmp r8, 8
cmovae rdi, qword [rbp - 0x11]
lea rcx, [rdi + rcx*2]
lea r8, [rdx + rdx]
mov rdx, r9
call fcn.140079910
mov word [rdi + rsi*2], r14w
mov rsi, qword [rbp + 0x77]
jmp 0x140072a7f
mov qword [rsp + 0x20], rdx
movzx r8d, bl
lea rcx, [rbp - 0x11]
call fcn.140068210
mov r12, qword [rbp - 0x21]
mov r13, qword [rbp - 0x39]
cmp r12, 8
jb 0x140072aba
lea rdx, [r12*2 + 2]
mov rax, r13
cmp rdx, 0x1000
jb 0x140072ab2
add rdx, 0x27
mov r13, qword [r13 - 8]
sub rax, r13
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140072d04
mov rcx, r13
call fcn.140077488
lea rcx, [rbp - 0x11]
cmp qword [rbp + 7], 8
cmovae rcx, qword [rbp - 0x11]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140072ad7
test al, 0x10
jne 0x140072aed
lea rcx, [rbp - 0x11]
cmp qword [rbp + 7], 8
cmovae rcx, qword [rbp - 0x11]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
add r15, 0x20
cmp r15, rsi
je 0x140072b01
mov r12d, 1
jmp 0x1400729c2
mov rdi, qword [rbp + 0x67]
mov r13, qword [rbp + 0x6f]
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x140072b16
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp qword [rdi + 0x18], 8
jb 0x140072b26
mov rdi, qword [rdi]
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 2]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x140072bee
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rdx, qword [r13]
mov r8, qword [r13 + 8]
sub r8, rdx
mov qword [rsp + 0x20], r14
xor r9d, r9d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140072be0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
movdqa xmm0, xmmword [0x1400bb170]
movdqu xmmword [rbp - 0x39], xmm0
movdqa xmm1, xmmword [0x1400bb050]
movdqu xmmword [rbp - 0x29], xmm1
mov word [rbp - 0x19], 0xbf
mov edx, r14d
nop dword [rax]
movsxd rax, edx
lea rcx, [rbp - 0x39]
add rcx, rax
lea eax, [rdx - 0x6b]
xor byte [rcx], al
inc edx
cmp edx, 0x21
jb 0x140072bc0
mov byte [rbp - 0x18], 0
lea rcx, [rbp - 0x39]
jmp 0x140072c3e
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r12d, r14d
jmp 0x140072c48
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
movdqa xmm0, xmmword [0x1400bb150]
movdqu xmmword [rbp - 0x39], xmm0
movdqa xmm1, xmmword [0x1400bac20]
movdqu xmmword [rbp - 0x29], xmm1
mov word [rbp - 0x19], 0xbcd1
xor eax, eax
mov byte [rbp - 0x17], al
mov edx, r14d
nop
movsxd rax, edx
lea rcx, [rbp - 0x39]
add rcx, rax
lea eax, [rdx - 0x6b]
xor byte [rcx], al
inc edx
cmp edx, 0x22
jb 0x140072c20
mov byte [rbp - 0x17], 0
lea rcx, [rbp - 0x39]
mov edx, ebx
call fcn.14006df70
mov r12d, ebx
mov rdx, qword [rbp + 7]
cmp rdx, 8
jb 0x140072c88
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x11]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140072c83
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140072d10
call fcn.140077488
mov qword [rbp - 1], r14
mov qword [rbp + 7], 7
mov word [rbp - 0x11], r14w
mov rcx, qword [rbp + 0xf]
test rcx, rcx
je 0x140072ce0
mov rdx, qword [rbp + 0x17]
call fcn.1400683d0
mov rdx, qword [rbp + 0x1f]
mov rcx, qword [rbp + 0xf]
sub rdx, rcx
and rdx, 0xffffffffffffffe0
mov rax, rcx
cmp rdx, 0x1000
jb 0x140072cdb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140072cfe
call fcn.140077488
mov eax, r12d
mov rbx, qword [rsp + 0xf8]
add rsp, 0xa0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.1400870b4
nop
call fcn.1400870b4
nop
call fcn.140006b20
nop
call fcn.1400870b4
int3