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

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp 0x49a04f
nop
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x61bfe9
mov eax, dword fs:[0]
push eax
mov eax, 0x1cd4
call fcn.004fe480
mov eax, dword [0x6c2008]
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 0x658258
push 1
mov dword [ebp - 0x1c88], eax
call fcn.0044ffa7
add esp, 0xc
xor ebx, ebx
mov esi, ebx
push dword [ebp - 0x1c88]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x49a0d2
push str.GetProcessesUsingFile____file_doesnt_exist
push 0x658258
push 1
call fcn.0044ffa7
mov eax, 0x80070002
jmp 0x49a43d
push 0x68305c
mov ecx, edi
call fcn.00411bb5
push 0x42
lea eax, [ebp - 0x54]
push ebx
push eax
call fcn.0042a970
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 0x49a375
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 0x49a346
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 0x49a330
cmp dword [ebp - 0x1c78], 0xa
ja 0x49a330
mov dword [ebp - 0x1c94], ebx
cmp dword [ebp - 0x1c78], ebx
jbe 0x49a368
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 0x49a2e5
push 0x208
lea eax, [ebp - 0x25c]
push 0
push eax
call fcn.0042a970
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 0x49a2af
push 0
lea eax, [ebp - 0x25c]
push eax
lea eax, [ebp - 0x1cb0]
push eax
call fcn.004beb53
and dword [ebp - 4], 0
mov ecx, edi
push eax
call fcn.00416b36
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1cb0]
call fcn.00413b5a
push 0x68305c
mov ecx, edi
call fcn.00411c2b
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.004beb53
mov dword [ebp - 0x1c8c], eax
cmp dword [eax + 0x14], 8
mov dword [ebp - 4], 1
jb 0x49a252
mov eax, dword [eax]
mov dword [ebp - 0x1c8c], eax
push 0
push dword [ebp - 0x1c88]
lea eax, [ebp - 0x1cb0]
push eax
call fcn.004beb53
cmp dword [eax + 0x14], 8
mov byte [ebp - 4], 2
jb 0x49a272
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 0x658258
push 1
call fcn.0044ffa7
add esp, 0x18
lea ecx, [ebp - 0x1cb0]
call fcn.00413b5a
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1cc8]
call fcn.00413b5a
jmp 0x49a2d7
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 0x658258
push esi
call fcn.0044df9a
add esp, 0x10
push dword [ebp - 0x1c90]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x49a30d
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 0x658258
push esi
call fcn.0044df9a
add esp, 0x10
mov eax, dword [ebp - 0x1c94]
add ebx, 0x29c
inc eax
mov dword [ebp - 0x1c94], eax
cmp eax, dword [ebp - 0x1c78]
jb 0x49a18a
xor ebx, ebx
jmp 0x49a368
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
push esi
push str.RmGetList___failed_with_result:_0x_X
jmp 0x49a35a
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
push esi
push str.RmRegisterResources___failed_with_result:_0x_X
push 0x658258
push esi
call fcn.0044df9a
add esp, 0x10
push dword [ebp - 0x1c7c]
call sub.RstrtMgr.DLL_RmEndSession
jmp 0x49a397
movzx esi, ax
or esi, 0x80070000
test eax, eax
cmovle esi, eax
push esi
push str.RmStartSession___failed_with_result:_0x_X
push 0x658258
push esi
call fcn.0044df9a
add esp, 0x10
cmp dword [edi + 0x10], 1
jbe 0x49a3e5
cmp dword [edi + 0x14], 8
jb 0x49a3a5
mov edi, dword [edi]
push ebx
push dword [ebp - 0x1c88]
lea eax, [ebp - 0x1cc8]
push eax
call fcn.004beb53
cmp dword [eax + 0x14], 8
mov dword [ebp - 4], 3
jb 0x49a3c7
mov eax, dword [eax]
push edi
push eax
push str.File__ls_is_in_use_by_processes___ls_
push 0x658258
push 1
call fcn.0044ffa7
add esp, 0x14
lea ecx, [ebp - 0x1cc8]
jmp 0x49a422
push ebx
push dword [ebp - 0x1c88]
lea eax, [ebp - 0x1ce0]
push eax
call fcn.004beb53
cmp dword [eax + 0x14], 8
mov dword [ebp - 4], 4
jb 0x49a407
mov eax, dword [eax]
push eax
push str.File__ls_is_not_being_used_by_any_process
push 0x658258
push 1
call fcn.0044ffa7
add esp, 0x10
lea ecx, [ebp - 0x1ce0]
or dword [ebp - 4], 0xffffffff
call fcn.00413b5a
push str.GetProcessesUsingFile_failed_
push 0x658258
push esi
call fcn.0044df9a
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.004297f5
leave
ret 8