Function at 0x406470
Capabilities:
Get common file path
Get installed programs
Query or enumerate registry key
Read .ini file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa34
mov eax, dword [0x4431cc]
push ebx
xor eax, ebp
push esi
push edi
mov dword [esp + 0xa3c], eax
xor eax, eax
mov word [esp + 0x628], 0
mov ecx, 0x81
lea edi, [esp + 0x62a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x220]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea ecx, [esp + 0x220]
push ecx
call fcn.004144df
add esp, 4
cmp word [esp + eax*2 + 0x21e], 0x5c
je 0x4064ec
lea edx, [esp + 0x220]
push 0x4330e4
push edx
call fcn.004145d0
add esp, 8
lea eax, [esp + 0x220]
push 0x444b28
push eax
call fcn.004145d0
add esp, 8
lea ecx, [esp + 0x220]
push ecx
push 0x208
lea edx, [esp + 0x838]
push edx
push str.Failed
push 0x4330b8
push 0x447a1c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [esp + 0x830]
push eax
call fcn.00414fdb
add esp, 4
mov dword [esp + 0x1c], eax
nop
lea ecx, [esp + 0x10]
push ecx
push 8
xor ebx, ebx
push ebx
push str.SYSTEMCurrentControlSetEnumUSB
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x2c], 1
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
jne 0x40664c
lea esp, [esp]
xor eax, eax
push eax
push eax
push eax
push eax
mov ecx, 0x80
lea edi, [esp + 0x438]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x43c]
push eax
push ebx
push ecx
mov dword [esp + 0x34], 0x200
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov esi, eax
inc ebx
cmp esi, 0x103
je 0x40663f
test esi, esi
jne 0x40663f
mov edx, dword [esp + 0x1c]
push edx
lea eax, [esp + 0x42c]
push eax
call fcn.00414fdb
add esp, 4
push eax
call fcn.00414f7d
add esp, 8
test eax, eax
je 0x406570
xor eax, eax
mov ecx, 0x80
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x20]
push str.SYSTEMCurrentControlSetEnumUSB_
push ecx
call fcn.004145fa
lea edx, [esp + 0x430]
push edx
lea eax, [esp + 0x2c]
push eax
call fcn.004145d0
lea ecx, [esp + 0x30]
push 0x4330e4
push ecx
call fcn.004145d0
lea edx, [esp + 0x38]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00406330
mov esi, eax
add esp, 0x20
test esi, esi
mov dword [esp + 0x18], 0
je 0x406570
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40669e
push str.UnSuccessful_in_opening_the_SYSTEMCurrentControlSetEnumUSB_Reg_key:
mov ecx, 0x44d2d0
call fcn.00402680
push str.Error:
mov ecx, 0x44d2d0
call fcn.00402680
push 0xa
lea ecx, [esp + 0x62c]
push ecx
push esi
call fcn.00414ddb
add esp, 0xc
lea edx, [esp + 0x628]
push edx
mov ecx, 0x44d2d0
call fcn.00402680
push 0x433110
mov ecx, 0x44d2d0
call fcn.00402680
test esi, esi
je 0x4066aa
cmp esi, 0x103
jne 0x4066b6
mov eax, dword [esp + 0x18]
test eax, eax
je 0x406540
lea eax, [esp + 0x10]
push eax
push 0xf003f
xor ebx, ebx
push ebx
push str.SOFTWAREHewlett_Packard_
push reloc.OLEAUT32.dll_SysReAllocString
mov edi, 1
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
jne 0x406780
mov eax, dword [esp + 0x10]
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x43c]
push edx
push ebx
push eax
mov dword [esp + 0x34], 0x100
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov esi, eax
inc ebx
cmp esi, 0x103
je 0x406773
test esi, esi
jne 0x406773
mov ecx, 0x80
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x20]
push str.SOFTWAREHewlett_Packard_
push ecx
call fcn.004145fa
lea edx, [esp + 0x430]
push edx
lea eax, [esp + 0x2c]
push eax
call fcn.004145d0
lea ecx, [esp + 0x30]
push 0x4330e4
push ecx
call fcn.004145d0
lea edx, [esp + 0x38]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00406330
mov esi, eax
add esp, 0x20
xor edi, edi
test esi, esi
je 0x4066e2
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4067d2
push str.UnSuccessful_in_opening_the_SOFTWAREHewlett_Packard_Reg_key:
mov ecx, 0x44d2d0
call fcn.00402680
push str.Error:
mov ecx, 0x44d2d0
call fcn.00402680
push 0xa
lea ecx, [esp + 0x62c]
push ecx
push esi
call fcn.00414ddb
add esp, 0xc
lea edx, [esp + 0x628]
push edx
mov ecx, 0x44d2d0
call fcn.00402680
push 0x433110
mov ecx, 0x44d2d0
call fcn.00402680
test esi, esi
je 0x4067de
cmp esi, 0x103
jne 0x4067e6
test edi, edi
je 0x4066b6
lea eax, [esp + 0x10]
push eax
push 8
xor ebx, ebx
push ebx
push str.SYSTEMControlSet001EnumUSB
push reloc.OLEAUT32.dll_SysReAllocString
mov edi, 1
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
jne 0x4068dd
nop
mov eax, dword [esp + 0x10]
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x43c]
push edx
push ebx
push eax
mov dword [esp + 0x34], 0x100
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov esi, eax
inc ebx
cmp esi, 0x103
je 0x4068d0
test esi, esi
jne 0x4068d0
lea ecx, [esp + 0x830]
push ecx
lea edx, [esp + 0x42c]
push edx
call fcn.00414fdb
add esp, 4
push eax
call fcn.00414f7d
add esp, 8
test eax, eax
je 0x406810
xor eax, eax
mov ecx, 0x80
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x20]
push str.SYSTEMControlSet001EnumUSB_
push eax
call fcn.004145fa
lea ecx, [esp + 0x430]
push ecx
lea edx, [esp + 0x2c]
push edx
call fcn.004145d0
lea eax, [esp + 0x30]
push 0x4330e4
push eax
call fcn.004145d0
lea ecx, [esp + 0x38]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00406330
mov esi, eax
add esp, 0x20
xor edi, edi
test esi, esi
je 0x406810
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40692f
push str.UnSuccessful_in_opening_the_SYSTEMControlSet001EnumUSB_Reg_key:
mov ecx, 0x44d2d0
call fcn.00402680
push str.Error:
mov ecx, 0x44d2d0
call fcn.00402680
push 0xa
lea eax, [esp + 0x62c]
push eax
push esi
call fcn.00414ddb
add esp, 0xc
lea ecx, [esp + 0x628]
push ecx
mov ecx, 0x44d2d0
call fcn.00402680
push 0x433110
mov ecx, 0x44d2d0
call fcn.00402680
test esi, esi
je 0x40693b
cmp esi, 0x103
jne 0x406943
test edi, edi
je 0x4067e6
lea edx, [esp + 0x10]
push edx
push 8
xor ebx, ebx
push ebx
push str.SYSTEMControlSet002EnumUSB
push reloc.OLEAUT32.dll_SysReAllocString
mov edi, 1
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
jne 0x406a3d
lea esp, [esp]
mov edx, dword [esp + 0x10]
push 0
push 0
push 0
push 0
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x43c]
push ecx
push ebx
push edx
mov dword [esp + 0x34], 0x100
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov esi, eax
inc ebx
cmp esi, 0x103
je 0x406a30
test esi, esi
jne 0x406a30
lea eax, [esp + 0x830]
push eax
lea ecx, [esp + 0x42c]
push ecx
call fcn.00414fdb
add esp, 4
push eax
call fcn.00414f7d
add esp, 8
test eax, eax
je 0x406970
lea edx, [esp + 0x20]
xor eax, eax
push str.SYSTEMControlSet002EnumUSB_
mov ecx, 0x80
lea edi, [esp + 0x24]
push edx
rep stosd dword es:[edi], eax
call fcn.004145fa
lea eax, [esp + 0x430]
push eax
lea ecx, [esp + 0x2c]
push ecx
call fcn.004145d0
lea edx, [esp + 0x30]
push 0x4330e4
push edx
call fcn.004145d0
lea eax, [esp + 0x38]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00406330
mov esi, eax
add esp, 0x20
xor edi, edi
test esi, esi
je 0x406970
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x406a8f
push str.UnSuccessful_in_opening_the_SYSTEMControlSet002EnumUSB_Reg_key:
mov ecx, 0x44d2d0
call fcn.00402680
push str.Error:
mov ecx, 0x44d2d0
call fcn.00402680
push 0xa
lea edx, [esp + 0x62c]
push edx
push esi
call fcn.00414ddb
add esp, 0xc
lea eax, [esp + 0x628]
push eax
mov ecx, 0x44d2d0
call fcn.00402680
push 0x433110
mov ecx, 0x44d2d0
call fcn.00402680
test esi, esi
je 0x406a9b
cmp esi, 0x103
jne 0x406aa3
test edi, edi
je 0x406943
xor eax, eax
mov ecx, 0x82
lea edi, [esp + 0x220]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x220]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea edx, [esp + 0x220]
push edx
call fcn.004144df
add esp, 4
cmp word [esp + eax*2 + 0x21e], 0x5c
je 0x406af6
lea eax, [esp + 0x220]
push 0x4330e4
push eax
call fcn.004145d0
add esp, 8
lea ecx, [esp + 0x220]
push 0x444b28
push ecx
call fcn.004145d0
add esp, 8
lea edx, [esp + 0x220]
push edx
push 0x208
lea eax, [esp + 0x838]
push eax
push str.Failed
push str.USBPrint
push 0x447a1c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
xor eax, eax
mov ecx, 0x80
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x20]
push str.SYSTEMCurrentControlSetEnumUSBPRINT_
push ecx
call fcn.004145fa
lea edx, [esp + 0x838]
push edx
lea eax, [esp + 0x2c]
push eax
call fcn.004145d0
lea ecx, [esp + 0x30]
push 0x4330e4
push ecx
call fcn.004145d0
lea edx, [esp + 0x38]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00406330
xor eax, eax
push str.HP_LaserJet_P100
mov ecx, 0x40
lea edi, [esp + 0x44]
push 0x4444e0
rep stosd dword es:[edi], eax
call fcn.00414f7d
add esp, 0x28
test eax, eax
je 0x406bc5
lea eax, [esp + 0x20]
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstallHP_LaserJet_P1000_series_
push eax
call fcn.004145fa
lea ecx, [esp + 0x28]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00406330
add esp, 0x10
push str.HP_LaserJet_P150
push 0x4444e0
call fcn.00414f7d
add esp, 8
test eax, eax
je 0x406bfc
lea edx, [esp + 0x20]
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstallHP_LaserJet_P1500_series_
push edx
call fcn.004145fa
lea eax, [esp + 0x28]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00406330
add esp, 0x10
mov ecx, dword [esp + 0xa3c]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.00414a22
mov esp, ebp
pop ebp
ret