Function at 0x4a0422
Capabilities:
Check if file exists
Create restart manager session
Enumerate processes that use resource

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp 0x4a24cf
nop
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x62530d
mov eax, dword fs:[0]
push eax
mov eax, 0x1cd4
call fcn.005065d0
mov eax, dword [0x6ce008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
push str.Enter_GetProcessesUsingFile__
push 0x661b70
push 1
mov dword [ebp - 0x1c88], eax
call fcn.0044f68f
add esp, 0xc
xor ebx, ebx
mov esi, ebx
push dword [ebp - 0x1c88]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4a2552
push str.GetProcessesUsingFile____file_doesnt_exist
push 0x661b70
push 1
call fcn.0044f68f
mov eax, 0x80070002
jmp 0x4a28bd
push 0x68de10
mov ecx, edi
call fcn.00411a05
push 0x42
lea eax, [ebp - 0x54]
push ebx
push eax
call fcn.0042af50
add esp, 0xc
lea eax, [ebp - 0x54]
push eax
push ebx
lea eax, [ebp - 0x1c7c]
push eax
call sub.RstrtMgr.DLL_RmStartSession
test eax, eax
jne 0x4a27f5
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x1c88]
push eax
push 1
push dword [ebp - 0x1c7c]
call sub.RstrtMgr.DLL_RmRegisterResources
test eax, eax
jne 0x4a27c6
lea eax, [ebp - 0x1c84]
mov dword [ebp - 0x1c80], ebx
push eax
lea eax, [ebp - 0x1c74]
mov dword [ebp - 0x1c78], 0xa
push eax
lea eax, [ebp - 0x1c78]
push eax
lea eax, [ebp - 0x1c80]
push eax
push dword [ebp - 0x1c7c]
call sub.RstrtMgr.DLL_RmGetList
test eax, eax
jne 0x4a27b0
cmp dword [ebp - 0x1c78], 0xa
ja 0x4a27b0
mov dword [ebp - 0x1c94], ebx
cmp dword [ebp - 0x1c78], ebx
jbe 0x4a27e8
lea ebx, [ebp - 0x1c74]
push dword [ebx]
push 0
push 0x1000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x1c90], eax
test eax, eax
je 0x4a2765
push 0x208
lea eax, [ebp - 0x25c]
push 0
push eax
call fcn.0042af50
add esp, 0xc
lea eax, [ebp - 0x25c]
push 0x104
push eax
push 0
push dword [ebp - 0x1c90]
call sub.KERNEL32.dll_K32GetModuleFileNameExW
test eax, eax
je 0x4a272f
push 0
lea eax, [ebp - 0x25c]
push eax
lea eax, [ebp - 0x1cb0]
push eax
call fcn.004c6453
and dword [ebp - 4], 0
mov ecx, edi
push eax
call fcn.00416812
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1cb0]
call fcn.0041395f
push 0x68de10
mov ecx, edi
call fcn.00411a7f
mov eax, dword [ebx]
mov dword [ebp - 0x1c98], eax
lea eax, [ebp - 0x25c]
push 0
push eax
lea eax, [ebp - 0x1cc8]
push eax
call fcn.004c6453
mov dword [ebp - 0x1c8c], eax
cmp dword [eax + 0x14], 8
mov dword [ebp - 4], 1
jb 0x4a26d2
mov eax, dword [eax]
mov dword [ebp - 0x1c8c], eax
push 0
push dword [ebp - 0x1c88]
lea eax, [ebp - 0x1cb0]
push eax
call fcn.004c6453
cmp dword [eax + 0x14], 8
mov byte [ebp - 4], 2
jb 0x4a26f2
mov eax, dword [eax]
push dword [ebp - 0x1c98]
push dword [ebp - 0x1c8c]
push eax
push str.File__ls_is_in_use_by__ls_pid:_ld_
push 0x661b70
push 1
call fcn.0044f68f
add esp, 0x18
lea ecx, [ebp - 0x1cb0]
call fcn.0041395f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1cc8]
call fcn.0041395f
jmp 0x4a2757
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
push esi
push str.GetModuleFileNameEx___failed_with_result:_0x_X
push 0x661b70
push esi
call fcn.0044e676
add esp, 0x10
push dword [ebp - 0x1c90]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4a278d
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
push esi
push str.OpenProcess___failed_with_result:_0x_X
push 0x661b70
push esi
call fcn.0044e676
add esp, 0x10
mov eax, dword [ebp - 0x1c94]
add ebx, 0x29c
inc eax
mov dword [ebp - 0x1c94], eax
cmp eax, dword [ebp - 0x1c78]
jb 0x4a260a
xor ebx, ebx
jmp 0x4a27e8
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
push esi
push str.RmGetList___failed_with_result:_0x_X
jmp 0x4a27da
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
push esi
push str.RmRegisterResources___failed_with_result:_0x_X
push 0x661b70
push esi
call fcn.0044e676
add esp, 0x10
push dword [ebp - 0x1c7c]
call sub.RstrtMgr.DLL_RmEndSession
jmp 0x4a2817
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
push esi
push str.RmStartSession___failed_with_result:_0x_X
push 0x661b70
push esi
call fcn.0044e676
add esp, 0x10
cmp dword [edi + 0x10], 1
jbe 0x4a2865
cmp dword [edi + 0x14], 8
jb 0x4a2825
mov edi, dword [edi]
push ebx
push dword [ebp - 0x1c88]
lea eax, [ebp - 0x1cc8]
push eax
call fcn.004c6453
cmp dword [eax + 0x14], 8
mov dword [ebp - 4], 3
jb 0x4a2847
mov eax, dword [eax]
push edi
push eax
push str.File__ls_is_in_use_by_processes___ls_
push 0x661b70
push 1
call fcn.0044f68f
add esp, 0x14
lea ecx, [ebp - 0x1cc8]
jmp 0x4a28a2
push ebx
push dword [ebp - 0x1c88]
lea eax, [ebp - 0x1ce0]
push eax
call fcn.004c6453
cmp dword [eax + 0x14], 8
mov dword [ebp - 4], 4
jb 0x4a2887
mov eax, dword [eax]
push eax
push str.File__ls_is_not_being_used_by_any_process
push 0x661b70
push 1
call fcn.0044f68f
add esp, 0x10
lea ecx, [ebp - 0x1ce0]
or dword [ebp - 4], 0xffffffff
call fcn.0041395f
push str.GetProcessesUsingFile_failed_
push 0x661b70
push esi
call fcn.0044e676
mov eax, esi
add esp, 0xc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00429dd5
leave
ret 8