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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x198
movaps xmmword [rsp + 0x180], xmm6
mov ebp, r9d
mov rbx, rcx
movabs r13, 0xffffffff00000000
movabs r12, 0x100000000
movabs rax, 0x60400000008
mov qword [rsp + 0xd0], rax
lea rcx, [rsp + 0xd0]
call qword [sym.imp.comctl32.dll_InitCommonControlsEx]
lea rdx, [0x14000ff80]
mov rcx, rbx
call qword [sym.imp.user32.dll_LoadAcceleratorsW]
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x80], 0x50
lea rax, [sym.WndProc]
mov qword [rsp + 0x88], rax
movabs rax, 0x400000000
mov qword [rsp + 0x90], rax
mov qword [rsp + 0x98], rbx
mov edx, 0x66
mov rcx, rbx
call qword [sym.imp.user32.dll_LoadIconW]
mov qword [rsp + 0xa0], rax
mov rsi, qword [sym.imp.user32.dll_GetSystemMetrics]
mov ecx, 0x32
call rsi
mov edi, eax
mov ecx, 0x31
call rsi
mov dword [rsp + 0x20], edi
mov dword [rsp + 0x28], 0x8000
mov edx, 0x66
mov rcx, rbx
mov r8d, 1
mov r9d, eax
call qword [sym.imp.user32.dll_LoadImageW]
mov qword [rsp + 0xc8], rax
mov r15, qword [sym.imp.user32.dll_LoadCursorW]
mov edx, 0x7f01
xor ecx, ecx
call r15
mov qword [rsp + 0xa8], rax
mov ecx, 5
call qword [sym.imp.user32.dll_GetSysColorBrush]
mov qword [rsp + 0xb0], rax
mov qword [rsp + 0xb8], 0x898
lea r14, str.WORDPADTOP
mov qword [rsp + 0xc0], r14
mov rsi, qword [sym.imp.user32.dll_RegisterClassExW]
lea rdi, [rsp + 0x80]
mov rcx, rdi
call rsi
mov dword [rsp + 0x84], 0
lea rax, [sym.preview_proc]
mov qword [rsp + 0x88], rax
mov qword [rsp + 0x90], 0
mov qword [rsp + 0x98], rbx
mov qword [rsp + 0xa0], 0
mov qword [rsp + 0xc8], 0
mov edx, 0x7f01
xor ecx, ecx
call r15
mov qword [rsp + 0xa8], rax
xorps xmm6, xmm6
movups xmmword [rsp + 0xb0], xmm6
lea rax, str.PrtPreview
mov qword [rsp + 0xc0], rax
mov rcx, rdi
call rsi
lea rdi, [rsp + 0x68]
mov rcx, rdi
call sym.registry_read_winrect
mov rcx, rdi
mov edx, 1
call qword [sym.imp.user32.dll_MonitorFromRect]
mov dword [rsp + 0x150], 0x28
lea rdx, [rsp + 0x150]
mov rcx, rax
call qword [sym.imp.user32.dll_GetMonitorInfoW]
mov r15d, dword [rsp + 0x68]
mov esi, dword [rsp + 0x6c]
lea rcx, [rsp + 0x164]
mov rdx, rcx
mov r8, rdi
call qword [sym.imp.user32.dll_IntersectRect]
movq xmm0, qword [rsp + 0x164]
movq xmm1, qword [rsp + 0x16c]
pcmpgtd xmm1, xmm0
pshufd xmm0, xmm1, 0x50
movmskpd eax, xmm0
cmp eax, 3
mov eax, 0x80000000
cmovne r15d, eax
cmovne esi, eax
mov eax, dword [rsp + 0x70]
mov ecx, dword [rsp + 0x74]
sub ecx, dword [rsp + 0x6c]
sub eax, dword [rsp + 0x68]
mov qword [rsp + 0x50], rbx
movups xmmword [rsp + 0x40], xmm6
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], r15d
mov qword [rsp + 0x58], 0
lea rdi, [0x14000ffc0]
xor ecx, ecx
mov rdx, r14
mov r8, rdi
mov r9d, 0x2cf0000
call qword [sym.imp.user32.dll_CreateWindowExW]
mov qword [0x14001bff0], rax
lea rcx, [rsp + 0x64]
call sym.registry_read_maximized
cmp dword [rsp + 0x64], 0
mov eax, 3
cmove eax, ebp
cmp ebp, 0xa
mov edx, ebp
cmove edx, eax
cmp ebp, 1
cmove edx, eax
mov rcx, qword [0x14001bff0]
call qword [sym.imp.user32.dll_ShowWindow]
lea rax, [0x14001c860]
mov rdx, r13
nop dword [rax]
add rdx, r12
cmp word [rax], 0
lea rax, [rax + 2]
jne 0x140005c80
sar rdx, 0x1f
and rdx, 0xfffffffffffffffe
add rdx, 0x20
mov ecx, 1
call qword [sym.imp.ucrtbase.dll_calloc]
test rax, rax
je 0x140005d47
mov r14, rax
lea rax, [0x14001c860]
mov r8, r13
nop word [rax + rax]
add r8, r12
cmp word [rax], 0
lea rax, [rax + 2]
jne 0x140005cc0
sar r8, 0x1f
and r8, 0xfffffffffffffffe
lea r15, [0x14001c860]
mov rcx, r14
mov rdx, r15
call sym.memcpy
nop word [rax + rax]
add r13, r12
cmp word [r15], 0
lea r15, [r15 + 2]
jne 0x140005cf0
sar r13, 0x20
mov word [r14 + r13*2 + 4], 0x20
mov dword [r14 + r13*2], 0x2d0020
movaps xmm0, xmmword [0x14000ffc0]
movups xmmword [r14 + r13*2 + 6], xmm0
movupd xmm0, xmmword [0x14000ffca]
movupd xmmword [r14 + r13*2 + 0x10], xmm0
mov rcx, qword [0x14001bff0]
mov rdx, r14
call qword [sym.imp.user32.dll_SetWindowTextW]
mov rcx, r14
call qword [sym.imp.ucrtbase.dll_free]
call sym.set_bar_states
mov qword [0x14001b298], 2
call sym.set_bar_states
xorpd xmm0, xmm0
movupd xmmword [rsp + 0x134], xmm0
movupd xmmword [rsp + 0x124], xmm0
movupd xmmword [rsp + 0x114], xmm0
movupd xmmword [rsp + 0x104], xmm0
movupd xmmword [rsp + 0xf4], xmm0
movupd xmmword [rsp + 0xe4], xmm0
mov qword [rsp + 0x144], 0
movabs rax, 0x2000000700000074
mov qword [rsp + 0xd8], rax
mov dword [rsp + 0xe0], 0
test byte [0x14001b298], 2
lea rcx, str.Courier_New
lea rax, str.Times_New_Roman
cmove rax, rcx
xor ecx, ecx
nop word [rax + rax]
movzx edx, word [rax + rcx]
mov word [rsp + rcx + 0xf2], dx
add rcx, 2
test dx, dx
jne 0x140005de0
mov rcx, qword [0x14001c020]
mov r15, qword [sym.imp.user32.dll_SendMessageW]
lea r9, [rsp + 0xd8]
mov edx, 0x444
xor r8d, r8d
call r15
mov rcx, qword [0x14001b298]
call sym.reg_formatindex
cdqe
lea rsi, [0x14001c000]
mov edx, dword [rsi + rax*4]
mov rcx, qword [0x14001bff0]
call sym.target_device
mov edx, 0x89a
mov rcx, rbx
call qword [sym.imp.user32.dll_LoadMenuW]
mov qword [0x14001bff8], rax
call sym.get_default_printer_opts
mov rcx, qword [0x14001b298]
call sym.reg_formatindex
cdqe
mov edx, dword [rsi + rax*4]
mov rcx, qword [0x14001bff0]
call sym.target_device
mov rcx, qword [0x14001bff0]
mov rsi, qword [sym.imp.user32.dll_GetDlgItem]
mov edx, 0x7d4
call rsi
mov rcx, rax
mov edx, 0x7df
call rsi
mov rbx, rax
mov rcx, qword [0x14001bff0]
mov edx, 0x7d1
call rsi
lea r14, [rsp + 0x178]
mov rcx, rax
mov edx, 0xd6
mov r8, r14
xor r9d, r9d
call r15
lea r8, [sym.ruler_proc]
mov rcx, rbx
mov edx, 0xfffffffc
call qword [sym.imp.user32.dll_SetWindowLongPtrW]
mov rcx, rbx
mov edx, 0x400
mov r8, r14
mov r9, rax
call r15
call qword [sym.imp.kernel32.dll_GetCommandLineW]
add rax, 0xfffffffffffffffe
nop word [rax + rax]
movzx edx, word [rax + 2]
add rax, 2
cmp edx, 0x20
je 0x140005ef0
xor ecx, ecx
cmp edx, 0x22
sete cl
lea ecx, [rcx*2 + 0x20]
xor r8d, r8d
cmp ecx, edx
sete r8b
lea rdx, [rax + r8*2]
lea rax, [rax + r8*2]
add rax, 0xfffffffffffffffe
mov rsi, qword [rsp + 0x78]
nop word cs:[rax + rax]
movzx r8d, word [rdx]
add rax, 2
test r8d, r8d
je 0x140005f46
add rdx, 2
cmp ecx, r8d
jne 0x140005f30
xor edx, edx
cmp ecx, r8d
sete dl
movzx ebp, word [rax + rdx*2]
test bp, bp
je 0x14000609a
lea rbx, [rax + rdx*2]
mov r14b, 1
lea r15, [0x14000f690]
mov r13, qword [sym.imp.ucrtbase.dll_isspace]
jmp 0x140005f83
movzx ebp, word [rbx]
add rbx, 2
movzx eax, bp
add eax, 0xfffffff7
cmp eax, 0x26
ja case.0x140005f99.10
movsxd rax, dword [r15 + rax*4]
add rax, r15
jmp rax
movzx ebp, word [rbx + 2]
test ebp, ebp
je 0x140005fac
mov ecx, ebp
call r13
test eax, eax
je 0x140005fc5
movzx eax, word [rbx]
or eax, 0x20
cmp eax, 0x70
jne 0x140005fc5
add rbx, 2
xor r14d, r14d
test bp, bp
jne 0x140005f83
jmp 0x14000602d
movzx ebp, word [rbx - 2]
test bp, bp
je 0x140006027
movzx eax, bp
cmp eax, 0x22
jne 0x140006009
movabs rax, 0xfffffffe00000000
mov rcx, rbx
nop word cs:[rax + rax]
add rax, r12
cmp word [rcx], 0
lea rcx, [rcx + 2]
jne 0x140005ff0
sar rax, 0x20
mov word [rbx + rax*2], 0
jmp 0x14000600d
add rbx, 0xfffffffffffffffe
mov rcx, rbx
call sym.DoOpenFile
mov rcx, qword [0x14001bff0]
xor edx, edx
xor r8d, r8d
call qword [sym.imp.user32.dll_InvalidateRect]
test r14b, 1
jne 0x14000609a
mov rax, qword [0x14001bff0]
mov dword [rsp + 0xd8], 0x50
mov qword [rsp + 0xe0], rax
xor ecx, ecx
call qword [sym.imp.kernel32.dll_GetModuleHandleW]
mov qword [rsp + 0xe8], rax
mov qword [rsp + 0xf0], 0x6af
mov qword [rsp + 0xf8], rdi
mov dword [rsp + 0x100], 0
xorpd xmm0, xmm0
movupd xmmword [rsp + 0x108], xmm0
movupd xmmword [rsp + 0x114], xmm0
lea rcx, [rsp + 0xd8]
call qword [sym.imp.user32.dll_MessageBoxIndirectW]
lea rcx, [rsp + 0xd8]
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.user32.dll_GetMessageW]
test eax, eax
je 0x140006165
lea rdi, [rsp + 0xd8]
mov rbx, qword [sym.imp.user32.dll_IsDialogMessageW]
mov r14, qword [sym.imp.user32.dll_TranslateAcceleratorW]
mov r12, qword [sym.imp.user32.dll_TranslateMessage]
mov r13, qword [sym.imp.user32.dll_DispatchMessageW]
mov rbp, qword [sym.imp.user32.dll_PeekMessageW]
mov r15, qword [sym.imp.user32.dll_GetMessageW]
jmp 0x140006102
mov rcx, rdi
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call r15
test eax, eax
je 0x140006165
mov rcx, qword [0x14001c008]
mov rdx, rdi
call rbx
test eax, eax
jne 0x1400060f0
mov rcx, qword [0x14001bff0]
mov rdx, rsi
mov r8, rdi
call r14
test eax, eax
jne 0x1400060f0
mov rcx, rdi
call r12
mov rcx, rdi
call r13
mov dword [rsp + 0x20], 0
mov rcx, rdi
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call rbp
test eax, eax
jne 0x1400060f0
mov rcx, qword [0x14001bff0]
mov edx, 0x400
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.user32.dll_SendMessageW]
jmp 0x1400060f0
xor eax, eax
movaps xmm6, xmmword [rsp + 0x180]
add rsp, 0x198
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret