Function at 0x4021b0
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x84c
mov eax, dword [0x4432d4]
mov edx, dword [0x434c20]
mov dword [esp + 0x848], eax
mov eax, dword [str.HNCE2PPRDRV80.dll]
mov dword [esp + 0x114], eax
mov eax, dword [0x434c24]
mov dword [esp + 0x120], eax
xor eax, eax
mov dword [esp + 0x11c], edx
mov edx, dword [str.HNCE2PPRUI80.dll]
push ebx
mov ebx, ecx
mov ecx, dword [0x434c1c]
mov dword [esp + 0x11c], ecx
mov cx, word [0x434c28]
mov word [esp + 0x128], cx
push esi
push edi
mov ecx, 0x3c
lea edi, [esp + 0x132]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [0x434c00]
mov ecx, dword [0x434c04]
mov dword [esp + 0x22d], ecx
mov dword [esp + 0x229], eax
mov al, byte [0x434c0c]
mov byte [esp + 0x235], al
mov dword [esp + 0x225], edx
mov edx, dword [0x434c08]
xor eax, eax
mov dword [esp + 0x231], edx
mov edx, dword [0x434d20]
mov ecx, 0x3d
lea edi, [esp + 0x236]
rep stosd dword es:[edi], eax
mov eax, dword [0x434d24]
mov ecx, dword [str.HNCE2PPRCONV80.exe]
mov dword [esp + 0x32a], ecx
mov ecx, dword [0x434d28]
mov dword [esp + 0x336], ecx
mov dword [esp + 0x332], eax
mov al, byte [0x434d2e]
mov byte [esp + 0x33c], al
mov dword [esp + 0x32e], edx
mov dx, word [0x434d2c]
xor eax, eax
mov word [esp + 0x33a], dx
mov edx, dword [0x434d10]
mov ecx, 0x3c
lea edi, [esp + 0x33d]
rep stosd dword es:[edi], eax
mov ecx, dword [str.HNCE2PT80.dll]
stosw word es:[edi], ax
mov eax, dword [0x434d14]
mov dword [esp + 0x42f], ecx
mov cx, word [0x434d18]
mov word [esp + 0x43b], cx
mov dword [esp + 0x437], eax
xor eax, eax
mov dword [esp + 0x433], edx
mov ecx, 0x3d
lea edi, [esp + 0x43d]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x19]
mov byte [esp + 0x18], 0
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x539]
mov byte [esp + 0x538], al
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x641]
mov byte [esp + 0x640], al
rep stosd dword es:[edi], eax
mov byte [esp + 0x748], al
lea edx, [esp + 0x10]
push edx
push 0x104
mov ecx, 0x41
lea edi, [esp + 0x751]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x20]
push eax
push 1
lea esi, [ebx + 0x140]
push esi
push 0
mov dword [esp + 0x28], 0x104
call sub.WINSPOOL.DRV_GetPrinterDriverDirectoryA
lea edi, [ebx + 8]
push str.Copy_to_GetPrinterDriverDirectory
mov ecx, edi
mov dword [esp + 0x18], eax
call fcn.004012b0
lea ecx, [esp + 0x18]
push ecx
mov ecx, edi
call fcn.004012b0
push str.Windows_x64
push esi
call fcn.0040dc17
add esp, 8
test eax, eax
jne 0x4023d3
mov edx, dword [ebx]
push edx
push str._sx64
lea eax, [esp + 0x750]
push eax
jmp 0x4023f5
push str.Windows_NT_x86
push esi
call fcn.0040dc17
add esp, 8
test eax, eax
jne 0x4023fe
mov ecx, dword [ebx]
push ecx
push str._sx86
lea edx, [esp + 0x750]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov dword [esp + 0xc], 0
lea esi, [esp + 0x120]
lea ecx, [ecx]
push str.HNCE2PPRCONV80.exe
push esi
call fcn.0040dc17
add esp, 8
test eax, eax
jne 0x40243c
lea eax, [esp + 0x18]
mov edx, eax
mov ecx, ebx
sub ecx, edx
lea edx, [ecx + 0x158]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x402432
push esi
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x540]
push str._s_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
push esi
lea edx, [esp + 0x75c]
push edx
lea eax, [esp + 0x658]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x20
push 0
lea ecx, [esp + 0x53c]
push ecx
lea edx, [esp + 0x648]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x4024bf
mov eax, dword [esp + 0xc]
inc eax
add esi, 0x105
cmp eax, 4
mov dword [esp + 0xc], eax
jl 0x402410
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x854]
call fcn.0040da9f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Copy_File_Error
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, edi
call fcn.004012d0
lea eax, [esp + 0x538]
push eax
mov ecx, edi
call fcn.004012b0
lea ecx, [esp + 0x640]
push ecx
mov ecx, edi
call fcn.004012b0
mov ecx, dword [esp + 0x854]
mov dword [ebx + 4], 4
xor eax, eax
call fcn.0040da9f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret