Function at 0x407f40
Capabilities:
Get common file path
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x427e8b
mov eax, dword fs:[0]
push eax
sub esp, 0x9c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x433a70]
xor eax, esp
push eax
lea eax, [esp + 0xb0]
mov dword fs:[0], eax
mov dword [esp + 0x2c], ecx
push str.CScrubber::DeleteHPImagingKey
lea ecx, [esp + 0x3c]
call fcn.00401130
xor ebp, ebp
push 0xa
lea ecx, [esp + 0x68]
mov dword [esp + 0xbc], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x2c], ebp
call fcn.00402090
push 0xa
lea ecx, [esp + 0x4c]
call fcn.00402090
push 0x104
mov byte [esp + 0xbc], 2
call fcn.00409b95
mov ebx, eax
add esp, 4
cmp ebx, ebp
mov dword [esp + 0x30], ebx
je 0x408334
mov esi, dword [esp + 0xc0]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x407fd5
sub eax, edx
add eax, 0x44
push eax
call fcn.00409b95
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x1c], edi
je 0x40831e
push esi
push str.SoftwareHewlett_PackardDigitalImaging_sDeviceInstances
push edi
call fcn.00413df0
add esp, 0xc
lea eax, [esp + 0x14]
push eax
push 0xf003f
push 0
push edi
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x408311
push 0x104
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], 0x104
call fcn.00409b95
mov ecx, dword [esp + 0x1c]
mov ebp, eax
push ecx
mov dword [esp + 0x3c], ebp
call fcn.00409b95
add esp, 8
test eax, eax
mov dword [esp + 0x28], eax
je 0x408304
test ebp, ebp
je 0x408311
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x40]
push edx
push 0
push 0
push 0
lea eax, [esp + 0x28]
push eax
push ebp
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x4081e2
mov esi, dword [esp + 0x28]
add dword [esp + 0x20], 1
push ebp
push str._sFunctionsScan
push 0x104
push esi
call fcn.004131ec
add esp, 0x10
cmp eax, 0xffffffff
je 0x4081b1
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x24]
push edx
push 0xf003f
push 0
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4081b1
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x18]
push ecx
push ebx
push eax
push eax
push str.ImagingClassIndex
push edx
mov dword [esp + 0x30], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40819e
mov eax, edi
lea edx, [eax + 1]
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x408100
sub eax, edx
mov edx, eax
mov eax, ebp
lea esi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x408112
sub eax, esi
lea eax, [eax + edx + 0x19]
push eax
call fcn.00409b95
mov esi, eax
add esp, 4
test esi, esi
je 0x408304
push ebp
push edi
push str.HKEY_LOCAL_MACHINE_s_s
push esi
call fcn.00413df0
push esi
lea ecx, [esp + 0x4c]
push str.Add_key_to_list:__s
push ecx
call fcn.00401460
add esp, 0x1c
push esi
lea ecx, [esp + 0x4c]
call fcn.00406ff0
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x408163
sub eax, edx
add eax, 1
push eax
call fcn.00409b95
add esp, 4
test eax, eax
je 0x408304
mov esi, eax
mov ecx, ebx
sub esi, ebx
mov dl, byte [ecx]
mov byte [esi + ecx], dl
add ecx, 1
test dl, dl
jne 0x408188
push eax
lea ecx, [esp + 0x68]
call fcn.00406ff0
mov edx, dword [esp + 0x24]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x24], 0
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x40]
push eax
mov eax, dword [esp + 0x18]
push 0
push 0
push 0
lea ecx, [esp + 0x28]
push ecx
push ebp
push edx
push eax
mov dword [esp + 0x38], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
je 0x40808c
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0x48]
push edx
mov dword [esp + 0x18], 0
call fcn.00407740
mov ecx, dword [esp + 0x54]
test ecx, ecx
je 0x408238
mov esi, dword [esp + 0x4c]
xor edi, edi
test ecx, ecx
jle 0x408234
mov eax, esi
mov eax, dword [eax + 8]
test eax, eax
mov esi, dword [esi]
je 0x40822d
push eax
call fcn.00409b90
mov ecx, dword [esp + 0x58]
add esp, 4
add edi, 1
cmp edi, ecx
jl 0x408215
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x70]
test eax, eax
je 0x408304
mov edi, dword [esp + 0x68]
xor ebx, ebx
test eax, eax
jle 0x4082fc
mov eax, edi
mov edi, dword [edi]
mov ebp, dword [eax + 8]
push 0x104
call fcn.00409b95
mov esi, eax
add esp, 4
test esi, esi
je 0x4082e2
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov eax, esi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x408280
sub eax, edx
cmp byte [eax + esi - 1], 0x5c
push 0x104
jne 0x40829e
push str.twain_32hpsj_
jmp 0x4082a3
push str._twain_32hpsj_
push esi
call fcn.00414532
add esp, 0xc
push 0x104
push ebp
push esi
call fcn.00414532
lea eax, [esp + 0x8c]
push eax
push esi
call fcn.00413ee3
add esp, 0x14
test eax, eax
jne 0x4082d9
mov ecx, dword [esp + 0x2c]
push 5
push esi
call fcn.00405ec0
push esi
call fcn.00409b90
add esp, 4
push ebp
call fcn.00409b90
add ebx, 1
add esp, 4
cmp ebx, dword [esp + 0x70]
jl 0x408252
mov ebp, dword [esp + 0x34]
mov edi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x30]
test ebp, ebp
je 0x408311
push ebp
call fcn.00409b90
add esp, 4
push edi
call fcn.00409b90
mov ebp, dword [esp + 0x2c]
add esp, 4
push ebx
call fcn.00409b90
add esp, 4
test ebp, ebp
je 0x408334
push ebp
call fcn.00409b90
add esp, 4
mov eax, dword [esp + 0x14]
test eax, eax
je 0x408343
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x48]
mov byte [esp + 0xb8], 1
call fcn.00402330
lea ecx, [esp + 0x64]
mov byte [esp + 0xb8], 0
call fcn.00402330
lea ecx, [esp + 0x38]
mov dword [esp + 0xb8], 0xffffffff
call fcn.004012e0
xor eax, eax
mov ecx, dword [esp + 0xb0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa8
ret 4