Function at 0x40c2e0
Capabilities:
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x3f4
mov eax, dword [0x4630b0]
xor eax, esp
mov dword [esp + 0x3f0], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
imul edi, edi, 0x1008
add edi, dword [0x464bc0]
xor esi, esi
push esi
push esi
mov dword [esp + 0xe0], esi
mov dword [esp + 0x5c], esi
mov ecx, dword [edi + 0xa10]
mov edx, dword [ecx + 0x24]
push 0x147
push 0xcc
push eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x50], esi
mov ebx, 1
mov dword [esp + 0x94], esi
mov dword [esp + 0x8c], edx
mov byte [esp + 0x304], 0
mov byte [esp + 0x1fc], 0
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
test eax, eax
jge 0x40c38b
push 0x8b
call fcn.0040ae20
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3f0]
xor ecx, esp
call fcn.0043b3fc
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x5c]
lea ecx, [esp + 0xe8]
push ecx
push eax
push 0x148
push 0xcc
push edx
call dword [sym.imp.USER32.dll_SendDlgItemMessageA]
cmp dword [0x4652c8], esi
jne 0x40c455
push 0
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0xf0]
push ecx
call sub.WINSPOOL.DRV_OpenPrinterA
test eax, eax
je 0x40c374
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x5c]
push 0
push 0
push 0
lea edx, [esp + 0xf4]
push edx
push eax
push ecx
call sub.WINSPOOL.DRV_DocumentPropertiesA
test eax, eax
mov dword [0x4652c8], eax
jne 0x40c3fc
mov dword [esp + 0x3c], ebx
jmp 0x40ca53
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
mov dword [0x4652cc], eax
jne 0x40c41e
mov dword [esp + 0x3c], ebx
jmp 0x40ca53
mov ecx, dword [esp + 0x5c]
push 2
push 0
push eax
mov eax, dword [esp + 0x60]
lea edx, [esp + 0xf4]
push edx
push eax
push ecx
call sub.WINSPOOL.DRV_DocumentPropertiesA
test eax, eax
jge 0x40c447
mov dword [esp + 0x3c], ebx
jmp 0x40ca53
mov edx, dword [esp + 0x54]
push edx
call sub.WINSPOOL.DRV_ClosePrinter
mov dword [esp + 0x54], esi
mov eax, dword [0x4652cc]
mov cx, word [ebp + 0x10]
mov word [eax + 0x36], cx
mov edx, dword [0x4652cc]
push edx
push 0
lea eax, [esp + 0xf0]
push eax
push 0
call dword [sym.imp.GDI32.dll_CreateDCA]
mov esi, eax
test esi, esi
jne 0x40c48a
mov dword [esp + 0x3c], ebx
jmp 0x40ca53
push 0x6e
push esi
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 0x6f
push esi
mov dword [esp + 0x74], eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 0x70
push esi
mov dword [esp + 0x68], eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov ecx, dword [esp + 0x6c]
neg eax
push 0x71
lea edx, [ecx + eax*2]
push esi
mov dword [esp + 0x74], edx
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov ecx, dword [esp + 0x60]
neg eax
push 0x58
lea edx, [ecx + eax*2]
push esi
mov dword [esp + 0x68], edx
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov ecx, dword [esp + 0x6c]
xor edx, edx
cmp dword [0x4652ac], edx
mov dword [esp + 0x90], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0xa0], edx
mov dword [esp + 0x9c], edx
mov dword [esp + 0xa4], ecx
mov dword [esp + 0xa8], eax
je 0x40c534
mov edx, dword [edi + 0xeec]
mov dword [esp + 0x40], edx
mov edx, dword [edi + 0xef0]
mov dword [esp + 0x44], edx
mov edx, dword [edi + 0xef4]
mov dword [esp + 0x48], edx
mov edx, dword [edi + 0xef8]
jmp 0x40c554
mov dword [esp + 0x44], edx
mov dword [esp + 0x40], edx
mov edx, dword [esp + 0x78]
mov edx, dword [edx + 0x114]
mov dword [esp + 0x48], edx
mov edx, dword [esp + 0x78]
mov edx, dword [edx + 0x110]
cmp dword [0x460008], 0
mov dword [esp + 0x4c], edx
je 0x40c59f
mov eax, ecx
shl eax, 8
mov dword [esp + 0x34], eax
cdq
idiv dword [esp + 0x48]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x60]
shl eax, 8
mov dword [esp + 0x50], eax
cdq
idiv dword [esp + 0x4c]
mov ecx, dword [esp + 0x58]
cmp ecx, eax
jge 0x40c595
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x34]
jmp 0x40c5d1
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x38], eax
jmp 0x40c5d1
shl eax, 8
mov dword [esp + 0x50], eax
cdq
idiv dword [edi + 0xef8]
shl ecx, 8
mov dword [esp + 0x34], ecx
mov dword [esp + 0x58], eax
mov eax, ecx
cdq
idiv dword [edi + 0xef4]
mov edx, dword [esp + 0x58]
cmp eax, edx
mov dword [esp + 0x38], eax
jl 0x40c5d1
mov dword [esp + 0x38], edx
cmp dword [esp + 0x38], 0x100
jle 0x40c69a
cmp dword [edi], 9
jne 0x40c69a
lea eax, [esp + 0xe8]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea ecx, [esp + 0x1e8]
push ecx
push 0
push 0x453718
lea edx, [esp + 0xf4]
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
lea eax, [esp + 0x2f0]
push eax
push 0
push 0x453714
lea ecx, [esp + 0xf4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
lea ecx, [esp + 0x1e8]
lea esp, [esp]
lea edx, [esp + 0x1e8]
cmp ecx, edx
lea ecx, [esp + 0x2f0]
je 0x40c654
mov ecx, edx
mov eax, dword [esp + 0x40]
lea edx, [eax + eax]
mov eax, dword [esp + 0x44]
mov dword [esp + 0x40], edx
lea edx, [eax + eax]
mov eax, dword [esp + 0x48]
mov dword [esp + 0x44], edx
lea edx, [eax + eax]
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x48], edx
lea edx, [eax + eax]
mov eax, dword [esp + 0x38]
mov dword [esp + 0x4c], edx
cdq
sub eax, edx
sar eax, 1
add ebx, ebx
cmp eax, 0x100
mov dword [esp + 0x38], eax
jg 0x40c640
mov ecx, dword [esp + 0x34]
mov eax, ecx
mov ecx, dword [esp + 0x38]
cdq
idiv ecx
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x50]
cdq
idiv ecx
mov ecx, eax
mov eax, dword [esp + 0x4c]
lea eax, [ecx + eax - 1]
cdq
idiv ecx
mov edx, dword [esp + 0x48]
mov dword [esp + 0x58], ecx
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x64], eax
lea eax, [ecx + edx - 1]
cdq
idiv ecx
mov ecx, dword [esp + 0x64]
lea edx, [esp + 0xac]
push edx
push esi
imul ecx, eax
xor eax, eax
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb8], eax
mov dword [esp + 0xa0], ecx
mov dword [esp + 0xbc], eax
mov dword [esp + 0xc0], eax
mov dword [esp + 0xc4], eax
mov dword [esp + 0xb4], 0x14
mov dword [esp + 0xb8], str.Document
call dword [sym.imp.GDI32.dll_StartDocA]
test eax, eax
jg 0x40c73b
mov dword [esp + 0x3c], 1
jmp 0x40ca53
mov eax, dword [esp + 0x38]
imul eax, ebx
mov dword [esp + 0x70], eax
push 0x7f02
push 0
fild dword [esp + 0x78]
mov dword [0x464dfc], 1
fmul qword [0x4535f0]
fstp qword [esp + 0xd8]
call dword [sym.imp.USER32.dll_LoadCursorA]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x44]
add ecx, eax
cmp eax, ecx
mov dword [esp + 0x84], 0
mov dword [esp + 0x68], eax
mov dword [esp + 0x94], ecx
jge 0x40ca4c
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x48]
add edx, ecx
mov dword [esp + 0x64], edx
cmp ecx, dword [esp + 0x64]
mov dword [esp + 0x74], ecx
jge 0x40ca37
mov eax, dword [esp + 0x34]
neg eax
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x84]
mov ecx, dword [esp + 0x98]
push ecx
add eax, 1
push eax
push 0x465158
push 0x70
mov dword [esp + 0x94], eax
call fcn.00406330
add esp, 8
push eax
lea edx, [esp + 0xf4]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [esp + 0x6c]
add esp, 0x10
lea eax, [esp + 0xe8]
push eax
push 0xcb
push ecx
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
push esi
call dword [sym.imp.GDI32.dll_StartPage]
test eax, eax
jle 0x40cae4
mov edx, dword [esp + 0x4c]
sub edx, dword [esp + 0x68]
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x58]
add eax, edx
cmp ecx, eax
jl 0x40c84f
mov ecx, eax
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x50]
cmp edx, eax
jge 0x40c85d
mov eax, edx
lea edx, [esp + 0xdc]
push edx
mov edx, dword [esp + 0x3c]
push edx
mov edx, dword [esp + 0x68]
push edx
mov edx, dword [esp + 0x78]
push edx
mov edx, dword [esp + 0x88]
push ecx
mov ecx, dword [esp + 0x88]
push eax
mov eax, dword [esp + 0x80]
push eax
push ecx
add edx, 8
push edx
push esi
call fcn.0040b0d0
mov eax, dword [esp + 0x68]
cdq
idiv ebx
add esp, 0x28
mov dword [esp + 0xc0], eax
mov eax, dword [esp + 0x44]
cdq
idiv ebx
mov dword [esp + 0xc4], eax
mov eax, dword [esp + 0x48]
cdq
idiv ebx
mov dword [esp + 0xc8], eax
mov eax, dword [esp + 0x4c]
cdq
idiv ebx
mov dword [esp + 0xcc], eax
mov eax, dword [0x4652b0]
test eax, eax
je 0x40c980
cmp dword [edi + 0x590], 0
mov dword [esp + 0x88], 0
jle 0x40c980
xor eax, eax
mov dword [esp + 0x7c], eax
mov ecx, dword [edi + 0x594]
add eax, ecx
cmp dword [eax + 4], 0
je 0x40c957
mov edx, dword [edi + 0xa10]
fld qword [esp + 0xd0]
mov ecx, dword [edx + 0x20]
push 0
mov eax, dword [eax + 8]
push 0
push 2
push ecx
mov ecx, dword [esp + 0x80]
push 0
lea edx, [esp + 0xd4]
push edx
sub esp, 0x10
fst qword [esp + 8]
lea edx, [esp + 0xc4]
fstp qword [esp]
push ecx
push edx
push esi
push 0xffffffffffffffff
push eax
push 0
call fcn.00425210
add esp, 0x40
mov ecx, dword [esp + 0x88]
mov eax, dword [esp + 0x7c]
add ecx, 1
add eax, 0xc
cmp ecx, dword [edi + 0x590]
mov dword [esp + 0x88], ecx
mov dword [esp + 0x7c], eax
jl 0x40c8fd
mov eax, dword [0x4652b0]
mov ecx, dword [edi + 0x5a4]
test ecx, ecx
je 0x40c9e6
cmp dword [edi + 0x598], 0
je 0x40c998
cmp eax, 1
je 0x40c99d
cmp eax, 2
jne 0x40c9e6
mov edx, dword [edi + 0xa10]
fld qword [esp + 0xd0]
mov eax, dword [edx + 0x20]
push 0
push 0
push 2
push eax
mov eax, dword [esp + 0x80]
push 0
lea edx, [esp + 0xd4]
push edx
sub esp, 0x10
fst qword [esp + 8]
lea edx, [esp + 0xc4]
fstp qword [esp]
push eax
push edx
push esi
push 0xffffffffffffffff
push ecx
push 0
call fcn.00425210
add esp, 0x40
mov eax, dword [esp + 0x90]
push eax
lea ecx, [esp + 0xa0]
push ecx
push esi
call fcn.004085e0
add esp, 0xc
push esi
call dword [sym.imp.GDI32.dll_EndPage]
test eax, eax
jle 0x40caea
mov eax, dword [esp + 0x74]
add eax, dword [esp + 0x34]
mov edx, dword [esp + 0x8c]
add dword [esp + 0x50], edx
cmp eax, dword [esp + 0x64]
mov dword [esp + 0x74], eax
jl 0x40c7d5
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x40]
add eax, dword [esp + 0x58]
cmp eax, dword [esp + 0x94]
mov dword [esp + 0x68], eax
jl 0x40c7b2
push esi
call dword [sym.imp.GDI32.dll_EndDoc]
mov eax, dword [esp + 0x80]
test eax, eax
mov dword [0x464dfc], 0
je 0x40ca6f
push eax
call dword [sym.imp.USER32.dll_SetCursor]
mov eax, dword [esp + 0x5c]
push 0x45354b
push 0xcb
push eax
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
test esi, esi
je 0x40ca8f
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
cmp byte [esp + 0x1e8], 0
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
je 0x40caa9
lea ecx, [esp + 0x1e8]
push ecx
call esi
cmp byte [esp + 0x2f0], 0
je 0x40cabd
lea edx, [esp + 0x2f0]
push edx
call esi
mov eax, dword [esp + 0x54]
test eax, eax
je 0x40cacb
push eax
call sub.WINSPOOL.DRV_ClosePrinter
mov ecx, dword [esp + 0x3fc]
mov eax, dword [esp + 0x3c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0043b3fc
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x3c], 1
jmp 0x40ca53