Function at 0x100214e0
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.1013f390
mov eax, dword [0x101c6080]
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.10022d10
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x824], ax
lea eax, [ebp - 0x822]
push eax
call fcn.1013f3c0
xor eax, eax
push 0x206
push eax
mov word [ebp - 0xc34], ax
lea eax, [ebp - 0xc32]
push eax
call fcn.1013f3c0
xor eax, eax
push 0x206
push eax
mov word [ebp - 0xa2c], ax
lea eax, [ebp - 0xa2a]
push eax
call fcn.1013f3c0
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call fcn.1013f3c0
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x412]
push eax
call fcn.1013f3c0
add esp, 0x40
xor eax, eax
mov word [ebp - 0x1044], ax
push 0x206
push eax
lea eax, [ebp - 0x1042]
push eax
call fcn.1013f3c0
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 0x100215d0
mov eax, dword [0x1016f2a8]
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 0x100215f0
mov esi, dword [str.WnPicture]
lea edi, [ebp - 0x824]
mov ebx, dword [0x1016f3ac]
add edi, 0xfffffffe
mov ecx, dword [0x1016f3b0]
mov dword [edx], esi
mov dword [edx + 4], ebx
mov dword [edx + 8], ecx
mov ecx, dword [0x1016f3b4]
mov dword [edx + 0xc], ecx
mov ecx, dword [0x1016f3b8]
mov dword [edx + 0x10], ecx
mov cx, word [edi + 2]
lea edi, [edi + 2]
test cx, cx
jne 0x10021631
lea ecx, [ebp - 0x824]
mov dword [edi], eax
add ecx, 0xfffffffe
jmp 0x10021650
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x10021650
mov eax, dword [0x1016f3b0]
mov dword [ecx], esi
mov dword [ecx + 4], ebx
mov dword [ecx + 8], eax
mov eax, dword [0x1016f3b4]
mov dword [ecx + 0xc], eax
mov eax, dword [0x1016f3b8]
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 0x10021682
mov eax, dword [str..ini]
mov dword [ecx], eax
mov eax, dword [0x1016f3c0]
mov dword [ecx + 4], eax
mov ax, word [0x1016f3c4]
mov word [ecx + 8], ax
lea eax, [ebp - 0x824]
push eax
push 0x104
lea eax, [ebp - 0xc34]
push eax
push 0x1016edd8
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 0x100216d1
lea eax, [ebp - 0x20c]
push eax
push str.get_program_files_common_szInstallRootPath:_s
call fcn.10022d10
lea ecx, [ebp - 0x20c]
add esp, 8
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10021706
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
sub ecx, edx
sar ecx, 1
test ecx, ecx
jle 0x100217f2
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x20c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x416], ax
test ax, ax
jne 0x10021725
lea eax, [ebp - 0x414]
push eax
call ebx
test eax, eax
je 0x100217f2
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x61c], ax
lea eax, [ebp - 0x61a]
push eax
call fcn.1013f3c0
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 0x10021770
lea edi, [ebp - 0x61c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x10021791
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 0x100217f2
mov esi, dword [ebp - 0x1048]
lea eax, [ebp - 0x20c]
push eax
lea ecx, [esi + 0x64]
call fcn.10020870
lea eax, [ebp - 0x414]
add esi, 0x94
push eax
mov ecx, esi
call fcn.10020870
cmp dword [esi + 0x14], 8
jb 0x100217e7
mov esi, dword [esi]
push esi
push str.checke_config_exe_name:_install_path:_s
jmp 0x10021d62
xor eax, eax
push 0x206
push eax
mov word [ebp - 0xe3c], ax
lea eax, [ebp - 0xe3a]
push eax
call fcn.1013f3c0
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 0x10021812
lea ecx, [ebp - 0xe3c]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x10021832
mov eax, dword [str.WnPicture]
mov dword [ecx], eax
mov eax, dword [0x1016f3ac]
mov dword [ecx + 4], eax
mov eax, dword [0x1016f3b0]
mov dword [ecx + 8], eax
mov eax, dword [0x1016f3b4]
mov dword [ecx + 0xc], eax
mov eax, dword [0x1016f3b8]
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 0x100219be
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 0x100219be
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x1044]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x100218c4
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 0x100218e0
lea eax, [ebp - 0x414]
push eax
call ebx
test eax, eax
je 0x100219be
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x61c], ax
lea eax, [ebp - 0x61a]
push eax
call fcn.1013f3c0
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 0x10021930
lea edi, [ebp - 0x61c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x10021951
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 0x100219be
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.10020870
lea eax, [ebp - 0x414]
add esi, 0x94
push eax
mov ecx, esi
call fcn.10020870
cmp dword [esi + 0x14], 8
jb 0x100219b3
mov esi, dword [esi]
push esi
push str.checke_regedit_soft_install_install_path:_s
jmp 0x10021d62
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 0x100219e6
mov eax, dword [0x1016f2a8]
lea edx, [ebp - 0xa2c]
mov dword [edi], eax
add edx, 0xfffffffe
mov cx, word [edx + 2]
lea edx, [edx + 2]
test cx, cx
jne 0x10021a02
mov ecx, dword [str.WnPicture]
lea edi, [ebp - 0xa2c]
mov dword [edx], ecx
add edi, 0xfffffffe
mov ecx, dword [0x1016f3ac]
mov dword [edx + 4], ecx
mov ecx, dword [0x1016f3b0]
mov dword [edx + 8], ecx
mov ecx, dword [0x1016f3b4]
mov dword [edx + 0xc], ecx
mov ecx, dword [0x1016f3b8]
mov dword [edx + 0x10], ecx
mov cx, word [edi + 2]
lea edi, [edi + 2]
test cx, cx
jne 0x10021a43
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 0x10021a53
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 0x10021a70
lea eax, [ebp - 0x414]
push eax
call ebx
test eax, eax
je 0x10021b97
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x61c], ax
lea eax, [ebp - 0x61a]
push eax
call fcn.1013f3c0
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 0x10021ac0
lea edi, [ebp - 0x61c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x10021ae1
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 0x10021b97
cmp word [ebp - 0x20c], 0
jne 0x10021b18
xor ecx, ecx
jmp 0x10021b30
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10021b21
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.10022a80
cmp word [ebp - 0x414], 0
jne 0x10021b54
xor ecx, ecx
jmp 0x10021b6f
lea ecx, [ebp - 0x414]
lea edx, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10021b60
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x414]
add esi, 0x94
push eax
mov ecx, esi
call fcn.10022a80
cmp dword [esi + 0x14], 8
jb 0x10021b8c
mov esi, dword [esi]
push esi
push str.checke_CSIDL_PROGRAM_FILES__install_path.....:_s
jmp 0x10021d62
lea ecx, [ebp - 0xc34]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10021ba0
sub ecx, edx
sar ecx, 1
test ecx, ecx
jle 0x10021c97
lea eax, [ebp - 0xc34]
push eax
call ebx
test eax, eax
je 0x10021c97
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 0x10021bd0
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 0x10021bf0
cmp word [ebp - 0x20c], ax
jne 0x10021c15
xor ecx, ecx
jmp 0x10021c2f
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10021c20
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.10022a80
cmp word [ebp - 0x414], 0
jne 0x10021c53
xor ecx, ecx
jmp 0x10021c6f
lea ecx, [ebp - 0x414]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10021c60
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x414]
add esi, 0x94
push eax
mov ecx, esi
call fcn.10022a80
cmp dword [esi + 0x14], 8
jb 0x10021c8c
mov esi, dword [esi]
push esi
push str.checke_CSIDL_PROGRAM_FILESt_install_install_path:_s
jmp 0x10021d62
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 0x10021ca0
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 0x10021cc0
cmp word [ebp - 0x20c], ax
jne 0x10021ce5
xor ecx, ecx
jmp 0x10021cff
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10021cf0
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.10022a80
cmp word [ebp - 0x414], 0
jne 0x10021d23
xor ecx, ecx
jmp 0x10021d3f
lea ecx, [ebp - 0x414]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10021d30
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x414]
add esi, 0x94
push eax
mov ecx, esi
call fcn.10022a80
cmp dword [esi + 0x14], 8
jb 0x10021d5c
mov esi, dword [esi]
push esi
push str.Init_install_path_end_install_path:_s
call fcn.10022d10
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.1013ef23
mov esp, ebp
pop ebp
ret