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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc58
mov eax, dword [0x580280]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0xc58], ecx
xor eax, eax
mov word [ebp - 0x628], ax
push 0x206
push 0
lea ecx, [ebp - 0x626]
push ecx
call fcn.00486c20
add esp, 0xc
xor edx, edx
mov word [ebp - 0x418], dx
push 0x206
push 0
lea eax, [ebp - 0x416]
push eax
call fcn.00486c20
add esp, 0xc
xor ecx, ecx
mov word [ebp - 0xc50], cx
push 0x206
push 0
lea edx, [ebp - 0xc4e]
push edx
call fcn.00486c20
add esp, 0xc
xor eax, eax
mov word [ebp - 0x210], ax
push 0x206
push 0
lea ecx, [ebp - 0x20e]
push ecx
call fcn.00486c20
add esp, 0xc
xor edx, edx
mov word [ebp - 0xa48], dx
push 0x206
push 0
lea eax, [ebp - 0xa46]
push eax
call fcn.00486c20
add esp, 0xc
mov dword [ebp - 0x83c], 0
push 0
push 0x2b
lea ecx, [ebp - 0x628]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0x54fb04
lea edx, [ebp - 0x628]
push edx
call fcn.00486ab7
add esp, 8
push 0x54fb08
lea eax, [ebp - 0x628]
push eax
call fcn.00486ab7
add esp, 8
push 0x54fb28
lea ecx, [ebp - 0x628]
push ecx
call fcn.00486ab7
add esp, 8
push 0x54fb2c
lea edx, [ebp - 0x628]
push edx
call fcn.00486ab7
add esp, 8
push 0x54fb4c
lea eax, [ebp - 0x628]
push eax
call fcn.00486ab7
add esp, 8
lea ecx, [ebp - 0x628]
push ecx
push 0x104
lea edx, [ebp - 0xc50]
push edx
push 0x54fb58
push 0x54fb5c
push 0x54fb7c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x628]
push eax
push 0
push 0x54fb8c
push 0x54fba4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x83c], eax
lea ecx, [ebp - 0xc50]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x43747b
lea edx, [ebp - 0xc50]
push edx
mov eax, dword [ebp - 0xc58]
add eax, 8
push eax
call fcn.00486ae5
add esp, 8
cmp dword [ebp - 0x83c], 1
jne 0x43747b
mov ecx, dword [ebp - 0xc58]
mov dword [ecx], 1
xor edx, edx
mov word [ebp - 0x838], dx
push 0x206
push 0
lea eax, [ebp - 0x836]
push eax
call fcn.00486c20
add esp, 0xc
push 0x54fbb4
lea ecx, [ebp - 0x838]
push ecx
call fcn.00486ae5
add esp, 8
push 0x54fbc8
lea edx, [ebp - 0x838]
push edx
call fcn.00486ab7
add esp, 8
lea eax, [ebp - 0x41c]
push eax
push 0x20019
push 0
lea ecx, [ebp - 0x838]
push ecx
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x62c], eax
cmp dword [ebp - 0x62c], 0
jne 0x4375ad
mov dword [ebp - 0xc54], 0x104
lea edx, [ebp - 0xc54]
push edx
lea eax, [ebp - 0x210]
push eax
push 0
push 0
push str.OldInstallPath
mov ecx, dword [ebp - 0x41c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea edx, [ebp - 0xc54]
push edx
lea eax, [ebp - 0xa48]
push eax
push 0
push 0
push str.InstallType
mov ecx, dword [ebp - 0x41c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea edx, [ebp - 0x210]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4375ad
lea eax, [ebp - 0x210]
push eax
mov ecx, dword [ebp - 0xc58]
add ecx, 0x210
push ecx
call fcn.00486ae5
add esp, 8
lea edx, [ebp - 0xa48]
push edx
call fcn.00487d3d
add esp, 4
mov dword [ebp - 0x83c], eax
cmp dword [ebp - 0x83c], 1
jne 0x43759e
mov eax, dword [ebp - 0xc58]
mov dword [eax], 1
mov ecx, dword [ebp - 0x41c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4375ba
mov edx, dword [ebp - 0x41c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00486c08
mov esp, ebp
pop ebp
ret