Function at 0x40d310
Capabilities:
Check for time delay via gettickcount

Disassembly:
push 0xffffffffffffffff
push 0x4165bd
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3b8
push ebx
push ebp
mov ebp, ecx
push esi
push edi
lea ecx, [esp + 0x60]
call sub.MFC42.DLL_CPrintInfo::CPrintInfo
mov eax, dword [ebp]
xor esi, esi
lea ecx, [esp + 0x60]
push esi
push ecx
mov ecx, ebp
mov dword [esp + 0x3d8], esi
call dword [eax + 0x10]
test al, al
je 0x40dbfa
lea ecx, [esp + 0x34]
call fcn.004143d2
mov edx, dword [esp + 0x60]
mov byte [esp + 0x3d0], 1
mov eax, dword [edx + 0x60]
test byte [eax + 0x14], 0x20
je 0x40d521
push 0xf045
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::CString_2
push 0xf046
lea ecx, [esp + 0x40]
mov byte [esp + 0x3d4], 2
call sub.MFC42.DLL_CString::CString_2
push 0xf047
lea ecx, [esp + 0x3c]
mov byte [esp + 0x3d4], 3
call sub.MFC42.DLL_CString::CString_2
mov bl, 4
push 0xf048
lea ecx, [esp + 0x14]
mov byte [esp + 0x3d4], bl
call sub.MFC42.DLL_CString::CString_2
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x1c]
push esi
push ecx
push 6
push edx
push eax
push esi
lea ecx, [esp + 0x1e4]
mov byte [esp + 0x3e8], 5
call sub.MFC42.DLL_CFileDialog::CFileDialog
mov ecx, dword [esp + 0x10]
mov byte [esp + 0x3d0], 6
mov dword [esp + 0x25c], ecx
lea ecx, [esp + 0x1cc]
call sub.MFC42.DLL_CFileDialog::DoModal
cmp eax, 1
je 0x40d482
lea ecx, [esp + 0x27c]
mov byte [esp + 0x3d0], 7
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1cc]
mov byte [esp + 0x3d0], 5
call fcn.00414492
lea ecx, [esp + 0x10]
mov byte [esp + 0x3d0], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x38]
mov byte [esp + 0x3d0], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x3c]
mov byte [esp + 0x3d0], 2
call sub.MFC42.DLL_CString::CString
mov byte [esp + 0x3d0], 1
lea ecx, [esp + 0x1c]
jmp 0x40dbe4
lea edx, [esp + 0x18]
lea ecx, [esp + 0x1cc]
push edx
call sub.MFC42.DLL_CFileDialog::GetPathName
push eax
lea ecx, [esp + 0x38]
mov byte [esp + 0x3d4], 8
call fcn.00414408
lea ecx, [esp + 0x18]
mov byte [esp + 0x3d0], 6
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x27c]
mov byte [esp + 0x3d0], 9
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1cc]
mov byte [esp + 0x3d0], 5
call fcn.00414492
lea ecx, [esp + 0x10]
mov byte [esp + 0x3d0], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x38]
mov byte [esp + 0x3d0], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x3c]
mov byte [esp + 0x3d0], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x3d0], 1
call sub.MFC42.DLL_CString::CString
xor eax, eax
lea ecx, [esp + 0x40]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x4c], 0x14
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x50], eax
call fcn.004143d2
mov eax, dword [esp + 0x34]
mov byte [esp + 0x3d0], 0xa
cmp dword [eax - 8], esi
jne 0x40d59c
lea ecx, [esp + 0x18]
mov dword [esp + 0x54], esi
push ecx
mov ecx, dword [esp + 0x64]
call sub.MFC42.DLL_CPrintDialog::GetPortName
push eax
lea ecx, [esp + 0x44]
mov byte [esp + 0x3d4], 0xb
call fcn.00414408
lea ecx, [esp + 0x18]
mov byte [esp + 0x3d0], 0xa
call sub.MFC42.DLL_CString::CString
mov ebx, 0xf040
jmp 0x40d5a5
mov dword [esp + 0x54], eax
mov ebx, 0xf049
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CDC::CDC
mov edx, dword [esp + 0x60]
mov byte [esp + 0x3d0], 0xc
mov eax, dword [edx + 0x60]
mov ecx, dword [eax + 0x10]
push ecx
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CDC::Attach
mov edx, dword [esp + 0x28]
mov edi, dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 0xa
push edx
mov dword [esp + 0x34], 1
call edi
mov esi, eax
mov eax, dword [esp + 0x28]
push 8
push eax
call edi
push esi
push eax
push 0
lea ecx, [esp + 0x90]
push 0
push ecx
call dword [sym.imp.USER32.dll_SetRect]
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x84]
push 2
push edx
push eax
call dword [sym.imp.GDI32.dll_DPtoLP]
mov edx, dword [ebp]
lea eax, [esp + 0x60]
lea ecx, [esp + 0x20]
push eax
push ecx
mov ecx, ebp
call dword [edx + 0xc]
mov edx, dword [esp + 0x24]
push fcn.0040d160
push edx
call dword [sym.imp.GDI32.dll_SetAbortProc]
lea ecx, [esp + 0x44]
call fcn.004143d2
lea ecx, [esp + 0x30]
mov byte [esp + 0x3d0], 0xd
call fcn.004143d2
lea ecx, [esp + 0x14]
mov byte [esp + 0x3d0], 0xe
call fcn.004143d2
mov byte [esp + 0x3d0], 0xf
call sub.MFC42.DLL_AfxGetThread
test eax, eax
je 0x40d67c
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x7c]
jmp 0x40d67e
xor eax, eax
push 0
mov ecx, eax
call sub.MFC42.DLL_CWnd::EnableWindow
mov eax, dword [ebp + 4]
lea ecx, [esp + 0x9c]
push eax
call fcn.0040dd20
mov ecx, dword [ebp + 8]
lea edx, [esp + 0x30]
push ecx
push str.Stampa_di__s_in_corso_..
push edx
mov byte [esp + 0x3dc], 0x10
call sub.MFC42.DLL_CString::Format
mov eax, dword [esp + 0x3c]
add esp, 0xc
lea ecx, [esp + 0x9c]
push eax
call sub.MFC42.DLL_CWnd::SetWindowTextA
lea ecx, [esp + 0x44]
push ecx
push 0x452
lea ecx, [esp + 0xa4]
call sub.MFC42.DLL_CWnd::GetDlgItemTextA
mov edx, dword [esp + 0x40]
lea eax, [esp + 0x14]
push edx
push ebx
push eax
call sub.MFC42.DLL_AfxFormatString1
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x64]
call sub.MFC42.DLL_CPrintDialog::GetDeviceName
mov edx, dword [esp + 0x14]
mov eax, dword [eax]
mov ecx, dword [ebp + 8]
push edx
mov edx, dword [esp + 0x48]
push eax
push ecx
lea eax, [esp + 0x3c]
push edx
push eax
mov byte [esp + 0x3e4], 0x11
call sub.MFC42.DLL_CString::Format
add esp, 0x14
lea ecx, [esp + 0x18]
mov byte [esp + 0x3d0], 0x10
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x30]
push ecx
push 0x452
lea ecx, [esp + 0xa4]
call sub.MFC42.DLL_CWnd::SetDlgItemTextA
push 5
lea ecx, [esp + 0xa0]
call sub.MFC42.DLL_CWnd::ShowWindow
mov edx, dword [esp + 0xbc]
push edx
call dword [sym.imp.USER32.dll_UpdateWindow]
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x4c]
push eax
push ecx
call dword [sym.imp.GDI32.dll_StartDocA]
cmp eax, 0xffffffff
jne 0x40d7eb
call sub.MFC42.DLL_AfxGetThread
test eax, eax
je 0x40d78a
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x7c]
jmp 0x40d78c
xor eax, eax
push 1
mov ecx, eax
call sub.MFC42.DLL_CWnd::EnableWindow
mov eax, dword [ebp]
lea ecx, [esp + 0x60]
lea edx, [esp + 0x20]
push ecx
push edx
mov ecx, ebp
call dword [eax + 8]
lea ecx, [esp + 0x9c]
call sub.MFC42.DLL_CWnd::DestroyWindow
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CDC::Detach
push 0xffffffffffffffff
push 0
push 0xf106
call sub.MFC42.DLL_AfxMessageBox_1
lea ecx, [esp + 0x13c]
mov byte [esp + 0x3d0], 0x13
call sub.MFC42.DLL_CProgressCtrl::CProgressCtrl
mov byte [esp + 0x3d0], 0x12
jmp 0x40db74
mov eax, dword [esp + 0x60]
xor ecx, ecx
xor ebx, ebx
mov edx, dword [eax + 0x60]
xor eax, eax
mov cx, word [edx + 0x1a]
mov ax, word [edx + 0x1c]
mov bx, word [edx + 0x18]
cmp ecx, eax
jae 0x40d80e
mov dword [esp + 0x10], eax
mov ecx, eax
xor esi, esi
mov si, word [edx + 0x1e]
cmp ecx, esi
jbe 0x40d81e
mov dword [esp + 0x10], esi
mov ecx, esi
cmp ebx, eax
jae 0x40d824
mov ebx, eax
cmp ebx, esi
jbe 0x40d82a
mov ebx, esi
cmp ecx, ebx
sbb eax, eax
and al, 0xfe
inc eax
cmp ecx, 0xffff
mov dword [esp + 0x38], eax
jne 0x40d843
mov dword [esp + 0x10], ecx
jmp 0x40d849
add ecx, eax
mov dword [esp + 0x10], ecx
mov eax, ebx
xor edi, edi
cdq
mov esi, eax
mov eax, ecx
xor esi, edx
lea ecx, [esp + 0x48]
sub esi, edx
cdq
xor eax, edx
sub eax, edx
sub eax, esi
cdq
mov esi, eax
xor esi, edx
sub esi, edx
call fcn.004143d2
lea ecx, [esp + 0x48]
mov byte [esp + 0x3d0], 0x14
push ecx
push 0x453
lea ecx, [esp + 0xa4]
call sub.MFC42.DLL_CWnd::GetDlgItemTextA
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edx, esi
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x15c]
and edx, 0xffff
shl edx, 0x10
push edx
push edi
push 0x401
push eax
mov dword [esp + 0x2c], edi
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [esp + 0x15c]
push edi
push edi
push 0x402
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x74], ebx
cmp ebx, eax
je 0x40daeb
xor ebx, ebx
jmp 0x40d8e6
mov ebx, dword [esp + 0x18]
mov edx, dword [esp + 0x15c]
inc edi
push 0
push edi
add ebx, 0x64
push 0x402
push edx
mov dword [esp + 0x28], ebx
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [esp + 0x15c]
push eax
call dword [sym.imp.USER32.dll_UpdateWindow]
mov eax, ebx
lea ecx, [esp + 0x17c]
cdq
idiv esi
push eax
push 0x41df90
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edx, [esp + 0x17c]
lea ecx, [esp + 0x9c]
push edx
push 0x451
call sub.MFC42.DLL_CWnd::SetDlgItemTextA
lea eax, [esp + 0x60]
lea ecx, [esp + 0x20]
push eax
push ecx
mov ecx, ebp
call fcn.0040dce0
mov eax, dword [esp + 0x70]
test eax, eax
je 0x40daeb
mov edx, esi
mov eax, 0x10624dd3
sub edx, edi
inc edx
imul edx, dword [esp + 0x1c]
mul edx
mov ecx, edx
shr ecx, 6
cmp ecx, 0x3c
jbe 0x40d9ac
mov eax, ecx
xor edx, edx
mov ebx, 0x3c
div ebx
mov eax, 0x88888889
mov ebx, edx
mul ecx
shr edx, 5
push ebx
push edx
lea eax, [esp + 0x1c]
push str._d_minuti___d_secondi
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0x10
jmp 0x40d9d8
cmp esi, 1
jle 0x40d9d8
test ecx, ecx
jbe 0x40d9ca
push ecx
lea ecx, [esp + 0x18]
push str._d_secondi
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
jmp 0x40d9d8
push 0x41df68
lea ecx, [esp + 0x18]
call fcn.004143cc
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x48]
push edx
push esi
push edi
lea ecx, [esp + 0x188]
push eax
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea edx, [esp + 0x17c]
lea ecx, [esp + 0x9c]
push edx
push 0x453
call sub.MFC42.DLL_CWnd::SetDlgItemTextA
mov eax, dword [esp + 0x28]
push 0xa
push eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov ecx, dword [esp + 0x28]
push 8
push ecx
mov ebx, eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push ebx
push eax
push 0
lea edx, [esp + 0x90]
push 0
push edx
call dword [sym.imp.USER32.dll_SetRect]
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x84]
push 2
push eax
push ecx
call dword [sym.imp.GDI32.dll_DPtoLP]
mov edx, dword [esp + 0x24]
push edx
call dword [sym.imp.GDI32.dll_StartPage]
test eax, eax
jl 0x40daf8
lea eax, [esp + 0x60]
lea ecx, [esp + 0x20]
push eax
push ecx
mov ecx, ebp
call fcn.0040dce0
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CDC::SaveDC
mov edx, dword [ebp]
mov ebx, eax
lea eax, [esp + 0x60]
lea ecx, [esp + 0x20]
push eax
push ecx
mov ecx, ebp
call dword [edx + 4]
mov edx, dword [esp + 0x24]
push edx
call dword [sym.imp.GDI32.dll_EndPage]
test eax, eax
jl 0x40daf8
mov eax, dword [esp + 0x24]
push 0
push eax
call fcn.0040d160
test eax, eax
je 0x40daf8
push ebx
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CDC::RestoreDC
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, dword [esp + 0x3c]
xor edx, edx
sub eax, ebx
mov ecx, dword [esp + 0x10]
div edi
mov edx, dword [esp + 0x38]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x74]
add eax, edx
cmp eax, ecx
mov dword [esp + 0x74], eax
jne 0x40d8e2
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.GDI32.dll_EndDoc]
jmp 0x40db03
mov edx, dword [esp + 0x24]
push edx
call dword [sym.imp.GDI32.dll_AbortDoc]
call sub.MFC42.DLL_AfxGetThread
test eax, eax
je 0x40db15
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x7c]
jmp 0x40db17
xor eax, eax
push 1
mov ecx, eax
call sub.MFC42.DLL_CWnd::EnableWindow
mov eax, dword [ebp]
lea ecx, [esp + 0x60]
lea edx, [esp + 0x20]
push ecx
push edx
mov ecx, ebp
call dword [eax + 8]
lea ecx, [esp + 0x9c]
call sub.MFC42.DLL_CWnd::DestroyWindow
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CDC::Detach
lea ecx, [esp + 0x48]
mov byte [esp + 0x3d0], 0x10
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x13c]
mov byte [esp + 0x3d0], 0x16
call sub.MFC42.DLL_CProgressCtrl::CProgressCtrl
mov byte [esp + 0x3d0], 0x15
lea ecx, [esp + 0xfc]
call sub.MFC42.DLL_CAnimateCtrl::CAnimateCtrl
lea ecx, [esp + 0x9c]
mov byte [esp + 0x3d0], 0xf
call fcn.00414492
lea ecx, [esp + 0x14]
mov byte [esp + 0x3d0], 0xe
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x30]
mov byte [esp + 0x3d0], 0xd
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x44]
mov byte [esp + 0x3d0], 0xc
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x20]
mov byte [esp + 0x3d0], 0xa
call fcn.004148fa
mov byte [esp + 0x3d0], 1
lea ecx, [esp + 0x40]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x34]
mov byte [esp + 0x3d0], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x60]
mov dword [esp + 0x3d0], 0xffffffff
call fcn.004148f4
mov ecx, dword [esp + 0x3c8]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x3c4
ret