Function at 0x140008194
Capabilities:
Delete file
Get common file path
Move file
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1160
call fcn.1401ad250
sub rsp, rax
lea rbp, [rsp + 0x40]
mov qword [rbp + 0x1178], rbx
mov rax, qword [0x1419fb3c0]
xor rax, rbp
mov qword [rbp + 0x1110], rax
mov dword [rbp + 0x18], r9d
mov r15d, r8d
mov r12, rdx
mov rsi, rcx
or rdi, 0xffffffffffffffff
mov qword [rbp + 0x20], rdi
or r14, rdi
mov qword [rbp + 0x10], r14
xor ebx, ebx
lea rax, [rbp + 0xcf0]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0xf00]
lea r8, [rbp + 0x8d0]
lea rdx, [rbp + 0xae0]
mov rcx, r12
call fcn.1401ad8e0
lea rdx, [rbp + 0xae0]
lea rcx, [rbp + 0x6c0]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
lea rdx, [rbp + 0x8d0]
lea rcx, [rbp + 0x6c0]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
mov rdx, r12
lea rcx, [rbp + 0x4b0]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
lea rdx, str..bak
lea rcx, [rbp + 0x4b0]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
lea r9, [rbp + 0x2a0]
xor r8d, r8d
lea rdx, [0x1401de4e8]
lea rcx, [rbp + 0x6c0]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x140008503
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
lea rcx, [rbp + 0x2a0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
mov qword [rbp + 0x20], rax
cmp rax, 0xffffffffffffffff
je 0x140008503
cmp r15d, 0xffffffff
jne 0x1400082cb
mov r15d, dword [rsi + 0x4c]
movsxd rcx, r15d
lea rax, section..data
mov rax, qword [rax + rcx*8]
mov qword [rbp + 0x40], rax
mov rcx, rax
call fcn.1401accc0
mov r8, rax
mov qword [rbp + 0x30], rax
mov rax, qword [rsi + 0x68]
mov qword [rbp + 0x38], rax
mov qword [rbp + 0x28], rax
mov r15d, ebx
mov dword [rbp + 8], ebx
cmp r15d, eax
jge 0x140008463
movsxd rdx, r15d
test r15d, r15d
js 0x14000845e
cmp rdx, qword [rsi + 0x68]
jge 0x14000845e
lea rcx, [rdx + rdx*4]
mov rax, qword [rsi + 0x60]
mov r13d, dword [rax + rcx*4 + 8]
mov dword [rbp + 4], r13d
test r13d, r13d
jle 0x140008417
test r15d, r15d
js 0x14000840e
cmp rdx, qword [rsi + 0x68]
jge 0x14000840e
lea rcx, [rdx + rdx*4]
mov rax, qword [rax + rcx*4]
mov qword [rbp + 0x28], rax
test rax, rax
je 0x1400083e3
mov rcx, rax
call fcn.1401ac948
lea edx, [rax + 1]
cmp edx, 0x3fffffff
jg 0x1400083e3
movsxd rax, edx
add rax, rax
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x14000838b
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.1401ad250
sub rsp, rcx
lea r13, [rsp + 0x40]
test r13, r13
je 0x1400083df
mov byte [r13], bl
lea eax, [rdx + rdx]
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r13
or r9d, 0xffffffff
mov r8, qword [rbp + 0x28]
xor edx, edx
lea ecx, [rdx + 3]
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb rdx, rdx
and rdx, r13
mov r13d, dword [rbp + 4]
jmp 0x1400083e6
mov r13d, dword [rbp + 4]
mov rdx, rbx
mov qword [rsp + 0x20], rbx
lea r9, [rbp]
mov r8d, r13d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140008503
cmp r13d, dword [rbp]
je 0x140008413
jmp 0x140008503
call fcn.14001cfb8
mov r8, qword [rbp + 0x30]
mov rax, qword [rbp + 0x38]
dec eax
cmp r15d, eax
jge 0x14000844e
mov qword [rsp + 0x20], rbx
lea r9, [rbp]
mov rdx, qword [rbp + 0x40]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140008503
mov r8, qword [rbp + 0x30]
cmp r8d, dword [rbp]
jne 0x140008503
inc r15d
mov dword [rbp + 8], r15d
mov rax, qword [rbp + 0x38]
jmp 0x1400082fe
call fcn.14001cfb8
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or rdi, 0xffffffffffffffff
mov qword [rbp + 0x20], rdi
mov rcx, r12
cmp dword [rsi + 0x50], ebx
je 0x1400084c5
lea rdx, [rbp + 0x50]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov r14, rax
mov qword [rbp + 0x10], rax
cmp rax, rdi
je 0x1400084cb
lea rcx, [rbp + 0x4b0]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea rdx, [rbp + 0x4b0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x140008503
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FindClose]
or r14, rdi
mov qword [rbp + 0x10], r14
jmp 0x1400084cb
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rdx, r12
lea rcx, [rbp + 0x2a0]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x140008503
cmp dword [rbp + 0x18], ebx
je 0x1400084fe
mov rax, qword [rsi]
xor edx, edx
mov rcx, rsi
call qword [rax + 0xa8]
mov eax, dword [rsi + 0xa8]
mov dword [rsi + 0xac], eax
mov ebx, 1
cmp r14, 0xffffffffffffffff
je 0x140008512
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FindClose]
cmp rdi, 0xffffffffffffffff
je 0x140008521
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbp + 0x2a0]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, ebx
mov rcx, qword [rbp + 0x1110]
xor rcx, rbp
call fcn.1401ad2b0
mov rbx, qword [rbp + 0x1178]
lea rsp, [rbp + 0x1120]
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret