Function at 0x140012dc0
Capabilities:
Delete file

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x100
mov rsi, rcx
xor r15d, r15d
mov dword [rbp + 0x67], r15d
cmp qword [rcx], 0xffffffffffffffff
je 0x14001355f
mov edx, dword [0x140132b68]
mov eax, dword [0x140132b64]
lea r12, str.SingleInstanceSessionFile::Close
add edx, eax
je 0x140012e68
mov dword [rsp + 0x48], r15d
call fcn.14000c6e0
mov qword [rsp + 0x40], rax
lock inc dword [rsp + 0x48]
mov dword [rbp + 0x67], 1
mov rax, qword [rsp + 0x40]
test rax, rax
jne 0x140012e36
call fcn.14000c6e0
mov qword [rsp + 0x40], rax
lock inc dword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
mov dword [rbp + 0x6f], 0x20
lea rax, str.closing_instance_file
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r12
lea r9, [0x140000000]
lea r8, [rbp + 0x6f]
movsx edx, r15w
call fcn.14000ef60
nop
mov eax, dword [rbp + 0x67]
test al, 1
je 0x140012eaa
and eax, 0xfffffffe
mov dword [rbp + 0x67], eax
mov qword [rsp + 0x40], r15
mov eax, 0xffffffff
lock xadd dword [rsp + 0x48], eax
cmp eax, 1
js 0x140012ea5
nop word [rax + rax]
call fcn.14000efb0
mov eax, 0xffffffff
lock xadd dword [rsp + 0x48], eax
cmp eax, 1
jns 0x140012e90
lock inc dword [rsp + 0x48]
cmp byte [rsi + 0x28], 0
mov ecx, dword [0x140132b68]
mov eax, dword [0x140132b64]
je 0x1400130d1
add ecx, eax
je 0x140012f18
mov dword [rbp - 0x71], r15d
call fcn.14000c6e0
mov qword [rbp - 0x79], rax
lock inc dword [rbp - 0x71]
mov ebx, dword [rbp + 0x67]
or ebx, 2
mov dword [rbp + 0x67], ebx
lea rcx, [rbp - 0x79]
call fcn.14000c110
mov dword [rbp + 0x77], 0x20
lea rcx, str.instance_file_locked__unlock
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], r12
lea r9, [0x140000000]
lea r8, [rbp + 0x77]
movsx edx, r15w
mov rcx, rax
call fcn.14000ef60
jmp 0x140012f1b
mov ebx, dword [rbp + 0x67]
test bl, 2
je 0x140012f58
and ebx, 0xfffffffd
mov dword [rbp + 0x67], ebx
mov qword [rbp - 0x79], r15
mov eax, 0xffffffff
lock xadd dword [rbp - 0x71], eax
cmp eax, 1
js 0x140012f54
nop dword [rax]
call fcn.14000efb0
mov eax, 0xffffffff
lock xadd dword [rbp - 0x71], eax
cmp eax, 1
jns 0x140012f40
lock inc dword [rbp - 0x71]
mov dword [rsp + 0x20], r15d
mov r9d, dword [0x14012d0c0]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_UnlockFile]
mov ecx, dword [0x140132b68]
test eax, eax
mov eax, dword [0x140132b64]
je 0x140013024
add ecx, eax
je 0x140012fde
mov dword [rbp - 0x61], r15d
call fcn.14000c6e0
mov qword [rbp - 0x69], rax
lock inc dword [rbp - 0x61]
mov ebx, dword [rbp + 0x67]
or ebx, 4
mov dword [rbp + 0x67], ebx
lea rcx, [rbp - 0x69]
call fcn.14000c110
mov dword [rbp + 0x7f], 0x20
lea rcx, str.instance_file_unlocked
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], r12
lea r9, [0x140000000]
lea r8, [rbp + 0x7f]
movsx edx, r15w
mov rcx, rax
call fcn.14000ef60
jmp 0x140012fe1
mov ebx, dword [rbp + 0x67]
test bl, 4
je 0x1400130c8
and ebx, 0xfffffffb
mov dword [rbp + 0x67], ebx
mov qword [rbp - 0x69], r15
mov eax, 0xffffffff
lock xadd dword [rbp - 0x61], eax
cmp eax, 1
js 0x140013017
call fcn.14000efb0
mov eax, 0xffffffff
lock xadd dword [rbp - 0x61], eax
cmp eax, 1
jns 0x140013003
lock inc dword [rbp - 0x61]
mov byte [rsi + 0x28], 0
jmp 0x140013168
add ecx, eax
je 0x140013089
mov dword [rbp - 0x51], r15d
call fcn.14000c6e0
mov qword [rbp - 0x59], rax
lock inc dword [rbp - 0x51]
mov edi, dword [rbp + 0x67]
or edi, 8
mov dword [rbp + 0x67], edi
lea rcx, [rbp - 0x59]
call fcn.14000c110
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbp + 7], 0x20
mov dword [rsp + 0x30], eax
lea rax, str.instance_file_unlock_failed_with_error__lu
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r12
lea r9, [0x140000000]
lea r8, [rbp + 7]
movsx edx, r15w
mov rcx, rbx
call fcn.14000ef60
jmp 0x14001308c
mov edi, dword [rbp + 0x67]
test dil, 8
je 0x1400130c8
and edi, 0xfffffff7
mov dword [rbp + 0x67], edi
mov qword [rbp - 0x59], r15
mov eax, 0xffffffff
lock xadd dword [rbp - 0x51], eax
cmp eax, 1
js 0x1400130c4
nop dword [rax + rax]
call fcn.14000efb0
mov eax, 0xffffffff
lock xadd dword [rbp - 0x51], eax
cmp eax, 1
jns 0x1400130b0
lock inc dword [rbp - 0x51]
mov byte [rsi + 0x28], 0
jmp 0x140013168
add ecx, eax
je 0x140013129
mov dword [rbp - 0x41], r15d
call fcn.14000c6e0
mov qword [rbp - 0x49], rax
lock inc dword [rbp - 0x41]
mov ebx, dword [rbp + 0x67]
or ebx, 0x10
mov dword [rbp + 0x67], ebx
lea rcx, [rbp - 0x49]
call fcn.14000c110
mov dword [rbp + 0xb], 0x20
lea rcx, str.instance_file_not_locked
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], r12
lea r9, [0x140000000]
lea r8, [rbp + 0xb]
movsx edx, r15w
mov rcx, rax
call fcn.14000ef60
jmp 0x14001312c
mov ebx, dword [rbp + 0x67]
test bl, 0x10
je 0x140013168
and ebx, 0xffffffef
mov dword [rbp + 0x67], ebx
mov qword [rbp - 0x49], r15
mov eax, 0xffffffff
lock xadd dword [rbp - 0x41], eax
cmp eax, 1
js 0x140013164
nop word [rax + rax]
call fcn.14000efb0
mov eax, 0xffffffff
lock xadd dword [rbp - 0x41], eax
cmp eax, 1
jns 0x140013150
lock inc dword [rbp - 0x41]
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi], 0xffffffffffffffff
mov ecx, dword [0x140132b68]
mov eax, dword [0x140132b64]
add ecx, eax
je 0x1400131fe
mov dword [rsp + 0x58], r15d
call fcn.14000c6e0
mov qword [rsp + 0x50], rax
lock inc dword [rsp + 0x58]
or dword [rbp + 0x67], 0x20
mov rax, qword [rsp + 0x50]
test rax, rax
jne 0x1400131b9
call fcn.14000c6e0
mov qword [rsp + 0x50], rax
lock inc dword [rsp + 0x58]
mov rcx, qword [rsp + 0x50]
lea rax, [rsi + 8]
cmp qword [rax + 0x18], 8
jb 0x1400131cc
mov rax, qword [rax]
mov dword [rbp + 0xf], 0x20
mov qword [rsp + 0x30], rax
lea rax, str.deleting_file__s
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r12
lea r9, [0x140000000]
lea r8, [rbp + 0xf]
movsx edx, r15w
call fcn.14000ef60
nop
mov eax, dword [rbp + 0x67]
test al, 0x20
je 0x14001323a
and eax, 0xffffffdf
mov dword [rbp + 0x67], eax
mov qword [rsp + 0x50], r15
mov eax, 0xffffffff
lock xadd dword [rsp + 0x58], eax
cmp eax, 1
js 0x140013235
call fcn.14000efb0
mov eax, 0xffffffff
lock xadd dword [rsp + 0x58], eax
cmp eax, 1
jns 0x140013220
lock inc dword [rsp + 0x58]
lea rcx, [rsi + 8]
cmp qword [rsi + 0x20], 8
jb 0x140013249
mov rcx, qword [rsi + 8]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140013494
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
mov ecx, dword [0x140132b68]
cmp eax, 0x20
mov eax, dword [0x140132b64]
jne 0x1400133de
cmp byte [rsi + 0x28], 0
je 0x14001332e
add ecx, eax
je 0x1400132eb
mov dword [rbp - 0x31], r15d
call fcn.14000c6e0
mov qword [rbp - 0x39], rax
lock inc dword [rbp - 0x31]
mov edi, dword [rbp + 0x67]
or edi, 0x40
mov dword [rbp + 0x67], edi
lea rcx, [rbp - 0x39]
call fcn.14000c110
lea rcx, [rsi + 8]
cmp qword [rsi + 0x20], 8
jb 0x1400132b5
mov rcx, qword [rsi + 8]
mov dword [rbp + 0x13], 0x20
mov qword [rsp + 0x30], rcx
lea rcx, str.file__s_delete_failed_ERROR_SHARING_VIOLATION_although_is_locked.
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], r12
lea r9, [0x140000000]
lea r8, [rbp + 0x13]
movsx edx, r15w
mov rcx, rax
call fcn.14000ef60
jmp 0x1400132ee
mov edi, dword [rbp + 0x67]
test dil, 0x40
je 0x140013548
and edi, 0xffffffbf
mov dword [rbp + 0x67], edi
mov qword [rbp - 0x39], r15
mov eax, 0xffffffff
lock xadd dword [rbp - 0x31], eax
cmp eax, 1
js 0x140013325
call fcn.14000efb0
mov eax, 0xffffffff
lock xadd dword [rbp - 0x31], eax
cmp eax, 1
jns 0x140013311
lock inc dword [rbp - 0x31]
jmp 0x140013548
add ecx, eax
je 0x14001339b
mov dword [rbp - 0x21], r15d
call fcn.14000c6e0
mov qword [rbp - 0x29], rax
lock inc dword [rbp - 0x21]
mov edi, dword [rbp + 0x67]
bts edi, 7
mov dword [rbp + 0x67], edi
lea rcx, [rbp - 0x29]
call fcn.14000c110
lea rcx, [rsi + 8]
cmp qword [rsi + 0x20], 8
jb 0x140013365
mov rcx, qword [rsi + 8]
mov dword [rbp + 0x17], 0x20
mov qword [rsp + 0x30], rcx
lea rcx, str.file__s_delete_failed_ERROR_SHARING_VIOLATION_because_is_not_locked__most_likely_the_lock_was_placed_by_the_respawned_instance.
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], r12
lea r9, [0x140000000]
lea r8, [rbp + 0x17]
movsx edx, r15w
mov rcx, rax
call fcn.14000ef60
jmp 0x14001339e
mov edi, dword [rbp + 0x67]
test dil, dil
jns 0x140013548
btr edi, 7
mov dword [rbp + 0x67], edi
mov qword [rbp - 0x29], r15
mov eax, 0xffffffff
lock xadd dword [rbp - 0x21], eax
cmp eax, 1
js 0x1400133d5
call fcn.14000efb0
mov eax, 0xffffffff
lock xadd dword [rbp - 0x21], eax
cmp eax, 1
jns 0x1400133c1
lock inc dword [rbp - 0x21]
jmp 0x140013548
add ecx, eax
je 0x140013450
mov dword [rbp - 0x11], r15d
call fcn.14000c6e0
mov qword [rbp - 0x19], rax
lock inc dword [rbp - 0x11]
mov edi, dword [rbp + 0x67]
bts edi, 8
mov dword [rbp + 0x67], edi
lea rcx, [rbp - 0x19]
call fcn.14000c110
lea rcx, [rsi + 8]
cmp qword [rsi + 0x20], 8
jb 0x140013415
mov rcx, qword [rsi + 8]
mov dword [rbp + 0x1b], 0x20
mov dword [rsp + 0x38], r14d
mov qword [rsp + 0x30], rcx
lea rcx, str.file__s_delete_failed_with_error__lu
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], r12
lea r9, [0x140000000]
lea r8, [rbp + 0x1b]
movsx edx, r15w
mov rcx, rax
call fcn.14000ef60
jmp 0x140013453
mov edi, dword [rbp + 0x67]
bt edi, 8
jae 0x140013548
btr edi, 8
mov dword [rbp + 0x67], edi
mov qword [rbp - 0x19], r15
mov eax, 0xffffffff
lock xadd dword [rbp - 0x11], eax
cmp eax, 1
js 0x14001348b
call fcn.14000efb0
mov eax, 0xffffffff
lock xadd dword [rbp - 0x11], eax
cmp eax, 1
jns 0x140013477
lock inc dword [rbp - 0x11]
jmp 0x140013548
mov ecx, dword [0x140132b68]
mov eax, dword [0x140132b64]
add ecx, eax
je 0x14001350d
mov dword [rbp - 1], r15d
call fcn.14000c6e0
mov qword [rbp - 9], rax
lock inc dword [rbp - 1]
mov edi, dword [rbp + 0x67]
bts edi, 9
mov dword [rbp + 0x67], edi
lea rcx, [rbp - 9]
call fcn.14000c110
lea rcx, [rsi + 8]
cmp qword [rsi + 0x20], 8
jb 0x1400134d7
mov rcx, qword [rsi + 8]
mov dword [rbp + 0x1f], 0x20
mov qword [rsp + 0x30], rcx
lea rcx, str.file__s_deleted
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], r12
lea r9, [0x140000000]
lea r8, [rbp + 0x1f]
movsx edx, r15w
mov rcx, rax
call fcn.14000ef60
jmp 0x140013510
mov edi, dword [rbp + 0x67]
bt edi, 9
jae 0x140013548
btr edi, 9
mov dword [rbp + 0x67], edi
mov qword [rbp - 9], r15
mov eax, 0xffffffff
lock xadd dword [rbp - 1], eax
cmp eax, 1
js 0x140013544
call fcn.14000efb0
mov eax, 0xffffffff
lock xadd dword [rbp - 1], eax
cmp eax, 1
jns 0x140013530
lock inc dword [rbp - 1]
lea rax, [rsi + 8]
cmp qword [rsi + 0x20], 8
jb 0x140013557
mov rax, qword [rsi + 8]
mov qword [rsi + 0x18], r15
mov word [rax], r15w
add rsp, 0x100
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret