Function at 0x407200
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x422348]
movups xmm0, xmmword [str.out.print]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push esi
push edi
mov edi, dword [eax + 8]
mov eax, dword [0x41f494]
push 0
push 0
push 0xffffffffffffffff
push edi
push 0
push 0xfde9
movups xmmword [ebp - 0x48], xmm0
mov dword [ebp - 0x38], eax
call ebx
mov esi, eax
test esi, esi
je 0x407541
inc esi
lea ecx, [esi + esi]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x407541
push esi
push eax
push 0xffffffffffffffff
push edi
push 0
push 0xfde9
call ebx
test eax, eax
je 0x40752f
mov esi, dword [sym.imp.WINSPOOL.DRV_EnumPrintersW]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push 0
push 0
push 2
push 0
push 6
call esi
push dword [ebp - 4]
call fcn.004092c0
add esp, 4
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x4072f2
cmp dword [0x422398], eax
je 0x40752f
push eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
push str.Failed_to_allocate_memory_for_printer_list.
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, dword [sym.imp.KERNEL32.dll_WriteConsoleW]
push eax
push str.Failed_to_allocate_memory_for_printer_list.
push dword [0x422398]
call esi
push 0
lea eax, [ebp - 0xc]
push eax
push 1
push 0x41eeac
push dword [0x422398]
call esi
jmp 0x40752f
push str.Arial
push 0
push 5
push 0
push 8
push 1
push 0
push 0
push 0
push 0x190
push 0
push 0
push 0
push 0x32
call dword [sym.imp.GDI32.dll_CreateFontW]
mov edi, eax
mov dword [ebp - 0x20], edi
test edi, edi
jne 0x40736f
cmp dword [0x422398], eax
je 0x40752f
push eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
push str.Failed_to_retrieve_font.
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, dword [sym.imp.KERNEL32.dll_WriteConsoleW]
push eax
push str.Failed_to_retrieve_font.
push dword [0x422398]
call esi
push edi
lea eax, [ebp - 0xc]
push eax
push 1
push 0x41eeac
push dword [0x422398]
call esi
jmp 0x40752f
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push dword [ebp - 0xc]
push 2
push 0
push 6
call esi
test eax, eax
je 0x4074d3
xor ebx, ebx
mov dword [ebp - 0x10], ebx
cmp dword [ebp - 8], ebx
jbe 0x40751d
mov eax, dword [ebp - 0xc]
add eax, 4
mov dword [ebp - 0x18], eax
push 0
push 0
push dword [eax]
push 0
call dword [sym.imp.GDI32.dll_CreateDCW]
mov esi, eax
test esi, esi
jne 0x407405
cmp dword [0x422398], eax
je 0x4074bb
push eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
push str.Failed_to_retrieve_printer.
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, dword [sym.imp.KERNEL32.dll_WriteConsoleW]
push eax
push str.Failed_to_retrieve_printer.
push dword [0x422398]
call esi
push 0
lea eax, [ebp - 0x10]
push eax
push 1
push 0x41eeac
push dword [0x422398]
call esi
jmp 0x4074bb
push edi
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
lea eax, [ebp - 0x48]
mov dword [ebp - 0x34], 0x14
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x34]
push eax
push esi
mov dword [ebp - 0x30], str.MyDocument
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
call dword [sym.imp.GDI32.dll_StartDocW]
push esi
call dword [sym.imp.GDI32.dll_StartPage]
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push 0x41eeac
push dword [ebp - 0x1c]
mov ebx, 0x64
call fcn.0040aac4
mov edi, eax
add esp, 0xc
test edi, edi
je 0x407496
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push edi
push ebx
push 0x64
push esi
call dword [sym.imp.GDI32.dll_TextOutW]
lea eax, [ebp - 0x14]
add ebx, 0x37
push eax
push 0x41eeac
push 0
call fcn.0040aac4
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x407467
push esi
call dword [sym.imp.GDI32.dll_EndPage]
push esi
call dword [sym.imp.GDI32.dll_EndDoc]
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebx, dword [ebp - 0x10]
mov edi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x18]
inc ebx
add eax, 0x54
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x18], eax
cmp ebx, dword [ebp - 8]
jb 0x4073a4
jmp 0x40751d
cmp dword [0x422398], 0
je 0x40751d
push 0
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
push str.Failed_to_retrieve_printer_list.
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, dword [sym.imp.KERNEL32.dll_WriteConsoleW]
push eax
push str.Failed_to_retrieve_printer_list.
push dword [0x422398]
call esi
push 0
lea eax, [ebp - 0x18]
push eax
push 1
push 0x41eeac
push dword [0x422398]
call esi
push edi
call dword [sym.imp.GDI32.dll_DeleteObject]
push dword [ebp - 0xc]
call fcn.004092cb
add esp, 4
push dword [ebp - 0x1c]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret