Function at 0x42ac20
Capabilities:
Check if file exists
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x565b77
mov eax, dword fs:[0]
push eax
sub esp, 0xc3c
mov eax, dword [0x5c0490]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0
lea eax, [ebp - 0xc48]
push str.Tool_DeleteVCIniFile
push eax
mov esi, ecx
mov edi, edx
call fcn.00401190
add esp, 0xc
push edi
push esi
push str.pRegRoot___s__pSubKey___s
lea ecx, [ebp - 0xc48]
push 1
push ecx
mov dword [ebp - 4], 0
call fcn.00401410
add esp, 0x14
call fcn.0044b52d
mov ebx, dword [eax + 4]
xor ecx, ecx
push 0x204
mov eax, 1
push ecx
lea edx, [ebp - 0x214]
push edx
mov dword [ebp - 0xc2c], ecx
mov dword [ebp - 0xc24], eax
mov dword [ebp - 0xc3c], eax
mov dword [ebp - 0xc40], 0x104
mov dword [ebp - 0x218], ecx
call fcn.00541d20
add esp, 0xc
push 0x204
lea eax, [ebp - 0x41c]
push 0
push eax
mov dword [ebp - 0x420], 0
call fcn.00541d20
add esp, 0xc
push 0x7fc
lea ecx, [ebp - 0xc1c]
push 0
push ecx
mov dword [ebp - 0xc20], 0
call fcn.00541d20
add esp, 0xc
push 0x5960a4
lea ecx, [ebp - 0xc30]
call fcn.00404f00
push edi
push esi
lea edx, [ebp - 0xc30]
push 0x594b70
push edx
mov byte [ebp - 4], 1
call fcn.0040aa50
mov ecx, dword [ebp - 0xc30]
add esp, 0x10
lea eax, [ebp - 0xc2c]
push eax
push 0xf003f
xor edi, edi
push edi
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x42af97
lea edx, [ebp - 0xc40]
push edx
mov edx, dword [ebp - 0xc2c]
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0xc3c]
push ecx
push edi
push str.MsiInstallDir
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, edi
jne 0x42af6e
push str.Module.ini
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea ecx, [ebp - 0x218]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x42af88
lea edx, [ebp - 0x218]
push edx
push 0x104
lea eax, [ebp - 0x420]
push eax
push str.ICA_3.0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionW]
test eax, eax
je 0x42af7e
push 0x5988ec
lea ecx, [ebp - 0xc28]
call fcn.00404f00
push 0x5988ec
lea ecx, [ebp - 0xc38]
mov byte [ebp - 4], 2
call fcn.00404f00
mov byte [ebp - 4], 3
mov ecx, dword [ebx + 0x624]
push ecx
lea edx, [ebp - 0xc38]
push str.Canon__s_ERROR
push edx
call fcn.0040aa50
mov eax, dword [ebx + 0x624]
add esp, 0xc
push eax
lea ecx, [ebp - 0xc28]
push str.Canon__s
push ecx
call fcn.0040aa50
add esp, 0xc
lea edx, [ebp - 0x218]
push edx
push 0x400
lea eax, [ebp - 0xc20]
push eax
push str.Canon__s_ERROR
push str.VirtualDriver
push str.ICA_3.0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push str.Canon__s_ERROR
lea ecx, [ebp - 0xc20]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x42ae7f
mov dword [ebp - 0xc24], edi
mov edx, dword [ebp - 0xc28]
push edx
lea eax, [ebp - 0xc20]
push eax
call fcn.0053d6a8
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
add esp, 8
test eax, eax
je 0x42aef7
push 0x5960a4
lea ecx, [ebp - 0xc34]
call fcn.00404f00
lea ecx, [ebp - 0xc34]
push ecx
lea ecx, [ebp - 0xc20]
mov byte [ebp - 4], 4
call fcn.0042a840
mov eax, dword [ebp - 0xc34]
add esp, 4
lea edx, [ebp - 0x218]
push edx
push eax
push str.VirtualDriver
push str.ICA_3.0
call esi
test eax, eax
jne 0x42aeec
mov dword [ebp - 0xc24], edi
lea ecx, [ebp - 0xc34]
call fcn.00405310
mov edx, dword [ebp - 0xc28]
lea ecx, [ebp - 0x218]
push ecx
push edi
push edi
push edx
call esi
test eax, eax
jne 0x42af13
mov dword [ebp - 0xc24], edi
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0xc38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42af39
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0xc28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42af88
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc2c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x42afa1
cmp eax, 2
je 0x42af7e
mov dword [ebp - 0xc24], edi
cmp eax, 3
jne 0x42af88
mov dword [ebp - 0xc24], 1
mov ecx, dword [ebp - 0xc2c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x42afa1
mov dword [ebp - 0xc24], 1
mov esi, dword [ebp - 0xc24]
push esi
push str.return___08x
lea edx, [ebp - 0xc48]
push 2
push edx
call fcn.00401410
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0xc30]
add eax, 0xfffffff0
add esp, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x42afe4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0xc48]
mov dword [ebp - 4], 0xffffffff
call fcn.00401370
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0053ca73
mov esp, ebp
pop ebp
ret