Function at 0x45f023
Capabilities:
Check if file exists
Get common file path
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5defaa
mov eax, dword fs:[0]
push eax
mov eax, 0x126c
call fcn.00451480
mov eax, dword [0x66f33c]
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 edi, ecx
mov ebx, 0x208
lea eax, [ebp - 0x830]
push ebx
xor esi, esi
push esi
push eax
call fcn.0047be90
push ebx
lea eax, [ebp - 0xc40]
push esi
push eax
call fcn.0047be90
push ebx
lea eax, [ebp - 0x628]
push esi
push eax
call fcn.0047be90
push ebx
lea eax, [ebp - 0x218]
push esi
push eax
call fcn.0047be90
push ebx
lea eax, [ebp - 0x420]
push esi
push eax
call fcn.0047be90
push ebx
lea eax, [ebp - 0x1258]
push esi
push eax
call fcn.0047be90
add esp, 0x48
lea eax, [ebp - 0xe48]
push ebx
push esi
push eax
call fcn.0047be90
lea eax, [ebp - 0xe48]
push 0x5e92f8
push eax
call fcn.0048d128
lea eax, [ebp - 0xe48]
push 0x5e28c4
push eax
call fcn.0048d7df
add esp, 0x1c
lea eax, [ebp - 0x1274]
push eax
push 0x20019
push esi
lea eax, [ebp - 0xe48]
push eax
push reloc.WS2_32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x45f22b
lea eax, [ebp - 0x1278]
mov dword [ebp - 0x1278], 0x208
push eax
lea eax, [ebp - 0x1258]
push eax
push esi
push esi
push str.InstallPath
push dword [ebp - 0x1274]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x45f22b
lea eax, [ebp - 0x1258]
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.0048d128
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push eax
call fcn.0048d128
add esp, 0x10
lea eax, [ebp - 0x420]
push eax
call ebx
test eax, eax
je 0x45f22b
push 0x208
lea eax, [ebp - 0xa38]
push esi
push eax
call fcn.0047be90
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0xa38]
push eax
call fcn.0048d128
lea eax, [ebp - 0xa38]
push str.WindowsRestMater.exe
push eax
call fcn.0048d7df
add esp, 0x1c
lea eax, [ebp - 0xa38]
push eax
call ebx
test eax, eax
je 0x45f22b
push dword [ebp - 0x1274]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp word [ebp - 0x218], si
jne 0x45f1e1
mov eax, esi
jmp 0x45f1ee
lea eax, [ebp - 0x218]
push eax
call fcn.0048cd3b
pop ecx
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [edi + 0x44]
call fcn.00403000
cmp word [ebp - 0x420], si
je 0x45f216
lea eax, [ebp - 0x420]
push eax
call fcn.0048cd3b
pop ecx
mov esi, eax
push esi
lea eax, [ebp - 0x420]
push eax
lea ecx, [edi + 0x74]
call fcn.00403000
jmp 0x45f540
push dword [ebp - 0x1274]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
push 0x2b
lea eax, [ebp - 0x830]
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x830]
push 0x5e283c
push eax
call fcn.0048d7df
lea eax, [ebp - 0x830]
push 0x5e28c4
push eax
call fcn.0048d7df
lea eax, [ebp - 0x830]
push 0x5e283c
push eax
call fcn.0048d7df
lea eax, [ebp - 0x830]
push 0x5e28c4
push eax
call fcn.0048d7df
lea eax, [ebp - 0x830]
push 0x5e6b6c
push eax
call fcn.0048d7df
add esp, 0x28
lea eax, [ebp - 0x830]
push eax
push 0x104
lea eax, [ebp - 0xc40]
push eax
push 0x5e266c
push str.InstallPath
push str.Globals
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0xc40]
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.0048d128
lea eax, [ebp - 0x218]
push eax
call fcn.0048cd3b
add esp, 0xc
test eax, eax
jle 0x45f35a
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push eax
call fcn.0048d128
pop ecx
pop ecx
lea eax, [ebp - 0x420]
push eax
call ebx
test eax, eax
je 0x45f35a
push 0x208
lea eax, [ebp - 0xa38]
push esi
push eax
call fcn.0047be90
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0xa38]
push eax
call fcn.0048d128
lea eax, [ebp - 0xa38]
push str.WindowsRestMater.exe
push eax
call fcn.0048d7df
add esp, 0x1c
lea eax, [ebp - 0xa38]
push eax
call ebx
test eax, eax
jne 0x45f1d4
lea eax, [ebp - 0x1270]
push eax
call fcn.00460371
pop ecx
cmp dword [ebp - 0x125c], 8
lea eax, [ebp - 0x1270]
mov dword [ebp - 4], esi
cmovae eax, dword [ebp - 0x1270]
push eax
call ebx
test eax, eax
je 0x45f3cd
cmp dword [ebp - 0x125c], 8
lea eax, [ebp - 0x1270]
cmovae eax, dword [ebp - 0x1270]
push eax
lea eax, [ebp - 0x628]
push eax
call fcn.0048d128
lea eax, [ebp - 0x628]
push 0x5e28c4
push eax
call fcn.0048d7df
lea eax, [ebp - 0x628]
push 0x5e283c
push eax
call fcn.0048d7df
add esp, 0x18
jmp 0x45f413
push esi
push 0x26
lea eax, [ebp - 0x628]
push eax
push esi
call fcn.004611e7
lea eax, [ebp - 0x628]
push 0x5e283c
push eax
call fcn.0048d7df
lea eax, [ebp - 0x628]
push 0x5e28c4
push eax
call fcn.0048d7df
lea eax, [ebp - 0x628]
push 0x5e283c
push eax
call fcn.0048d7df
add esp, 0x28
lea eax, [ebp - 0x628]
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.0048d128
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push eax
call fcn.0048d128
add esp, 0x10
lea eax, [ebp - 0x420]
push eax
call ebx
test eax, eax
je 0x45f48f
push 0x208
lea eax, [ebp - 0x1050]
push esi
push eax
call fcn.0047be90
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x1050]
push eax
call fcn.0048d128
lea eax, [ebp - 0x1050]
push str.WindowsRestMater.exe
push eax
call fcn.0048d7df
add esp, 0x1c
lea eax, [ebp - 0x1050]
push eax
call ebx
test eax, eax
jne 0x45f4dc
lea eax, [ebp - 0xc40]
push eax
call fcn.0048cd3b
pop ecx
test eax, eax
jle 0x45f4b3
lea eax, [ebp - 0xc40]
push eax
call ebx
test eax, eax
lea eax, [ebp - 0xc40]
jne 0x45f4b9
lea eax, [ebp - 0x628]
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.0048d128
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push eax
call fcn.0048d128
add esp, 0x10
cmp word [ebp - 0x218], 0
jne 0x45f4ea
mov eax, esi
jmp 0x45f4f7
lea eax, [ebp - 0x218]
push eax
call fcn.0048cd3b
pop ecx
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [edi + 0x44]
call fcn.00403000
cmp word [ebp - 0x420], 0
jne 0x45f515
mov eax, esi
jmp 0x45f522
lea eax, [ebp - 0x420]
push eax
call fcn.0048cd3b
pop ecx
push eax
lea eax, [ebp - 0x420]
push eax
lea ecx, [edi + 0x74]
call fcn.00403000
push esi
push 1
lea ecx, [ebp - 0x1270]
call fcn.0041e4c0
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.0045132d
mov esp, ebp
pop ebp
ret