Function at 0x520ad0
Capabilities:
Query or enumerate registry value
Read .ini file
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ad266
mov eax, dword fs:[0]
push eax
mov eax, 0x204c
call fcn.0056e430
mov eax, dword [0x608554]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x2050], ecx
push ecx
push str.CBaseSeqOutsideModule::ProcDIASInst
lea ecx, [ebp - 0x2048]
call fcn.0040a480
mov dword [ebp - 4], 0
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x520b5f
test byte [ecx + 0x1c], 1
je 0x520b5f
cmp dword [0x608f68], 8
mov eax, 0x608f54
mov edx, 0x5dedd8
cmovae eax, dword [0x608f54]
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0xe
call fcn.00401840
add esp, 0xc
push str.ProcDIASInst
push str.Action_start__s.
push 0x6185b4
call fcn.0048a7e0
push 0x800
xor edi, edi
lea eax, [ebp - 0x810]
push edi
push eax
call fcn.00571c00
mov ecx, dword [0x6184f0]
lea eax, [ebp - 0x810]
add esp, 0x18
mov ecx, dword [ecx + 0x1c]
push eax
push str.PDL_TYPE
call fcn.004f65f0
mov ecx, 0x5c8a8c
lea eax, [ebp - 0x810]
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x520bd6
test dx, dx
je 0x520bd2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x520bd6
add eax, 4
add ecx, 4
test dx, dx
jne 0x520bb0
xor eax, eax
jmp 0x520bdb
sbb eax, eax
or eax, 1
test eax, eax
jne 0x520c00
mov eax, dword [0x6184f0]
mov eax, dword [eax + 0x20]
add eax, 0x20
cmp dword [eax + 0x14], 8
jb 0x520bf2
mov eax, dword [eax]
push eax
push str.SetupUIJ.dll
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
jmp 0x520c0a
mov ecx, 0x5c8aec
call fcn.0049c890
mov esi, eax
lea eax, [ebp - 0x810]
neg esi
push 0x800
sbb esi, esi
push 0
push eax
inc esi
call fcn.00571c00
mov ecx, dword [0x6184f0]
lea eax, [ebp - 0x810]
add esp, 0xc
mov ecx, dword [ecx + 0x1c]
push eax
push str.INSTALLATION_SELECT
call fcn.004f65f0
lea eax, [ebp - 0x810]
push eax
call fcn.00577bb7
add esp, 4
cmp eax, 2
jne 0x520c95
call fcn.0049bf50
test eax, eax
je 0x520c95
test esi, esi
je 0x520c95
lea ecx, [ebp - 0x204c]
call fcn.00451f00
lea ecx, [ebp - 0x204c]
mov byte [ebp - 4], 1
call fcn.004522d0
lea ecx, [ebp - 0x204c]
mov byte [ebp - 4], 0
mov edi, eax
call fcn.00451fd0
test edi, edi
jne 0x520edc
call fcn.0049bf50
test eax, eax
je 0x520cbb
call fcn.0049bfd0
test eax, eax
je 0x520cbb
mov ecx, dword [ebp - 0x2050]
push 5
call fcn.00521230
mov edi, eax
jmp 0x520edc
call fcn.0049bf50
test eax, eax
je 0x520edc
mov ecx, 0x5c8a8c
call fcn.0049c890
test eax, eax
jne 0x520ce8
mov ecx, 0x5c8aec
call fcn.0049c890
test eax, eax
je 0x520edc
lea eax, [ebp - 0x204c]
push eax
push 0xf003f
push 0
push str.SOFTWARECanonDIASSETUPDIASUser
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x520edc
push 0x800
push eax
lea eax, [ebp - 0x1010]
push eax
call fcn.00571c00
push 0x800
lea eax, [ebp - 0x810]
push 0
push eax
call fcn.00571c00
push 0x800
lea eax, [ebp - 0x1810]
push 0
push eax
call fcn.00571c00
mov ecx, dword [0x6184f0]
lea eax, [ebp - 0x1010]
add esp, 0x24
mov ecx, dword [ecx + 0x1c]
push eax
push str.TEMPPATH
call fcn.004f65f0
lea eax, [ebp - 0x1010]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
push str.InsDrv.ini
lea eax, [ebp - 0x1010]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x1010]
push eax
push 0x400
lea eax, [ebp - 0x810]
push eax
push 0x5c6930
push str.Product
push str.Installer_Info
call esi
lea eax, [ebp - 0x1010]
push eax
push 0x400
lea eax, [ebp - 0x1810]
push eax
push 0x5c6930
push str.Version
push str.Installer_Info
call esi
push 0x800
lea eax, [ebp - 0x2010]
push 0
push eax
call fcn.00571c00
add esp, 0xc
mov dword [ebp - 0x2054], 0x800
lea eax, [ebp - 0x2054]
mov dword [ebp - 0x2058], 1
push eax
lea eax, [ebp - 0x2010]
push eax
lea eax, [ebp - 0x2058]
push eax
push 0
lea eax, [ebp - 0x810]
push eax
push dword [ebp - 0x204c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x520ed0
lea eax, [ebp - 0x2010]
push eax
lea eax, [ebp - 0x1810]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x520ed0
lea eax, [ebp - 0x1810]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax*2 + 2]
push eax
lea eax, [ebp - 0x1810]
push eax
push 1
push 0
lea eax, [ebp - 0x810]
push eax
push dword [ebp - 0x204c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x520ed0
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x520ecb
test byte [ecx + 0x1c], 4
je 0x520ecb
cmp dword [0x608f68], 8
lea edx, [ebp - 0x810]
push str.SOFTWARECanonDIASSETUPDIASUser
push edx
mov eax, 0x608f54
mov edx, 0x5dedd8
cmovae eax, dword [0x608f54]
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0xf
call fcn.00430170
add esp, 0x14
mov edi, 0x25
push dword [ebp - 0x204c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
push str.ProcDIASInst
push str.Action_ended__s._Return_value__08x.
push 0x6185b4
call fcn.0048a7e0
add esp, 0x10
mov byte [ebp - 0x2044], 1
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x520f3c
test byte [ecx + 0x1c], 1
je 0x520f3c
cmp dword [0x608f68], 8
mov eax, 0x608f54
push edi
cmovae eax, dword [0x608f54]
mov edx, 0x5dedd8
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0x10
call fcn.004018a0
add esp, 0x10
lea ecx, [ebp - 0x2048]
call fcn.0040a570
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0056d977
mov esp, ebp
pop ebp
ret