Function at 0x402570
Capabilities:
Accept command line arguments
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0xac]
push ebx
sub esp, 0xdc
mov ebx, dword [ebp + 8]
mov dword [ebp - 0xac], 8
mov dword [ebp - 0xa8], 0x604
mov dword [esp], eax
call dword [sym.imp.comctl32.dll_InitCommonControlsEx]
sub esp, 4
mov dword [esp + 4], 0x41c450
mov dword [esp], ebx
call dword [sym.imp.user32.dll_LoadAcceleratorsW]
mov dword [ebp - 0x3c], 0x30
sub esp, 8
mov dword [ebp - 0xb4], eax
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], sym._WndProc_16
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 4
mov dword [ebp - 0x28], ebx
mov dword [esp + 4], 0x66
mov dword [esp], ebx
call dword [sym.imp.user32.dll_LoadIconW]
mov edi, dword [sym.imp.user32.dll_GetSystemMetrics]
sub esp, 8
mov dword [ebp - 0x24], eax
mov dword [esp], 0x32
call edi
sub esp, 4
mov esi, eax
mov dword [esp], 0x31
call edi
lea edi, [ebp - 0x3c]
sub esp, 4
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], 0x8000
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x66
mov dword [esp], ebx
call dword [sym.imp.user32.dll_LoadImageW]
mov edx, dword [sym.imp.user32.dll_LoadCursorW]
sub esp, 0x18
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xb8], edx
mov dword [esp + 4], 0x7f01
mov dword [esp], 0
call edx
sub esp, 8
mov dword [ebp - 0x20], eax
mov dword [esp], 5
call dword [sym.imp.user32.dll_GetSysColorBrush]
mov esi, dword [sym.imp.user32.dll_RegisterClassExW]
mov dword [ebp - 0x18], 0x898
sub esp, 4
mov dword [ebp - 0x1c], eax
mov dword [esp], edi
mov dword [ebp - 0x14], str.WORDPADTOP
call esi
mov edx, dword [ebp - 0xb8]
mov dword [ebp - 0x38], 0
sub esp, 4
mov dword [ebp - 0x34], sym._preview_proc_16
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x10], 0
mov dword [esp + 4], 0x7f01
mov dword [esp], 0
call edx
mov dword [ebp - 0x1c], 0
sub esp, 8
mov dword [ebp - 0x20], eax
mov dword [esp], edi
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], str.PrtPreview
call esi
lea esi, [ebp - 0x9c]
sub esp, 4
mov dword [esp], esi
call sym._registry_read_winrect
mov dword [esp + 4], 1
mov dword [esp], esi
call dword [sym.imp.user32.dll_MonitorFromRect]
lea edx, [ebp - 0x8c]
mov dword [ebp - 0x8c], 0x28
sub esp, 8
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.user32.dll_GetMonitorInfoW]
mov edx, dword [ebp - 0x98]
lea eax, [ebp - 0x78]
mov edi, dword [ebp - 0x9c]
sub esp, 8
mov dword [ebp - 0xb8], edx
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov dword [esp], eax
call dword [sym.imp.user32.dll_IntersectRect]
mov eax, dword [ebp - 0x70]
sub esp, 0xc
cmp dword [ebp - 0x78], eax
jge 0x402c00
mov edx, dword [ebp - 0xb8]
mov eax, 0x80000000
mov ecx, dword [ebp - 0x6c]
cmp dword [ebp - 0x74], ecx
cmovge edx, eax
cmovge edi, eax
mov eax, dword [ebp - 0x90]
sub eax, dword [ebp - 0x98]
mov dword [esp + 0x14], edx
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x94]
sub eax, dword [ebp - 0x9c]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 0x2cf0000
mov dword [esp + 8], 0x41c470
mov dword [esp + 4], str.WORDPADTOP
mov dword [esp], 0
call dword [sym.imp.user32.dll_CreateWindowExW]
sub esp, 0x30
mov dword [0x410cb8], eax
lea eax, [ebp - 0xb0]
mov dword [esp], eax
call sym._registry_read_maximized
cmp dword [ebp + 0x14], 1
je 0x402c10
cmp dword [ebp + 0x14], 0xa
je 0x402c10
mov eax, dword [ebp + 0x14]
lea esi, [ebp - 0xa4]
mov dword [esp + 4], eax
mov eax, dword [0x410cb8]
mov dword [esp], eax
call dword [sym.imp.user32.dll_ShowWindow]
xor eax, eax
sub esp, 8
call sym._set_caption
call sym._set_bar_states
mov dword [0x410c40], 2
call sym._set_bar_states
call sym._set_default_font
mov eax, dword [0x410c40]
mov dword [esp], eax
call sym._reg_formatindex
mov eax, dword [eax*4 + 0x411860]
mov dword [esp + 4], eax
mov eax, dword [0x410cb8]
mov dword [esp], eax
call sym._target_device
mov dword [esp], ebx
mov dword [esp + 4], 0x89a
call dword [sym.imp.user32.dll_LoadMenuW]
sub esp, 8
mov dword [0x410cac], eax
call sym._get_default_printer_opts
mov eax, dword [0x410c40]
mov dword [esp], eax
call sym._reg_formatindex
mov eax, dword [eax*4 + 0x411860]
mov dword [esp + 4], eax
mov eax, dword [0x410cb8]
mov dword [esp], eax
call sym._target_device
mov eax, dword [0x410cb8]
mov edi, dword [sym.imp.user32.dll_GetDlgItem]
mov dword [esp + 4], 0x7d4
mov dword [esp], eax
call edi
sub esp, 8
mov dword [esp + 4], 0x7df
mov dword [esp], eax
call edi
mov ebx, eax
mov eax, dword [0x410cb8]
sub esp, 8
mov dword [esp + 4], 0x7d1
mov dword [esp], eax
call edi
mov edi, dword [sym.imp.user32.dll_SendMessageW]
sub esp, 8
mov dword [esp + 0xc], 0
mov dword [esp + 8], esi
mov dword [esp + 4], 0xd6
mov dword [esp], eax
mov dword [ebp - 0xb8], edi
call edi
sub esp, 0x10
mov dword [esp], ebx
mov dword [esp + 8], sym._ruler_proc_16
mov dword [esp + 4], 0xfffffffc
call dword [sym.imp.user32.dll_SetWindowLongW]
sub esp, 0xc
mov dword [esp], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov dword [esp + 4], 0x400
call edi
sub esp, 0x10
call dword [sym.imp.kernel32.dll_GetCommandLineW]
mov ebx, eax
movzx eax, word [eax]
cmp ax, 0x20
jne 0x40298d
lea esi, [esi]
movzx eax, word [ebx + 2]
add ebx, 2
cmp ax, 0x20
je 0x402980
cmp ax, 0x22
je 0x402c30
mov eax, 0x20
movzx edi, word [ebx]
test di, di
jne 0x4029b9
jmp 0x402bf8
test di, di
je 0x402bf8
add ebx, 2
mov edx, edi
movzx edi, word [ebx]
cmp dx, ax
jne 0x4029b0
test di, di
je 0x402bf8
xor esi, esi
cmp di, 9
je 0x4029e0
cmp di, 0x20
jne 0x4029f3
lea esi, [esi]
movzx edi, word [ebx + 2]
add ebx, 2
cmp di, 0x20
je 0x4029e0
cmp di, 9
je 0x4029e0
and edi, 0xfffffffd
cmp di, 0x2d
jne 0x402a2a
movzx edi, word [ebx + 4]
test di, di
je 0x402b70
movzx eax, di
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_isspace]
test eax, eax
je 0x402a2a
movzx eax, word [ebx + 2]
and eax, 0xffffffdf
cmp ax, 0x50
je 0x402be8
movzx eax, word [ebx]
test ax, ax
je 0x402a64
cmp ax, 0x22
je 0x402c40
mov eax, ebx
call sym._DoOpenFile
mov eax, dword [0x410cb8]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.user32.dll_InvalidateRect]
sub esp, 0xc
lea ebx, [ebp - 0x64]
test esi, esi
jne 0x402b81
mov esi, dword [sym.imp.user32.dll_GetMessageW]
mov edi, dword [sym.imp.user32.dll_IsDialogMessageW]
lea esi, [esi]
nop
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call esi
sub esp, 0x10
test eax, eax
je 0x402b60
mov eax, dword [0x410cb4]
mov dword [esp + 4], ebx
mov dword [esp], eax
call edi
sub esp, 8
test eax, eax
jne 0x402a80
mov eax, dword [ebp - 0xb4]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [0x410cb8]
mov dword [esp], eax
call dword [sym.imp.user32.dll_TranslateAcceleratorW]
sub esp, 0xc
test eax, eax
jne 0x402a80
mov dword [esp], ebx
call dword [sym.imp.user32.dll_TranslateMessage]
sub esp, 4
mov dword [esp], ebx
call dword [sym.imp.user32.dll_DispatchMessageW]
sub esp, 4
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.user32.dll_PeekMessageW]
sub esp, 0x14
test eax, eax
jne 0x402a80
mov eax, dword [0x410cb8]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], eax
mov eax, dword [ebp - 0xb8]
mov dword [esp + 4], 0x400
call eax
sub esp, 0x10
jmp 0x402a80
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
movzx eax, word [ebx + 2]
and eax, 0xffffffdf
cmp ax, 0x50
jne 0x402a2a
mov eax, dword [0x410cb8]
mov dword [ebp - 0x64], 0x28
lea ebx, [ebp - 0x64]
mov dword [esp], 0
mov dword [ebp - 0x60], eax
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
mov dword [ebp - 0x58], 0x6af
sub esp, 4
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x54], 0x41c470
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [esp], ebx
call dword [sym.imp.user32.dll_MessageBoxIndirectW]
sub esp, 4
jmp 0x402a6f
add ebx, 4
mov esi, 1
jmp 0x4029d1
lea ebx, [ebp - 0x64]
jmp 0x402a6f
mov edx, 0x80000000
mov edi, 0x80000000
jmp 0x402795
mov edx, dword [ebp - 0xb0]
mov eax, 3
test edx, edx
cmove eax, dword [ebp + 0x14]
mov dword [ebp + 0x14], eax
jmp 0x402828
add ebx, 2
jmp 0x40299c
cmp word [ebx + 2], 0
lea edx, [ebx + 2]
je 0x402c5d
mov eax, edx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x402c50
sub eax, edx
add ebx, eax
xor eax, eax
mov word [ebx], ax
mov ebx, edx
jmp 0x402a3c