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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x82c
mov eax, dword [0x43f194]
push ebx
push esi
mov dword [esp + 0x830], eax
push edi
lea eax, [esp + 0x220]
push eax
push 0x104
mov dword [esp + 0x1c], ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea ecx, [esp + 0x220]
push ecx
call fcn.0041156a
add esp, 4
cmp word [esp + eax*2 + 0x21e], 0x5c
je 0x402f52
lea edx, [esp + 0x220]
push 0x4301a0
push edx
call fcn.004115bd
add esp, 8
lea eax, [esp + 0x220]
push 0x440ae0
push eax
call fcn.004115bd
add esp, 8
lea ecx, [esp + 0x220]
push ecx
push 0x104
lea edx, [esp + 0x630]
push edx
push str.Failed
push str.USBHardwareID
push str.Setup.HP_LaserJet_M1005
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [esp + 0xc]
push eax
push 8
xor ebx, ebx
push ebx
push str.SYSTEMCurrentControlSetEnumUSB
push reloc.OLEAUT32.dll_SysReAllocString
mov edi, 1
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
jne 0x403084
lea ebx, [ebx]
mov eax, dword [esp + 0xc]
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x43c]
push edx
push ebx
push eax
mov dword [esp + 0x30], 0x100
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov esi, eax
inc ebx
cmp esi, 0x103
je 0x403084
test esi, esi
jne 0x403084
lea ecx, [esp + 0x628]
push ecx
lea edx, [esp + 0x42c]
push edx
call fcn.00411ffd
add esp, 4
push eax
call fcn.00411f9f
add esp, 8
test eax, eax
je 0x402fc0
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push str.SYSTEMCurrentControlSetEnumUSB_
push eax
call fcn.004115e7
lea ecx, [esp + 0x430]
push ecx
lea edx, [esp + 0x24]
push edx
call fcn.004115bd
lea eax, [esp + 0x28]
push 0x4301a0
push eax
call fcn.004115bd
add esp, 0x18
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x18]
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00402e50
mov esi, eax
xor edi, edi
test esi, esi
je 0x402fc0
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x40309b
cmp esi, 0x103
jne 0x4030a3
test edi, edi
je 0x402f91
lea eax, [esp + 0xc]
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 0x403194
lea esp, [esp]
mov eax, dword [esp + 0xc]
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x43c]
push edx
push ebx
push eax
mov dword [esp + 0x30], 0x100
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov esi, eax
inc ebx
cmp esi, 0x103
je 0x403194
test esi, esi
jne 0x403194
lea ecx, [esp + 0x628]
push ecx
lea edx, [esp + 0x42c]
push edx
call fcn.00411ffd
add esp, 4
push eax
call fcn.00411f9f
add esp, 8
test eax, eax
je 0x4030d0
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push str.SYSTEMControlSet001EnumUSB_
push eax
call fcn.004115e7
lea ecx, [esp + 0x430]
push ecx
lea edx, [esp + 0x24]
push edx
call fcn.004115bd
lea eax, [esp + 0x28]
push 0x4301a0
push eax
call fcn.004115bd
add esp, 0x18
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x18]
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00402e50
mov esi, eax
xor edi, edi
test esi, esi
je 0x4030d0
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x4031ab
cmp esi, 0x103
jne 0x4031b3
test edi, edi
je 0x4030a3
lea eax, [esp + 0xc]
push eax
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 0x4032a4
lea esp, [esp]
mov eax, dword [esp + 0xc]
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x43c]
push edx
push ebx
push eax
mov dword [esp + 0x30], 0x100
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov esi, eax
inc ebx
cmp esi, 0x103
je 0x4032a4
test esi, esi
jne 0x4032a4
lea ecx, [esp + 0x628]
push ecx
lea edx, [esp + 0x42c]
push edx
call fcn.00411ffd
add esp, 4
push eax
call fcn.00411f9f
add esp, 8
test eax, eax
je 0x4031e0
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push str.SYSTEMControlSet002EnumUSB_
push eax
call fcn.004115e7
lea ecx, [esp + 0x430]
push ecx
lea edx, [esp + 0x24]
push edx
call fcn.004115bd
lea eax, [esp + 0x28]
push 0x4301a0
push eax
call fcn.004115bd
add esp, 0x18
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x18]
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00402e50
mov esi, eax
xor edi, edi
test esi, esi
je 0x4031e0
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x4032bb
cmp esi, 0x103
jne 0x4032c3
test edi, edi
je 0x4031b3
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x220]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x220]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea ecx, [esp + 0x220]
push ecx
call fcn.0041156a
add esp, 4
cmp word [esp + eax*2 + 0x21e], 0x5c
je 0x403316
lea edx, [esp + 0x220]
push 0x4301a0
push edx
call fcn.004115bd
add esp, 8
lea eax, [esp + 0x220]
push 0x440ae0
push eax
call fcn.004115bd
add esp, 8
lea ecx, [esp + 0x220]
push ecx
push 0x104
lea edx, [esp + 0x630]
push edx
push str.Failed
push str.USBPrint
push str.Setup.HP_LaserJet_M1005
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push str.SYSTEMCurrentControlSetEnumUSBPRINT_
push eax
call fcn.004115e7
lea ecx, [esp + 0x630]
push ecx
lea edx, [esp + 0x24]
push edx
call fcn.004115bd
lea eax, [esp + 0x28]
push 0x4301a0
push eax
call fcn.004115bd
mov ebx, dword [esp + 0x2c]
add esp, 0x18
lea ecx, [esp + 0x18]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
mov ecx, ebx
call fcn.00402e50
lea edx, [esp + 0x18]
xor eax, eax
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstallHP_LaserJet_M1005_MFP_
mov ecx, 0x41
lea edi, [esp + 0x1c]
push edx
rep stosd dword es:[edi], eax
call fcn.004115e7
add esp, 8
lea eax, [esp + 0x18]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
mov ecx, ebx
call fcn.00402e50
mov ecx, dword [esp + 0x834]
mov eax, esi
call fcn.00411bef
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret