Function at 0x4020d0
Capabilities:
Check if file exists
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1014
call fcn.0052e0f0
mov eax, dword [0x5aa060]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x1014], eax
xor esi, esi
xor eax, eax
mov dword [ebp - 0x100c], esi
push 0x7fe
push eax
mov word [ebp - 0x1004], ax
lea eax, [ebp - 0x1002]
push eax
mov dword [ebp - 0x1010], esi
call fcn.0052e120
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0x1008]
add esp, 0xc
push eax
push 0x20019
push esi
push str.SoftwareHNCSharedInstall_InformationHOffice100
push SysReAllocString
call ebx
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x402198
lea eax, [ebp - 0x1010]
mov dword [ebp - 0x1010], 0x800
push eax
lea eax, [ebp - 0x1004]
push eax
lea eax, [ebp - 0x100c]
push eax
push esi
push str.Path
push dword [ebp - 0x1008]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40218c
cmp dword [ebp - 0x100c], 1
mov eax, 2
cmove esi, eax
push dword [ebp - 0x1008]
call edi
test esi, esi
jne 0x40220f
lea eax, [ebp - 0x1008]
push eax
push 0x20219
push 0
push str.SoftwareHNCSharedInstall_InformationHOffice100
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
test eax, eax
jne 0x402290
lea eax, [ebp - 0x1010]
mov dword [ebp - 0x1010], 0x800
push eax
lea eax, [ebp - 0x1004]
push eax
lea eax, [ebp - 0x100c]
push eax
push 0
push str.Path
push dword [ebp - 0x1008]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4021ff
cmp dword [ebp - 0x100c], 1
mov eax, 2
cmove esi, eax
push dword [ebp - 0x1008]
call edi
test esi, esi
je 0x402290
xor eax, eax
push 0x7fe
push eax
mov word [ebp - 0x804], ax
lea eax, [ebp - 0x802]
push eax
call fcn.0052e120
add esp, 0xc
cmp esi, 2
jne 0x402279
push str.HOffice100Bin_
lea eax, [ebp - 0x1004]
push 0x400
push eax
call fcn.0052dd36
lea eax, [ebp - 0x1004]
push eax
lea eax, [ebp - 0x804]
push 0x400
push eax
call fcn.0052de50
push str.hpdf.exe
lea eax, [ebp - 0x804]
push 0x400
push eax
call fcn.0052dd36
add esp, 0x24
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x402569
xor esi, esi
lea eax, [ebp - 0x1008]
push eax
push 0x20019
push 0
push str.SoftwareHNCSharedInstall_InformationHOffice96
push SysReAllocString
call ebx
test eax, eax
jne 0x4022fb
lea eax, [ebp - 0x1010]
mov dword [ebp - 0x1010], 0x800
push eax
lea eax, [ebp - 0x1004]
push eax
lea eax, [ebp - 0x100c]
push eax
push 0
push str.Path
push dword [ebp - 0x1008]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4022f3
cmp dword [ebp - 0x100c], 1
mov eax, 3
cmove esi, eax
push dword [ebp - 0x1008]
call edi
test esi, esi
jne 0x402374
lea eax, [ebp - 0x1008]
push eax
push 0x20219
push esi
push str.SoftwareHNCSharedInstall_InformationHOffice96
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
test eax, eax
jne 0x4023f5
lea eax, [ebp - 0x1010]
mov dword [ebp - 0x1010], 0x800
push eax
lea eax, [ebp - 0x1004]
push eax
lea eax, [ebp - 0x100c]
push eax
push esi
push str.Path
push dword [ebp - 0x1008]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x402364
cmp dword [ebp - 0x100c], 1
mov eax, 3
cmove esi, eax
push dword [ebp - 0x1008]
call edi
test esi, esi
je 0x4023f5
xor eax, eax
push 0x7fe
push eax
mov word [ebp - 0x804], ax
lea eax, [ebp - 0x802]
push eax
call fcn.0052e120
add esp, 0xc
cmp esi, 3
jne 0x4023de
push str.HncUtilsHpdfBin_
lea eax, [ebp - 0x1004]
push 0x400
push eax
call fcn.0052dd36
lea eax, [ebp - 0x1004]
push eax
lea eax, [ebp - 0x804]
push 0x400
push eax
call fcn.0052de50
push str.hpdf.exe
lea eax, [ebp - 0x804]
push 0x400
push eax
call fcn.0052dd36
add esp, 0x24
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x402569
xor esi, esi
lea eax, [ebp - 0x1008]
push eax
push 0x20019
push 0
push str.SoftwareHNCSharedInstall_InformationHOffice96
push SysReAllocString
call ebx
test eax, eax
jne 0x402460
lea eax, [ebp - 0x1010]
mov dword [ebp - 0x1010], 0x800
push eax
lea eax, [ebp - 0x1004]
push eax
lea eax, [ebp - 0x100c]
push eax
push 0
push str.Path
push dword [ebp - 0x1008]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x402458
cmp dword [ebp - 0x100c], 1
mov eax, 1
cmove esi, eax
push dword [ebp - 0x1008]
call edi
test esi, esi
jne 0x4024d9
lea eax, [ebp - 0x1008]
push eax
push 0x20219
push esi
push str.SoftwareHNCSharedInstall_InformationHOffice96
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
test eax, eax
jne 0x402583
lea eax, [ebp - 0x1010]
mov dword [ebp - 0x1010], 0x800
push eax
lea eax, [ebp - 0x1004]
push eax
lea eax, [ebp - 0x100c]
push eax
push esi
push str.Path
push dword [ebp - 0x1008]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4024c9
cmp dword [ebp - 0x100c], 1
mov eax, 1
cmove esi, eax
push dword [ebp - 0x1008]
call edi
test esi, esi
je 0x402583
xor eax, eax
push 0x7fe
push eax
mov word [ebp - 0x804], ax
lea eax, [ebp - 0x802]
push eax
call fcn.0052e120
add esp, 0xc
cmp esi, 1
jne 0x402543
push str.HOffice96Bin_
lea eax, [ebp - 0x1004]
push 0x400
push eax
call fcn.0052dd36
lea eax, [ebp - 0x1004]
push eax
lea eax, [ebp - 0x804]
push 0x400
push eax
call fcn.0052de50
push str.HncPdfViewer.exe
lea eax, [ebp - 0x804]
push 0x400
push eax
call fcn.0052dd36
add esp, 0x24
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x402569
xor esi, esi
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0052e0dd
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x804]
push eax
push 0x400
push dword [ebp - 0x1014]
call fcn.0052de50
add esp, 0xc
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0052e0dd
mov esp, ebp
pop ebp
ret