Function at 0x140009f60
Capabilities:
Delete file

Disassembly:
push rbp
push rsi
sub rsp, 0x28
mov rbp, rdx
mov rsi, rcx
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], 0
jne 0x140009f74
cmp rax, 0xfa
jbe 0x140009fab
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, rsi
lea rdx, str.Cannot_open__.250s:_Name_too_long._n
mov rcx, rax
call fcn.140001740
xor eax, eax
add rsp, 0x28
pop rsi
pop rbp
ret
mov eax, dword [0x1400b39e0]
cmp eax, 5
jb 0x140009fdc
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, rsi
lea rdx, str.Cannot_open__.250s:_Too_many_locked_files._n
mov rcx, rax
call fcn.140001740
xor eax, eax
add rsp, 0x28
pop rsi
pop rbp
ret
mov qword [rsp + 0x40], rbx
lea rdx, str._.250s.lck
imul rcx, rax, 0x110
mov qword [rsp + 0x48], rdi
mov r8, rsi
mov qword [rsp + 0x50], r14
lea r14, [0x1400b34a0]
add rcx, r14
mov qword [rsp + 0x20], r15
call fcn.140001790
cmp qword [0x1400b3488], 0
jne 0x14000a039
xor edx, edx
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__getcwd]
mov qword [0x1400b3488], rax
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__getdrive]
mov dword [0x1400b337c], eax
jmp 0x14000a03f
mov eax, dword [0x1400b337c]
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__chdrive]
test eax, eax
jne 0x14000a05c
mov rcx, qword [0x1400b3488]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__chdir]
test eax, eax
je 0x14000a07d
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, qword [0x1400b3488]
lea rdx, str._nWarning:_Current_Directory___s__is_not_available._n
mov rcx, rax
call fcn.140001740
mov eax, dword [0x1400b39e0]
mov edx, 0x500
imul rcx, rax, 0x110
mov r8d, 0x180
xor edi, edi
add rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__open]
mov ebx, eax
test eax, eax
jns 0x14000a136
nop word [rax + rax]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [rax], 0x11
jne 0x14000a129
test edi, edi
jne 0x14000a0ea
mov eax, dword [0x1400b39e0]
lea ecx, [rdi + 2]
imul rbx, rax, 0x110
add rbx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, rbx
lea rdx, str._.250s_already_exists__waiting_..._n
mov rcx, rax
call fcn.140001740
lea eax, [rdi + 1]
cmp edi, 0x3e8
cmovae eax, edi
mov ecx, eax
mov edi, eax
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x1400b39e0]
mov edx, 0x500
imul rcx, rax, 0x110
mov r8d, 0x180
add rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__open]
mov ebx, eax
test eax, eax
js 0x14000a0b0
jmp 0x14000a136
lea rcx, str.Cannot_open_lockfile
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
mov eax, dword [0x1400b39e0]
lea r15, [0x1400b3490]
imul rcx, rax, 0x110
mov dword [rcx + r15], ebx
test ebx, ebx
jle 0x14000a165
test edi, edi
je 0x14000a165
mov rdx, rsi
lea rcx, str.Locked__.250s_n
call fcn.140001020
mov rdx, rbp
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rdi, qword [rsp + 0x48]
mov rbx, rax
test rax, rax
je 0x14000a19d
mov r8d, dword [0x1400b39e0]
imul rdx, r8, 0x110
inc r8d
mov dword [0x1400b39e0], r8d
mov qword [rdx + r15 + 8], rax
jmp 0x14000a1ec
mov eax, dword [0x1400b39e0]
imul rcx, rax, 0x110
mov ecx, dword [rcx + r15]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__close]
test eax, eax
je 0x14000a1c5
lea rcx, str.Failed_to_close_lockfile
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
mov eax, dword [0x1400b39e0]
imul rcx, rax, 0x110
add rcx, r14
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
test eax, eax
je 0x14000a1ec
lea rcx, str.Failed_to_delete_lockfile
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
mov r15, qword [rsp + 0x20]
mov rax, rbx
mov rbx, qword [rsp + 0x40]
mov r14, qword [rsp + 0x50]
add rsp, 0x28
pop rsi
pop rbp
ret