Function at 0x40d000
Capabilities:
Accept command line arguments

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
mov eax, 8
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0xe8
mov dword [ebp - 0xac], eax
mov eax, 0x604
mov ebx, dword [ecx]
mov dword [ebp - 0xa8], eax
lea eax, [ebp - 0xac]
mov edi, dword [ecx + 0xc]
mov dword [esp], eax
call sym._InitCommonControlsEx_4
mov edx, 0x410c9c
sub esp, 4
mov dword [esp + 4], edx
mov dword [esp], ebx
call sym._LoadAcceleratorsW_8
mov ecx, 0x66
mov dword [ebp - 0x48], 0x30
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], sym._WndProc_16
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 4
mov dword [ebp - 0x34], ebx
sub esp, 8
mov esi, eax
mov dword [esp + 4], ecx
mov dword [esp], ebx
call sym._LoadIconW_8
mov dword [ebp - 0x30], eax
sub esp, 8
mov dword [esp], 0x32
call sym._GetSystemMetrics_4
mov dword [ebp - 0xbc], eax
sub esp, 4
mov dword [esp], 0x31
call sym._GetSystemMetrics_4
mov edx, 0x8000
mov ecx, 1
sub esp, 4
mov dword [esp + 0x14], edx
mov edx, dword [ebp - 0xbc]
mov dword [esp + 0xc], eax
mov eax, 0x66
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov dword [esp + 0x10], edx
mov dword [esp], ebx
call sym._LoadImageW_24
mov dword [ebp - 0x1c], eax
sub esp, 0x18
mov eax, 0x7f01
mov dword [esp + 4], eax
mov dword [esp], 0
call sym._LoadCursorW_8
mov dword [ebp - 0x2c], eax
sub esp, 8
mov dword [esp], 5
call sym._GetSysColorBrush_4
lea edx, [ebp - 0x48]
mov dword [ebp - 0x24], 0x898
mov dword [ebp - 0x20], str.WORDPADTOP
mov dword [ebp - 0x28], eax
sub esp, 4
mov dword [esp], edx
call sym._RegisterClassExW_4
mov eax, 0x7f01
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], sym._preview_proc_16
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], 0
sub esp, 4
mov dword [esp + 4], eax
mov dword [esp], 0
mov dword [ebp - 0x1c], 0
call sym._LoadCursorW_8
lea edx, [ebp - 0x48]
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], str.PrtPreview
mov dword [ebp - 0x2c], eax
sub esp, 8
mov dword [esp], edx
call sym._RegisterClassExW_4
lea edx, [ebp - 0x9c]
sub esp, 4
mov dword [esp], edx
call sym._registry_read_winrect
lea edx, [ebp - 0x9c]
mov eax, 1
mov dword [esp], edx
mov dword [esp + 4], eax
call sym._MonitorFromRect_8
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x70], 0x28
sub esp, 8
mov dword [esp + 4], ecx
mov dword [esp], eax
call sym._GetMonitorInfoW_8
mov eax, dword [ebp - 0x9c]
lea edx, [ebp - 0x9c]
mov ecx, dword [ebp - 0x98]
mov dword [ebp - 0xbc], eax
lea eax, [ebp - 0x5c]
mov dword [ebp - 0xc0], ecx
sub esp, 8
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], eax
call sym._IntersectRect_12
mov eax, dword [ebp - 0x54]
sub esp, 0xc
cmp dword [ebp - 0x5c], eax
jge 0x40d630
mov edx, dword [ebp - 0x58]
mov eax, 0x80000000
mov ecx, dword [ebp - 0xc0]
cmp edx, dword [ebp - 0x50]
cmovge ecx, eax
cmovl eax, dword [ebp - 0xbc]
mov dword [ebp - 0xbc], eax
mov dword [esp + 0x14], ecx
xor eax, eax
xor edx, edx
mov dword [esp + 0x2c], eax
xor eax, eax
mov ecx, 0x2cf0000
mov dword [esp + 0x24], edx
mov edx, dword [ebp - 0x98]
mov dword [esp + 0x20], eax
mov eax, dword [ebp - 0x90]
mov dword [esp + 0xc], ecx
mov dword [esp + 0x28], ebx
mov dword [esp], 0
sub eax, edx
mov edx, dword [ebp - 0x9c]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x94]
sub eax, edx
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0xbc]
mov dword [esp + 0x10], eax
mov eax, 0x410d38
mov dword [esp + 8], eax
mov eax, str.WORDPADTOP
mov dword [esp + 4], eax
call sym._CreateWindowExW_48
mov dword [0x41c708], eax
lea eax, [ebp - 0xb0]
sub esp, 0x30
mov dword [esp], eax
call sym._registry_read_maximized
cmp edi, 1
je 0x40d648
cmp edi, 0xa
je 0x40d648
mov dword [esp + 4], edi
mov eax, dword [0x41c708]
mov edi, 0x89a
mov dword [esp], eax
call sym._ShowWindow_8
xor eax, eax
sub esp, 8
call sym._set_caption
call sym._set_bar_states
mov eax, 2
call sym._set_fileformat
mov dword [esp + 4], edi
lea edi, [ebp - 0xa4]
mov dword [esp], ebx
call sym._LoadMenuW_8
mov dword [0x41c6fc], eax
sub esp, 8
call sym._get_default_printer_opts
mov eax, dword [0x40f2a4]
mov dword [esp], eax
call sym._reg_formatindex
mov eax, dword [eax*4 + 0x41c6f0]
mov dword [esp + 4], eax
mov eax, dword [0x41c708]
mov dword [esp], eax
call sym._target_device
mov eax, 0x7d4
mov dword [esp + 4], eax
mov eax, dword [0x41c708]
mov dword [esp], eax
call sym._GetDlgItem_8
mov edx, 0x7df
sub esp, 8
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._GetDlgItem_8
mov ecx, 0x7d1
mov ebx, eax
mov eax, dword [0x41c708]
sub esp, 8
mov dword [esp + 4], ecx
mov dword [esp], eax
call sym._GetDlgItem_8
xor edx, edx
mov ecx, 0xd6
sub esp, 8
mov dword [esp + 0xc], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], edi
mov dword [esp], eax
call sym._SendMessageW_16
mov eax, sym._ruler_proc_16
sub esp, 0x10
mov dword [esp + 8], eax
mov eax, 0xfffffffc
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._SetWindowLongW_12
sub esp, 0xc
mov dword [esp + 0xc], eax
mov eax, 0x400
mov dword [esp], ebx
mov dword [esp + 8], edi
mov dword [esp + 4], eax
call sym._SendMessageW_16
sub esp, 0x10
call dword [sym.imp.kernel32.dll_GetCommandLineW]
mov ebx, eax
movzx eax, word [eax]
cmp eax, 0x20
jne 0x40d41c
lea esi, [esi]
lea edi, [edi]
movzx eax, word [ebx + 2]
add ebx, 2
cmp eax, 0x20
je 0x40d410
cmp eax, 0x22
je 0x40d660
mov eax, 0x20
movzx edx, word [ebx]
test edx, edx
jne 0x40d448
jmp 0x40d4fe
test edx, edx
je 0x40d4fe
mov ecx, edx
add ebx, 2
movzx edx, word [ebx]
cmp ecx, eax
jne 0x40d440
test edx, edx
je 0x40d4fe
xor edi, edi
cmp edx, 9
je 0x40d470
cmp edx, 0x20
jne 0x40d481
nop
lea esi, [esi]
movzx edx, word [ebx + 2]
add ebx, 2
cmp edx, 0x20
je 0x40d470
cmp edx, 9
je 0x40d470
and edx, 0xfffd
cmp edx, 0x2d
jne 0x40d4c3
movzx edx, word [ebx + 4]
test edx, edx
je 0x40d5f0
mov dword [esp], edx
mov dword [ebp - 0xbc], edx
call dword [sym.imp.ucrtbase.dll_isspace]
mov edx, dword [ebp - 0xbc]
test eax, eax
je 0x40d4c3
movzx eax, word [ebx + 2]
and eax, 0xffdf
cmp eax, 0x50
je 0x40d620
movzx eax, word [ebx]
test eax, eax
je 0x40d4f6
cmp eax, 0x22
je 0x40d670
mov eax, ebx
xor ebx, ebx
call sym._DoOpenFile
mov eax, dword [0x41c708]
xor ecx, ecx
mov dword [esp + 8], ecx
mov dword [esp + 4], ebx
mov dword [esp], eax
call sym._InvalidateRect_12
sub esp, 0xc
test edi, edi
jne 0x40d602
lea ebx, [ebp - 0x8c]
lea esi, [esi]
lea edi, [edi]
xor eax, eax
xor edx, edx
mov dword [esp + 0xc], eax
xor ecx, ecx
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], ebx
call sym._GetMessageW_16
sub esp, 0x10
test eax, eax
je 0x40d5d8
mov dword [esp + 4], ebx
mov eax, dword [0x41c700]
mov dword [esp], eax
call sym._IsDialogMessageW_8
sub esp, 8
test eax, eax
jne 0x40d510
mov dword [esp + 8], ebx
mov eax, dword [0x41c708]
mov dword [esp + 4], esi
mov dword [esp], eax
call sym._TranslateAcceleratorW_12
sub esp, 0xc
test eax, eax
jne 0x40d510
mov dword [esp], ebx
call sym._TranslateMessage_4
sub esp, 4
mov dword [esp], ebx
call sym._DispatchMessageW_4
xor eax, eax
xor edx, edx
sub esp, 4
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov dword [esp], ebx
call sym._PeekMessageW_20
sub esp, 0x14
test eax, eax
jne 0x40d510
xor eax, eax
xor edi, edi
mov dword [esp + 8], eax
mov eax, 0x400
mov dword [esp + 4], eax
mov eax, dword [0x41c708]
mov dword [esp + 0xc], edi
mov dword [esp], eax
call sym._SendMessageW_16
sub esp, 0x10
jmp 0x40d510
lea esp, [ebp - 0x10]
xor eax, eax
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10
movzx eax, word [ebx + 2]
and eax, 0xffdf
cmp eax, 0x50
jne 0x40d4c3
mov eax, dword [0x41c708]
xor ecx, ecx
mov edx, 0x6af
call sym._MessageBoxWithResStringW.constprop.0
jmp 0x40d4fe
add ebx, 4
mov edi, 1
jmp 0x40d45e
mov eax, 0x80000000
mov ecx, 0x80000000
mov dword [ebp - 0xbc], eax
jmp 0x40d247
mov eax, dword [ebp - 0xb0]
test eax, eax
mov eax, 3
cmovne edi, eax
jmp 0x40d2de
add ebx, 2
jmp 0x40d42a
cmp word [ebx + 2], 0
lea edx, [ebx + 2]
je 0x40d68d
mov eax, edx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x40d680
sub eax, edx
add ebx, eax
mov word [ebx], 0
mov ebx, edx
jmp 0x40d4d3