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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0xf4
mov esi, dword [ebp + 8]
mov dword [ebp - 0x5c], 8
mov dword [ebp - 0x58], 0x604
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.comctl32.dll_InitCommonControlsEx]
push global_wszAccelTable
push esi
call dword [sym.imp.user32.dll_LoadAcceleratorsW]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x44], 0x30
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], dbg._WndProc@16
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 4
mov dword [ebp - 0x30], esi
push 0x66
push esi
mov ebx, esi
call dword [sym.imp.user32.dll_LoadIconW]
mov dword [ebp - 0x2c], eax
mov esi, dword [sym.imp.user32.dll_GetSystemMetrics]
push 0x31
call esi
mov edi, eax
push 0x32
call esi
push 0x8000
push eax
push edi
push 1
push 0x66
push ebx
mov esi, ebx
call dword [sym.imp.user32.dll_LoadImageW]
mov dword [ebp - 0x18], eax
push 0x7f01
push 0
call dword [sym.imp.user32.dll_LoadCursorW]
mov dword [ebp - 0x28], eax
push 5
call dword [sym.imp.user32.dll_GetSysColorBrush]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], 0x898
mov dword [ebp - 0x1c], str.WORDPADTOP
lea edi, [ebp - 0x44]
mov ebx, dword [sym.imp.user32.dll_RegisterClassExW]
push edi
call ebx
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], dbg._preview_proc@16
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x18], 0
push 0x7f01
push 0
call dword [sym.imp.user32.dll_LoadCursorW]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], str.PrtPreview
push edi
call ebx
lea ebx, [ebp - 0x54]
push ebx
call dbg.registry_read_winrect
add esp, 4
push 1
push ebx
call dword [sym.imp.user32.dll_MonitorFromRect]
mov dword [ebp - 0xf8], 0x28
lea ecx, [ebp - 0xf8]
push ecx
push eax
call dword [sym.imp.user32.dll_GetMonitorInfoW]
mov esi, dword [ebp - 0x54]
mov edi, dword [ebp - 0x50]
lea eax, [ebp - 0xe4]
push ebx
push eax
push eax
call dword [sym.imp.user32.dll_IntersectRect]
movq xmm0, qword [ebp - 0xe4]
movq xmm1, qword [ebp - 0xdc]
pcmpgtd xmm1, xmm0
pshufd xmm0, xmm1, 0x50
movmskpd eax, xmm0
cmp eax, 3
mov eax, 0x80000000
cmovne esi, eax
cmovne edi, eax
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x48]
sub eax, dword [ebp - 0x54]
sub ecx, dword [ebp - 0x50]
push 0
push dword [ebp + 8]
push 0
push 0
push ecx
push eax
push edi
push esi
push 0x2cf0000
push 0x40d2c2
push str.WORDPADTOP
push 0
call dword [sym.imp.user32.dll_CreateWindowExW]
mov dword [0x419f58], eax
lea eax, [ebp - 0x14]
push eax
call dbg.registry_read_maximized
add esp, 4
cmp dword [ebp - 0x14], 0
mov eax, 3
mov edx, dword [ebp + 0x14]
cmove eax, edx
cmp edx, 0xa
mov ecx, edx
cmove ecx, eax
cmp edx, 1
cmove ecx, eax
push ecx
push dword [0x419f58]
call dword [sym.imp.user32.dll_ShowWindow]
mov eax, 0x1e
nop dword [eax + eax]
cmp word [eax + 0x41a784], 0
lea eax, [eax + 2]
jne 0x404fa0
push eax
push 1
call dword [sym.imp.ucrtbase.dll_calloc]
add esp, 8
test eax, eax
je 0x40504c
mov edi, eax
mov eax, 0xfffffffe
nop dword [eax + eax]
cmp word [eax + 0x41a7a4], 0
lea eax, [eax + 2]
jne 0x404fd0
push eax
push 0x41a7a2
push edi
call sym._memcpy
add esp, 0xc
mov eax, 0xfffffffe
nop word cs:[eax + eax]
cmp word [eax + 0x41a7a4], 0
lea eax, [eax + 2]
jne 0x405000
mov word [edi + eax + 4], 0x20
mov dword [edi + eax], 0x2d0020
movups xmm0, xmmword [0x40d2c2]
movups xmmword [edi + eax + 6], xmm0
movupd xmm0, xmmword [0x40d2cc]
movupd xmmword [edi + eax + 0x10], xmm0
push edi
push dword [0x419f58]
call dword [sym.imp.user32.dll_SetWindowTextW]
push edi
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
call dbg.set_bar_states
mov dword [0x419258], 2
call dbg.set_bar_states
xorpd xmm0, xmm0
movsd qword [ebp - 0x64], xmm0
xorpd xmm0, xmm0
movupd xmmword [ebp - 0x74], xmm0
movupd xmmword [ebp - 0x84], xmm0
movupd xmmword [ebp - 0x94], xmm0
movupd xmmword [ebp - 0xa4], xmm0
movupd xmmword [ebp - 0xb4], xmm0
movupd xmmword [ebp - 0xc4], xmm0
mov dword [ebp - 0xd0], 0x74
mov dword [ebp - 0xcc], 0x20000007
mov dword [ebp - 0xc8], 0
test byte [0x419258], 2
mov ecx, str.Courier_New
mov eax, str.Times_New_Roman
cmove eax, ecx
xor ecx, ecx
nop
movzx edx, word [eax + ecx]
mov word [ebp + ecx - 0xb6], dx
add ecx, 2
test dx, dx
jne 0x4050d0
lea eax, [ebp - 0xd0]
mov ebx, dword [sym.imp.user32.dll_SendMessageW]
push eax
push 0
push 0x444
push dword [0x419f78]
call ebx
mov esi, dword [0x419f58]
push dword [0x419258]
call dbg.reg_formatindex
add esp, 4
push dword [eax*4 + 0x419f60]
push esi
call dbg.target_device
add esp, 8
push 0x89a
push dword [ebp + 8]
call dword [sym.imp.user32.dll_LoadMenuW]
mov dword [0x419f5c], eax
call dbg.get_default_printer_opts
mov esi, dword [0x419f58]
push dword [0x419258]
call dbg.reg_formatindex
add esp, 4
push dword [eax*4 + 0x419f60]
push esi
call dbg.target_device
add esp, 8
mov esi, dword [sym.imp.user32.dll_GetDlgItem]
push 0x7d4
push dword [0x419f58]
call esi
push 0x7df
push eax
call esi
mov edi, eax
push 0x7d1
push dword [0x419f58]
call esi
lea esi, [ebp - 0x100]
push 0
push esi
push 0xd6
push eax
call ebx
push dbg._ruler_proc@16
push 0xfffffffffffffffc
push edi
call dword [sym.imp.user32.dll_SetWindowLongW]
push eax
push esi
push 0x400
push edi
call ebx
call dword [sym.imp.kernel32.dll_GetCommandLineW]
add eax, 0xfffffffe
nop dword [eax]
movzx edx, word [eax + 2]
add eax, 2
cmp edx, 0x20
je 0x4051c0
xor ecx, ecx
cmp edx, 0x22
sete cl
lea ecx, [ecx*2 + 0x20]
xor ebx, ebx
cmp ecx, edx
sete bl
lea edx, [eax + ebx*2]
lea eax, [eax + ebx*2]
add eax, 0xfffffffe
nop dword [eax + eax]
movzx esi, word [edx]
add eax, 2
test esi, esi
je 0x405201
add edx, 2
cmp ecx, esi
jne 0x4051f0
xor edx, edx
cmp ecx, esi
sete dl
movzx esi, word [eax + edx*2]
test si, si
lea ecx, [ebp - 0xd0]
je 0x405335
lea edi, [eax + edx*2]
mov bl, 1
jmp 0x405237
movzx esi, word [edi + 2]
add edi, 2
movzx eax, si
add eax, 0xfffffff7
cmp eax, 0x26
ja case.0x405242.10
jmp dword [eax*4 + 0x40c6d0]
movzx esi, word [edi + 4]
test esi, esi
je 0x405265
push esi
call dword [sym.imp.ucrtbase.dll_isspace]
lea ecx, [ebp - 0xd0]
add esp, 4
test eax, eax
je 0x40527d
movzx eax, word [edi + 2]
or eax, 0x20
cmp eax, 0x70
jne 0x40527d
add edi, 4
xor ebx, ebx
test si, si
jne 0x405237
jmp 0x4052d5
movzx esi, word [edi]
test si, si
je 0x4052d0
movzx eax, si
cmp eax, 0x22
jne 0x4052b3
lea ecx, [edi + 2]
mov eax, 0xfffffffe
nop word cs:[eax + eax]
cmp word [edi + eax + 4], 0
lea eax, [eax + 2]
jne 0x4052a0
mov word [edi + eax], 0
jmp 0x4052b5
mov ecx, edi
call dbg.DoOpenFile
push 0
push 0
push dword [0x419f58]
call dword [sym.imp.user32.dll_InvalidateRect]
lea ecx, [ebp - 0xd0]
test bl, 1
jne 0x405335
mov eax, dword [0x419f58]
mov dword [ebp - 0xd0], 0x28
mov dword [ebp - 0xcc], eax
push 0
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
mov dword [ebp - 0xc8], eax
mov dword [ebp - 0xc4], 0x6af
mov dword [ebp - 0xc0], 0x40d2c2
xorpd xmm0, xmm0
movupd xmmword [ebp - 0xbc], xmm0
mov dword [ebp - 0xac], 0
lea eax, [ebp - 0xd0]
push eax
call dword [sym.imp.user32.dll_MessageBoxIndirectW]
lea ecx, [ebp - 0xd0]
push 0
push 0
push 0
push ecx
mov ebx, ecx
call dword [sym.imp.user32.dll_GetMessageW]
test eax, eax
je 0x4053cd
mov esi, dword [sym.imp.user32.dll_IsDialogMessageW]
mov edi, dword [sym.imp.user32.dll_GetMessageW]
jmp 0x40536d
push 0
push 0
push 0
push ebx
call edi
test eax, eax
je 0x4053cd
push ebx
push dword [0x419f68]
call esi
test eax, eax
jne 0x405360
push ebx
push dword [ebp - 0x10]
push dword [0x419f58]
call dword [sym.imp.user32.dll_TranslateAcceleratorW]
test eax, eax
jne 0x405360
push ebx
call dword [sym.imp.user32.dll_TranslateMessage]
push ebx
call dword [sym.imp.user32.dll_DispatchMessageW]
sub esp, 0x14
xorpd xmm0, xmm0
movupd xmmword [esp + 4], xmm0
mov dword [esp], ebx
call dword [sym.imp.user32.dll_PeekMessageW]
test eax, eax
jne 0x405360
push 0
push 0
push 0x400
push dword [0x419f58]
call dword [sym.imp.user32.dll_SendMessageW]
jmp 0x405360
xor eax, eax
add esp, 0xf4
pop esi
pop edi
pop ebx
pop ebp
ret 0x10