Function at 0x477780
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push 0xffffffffffffffff
push 0x4ec640
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x10]
push 0
push eax
push ecx
mov dword [esp + 0x34], 0
call sub.WINSPOOL.DRV_OpenPrinterA
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
push 0
push 0
push 5
push eax
call sub.WINSPOOL.DRV_GetPrinterA
mov ecx, dword [esp + 0x14]
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push ecx
push 0x42
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
push esi
call edi
mov ecx, dword [esp + 0x10]
mov ebp, eax
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x14]
push edx
push eax
push ebp
push 5
push ecx
call sub.WINSPOOL.DRV_GetPrinterA
mov edx, dword [ebp + 4]
lea ecx, [esp + 0x18]
push edx
call sub.MFC42.DLL_CString::CString_2
push esi
mov byte [esp + 0x2c], 1
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x10]
push 0
push 0
push 0
push eax
push ecx
push 0
call sub.WINSPOOL.DRV_DocumentPropertiesA
push eax
push 0x42
call ebx
mov ebp, eax
push ebp
call edi
mov edx, dword [esp + 0x30]
push 2
push 0
push eax
mov eax, dword [esp + 0x1c]
push edx
push eax
push 0
call sub.WINSPOOL.DRV_DocumentPropertiesA
mov ecx, dword [esp + 0x10]
push ecx
call sub.WINSPOOL.DRV_ClosePrinter
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x18]
mov eax, dword [edx - 8]
mov ecx, dword [ecx - 8]
lea edx, [ecx + eax + 0x14]
push edx
push 0x42
call ebx
mov ebx, eax
push ebx
call edi
mov edx, eax
or ecx, 0xffffffff
mov edi, str.WINSPOOL
push ebp
mov word [edx], 8
mov word [edx + 2], 9
mov eax, dword [esp + 0x34]
lea esi, [edx + 8]
mov dword [esp + 0x20], esi
mov eax, dword [eax - 8]
mov word [edx + 6], 0
add eax, 0xa
mov word [edx + 4], ax
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x20]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x34]
xor ecx, ecx
mov cx, word [edx + 2]
mov esi, ecx
or ecx, 0xffffffff
add esi, edx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x20], esi
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x20]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x1c]
xor ecx, ecx
mov cx, word [edx + 4]
mov esi, ecx
or ecx, 0xffffffff
add esi, edx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, esi
mov edx, ecx
mov esi, edi
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
call esi
push ebx
call esi
call sub.MFC42.DLL_AfxGetModuleState
mov eax, dword [eax + 4]
push 1
push ebp
push ebx
mov ecx, eax
call sub.MFC42.DLL_CWinApp::SelectPrinter
lea ecx, [esp + 0x18]
mov byte [esp + 0x28], 0
call fcn.004e2712
lea ecx, [esp + 0x30]
mov dword [esp + 0x28], 0xffffffff
call fcn.004e2712
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c
ret