Function at 0x40b950
Capabilities:
Copy file
Resolve function by parsing pe exports
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42a6f8
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x43b010]
xor eax, esp
mov dword [esp + 0x60], eax
push ebx
push esi
push edi
mov eax, dword [0x43b010]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
xor bl, bl
mov dword [esp + 0x6c], 7
xor eax, eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x68], 0
mov word [esp + 0x58], ax
mov dword [esp + 0x80], eax
lea eax, [esp + 0x58]
push eax
push 0x43c7b0
call fcn.0040df90
test al, al
je 0x40bc45
xor eax, eax
mov dword [esp + 0x54], 7
mov dword [esp + 0x50], 0
mov word [esp + 0x40], ax
mov byte [esp + 0x80], 1
xor ebx, ebx
mov dword [esp + 0x1c], eax
mov ecx, 2
mov eax, 0x400
mul ecx
seto bl
xor esi, esi
neg ebx
mov dword [esp + 0x24], esi
or ebx, eax
cmp dword [0x43e5c0], esi
jne 0x40ba16
call fcn.00415650
mov dword [0x43e5c0], eax
test eax, eax
je 0x40ba2f
lea eax, [esp + 0x24]
push eax
mov eax, dword [ebp + 4]
cdq
push edx
push eax
push 1
push ebx
call dword [0x43e5c0]
add esp, 0x14
mov esi, eax
sub esp, 0x18
xor eax, eax
mov ecx, esp
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [esp + 0x78]
push eax
call fcn.0040a370
lea eax, [esp + 0x40]
push eax
call fcn.0040bc80
lea eax, [esp + 0x14]
mov byte [esp + 0x80], 2
push eax
push str.SoftwareHewlett_PackardDMCUserDefinedCFM
push 0x80000002
mov dword [esp + 0x20], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
je 0x40baaf
push 0
lea eax, [esp + 0x18]
push eax
push 0
push 0x20006
push 0
push 0
push 0
push str.SoftwareHewlett_PackardDMCUserDefinedCFM
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x40badd
mov eax, dword [esp + 0x38]
lea ecx, [esp + 0x28]
cmp dword [esp + 0x3c], 8
cmovae ecx, dword [esp + 0x28]
lea eax, [eax*2 + 2]
push eax
push ecx
push 1
push 0
push str.CFMFileName
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x40bc04
cmp dword [esp + 0x38], 0
je 0x40bbdd
mov ebx, dword [sym.imp.WINSPOOL.DRV_GetPrinterDriverDirectoryW]
lea eax, [esp + 0x1c]
push eax
push 0x400
push esi
push 1
push 0
push 0
call ebx
mov edi, dword [esp + 0x1c]
cmp edi, 0x800
jbe 0x40bb57
shr edi, 1
mov ecx, esi
sub edi, 0xffffff80
call fcn.00414500
xor ecx, ecx
mov eax, edi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
call fcn.00414590
mov esi, eax
test esi, esi
je 0x40bb57
lea eax, [esp + 0x1c]
push eax
push edi
push esi
push 1
push 0
push 0
call ebx
cmp word [esi], 0
jne 0x40bb61
xor ecx, ecx
jmp 0x40bb75
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40bb66
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [esp + 0x48]
call fcn.0040adb0
push 3
push 0x435b58
lea ecx, [esp + 0x48]
call fcn.0040acc0
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x4c]
call fcn.0040a2a0
cmp dword [esp + 0x54], 8
lea ecx, [esp + 0x40]
push 0
cmovae ecx, dword [esp + 0x44]
lea eax, [esp + 0x5c]
cmp dword [esp + 0x70], 8
push ecx
cmovae eax, dword [esp + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov ecx, dword [esp + 0x18]
test eax, eax
movzx ecx, cl
mov edx, 1
cmovne ecx, edx
mov dword [esp + 0x18], ecx
mov eax, dword [0x43e5bc]
mov dword [esp + 0x20], esi
test eax, eax
jne 0x40bbf8
call fcn.004156f0
mov dword [0x43e5bc], eax
test eax, eax
je 0x40bc04
lea ecx, [esp + 0x20]
push 1
push ecx
call eax
add esp, 8
cmp dword [esp + 0x3c], 8
jb 0x40bc17
push dword [esp + 0x28]
call fcn.004144c0
add esp, 4
xor eax, eax
mov dword [esp + 0x3c], 7
cmp dword [esp + 0x54], 8
mov dword [esp + 0x38], 0
mov word [esp + 0x28], ax
jb 0x40bc41
push dword [esp + 0x40]
call fcn.004144c0
add esp, 4
mov ebx, dword [esp + 0x18]
cmp dword [esp + 0x6c], 8
jb 0x40bc58
push dword [esp + 0x58]
call fcn.004144c0
add esp, 4
mov al, bl
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.0041729b
mov esp, ebp
pop ebp
ret