Function at 0x4115e0
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bb69e
mov eax, dword fs:[0]
push eax
sub esp, 0x64
push ebx
push esi
push edi
mov eax, dword [0x4f4164]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x10], 0
cmp dword [edi], 0xffffffff
je 0x411be9
mov eax, dword [0x4f8ee0]
add eax, dword [0x4f8edc]
je 0x411682
mov dword [ebp - 0x34], 0
call fcn.0040ba10
mov dword [ebp - 0x38], eax
lock inc dword [ebp - 0x34]
cmp dword [ebp - 0x38], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x10], 1
jne 0x41165a
call fcn.0040ba10
mov dword [ebp - 0x38], eax
lock inc dword [ebp - 0x34]
mov eax, dword [ebp - 0x38]
lea ecx, [ebp - 0x14]
push str.closing_instance_file
push str.SingleInstanceSessionFile::Close
push 0x400000
push ecx
push 0
push eax
mov dword [ebp - 0x14], 0x20
call fcn.0040df80
add esp, 0x18
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
test al, 1
je 0x4116ba
and eax, 0xfffffffe
mov dword [ebp - 0x10], eax
or eax, 0xffffffff
mov dword [ebp - 0x38], 0
lock xadd dword [ebp - 0x34], eax
js 0x4116b6
call fcn.0040dfb0
or eax, 0xffffffff
lock xadd dword [ebp - 0x34], eax
jns 0x4116a7
lock inc dword [ebp - 0x34]
cmp byte [edi + 0x1c], 0
mov eax, dword [0x4f8ee0]
je 0x411870
add eax, dword [0x4f8edc]
je 0x411729
mov dword [ebp - 0x44], 0
call fcn.0040ba10
mov dword [ebp - 0x48], eax
lock inc dword [ebp - 0x44]
or dword [ebp - 0x10], 2
cmp dword [ebp - 0x48], 0
mov dword [ebp - 4], 1
jne 0x411701
call fcn.0040ba10
mov dword [ebp - 0x48], eax
lock inc dword [ebp - 0x44]
mov eax, dword [ebp - 0x48]
lea ecx, [ebp - 0x18]
push str.instance_file_locked__unlock
push str.SingleInstanceSessionFile::Close
push 0x400000
push ecx
push 0
push eax
mov dword [ebp - 0x18], 0x20
call fcn.0040df80
add esp, 0x18
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
test al, 2
je 0x411745
and eax, 0xfffffffd
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x10], eax
call fcn.0040b3c0
push 0
push dword [0x4f4090]
push 0
push 0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_UnlockFile]
test eax, eax
mov eax, dword [0x4f8ee0]
je 0x4117ea
add eax, dword [0x4f8edc]
je 0x4117c0
mov dword [ebp - 0x5c], 0
call fcn.0040ba10
mov dword [ebp - 0x60], eax
lock inc dword [ebp - 0x5c]
mov ebx, dword [ebp - 0x10]
lea ecx, [ebp - 0x60]
or ebx, 4
mov dword [ebp - 4], 2
mov dword [ebp - 0x10], ebx
call fcn.00410f80
push str.instance_file_unlocked
push str.SingleInstanceSessionFile::Close
push 0x400000
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0x20
push ecx
push 0
push eax
call fcn.0040df80
add esp, 0x18
jmp 0x4117c3
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
test bl, 4
je 0x41186a
and ebx, 0xfffffffb
lea ecx, [ebp - 0x60]
mov dword [ebp - 0x10], ebx
call fcn.0040b3c0
mov byte [edi + 0x1c], 0
jmp 0x4118ec
add eax, dword [0x4f8edc]
je 0x41184d
mov dword [ebp - 0x64], 0
call fcn.0040ba10
mov dword [ebp - 0x68], eax
lock inc dword [ebp - 0x64]
mov ebx, dword [ebp - 0x10]
lea ecx, [ebp - 0x68]
or ebx, 8
mov dword [ebp - 4], 3
mov dword [ebp - 0x10], ebx
call fcn.00410f80
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.instance_file_unlock_failed_with_error__lu
push str.SingleInstanceSessionFile::Close
push 0x400000
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x20
push eax
push 0
push esi
call fcn.0040df80
add esp, 0x1c
jmp 0x411850
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
test bl, 8
je 0x41186a
and ebx, 0xfffffff7
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x10], ebx
call fcn.0040b3c0
mov byte [edi + 0x1c], 0
jmp 0x4118ec
add eax, dword [0x4f8edc]
je 0x4118d0
mov dword [ebp - 0x4c], 0
call fcn.0040ba10
mov dword [ebp - 0x50], eax
lock inc dword [ebp - 0x4c]
or dword [ebp - 0x10], 0x10
cmp dword [ebp - 0x50], 0
mov dword [ebp - 4], 4
jne 0x4118a8
call fcn.0040ba10
mov dword [ebp - 0x50], eax
lock inc dword [ebp - 0x4c]
mov eax, dword [ebp - 0x50]
lea ecx, [ebp - 0x24]
push str.instance_file_not_locked
push str.SingleInstanceSessionFile::Close
push 0x400000
push ecx
push 0
push eax
mov dword [ebp - 0x24], 0x20
call fcn.0040df80
add esp, 0x18
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
test al, 0x10
je 0x4118ec
and eax, 0xffffffef
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x10], eax
call fcn.0040b3c0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi], 0xffffffff
mov eax, dword [0x4f8ee0]
add eax, dword [0x4f8edc]
je 0x41196b
mov dword [ebp - 0x3c], 0
call fcn.0040ba10
mov dword [ebp - 0x40], eax
lock inc dword [ebp - 0x3c]
or dword [ebp - 0x10], 0x20
cmp dword [ebp - 0x40], 0
mov dword [ebp - 4], 5
jne 0x411937
call fcn.0040ba10
mov dword [ebp - 0x40], eax
lock inc dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x40]
lea eax, [edi + 4]
cmp dword [eax + 0x14], 8
jb 0x411945
mov eax, dword [eax]
push eax
push str.deleting_file__s
push str.SingleInstanceSessionFile::Close
push 0x400000
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 0x20
push eax
push 0
push ecx
call fcn.0040df80
add esp, 0x1c
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
test al, 0x20
je 0x4119a3
and eax, 0xffffffdf
mov dword [ebp - 0x10], eax
or eax, 0xffffffff
mov dword [ebp - 0x40], 0
lock xadd dword [ebp - 0x3c], eax
js 0x41199f
call fcn.0040dfb0
or eax, 0xffffffff
lock xadd dword [ebp - 0x3c], eax
jns 0x411990
lock inc dword [ebp - 0x3c]
cmp dword [edi + 0x18], 8
lea esi, [edi + 4]
mov eax, esi
jb 0x4119b0
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x411b4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, dword [0x4f8ee0]
cmp ebx, 0x20
jne 0x411acf
cmp byte [edi + 0x1c], 0
je 0x411a54
add eax, dword [0x4f8edc]
je 0x411a40
mov dword [ebp - 0x6c], 0
call fcn.0040ba10
mov dword [ebp - 0x70], eax
lock inc dword [ebp - 0x6c]
mov ebx, dword [ebp - 0x10]
lea ecx, [ebp - 0x70]
or ebx, 0x40
mov dword [ebp - 4], 6
mov dword [ebp - 0x10], ebx
call fcn.00410f80
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x411a18
mov ecx, dword [esi]
push ecx
push str.file__s_delete_failed_ERROR_SHARING_VIOLATION_although_is_locked.
push str.SingleInstanceSessionFile::Close
push 0x400000
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0x20
push ecx
push 0
push eax
call fcn.0040df80
add esp, 0x1c
jmp 0x411a43
mov ebx, dword [ebp - 0x10]
test bl, 0x40
je 0x411bd3
lea ecx, [ebp - 0x70]
jmp 0x411bce
add eax, dword [0x4f8edc]
je 0x411abc
mov dword [ebp - 0x6c], 0
call fcn.0040ba10
mov dword [ebp - 0x70], eax
lock inc dword [ebp - 0x6c]
mov ebx, dword [ebp - 0x10]
lea ecx, [ebp - 0x70]
or ebx, 0x80
mov dword [ebp - 4], 7
mov dword [ebp - 0x10], ebx
call fcn.00410f80
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x411a94
mov ecx, dword [esi]
push ecx
push str.file__s_delete_failed_ERROR_SHARING_VIOLATION_because_is_not_locked__most_likely_the_lock_was_placed_by_the_respawned_instance.
push str.SingleInstanceSessionFile::Close
push 0x400000
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0x20
push ecx
push 0
push eax
call fcn.0040df80
add esp, 0x1c
jmp 0x411abf
mov ebx, dword [ebp - 0x10]
test bl, bl
jns 0x411bd3
lea ecx, [ebp - 0x70]
jmp 0x411bce
add eax, dword [0x4f8edc]
je 0x411b38
mov dword [ebp - 0x6c], 0
call fcn.0040ba10
mov dword [ebp - 0x70], eax
lock inc dword [ebp - 0x6c]
mov edi, dword [ebp - 0x10]
lea ecx, [ebp - 0x70]
or edi, 0x100
mov dword [ebp - 4], 8
mov dword [ebp - 0x10], edi
call fcn.00410f80
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x411b0f
mov ecx, dword [esi]
push ebx
push ecx
push str.file__s_delete_failed_with_error__lu
push str.SingleInstanceSessionFile::Close
push 0x400000
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0x20
push ecx
push 0
push eax
call fcn.0040df80
add esp, 0x20
jmp 0x411b3b
mov edi, dword [ebp - 0x10]
test edi, 0x100
je 0x411bd3
lea ecx, [ebp - 0x70]
jmp 0x411bce
mov eax, dword [0x4f8ee0]
add eax, dword [0x4f8edc]
je 0x411bc2
mov dword [ebp - 0x54], 0
call fcn.0040ba10
mov dword [ebp - 0x58], eax
lock inc dword [ebp - 0x54]
or dword [ebp - 0x10], 0x200
cmp dword [ebp - 0x58], 0
mov dword [ebp - 4], 9
jne 0x411b8f
call fcn.0040ba10
mov dword [ebp - 0x58], eax
lock inc dword [ebp - 0x54]
mov ecx, dword [ebp - 0x58]
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x411b9c
mov eax, dword [esi]
push eax
push str.file__s_deleted
push str.SingleInstanceSessionFile::Close
push 0x400000
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 0x20
push eax
push 0
push ecx
call fcn.0040df80
add esp, 0x1c
test dword [ebp - 0x10], 0x200
je 0x411bd3
lea ecx, [ebp - 0x58]
call fcn.0040b3c0
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x411bdd
mov eax, dword [esi]
xor ecx, ecx
mov dword [esi + 0x10], 0
mov word [eax], cx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret