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

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0xb8]
push ebx
push ecx
sub esp, 0xf8
mov ebx, dword [ecx]
mov edi, dword [ecx + 0xc]
mov dword [ebp - 0xb8], 8
mov dword [esp], eax
mov dword [ebp - 0xb4], 0x604
call sym._InitCommonControlsEx_4
sub esp, 4
mov dword [esp + 4], global_wszAccelTable
mov dword [esp], ebx
call sym._LoadAcceleratorsW_8
mov dword [ebp - 0x48], 0x30
sub esp, 8
mov dword [ebp - 0x44], 0
mov esi, eax
mov dword [esp + 4], 0x66
mov dword [esp], ebx
mov dword [ebp - 0x40], dbg.WndProc
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 4
mov dword [ebp - 0x34], ebx
call sym._LoadIconW_8
sub esp, 8
mov dword [ebp - 0x30], eax
mov dword [esp], 0x32
call sym._GetSystemMetrics_4
sub esp, 4
mov dword [ebp - 0xcc], eax
mov dword [esp], 0x31
call sym._GetSystemMetrics_4
mov edx, dword [ebp - 0xcc]
sub esp, 4
mov dword [esp + 0x10], edx
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 sym._LoadImageW_24
sub esp, 0x18
mov dword [ebp - 0x1c], eax
mov dword [esp + 4], 0x7f01
mov dword [esp], 0
call sym._LoadCursorW_8
sub esp, 8
mov dword [ebp - 0x2c], eax
mov dword [esp], 5
call sym._GetSysColorBrush_4
lea edx, [ebp - 0x48]
mov dword [ebp - 0x24], 0x898
sub esp, 4
mov dword [ebp - 0x28], eax
mov dword [esp], edx
mov dword [ebp - 0x20], str.WORDPADTOP
call sym._RegisterClassExW_4
mov dword [ebp - 0x44], 0
sub esp, 4
mov dword [ebp - 0x40], dbg.preview_proc@16
mov dword [esp + 4], 0x7f01
mov dword [esp], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x1c], 0
call sym._LoadCursorW_8
lea edx, [ebp - 0x48]
mov dword [ebp - 0x28], 0
sub esp, 8
mov dword [ebp - 0x2c], eax
mov dword [esp], edx
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], str.PrtPreview
call sym._RegisterClassExW_4
lea eax, [ebp - 0xa8]
sub esp, 4
mov dword [esp], eax
call dbg.registry_read_winrect
lea eax, [ebp - 0xa8]
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._MonitorFromRect_8
lea ecx, [ebp - 0x98]
mov dword [ebp - 0x98], 0x28
sub esp, 8
mov dword [esp + 4], ecx
mov dword [esp], eax
call sym._GetMonitorInfoW_8
lea eax, [ebp - 0xa8]
mov edx, dword [ebp - 0xa8]
mov ecx, dword [ebp - 0xa4]
sub esp, 8
mov dword [esp + 8], eax
lea eax, [ebp - 0x84]
mov dword [esp + 4], eax
mov dword [esp], eax
mov dword [ebp - 0xd0], edx
mov dword [ebp - 0xcc], ecx
call sym._IntersectRect_12
mov eax, dword [ebp - 0x7c]
sub esp, 0xc
cmp dword [ebp - 0x84], eax
jge 0x40e170
mov ecx, dword [ebp - 0x78]
mov edx, dword [ebp - 0xd0]
mov eax, 0x80000000
cmp dword [ebp - 0x80], ecx
mov ecx, dword [ebp - 0xcc]
cmovge edx, eax
cmovge ecx, eax
mov eax, dword [ebp - 0x9c]
sub eax, dword [ebp - 0xa4]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0xa0]
sub eax, dword [ebp - 0xa8]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0x2cf0000
mov dword [esp + 8], global_lpCaption
mov dword [esp + 4], str.WORDPADTOP
mov dword [esp], 0
call sym._CreateWindowExW_48
sub esp, 0x30
mov dword [0x41d708], eax
lea eax, [ebp - 0xbc]
mov dword [esp], eax
call dbg.registry_read_maximized
cmp edi, 1
je 0x40e180
cmp edi, 0xa
je 0x40e180
mov eax, dword [0x41d708]
mov dword [esp + 4], edi
lea edi, [ebp - 0xb0]
mov dword [esp], eax
call sym._ShowWindow_8
xor eax, eax
sub esp, 8
call dbg.set_caption
call dbg.set_bar_states
mov dword [0x410284], 2
call dbg.set_bar_states
call dbg.set_default_font
mov eax, dword [0x410284]
mov dword [esp], eax
call sym._reg_formatindex
mov eax, dword [eax*4 + 0x41d6f0]
mov dword [esp + 4], eax
mov eax, dword [0x41d708]
mov dword [esp], eax
call dbg.target_device
mov dword [esp], ebx
mov dword [esp + 4], 0x89a
call sym._LoadMenuW_8
sub esp, 8
mov dword [0x41d6fc], eax
call dbg.get_default_printer_opts
mov eax, dword [0x410284]
mov dword [esp], eax
call sym._reg_formatindex
mov eax, dword [eax*4 + 0x41d6f0]
mov dword [esp + 4], eax
mov eax, dword [0x41d708]
mov dword [esp], eax
call dbg.target_device
mov eax, dword [0x41d708]
mov dword [esp + 4], 0x7d4
mov dword [esp], eax
call sym._GetDlgItem_8
sub esp, 8
mov dword [esp + 4], 0x7df
mov dword [esp], eax
call sym._GetDlgItem_8
mov ebx, eax
mov eax, dword [0x41d708]
sub esp, 8
mov dword [esp + 4], 0x7d1
mov dword [esp], eax
call sym._GetDlgItem_8
sub esp, 8
mov dword [esp + 0xc], 0
mov dword [esp + 8], edi
mov dword [esp + 4], 0xd6
mov dword [esp], eax
call sym._SendMessageW_16
sub esp, 0x10
mov dword [esp], ebx
mov dword [esp + 8], dbg.ruler_proc@16
mov dword [esp + 4], 0xfffffffc
call sym._SetWindowLongW_12
sub esp, 0xc
mov dword [esp], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp + 4], 0x400
call sym._SendMessageW_16
sub esp, 0x10
call dword [sym.imp.kernel32.dll_GetCommandLineW]
mov ebx, eax
movzx eax, word [eax]
cmp ax, 0x20
jne 0x40def5
lea esi, [esi]
movzx eax, word [ebx + 2]
add ebx, 2
cmp ax, 0x20
je 0x40dee8
cmp ax, 0x22
je 0x40e198
mov eax, 0x20
movzx edi, word [ebx]
test di, di
jne 0x40df21
jmp 0x40e168
test di, di
je 0x40e168
add ebx, 2
mov edx, edi
movzx edi, word [ebx]
cmp dx, ax
jne 0x40df18
test di, di
je 0x40e168
xor edx, edx
cmp di, 9
je 0x40df48
cmp di, 0x20
jne 0x40df5b
lea esi, [esi]
movzx edi, word [ebx + 2]
add ebx, 2
cmp di, 0x20
je 0x40df48
cmp di, 9
je 0x40df48
and edi, 0xfffffffd
cmp di, 0x2d
jne 0x40df9e
movzx edi, word [ebx + 4]
test di, di
je 0x40e0e0
movzx eax, di
mov dword [ebp - 0xcc], edx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_isspace]
mov edx, dword [ebp - 0xcc]
test eax, eax
je 0x40df9e
movzx eax, word [ebx + 2]
and eax, 0xffffffdf
cmp ax, 0x50
je 0x40e157
movzx eax, word [ebx]
test ax, ax
je 0x40dfe3
cmp ax, 0x22
je 0x40e1a0
mov eax, ebx
mov dword [ebp - 0xcc], edx
call dbg.DoOpenFile
mov eax, dword [0x41d708]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._InvalidateRect_12
mov edx, dword [ebp - 0xcc]
sub esp, 0xc
lea ebx, [ebp - 0x70]
test edx, edx
jne 0x40e0f1
nop
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call sym._GetMessageW_16
sub esp, 0x10
test eax, eax
je 0x40e0c8
mov eax, dword [0x41d700]
mov dword [esp + 4], ebx
mov dword [esp], eax
call sym._IsDialogMessageW_8
sub esp, 8
test eax, eax
jne 0x40dff0
mov eax, dword [0x41d708]
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], eax
call sym._TranslateAcceleratorW_12
sub esp, 0xc
test eax, eax
jne 0x40dff0
mov dword [esp], ebx
call sym._TranslateMessage_4
sub esp, 4
mov dword [esp], ebx
call sym._DispatchMessageW_4
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 sym._PeekMessageW_20
sub esp, 0x14
test eax, eax
jne 0x40dff0
mov eax, dword [0x41d708]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x400
mov dword [esp], eax
call sym._SendMessageW_16
sub esp, 0x10
jmp 0x40dff0
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, 0xffffffdf
cmp ax, 0x50
jne 0x40df9e
mov eax, dword [0x41d708]
mov dword [ebp - 0x70], 0x28
lea ebx, [ebp - 0x70]
mov dword [esp], 0
mov dword [ebp - 0x6c], eax
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
mov dword [ebp - 0x64], 0x6af
sub esp, 4
mov dword [ebp - 0x68], eax
mov dword [esp], ebx
mov dword [ebp - 0x60], global_lpCaption
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
call sym._MessageBoxIndirectW_4
sub esp, 4
jmp 0x40dff0
add ebx, 4
mov edx, 1
jmp 0x40df39
lea ebx, [ebp - 0x70]
jmp 0x40dff0
mov ecx, 0x80000000
mov edx, 0x80000000
jmp 0x40dd05
mov edx, dword [ebp - 0xbc]
mov eax, 3
test edx, edx
cmovne edi, eax
jmp 0x40dd95
add ebx, 2
jmp 0x40df04
cmp word [ebx + 2], 0
lea ecx, [ebx + 2]
je 0x40e1bb
mov eax, ecx
lea esi, [esi]
mov ebx, eax
add eax, 2
cmp word [eax], 0
jne 0x40e1b0
xor eax, eax
mov word [ebx], ax
mov ebx, ecx
jmp 0x40dfb0