Function at 0x140001ed0
Capabilities:
Delete file
Move file
Read file on windows
Write file on windows

Disassembly:
push rsi
push r13
sub rsp, 0xc8
mov rax, qword [0x14001f3f8]
xor rax, rsp
mov qword [rsp + 0x90], rax
mov rsi, rdx
mov qword [rsp + 0x40], rdx
mov r13d, ecx
mov qword [0x1400202c8], rdx
mov dword [0x1400202c0], ecx
call fcn.1400027f0
test al, al
jne 0x140001f18
mov eax, 1
jmp 0x140002647
mov qword [rsp + 0xf0], rbx
xor eax, eax
mov qword [rsp + 0xc0], rbp
mov qword [rsp + 0xb8], rdi
mov qword [rsp + 0xb0], r12
mov qword [rsp + 0xa8], r14
lea r14d, [r13 - 1]
mov qword [rsp + 0xa0], r15
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x34], eax
test r14d, r14d
jle 0x14000204f
movsxd rbp, r14d
lea r15, [0x140000000]
lea rbx, [rsi + rbp*8]
nop dword [rax]
nop word [rax + rax]
mov rcx, qword [rbx]
movzx eax, byte [rcx]
sub al, 0x2d
test al, 0xfd
jne 0x140002037
mov rsi, 0xffffffffffffffff
inc rsi
cmp byte [rcx + rsi], 0
jne 0x140001f97
mov edi, 1
cmp rdi, rsi
jae 0x14000201f
nop word [rax + rax]
mov rdx, qword [rbx]
movsx eax, byte [rdx + rdi]
add eax, 0xffffffc1
cmp eax, 0x33
ja case.0x140001fd5.69
cdqe
movzx eax, byte [r15 + rax + 0x2680]
mov ecx, dword [r15 + rax*4 + 0x2664]
add rcx, r15
jmp rcx
call fcn.140002730
jmp 0x140002017
mov byte [0x14001f5b1], 1
jmp 0x140002017
mov byte [0x14001f5b2], 1
jmp 0x140002017
mov dword [rsp + 0x38], 1
jmp 0x140002017
mov byte [0x14001f5b3], 1
jmp 0x140002017
mov dword [rsp + 0x34], 1
jmp 0x140002017
mov ecx, 0xa
call fcn.1400026c0
inc rdi
cmp rdi, rsi
jb 0x140001fb0
movsxd rcx, r13d
cmp rbp, rcx
jge 0x140002034
sub rcx, rbp
lea rsi, [rbx + 8]
mov rdi, rbx
rep movsq qword [rdi], qword [rsi]
dec r13d
dec r14d
dec rbp
sub rbx, 8
test r14d, r14d
jg 0x140001f80
mov rsi, qword [rsp + 0x40]
cmp byte [0x14001f5b1], 0
jne 0x14000205d
call fcn.1400027a0
lea eax, [r13 - 2]
cmp eax, 2
jbe 0x14000206b
call fcn.140002730
mov rax, qword [rsi + 8]
cmp byte [rax], 0x3f
jne 0x14000207f
cmp byte [rax + 1], 0
jne 0x14000207f
call fcn.140002730
mov eax, 0x4000
mov ecx, eax
mov qword [0x14001fb10], rax
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov qword [0x14001f5b8], rax
test rax, rax
jne 0x1400020ec
nop
mov rax, qword [0x14001fb10]
lea rcx, [rax - 1]
and rcx, rax
jne 0x1400020ba
lea rcx, [rax + rax]
or rcx, rax
add rcx, rcx
mov qword [0x14001fb10], rcx
cmp rcx, 0x82
jae 0x1400020db
xor edx, edx
lea ecx, [rdx + 0xb]
call fcn.1400026c0
mov rcx, qword [0x14001fb10]
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov qword [0x14001f5b8], rax
test rax, rax
je 0x1400020a0
mov ecx, 0x128
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov rbx, rax
test rax, rax
jne 0x140002108
xor edx, edx
lea ecx, [rax + 0xb]
call fcn.1400026c0
mov rcx, qword [rsi + 8]
lea rdi, [rbx + 0x18]
lea r15, [rbx + 0x10]
mov qword [rsp + 0x28], rdi
lea rdx, [rbx + 0x20]
mov qword [rsp + 0x20], r15
lea r9, [rbx + 8]
mov r8, rbx
call fcn.1400069c0
mov rbp, qword [rdi]
cmp byte [rbp], 0
jne 0x1400021aa
xor edi, edi
lea rsi, str..exe
mov rbp, qword [rsi]
lea rcx, [0x14001f6d8]
mov r9, qword [r15]
mov r8, qword [rbx + 8]
mov rdx, qword [rbx]
mov qword [rsp + 0x20], rbp
call sub.api_ms_win_crt_filesystem_l1_1_0.dll__makepath
lea rdx, [rsp + 0x50]
lea rcx, [0x14001f6d8]
call sub.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32
test eax, eax
je 0x14000218d
inc edi
add rsi, 8
cmp edi, 0xa
jb 0x140002140
mov edi, dword [rsp + 0x34]
mov rsi, qword [rsp + 0x40]
mov dword [rsp + 0x30], edi
jmp 0x1400021ff
mov rdx, qword [rsp + 0x70]
movzx ecx, word [rsp + 0x56]
mov rax, rdx
mov rsi, qword [rsp + 0x40]
mov qword [rsp + 0x48], rdx
mov dword [rsp + 0x30], ecx
jmp 0x1400021f0
mov r9, qword [r15]
lea rcx, [0x14001f6d8]
mov r8, qword [rbx + 8]
mov rdx, qword [rbx]
mov qword [rsp + 0x20], rbp
call sub.api_ms_win_crt_filesystem_l1_1_0.dll__makepath
lea rdx, [rsp + 0x50]
lea rcx, [0x14001f6d8]
call sub.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32
test eax, eax
jne 0x1400021f7
movzx eax, word [rsp + 0x56]
mov rcx, qword [rsp + 0x70]
mov dword [rsp + 0x30], eax
mov rax, rcx
mov qword [rsp + 0x48], rcx
test rax, rax
jne 0x140002215
jmp 0x1400021ff
mov eax, dword [rsp + 0x34]
mov dword [rsp + 0x30], eax
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rdx, qword [rsi + 8]
mov ecx, 0xc
call fcn.1400026c0
mov ecx, 0x128
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov r14, rax
test rax, rax
jne 0x140002239
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
xor edx, edx
lea ecx, [rdx + 0xb]
call fcn.1400026c0
cmp r13d, 3
jl 0x1400022dc
mov rcx, qword [rsi + 0x10]
lea rsi, [0x14001f0d0]
sub rsi, rcx
mov rax, rcx
movzx edi, byte [rax]
movzx edx, byte [rax + rsi]
sub edi, edx
jne 0x140002266
inc rax
test edx, edx
jne 0x140002254
test edi, edi
je 0x1400022dc
lea rdi, [r14 + 0x18]
mov r8, rbx
lea rsi, [r14 + 0x10]
mov qword [rsp + 0x28], rdi
lea rdx, [r14 + 0x20]
mov qword [rsp + 0x20], rsi
lea r9, [rbx + 8]
call fcn.1400069c0
mov rax, qword [rdi]
lea rcx, [0x14001f8f8]
mov r9, qword [rsi]
mov r8, qword [rbx + 8]
mov rdx, qword [rbx]
mov qword [rsp + 0x20], rax
call sub.api_ms_win_crt_filesystem_l1_1_0.dll__makepath
lea rdx, [rsp + 0x50]
lea rcx, [0x14001f8f8]
call sub.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32
test eax, eax
jne 0x1400022d6
movzx eax, word [rsp + 0x56]
mov ecx, 0xf000
and ax, cx
mov ecx, 0x4000
cmp ax, cx
je 0x1400022dc
mov rax, qword [rsi]
mov qword [r15], rax
mov r9, qword [r15]
lea rcx, [0x14001f7e8]
mov r8, qword [rbx + 8]
mov rdx, qword [rbx]
mov qword [rsp + 0x20], rbp
call sub.api_ms_win_crt_filesystem_l1_1_0.dll__makepath
mov r9, qword [r15]
lea rax, str..bak
mov r8, qword [rbx + 8]
lea rcx, [0x14001fa08]
mov rdx, qword [rbx]
mov qword [rsp + 0x20], rax
call sub.api_ms_win_crt_filesystem_l1_1_0.dll__makepath
mov r12, qword [rsp + 0xb0]
mov byte [0x14001f5c8], 0
cmp r13d, 4
jl 0x1400023e1
mov rcx, qword [rsp + 0x40]
lea rdi, [r14 + 0x18]
lea rsi, [r14 + 0x10]
mov qword [rsp + 0x28], rdi
lea rdx, [r14 + 0x20]
mov qword [rsp + 0x20], rsi
lea r9, [r14 + 8]
mov r8, r14
mov rcx, qword [rcx + 0x18]
call fcn.1400069c0
mov rax, qword [rdi]
lea rcx, [0x14001f8f8]
mov r9, qword [rsi]
mov r8, qword [r14 + 8]
mov rdx, qword [r14]
mov qword [rsp + 0x20], rax
call sub.api_ms_win_crt_filesystem_l1_1_0.dll__makepath
lea rdx, [rsp + 0x50]
lea rcx, [0x14001f8f8]
call sub.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32
test eax, eax
jne 0x1400023ad
movzx eax, word [rsp + 0x56]
mov ecx, 0xf000
and ax, cx
mov ecx, 0x4000
cmp ax, cx
jne 0x1400023ad
mov rax, qword [r15]
mov qword [rsi], rax
cmp byte [0x14001f5b3], 0
lea rcx, str..res
mov r9, qword [rsi]
lea rax, str..sym
mov r8, qword [r14 + 8]
cmovne rax, rcx
mov rdx, qword [r14]
lea rcx, [0x14001f5c8]
mov qword [rsp + 0x20], rax
call sub.api_ms_win_crt_filesystem_l1_1_0.dll__makepath
mov rcx, r14
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov rcx, rbx
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
mov eax, dword [0x14001f0e0]
movsd xmm0, qword [str.temporary_file]
mov dword [0x14001f900], eax
movzx eax, word [0x14001f0e4]
mov word [0x14001f904], ax
movzx eax, byte [0x14001f0e6]
mov byte [0x14001f906], al
movsd qword [0x14001f8f8], xmm0
call sub.api_ms_win_crt_stdio_l1_1_0.dll_tmpfile
mov r15, qword [rsp + 0xa0]
mov r14, qword [rsp + 0xa8]
mov rbp, qword [rsp + 0xc0]
mov rbx, qword [rsp + 0xf0]
mov qword [0x14001f8f0], rax
test rax, rax
jne 0x140002468
lea rdx, [0x14001f8f8]
lea ecx, [rax + 0xe]
call fcn.1400026c0
cmp dword [rsp + 0x38], 0
je 0x140002476
call fcn.1400017b0
jmp 0x14000247b
call fcn.140001bf0
xor edx, edx
cmp dword [rsp + 0x34], edx
je 0x1400024e4
lea rcx, [0x14001fa08]
call sub.api_ms_win_crt_filesystem_l1_1_0.dll__access
test eax, eax
jne 0x1400024b4
lea rcx, [0x14001fa08]
call sub.api_ms_win_crt_filesystem_l1_1_0.dll_remove
test eax, eax
je 0x1400024b4
lea rdx, [0x14001fa08]
mov ecx, 0x15
call fcn.1400026c0
xor edx, edx
lea rcx, [0x14001f7e8]
call sub.api_ms_win_crt_filesystem_l1_1_0.dll__access
test eax, eax
jne 0x140002515
lea rdx, [0x14001fa08]
lea rcx, [0x14001f7e8]
call sub.api_ms_win_crt_filesystem_l1_1_0.dll_rename
test eax, eax
je 0x140002515
mov ecx, 0x16
jmp 0x140002509
lea rcx, [0x14001f7e8]
call sub.api_ms_win_crt_filesystem_l1_1_0.dll__access
test eax, eax
jne 0x140002515
lea rcx, [0x14001f7e8]
call sub.api_ms_win_crt_filesystem_l1_1_0.dll_remove
test eax, eax
je 0x140002515
mov ecx, 0x15
lea rdx, [0x14001f7e8]
call fcn.1400026c0
lea rdx, [0x14001f0d4]
lea rcx, [0x14001f7e8]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen
mov qword [0x14001f7e0], rax
test rax, rax
jne 0x140002543
lea rdx, [0x14001f7e8]
lea ecx, [rax + 0x10]
call fcn.1400026c0
mov rcx, qword [0x14001f8f0]
xor r8d, r8d
xor edx, edx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
mov rdi, qword [0x14001fb10]
mov esi, 0xffffffff
mov r9, qword [0x14001f8f0]
mov edx, 1
mov rcx, qword [0x14001f5b8]
mov r8d, esi
cmp rdi, r8
cmovbe r8, rdi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
mov rcx, qword [0x14001f8f0]
mov rdi, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ferror
test eax, eax
je 0x1400025a6
lea rdx, [0x14001f8f8]
mov ecx, 0x12
call fcn.1400026c0
test rdi, rdi
je 0x1400025e0
mov r9, qword [0x14001f7e0]
mov r8, rdi
mov rcx, qword [0x14001f5b8]
mov edx, 1
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
cmp rdi, rax
je 0x1400025dc
lea rdx, [0x14001f7e8]
mov ecx, 0x13
call fcn.1400026c0
sub esi, edi
jne 0x140002560
mov rcx, qword [0x14001f7e0]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
mov rcx, qword [0x14001f8f0]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
xor ecx, ecx
call sub.api_ms_win_crt_time_l1_1_0.dll__time64
mov qword [rsp + 0x80], rax
lea rdx, [rsp + 0x80]
mov rax, qword [rsp + 0x48]
lea rcx, [0x14001f7e8]
mov qword [rsp + 0x88], rax
call sub.api_ms_win_crt_time_l1_1_0.dll__utime64
mov edx, dword [rsp + 0x30]
lea rcx, [0x14001f7e8]
call sub.api_ms_win_crt_filesystem_l1_1_0.dll__chmod
call fcn.1400028d0
mov rdi, qword [rsp + 0xb8]
xor eax, eax
mov rcx, qword [rsp + 0x90]
xor rcx, rsp
call fcn.1400078a0
add rsp, 0xc8
pop r13
pop rsi
ret