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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1050
call fcn.00531990
mov eax, dword [0x6e4770]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push str.Init_install_path_start
mov dword [ebp - 0x1048], ecx
call fcn.0049ad90
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x824], ax
lea eax, [ebp - 0x822]
push eax
call fcn.0052f1e0
xor eax, eax
push 0x206
push eax
mov word [ebp - 0xc34], ax
lea eax, [ebp - 0xc32]
push eax
call fcn.0052f1e0
xor eax, eax
push 0x206
push eax
mov word [ebp - 0xa2c], ax
lea eax, [ebp - 0xa2a]
push eax
call fcn.0052f1e0
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call fcn.0052f1e0
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x412]
push eax
call fcn.0052f1e0
add esp, 0x40
xor eax, eax
mov word [ebp - 0x1044], ax
push 0x206
push eax
lea eax, [ebp - 0x1042]
push eax
call fcn.0052f1e0
add esp, 0xc
lea eax, [ebp - 0x824]
push 0
push 0x2b
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [ebp - 0x824]
add edi, 0xfffffffe
mov edi, edi
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x498950
mov eax, dword [0x642134]
lea edx, [ebp - 0x824]
mov dword [edi], eax
add edx, 0xfffffffe
lea esp, [esp]
mov cx, word [edx + 2]
lea edx, [edx + 2]
test cx, cx
jne 0x498970
mov esi, dword [str.WnPicture]
lea edi, [ebp - 0x824]
mov ebx, dword [0x646694]
add edi, 0xfffffffe
mov ecx, dword [0x646698]
mov dword [edx], esi
mov dword [edx + 4], ebx
mov dword [edx + 8], ecx
mov ecx, dword [0x64669c]
mov dword [edx + 0xc], ecx
mov ecx, dword [0x6466a0]
mov dword [edx + 0x10], ecx
mov cx, word [edi + 2]
lea edi, [edi + 2]
test cx, cx
jne 0x4989b1
lea ecx, [ebp - 0x824]
mov dword [edi], eax
add ecx, 0xfffffffe
jmp 0x4989d0
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x4989d0
mov eax, dword [0x646698]
mov dword [ecx], esi
mov dword [ecx + 4], ebx
mov dword [ecx + 8], eax
mov eax, dword [0x64669c]
mov dword [ecx + 0xc], eax
mov eax, dword [0x6466a0]
mov dword [ecx + 0x10], eax
lea ecx, [ebp - 0x824]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x498a02
mov eax, dword [str..ini]
mov dword [ecx], eax
mov eax, dword [0x646b8c]
mov dword [ecx + 4], eax
mov ax, word [0x646b90]
mov word [ecx + 8], ax
lea eax, [ebp - 0x824]
push eax
push 0x104
lea eax, [ebp - 0xc34]
push eax
push 0x642138
push str.InstallPath
push str.Globals
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
xor ecx, ecx
movzx eax, word [ebp + ecx - 0xc34]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x498a51
lea eax, [ebp - 0x20c]
push eax
push str.get_program_files_common_szInstallRootPath:_s
call fcn.0049ad90
lea ecx, [ebp - 0x20c]
add esp, 8
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x498a86
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
sub ecx, edx
sar ecx, 1
test ecx, ecx
jle 0x498b72
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x20c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x416], ax
test ax, ax
jne 0x498aa5
lea eax, [ebp - 0x414]
push eax
call ebx
test eax, eax
je 0x498b72
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x61c], ax
lea eax, [ebp - 0x61a]
push eax
call fcn.0052f1e0
add esp, 0xc
xor ecx, ecx
mov edi, edi
movzx eax, word [ebp + ecx - 0x414]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x61e], ax
test ax, ax
jne 0x498af0
lea edi, [ebp - 0x61c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x498b11
lea eax, [ebp - 0x61c]
mov ecx, 8
mov esi, str.WnPicConfig.exe
rep movsd dword es:[edi], dword [esi]
push eax
call ebx
test eax, eax
je 0x498b72
mov esi, dword [ebp - 0x1048]
lea eax, [ebp - 0x20c]
push eax
lea ecx, [esi + 0x64]
call fcn.0046e820
lea eax, [ebp - 0x414]
add esi, 0x94
push eax
mov ecx, esi
call fcn.0046e820
cmp dword [esi + 0x14], 8
jb 0x498b67
mov esi, dword [esi]
push esi
push str.checke_config_exe_name:_install_path:_s
jmp 0x4990e2
xor eax, eax
push 0x206
push eax
mov word [ebp - 0xe3c], ax
lea eax, [ebp - 0xe3a]
push eax
call fcn.0052f1e0
add esp, 0xc
xor ecx, ecx
movzx eax, word [ecx + str.SOFTWARE_]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0xe3e], ax
test ax, ax
jne 0x498b92
lea ecx, [ebp - 0xe3c]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x498bb2
mov eax, dword [str.WnPicture]
mov dword [ecx], eax
mov eax, dword [0x646694]
mov dword [ecx + 4], eax
mov eax, dword [0x646698]
mov dword [ecx + 8], eax
mov eax, dword [0x64669c]
mov dword [ecx + 0xc], eax
mov eax, dword [0x6466a0]
mov dword [ecx + 0x10], eax
lea eax, [ebp - 0x104c]
push eax
push 0x20019
push 0
lea eax, [ebp - 0xe3c]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x498d3e
lea eax, [ebp - 0x1050]
mov dword [ebp - 0x1050], 0x104
push eax
lea eax, [ebp - 0x1044]
push eax
push 0
push 0
push str.InstallPath
push dword [ebp - 0x104c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x498d3e
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x1044]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x498c44
xor ecx, ecx
mov edi, edi
movzx eax, word [ebp + ecx - 0x20c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x416], ax
test ax, ax
jne 0x498c60
lea eax, [ebp - 0x414]
push eax
call ebx
test eax, eax
je 0x498d3e
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x61c], ax
lea eax, [ebp - 0x61a]
push eax
call fcn.0052f1e0
add esp, 0xc
xor ecx, ecx
lea esp, [esp]
movzx eax, word [ebp + ecx - 0x414]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x61e], ax
test ax, ax
jne 0x498cb0
lea edi, [ebp - 0x61c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x498cd1
lea eax, [ebp - 0x61c]
mov ecx, 8
mov esi, str.WnPicConfig.exe
rep movsd dword es:[edi], dword [esi]
push eax
call ebx
test eax, eax
je 0x498d3e
push dword [ebp - 0x104c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [ebp - 0x1048]
lea eax, [ebp - 0x20c]
push eax
lea ecx, [esi + 0x64]
call fcn.0046e820
lea eax, [ebp - 0x414]
add esi, 0x94
push eax
mov ecx, esi
call fcn.0046e820
cmp dword [esi + 0x14], 8
jb 0x498d33
mov esi, dword [esi]
push esi
push str.checke_regedit_soft_install_install_path:_s
jmp 0x4990e2
push dword [ebp - 0x104c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
push 0x26
lea eax, [ebp - 0xa2c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [ebp - 0xa2c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x498d66
mov eax, dword [0x642134]
lea edx, [ebp - 0xa2c]
mov dword [edi], eax
add edx, 0xfffffffe
mov cx, word [edx + 2]
lea edx, [edx + 2]
test cx, cx
jne 0x498d82
mov ecx, dword [str.WnPicture]
lea edi, [ebp - 0xa2c]
mov dword [edx], ecx
add edi, 0xfffffffe
mov ecx, dword [0x646694]
mov dword [edx + 4], ecx
mov ecx, dword [0x646698]
mov dword [edx + 8], ecx
mov ecx, dword [0x64669c]
mov dword [edx + 0xc], ecx
mov ecx, dword [0x6466a0]
mov dword [edx + 0x10], ecx
mov cx, word [edi + 2]
lea edi, [edi + 2]
test cx, cx
jne 0x498dc3
mov dword [edi], eax
xor ecx, ecx
movzx eax, word [ebp + ecx - 0xa2c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x498dd3
xor ecx, ecx
lea ecx, [ecx]
movzx eax, word [ebp + ecx - 0x20c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x416], ax
test ax, ax
jne 0x498df0
lea eax, [ebp - 0x414]
push eax
call ebx
test eax, eax
je 0x498f17
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x61c], ax
lea eax, [ebp - 0x61a]
push eax
call fcn.0052f1e0
add esp, 0xc
xor ecx, ecx
lea esp, [esp]
movzx eax, word [ebp + ecx - 0x414]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x61e], ax
test ax, ax
jne 0x498e40
lea edi, [ebp - 0x61c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x498e61
lea eax, [ebp - 0x61c]
mov ecx, 8
mov esi, str.WnPicConfig.exe
rep movsd dword es:[edi], dword [esi]
push eax
call ebx
test eax, eax
je 0x498f17
cmp word [ebp - 0x20c], 0
jne 0x498e98
xor ecx, ecx
jmp 0x498eb0
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x498ea1
sub ecx, edx
sar ecx, 1
mov esi, dword [ebp - 0x1048]
lea eax, [ebp - 0x20c]
push ecx
push eax
lea ecx, [esi + 0x64]
call fcn.00470470
cmp word [ebp - 0x414], 0
jne 0x498ed4
xor ecx, ecx
jmp 0x498eef
lea ecx, [ebp - 0x414]
lea edx, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x498ee0
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x414]
add esi, 0x94
push eax
mov ecx, esi
call fcn.00470470
cmp dword [esi + 0x14], 8
jb 0x498f0c
mov esi, dword [esi]
push esi
push str.checke_CSIDL_PROGRAM_FILES__install_path.....:_s
jmp 0x4990e2
lea ecx, [ebp - 0xc34]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x498f20
sub ecx, edx
sar ecx, 1
test ecx, ecx
jle 0x499017
lea eax, [ebp - 0xc34]
push eax
call ebx
test eax, eax
je 0x499017
xor ecx, ecx
lea ebx, [ebx]
movzx eax, word [ebp + ecx - 0xc34]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x498f50
xor ecx, ecx
lea ebx, [ebx]
movzx eax, word [ebp + ecx - 0x20c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x416], ax
test ax, ax
jne 0x498f70
cmp word [ebp - 0x20c], ax
jne 0x498f95
xor ecx, ecx
jmp 0x498faf
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x498fa0
sub ecx, edx
sar ecx, 1
mov esi, dword [ebp - 0x1048]
lea eax, [ebp - 0x20c]
push ecx
push eax
lea ecx, [esi + 0x64]
call fcn.00470470
cmp word [ebp - 0x414], 0
jne 0x498fd3
xor ecx, ecx
jmp 0x498fef
lea ecx, [ebp - 0x414]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x498fe0
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x414]
add esi, 0x94
push eax
mov ecx, esi
call fcn.00470470
cmp dword [esi + 0x14], 8
jb 0x49900c
mov esi, dword [esi]
push esi
push str.checke_CSIDL_PROGRAM_FILESt_install_install_path:_s
jmp 0x4990e2
xor ecx, ecx
lea esp, [esp]
movzx eax, word [ebp + ecx - 0xa2c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x499020
xor ecx, ecx
lea ebx, [ebx]
movzx eax, word [ebp + ecx - 0x20c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x416], ax
test ax, ax
jne 0x499040
cmp word [ebp - 0x20c], ax
jne 0x499065
xor ecx, ecx
jmp 0x49907f
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x499070
sub ecx, edx
sar ecx, 1
mov esi, dword [ebp - 0x1048]
lea eax, [ebp - 0x20c]
push ecx
push eax
lea ecx, [esi + 0x64]
call fcn.00470470
cmp word [ebp - 0x414], 0
jne 0x4990a3
xor ecx, ecx
jmp 0x4990bf
lea ecx, [ebp - 0x414]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4990b0
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x414]
add esi, 0x94
push eax
mov ecx, esi
call fcn.00470470
cmp dword [esi + 0x14], 8
jb 0x4990dc
mov esi, dword [esi]
push esi
push str.Init_install_path_end_install_path:_s
call fcn.0049ad90
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0052dfa4
mov esp, ebp
pop ebp
ret