Function at 0x4010c0
Capabilities:
Copy file
Get common file path
Set file attributes
Set registry value

Disassembly:
sub esp, 0x9f4
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x9f0], eax
push ebx
push esi
mov esi, dword [esp + 0xa08]
push edi
push str.HP_LaserJet
push esi
call fcn.004016c6
add esp, 8
test eax, eax
je 0x401245
xor ebx, ebx
push 0x206
lea eax, [esp + 0x462]
push ebx
push eax
mov word [esp + 0x468], bx
call fcn.00401c50
push 0x103
lea ecx, [esp + 0x29]
push ebx
push ecx
mov byte [esp + 0x30], bl
call fcn.00401c50
push 0x103
lea edx, [esp + 0x23d]
push ebx
push edx
mov byte [esp + 0x244], bl
call fcn.00401c50
add esp, 0x24
push 0x104
lea eax, [esp + 0x460]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea ecx, [esp + 0x45c]
push ecx
call fcn.00401050
push esi
mov edi, eax
call fcn.00401050
lea esi, [esp + 0x20]
add esp, 8
mov ecx, edi
sub esi, edi
mov dl, byte [ecx]
mov byte [esi + ecx], dl
add ecx, 1
cmp dl, bl
jne 0x401175
lea ecx, [esp + 0x18]
add ecx, 0xffffffff
mov dl, byte [ecx + 1]
add ecx, 1
cmp dl, bl
jne 0x401188
mov edx, dword [str._rundll32.exe]
mov dword [ecx], edx
mov edx, dword [0x40a390]
mov dword [ecx + 4], edx
mov edx, dword [0x40a394]
mov dword [ecx + 8], edx
mov dx, word [0x40a398]
mov word [ecx + 0xc], dx
mov ecx, 8
mov esi, str.printui.dll_PrintUIEntry__k__n__
lea edi, [esp + 0x220]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov ecx, eax
lea ecx, [ecx]
mov dl, byte [eax]
add eax, 1
cmp dl, bl
jne 0x4011d0
lea edi, [esp + 0x220]
sub eax, ecx
mov esi, ecx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
cmp cl, bl
jne 0x4011e7
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x220]
add edi, 0xffffffff
lea esp, [esp]
mov al, byte [edi + 1]
add edi, 1
cmp al, bl
jne 0x401210
mov ax, word [0x40a364]
push ebx
lea ecx, [esp + 0x224]
push ecx
push str.rundll32.exe
lea edx, [esp + 0x24]
push edx
push 1
mov word [edi], ax
call fcn.00401bec
add esp, 0x14
jmp 0x4016aa
push esi
call fcn.00401b83
push str.WIN7
push eax
call fcn.004016c6
add esp, 0xc
test eax, eax
je 0x4013d2
push str.DIFxAPI.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
xor ebx, ebx
cmp eax, ebx
mov dword [esp + 0x14], eax
je 0x4016aa
push ebp
push str.DriverPackageInstallW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebp, eax
cmp ebp, ebx
je 0x4013c1
push 0x206
lea eax, [esp + 0x466]
push ebx
push eax
mov word [esp + 0x46c], bx
call fcn.00401c50
add esp, 0xc
lea ecx, [esp + 0x1c]
push ecx
push 0x104
mov dword [esp + 0x18], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [esp + 0x1c]
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4012d0
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x1a], 0x5c
je 0x401304
lea edi, [esp + 0x1c]
add edi, 0xfffffffe
mov edi, edi
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x4012f0
mov edx, dword [0x40a314]
mov dword [edi], edx
push esi
call fcn.00401b83
push str.1005
push eax
call fcn.004016c6
lea edi, [esp + 0x28]
add esp, 0xc
add edi, 0xfffffffe
test eax, eax
je 0x401336
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x401323
mov esi, str.HPLJP1005.INF
jmp 0x401347
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x401336
mov esi, str.HPLJP1002.INF
lea eax, [esp + 0x10]
push eax
push ebx
push 0x104
mov ecx, 7
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x46c]
push ecx
push ebx
push 1
push ebx
lea edx, [esp + 0x38]
push edx
call dword [sym.imp.SETUPAPI.dll_SetupCopyOEMInfW]
cmp dword [esp + 0x10], ebx
je 0x4013c1
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x3e8
call esi
lea eax, [esp + 0x14]
push eax
push ebx
push 0x14
lea ecx, [esp + 0x28]
push ecx
mov dword [esp + 0x24], ebx
call ebp
cmp eax, ebx
je 0x4013c1
lea ebx, [ebx]
cmp eax, 0xb7
je 0x4013c1
push 0x7d0
call esi
lea edx, [esp + 0x14]
push edx
push ebx
push 0x14
lea eax, [esp + 0x28]
push eax
call ebp
cmp eax, ebx
jne 0x4013a0
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop ebp
jmp 0x4016aa
push esi
call fcn.00401b83
push str..INF
push eax
call fcn.004016c6
add esp, 0xc
xor ebx, ebx
test eax, eax
je 0x4015b1
push 0x206
lea edx, [esp + 0x1e]
push ebx
push edx
mov word [esp + 0x24], bx
call fcn.00401c50
push 0x206
lea eax, [esp + 0x232]
push ebx
push eax
mov word [esp + 0x238], bx
call fcn.00401c50
add esp, 0x18
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x10]
push edx
push ebx
push 0xf003f
push ebx
push ebx
push ebx
push str.SOFTWAREWow6432NodeHewlett_PackardHP_LaserJet_P1000_1500Installer
push ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x38], ebx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
lea eax, [esp + 0x18]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [esp + 0x18]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x401465
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x16], 0x5c
je 0x401497
lea edi, [esp + 0x18]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x401483
mov ecx, dword [0x40a314]
mov dword [edi], ecx
mov eax, esi
mov edx, esi
jmp 0x4014a0
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4014a0
lea edi, [esp + 0x18]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x4014b4
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push ebx
lea edx, [esp + 0x14]
push edx
push 0x104
mov ecx, eax
lea eax, [esp + 0x22c]
push eax
push 8
and ecx, 3
push 1
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.SETUPAPI.dll_SetupCopyOEMInfW]
push ebx
lea ecx, [esp + 0x34]
push ecx
call esi
cmp eax, ebx
jne 0x401581
push ebx
lea edx, [esp + 0x14]
push edx
push 0x104
lea eax, [esp + 0x22c]
push eax
push 2
push 1
push ebx
lea ecx, [esp + 0x34]
push ecx
call esi
cmp eax, ebx
jne 0x401581
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
je 0x4016aa
push 0xa
lea edx, [esp + 0x42c]
push edx
push eax
call fcn.00401904
mov eax, dword [esp + 0x18]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
add esp, 0xc
push 0x104
push str.ERROR
push 1
push ebx
push str.OEMFile
push eax
call esi
mov ecx, dword [esp + 0xc]
push 4
push eax
push 4
push ebx
push str.OEMErrorCode
push ecx
call esi
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4016aa
mov ecx, dword [esp + 0xc]
push 0x104
lea eax, [esp + 0x224]
push eax
push 1
push ebx
push str.OEMFile
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4016aa
push 0x190
lea eax, [esp + 0x870]
push ebx
push eax
call fcn.00401c50
add esp, 0xc
xor eax, eax
lea esp, [esp]
movzx ecx, word [eax + str.C:WINDOWSSYSTEM32HP1006LM.DLL]
mov word [esp + eax + 0x86c], cx
add eax, 2
cmp cx, bx
jne 0x4015d0
lea ecx, [esp + 0x664]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [esp + 0x664]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x401604
sub eax, edx
sar eax, 1
cmp word [esp + eax*2 + 0x662], 0x5c
je 0x401644
lea edi, [esp + 0x664]
add edi, 0xfffffffe
jmp 0x401630
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x401630
mov edx, dword [0x40a314]
mov dword [edi], edx
lea edi, [esp + 0x664]
add edi, 0xfffffffe
mov edi, edi
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x401650
mov ecx, 6
mov esi, str.HP1006LM.DLL
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
call fcn.00401000
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0x80
lea eax, [esp + 0x668]
push eax
call esi
push 0x80
lea ecx, [esp + 0x870]
push ecx
call esi
push ebx
lea edx, [esp + 0x870]
push edx
lea eax, [esp + 0x66c]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov ecx, dword [esp + 0x9fc]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00401c39
add esp, 0x9f4
ret 0x10