Function at 0x100401f40
Capabilities:
Execute command

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
test rdx, rdx
je 0x100401f63
mov eax, dword [rdx + 4]
and eax, 0x182c
jne 0x1004021f8
cmp byte [0x100409011], 0
jne 0x1004020d0
movzx eax, byte [0x100409010]
test al, al
je 0x1004020bc
mov rbx, qword [sym.imp.msys_ncursesw6.dll_cur_term]
mov rax, qword [rbx]
mov rax, qword [rax + 0x20]
mov rcx, qword [rax + 0x450]
lea rdx, [rcx - 1]
cmp rdx, 0xfffffffffffffffd
jbe 0x1004022e0
mov rcx, qword [rax + 0x180]
xor esi, esi
lea rdx, [rcx - 1]
cmp rdx, 0xfffffffffffffffd
jbe 0x100402318
mov rcx, qword [rax + 0x188]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x10040212d
lea r8, [0x1004019c0]
xor edx, edx
mov esi, 1
call qword [sym.imp.msys_ncursesw6.dll_tputs]
jmp 0x10040212d
mov rax, qword [rax + 0x18]
mov ecx, 2
xor r8d, r8d
movsx r9d, word [rax]
sub r9d, 1
call qword [sym.imp.msys_ncursesw6.dll__nc_tiparm]
mov rcx, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
jbe 0x1004021db
mov rax, qword [rbx]
mov rcx, qword [rax + 0x20]
mov r8, qword [rax + 0x18]
movzx edx, word [r8 + 2]
cmp dx, 8
not edx
setne al
shr dx, 0xf
and al, dl
mov edi, eax
je 0x100402053
mov rax, qword [rcx + 0x420]
sub rax, 1
cmp rax, 0xfffffffffffffffd
jbe 0x100402390
cmp byte [0x100409011], 0
je 0x100402358
mov r8, qword [rcx + 0x3e8]
test r8, r8
je 0x100402358
mov rcx, r8
call fcn.100401a50
mov rdx, qword [rbx]
cmp byte [0x100409011], 0
mov rdx, qword [rdx + 0x20]
je 0x100402348
mov rcx, qword [rdx + 0x3e0]
test rcx, rcx
je 0x100402348
lea rdx, [rcx - 1]
or eax, esi
cmp rdx, 0xfffffffffffffffd
ja 0x1004020bc
lea r8, [0x1004019c0]
xor edx, edx
call qword [sym.imp.msys_ncursesw6.dll_tputs]
mov eax, 1
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rbx, qword [sym.imp.msys_ncursesw6.dll_cur_term]
mov rax, qword [rbx]
mov rax, qword [rax + 0x20]
mov rcx, qword [rax + 0x450]
lea rdx, [rcx - 1]
cmp rdx, 0xfffffffffffffffd
jbe 0x1004022e0
mov rcx, qword [rax + 0x3d0]
test rcx, rcx
je 0x100402300
xor esi, esi
cmp rcx, 0xffffffffffffffff
jne 0x100402318
mov rcx, qword [rax + 0x3d8]
test rcx, rcx
je 0x100401fb9
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
jbe 0x100401fce
mov rax, qword [rbx]
mov rcx, qword [rax + 0x20]
mov r9, qword [rcx + 0x870]
lea rdx, [r9 - 1]
cmp rdx, 0xfffffffffffffffd
jbe 0x100402368
mov rdx, qword [rcx + 0xb80]
lea r8, [rdx - 1]
cmp r8, 0xfffffffffffffffd
jbe 0x100401ff0
mov rdx, qword [rcx + 0xab0]
lea r8, [rdx - 1]
cmp r8, 0xfffffffffffffffd
ja 0x100402210
mov rdi, qword [rcx + 0xab8]
lea r8, [rdi - 1]
cmp r8, 0xfffffffffffffffd
ja 0x100402210
mov ecx, 1
mov rdi, qword [sym.imp.msys_ncursesw6.dll__nc_tiparm]
xor r8d, r8d
call rdi
mov rcx, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
jbe 0x100402400
mov rax, qword [rbx]
mov rdx, qword [rax + 0x18]
mov rax, qword [rax + 0x20]
movsx ecx, word [rdx]
mov rdx, qword [rax + 0xab8]
lea r8d, [rcx - 1]
mov ecx, 1
call rdi
mov rcx, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
ja 0x10040201b
lea r8, [0x1004019c0]
xor edx, edx
mov esi, 1
call qword [sym.imp.msys_ncursesw6.dll_tputs]
jmp 0x10040201b
mov dword [rdx + 4], eax
mov r8, rdx
mov edx, 3
call fcn.100402d00
jmp 0x100401f63
mov rdi, qword [rcx + 0x878]
lea rdx, [rdi - 1]
cmp rdx, 0xfffffffffffffffd
ja 0x100402022
mov rdi, qword [rcx + 0x880]
lea rdx, [rdi - 1]
cmp rdx, 0xfffffffffffffffd
ja 0x100402022
call fcn.100401c60
mov rcx, qword [rbx]
mov rdx, qword [rcx + 0x20]
mov r9, qword [rdx + 0x878]
lea r8, [r9 - 1]
cmp r8, 0xfffffffffffffffd
jbe 0x1004024d0
or eax, esi
mov edi, eax
mov r9, qword [rdx + 0x380]
mov rax, qword [rcx + 0x18]
lea rcx, [r9 - 1]
movsx eax, word [rax]
cmp rcx, 0xfffffffffffffffd
jbe 0x1004024a0
xor esi, esi
cmp ax, 1
jle 0x1004022b6
nop dword [rax + rax]
mov rdx, qword [0x100409018]
mov ecx, 0x20
add esi, 1
call sub.msys_2.0.dll_putc
mov rdx, qword [rbx]
mov rax, qword [rdx + 0x18]
movsx eax, word [rax]
sub eax, 1
cmp eax, esi
jg 0x100402288
mov rdx, qword [rdx + 0x20]
mov edi, 1
mov rcx, qword [rdx + 0x880]
xor esi, esi
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
jbe 0x100402480
call fcn.100401c60
or esi, eax
or esi, edi
jmp 0x10040201b
call sub.msys_2.0.dll_system
mov rax, qword [rbx]
cmp byte [0x100409011], 0
mov rax, qword [rax + 0x20]
je 0x100401fa2
jmp 0x1004020f3
mov rcx, qword [rax + 0x180]
xor esi, esi
lea rdx, [rcx - 1]
cmp rdx, 0xfffffffffffffffd
ja 0x100402333
nop dword [rax + rax]
lea r8, [0x1004019c0]
xor edx, edx
mov esi, 1
call qword [sym.imp.msys_ncursesw6.dll_tputs]
mov rax, qword [rbx]
mov rax, qword [rax + 0x20]
cmp byte [0x100409011], 0
jne 0x10040210f
jmp 0x100401fb9
mov rcx, qword [rdx + 0x190]
jmp 0x10040209c
mov r8, qword [rcx + 0x198]
jmp 0x100402070
mov rcx, r9
lea r8, [0x1004019c0]
xor edx, edx
mov esi, 1
call qword [sym.imp.msys_ncursesw6.dll_tputs]
mov rax, qword [rbx]
mov rcx, qword [rax + 0x20]
jmp 0x100402022
mov rax, qword [rcx + 0x20]
sub rax, 1
cmp rax, 0xfffffffffffffffd
ja 0x100402053
movzx r13d, word [r8]
call fcn.100401c60
mov rax, qword [rbx]
xor edx, edx
lea r8, [0x1004019c0]
mov rbp, qword [sym.imp.msys_ncursesw6.dll_tputs]
mov rax, qword [rax + 0x20]
mov rcx, qword [rax + 0x20]
call rbp
mov rax, qword [rbx]
mov rdx, qword [rax + 0x18]
movsx r8d, word [rdx + 2]
cmp r8w, 1
jle 0x1004023f4
movsx r12d, r13w
mov esi, r8d
cmp r12d, r8d
jge 0x100402420
mov word [rdx + 2], r13w
call fcn.100401c60
mov rax, qword [rbx]
mov rcx, qword [rax + 0x20]
mov esi, edi
jmp 0x100402053
lea r8, [0x1004019c0]
xor edx, edx
mov esi, 1
call qword [sym.imp.msys_ncursesw6.dll_tputs]
jmp 0x1004021aa
jle 0x1004023ec
lea r14, [0x1004052c6]
lea r15, [0x1004052c4]
lea r13, [0x1004019c0]
nop word [rax + rax]
mov rcx, qword [0x100409018]
mov r9, r15
mov rdx, r14
call sub.msys_2.0.dll_fprintf
mov rax, qword [rbx]
mov r8, r13
xor edx, edx
mov rax, qword [rax + 0x20]
mov rcx, qword [rax + 0x420]
call rbp
mov rax, qword [rbx]
mov rax, qword [rax + 0x18]
movsx r8d, word [rax + 2]
add esi, r8d
cmp r12d, esi
jg 0x100402440
jmp 0x1004023ec
lea r8, [0x1004019c0]
xor edx, edx
mov esi, 1
call qword [sym.imp.msys_ncursesw6.dll_tputs]
jmp 0x1004022cd
mov ecx, 1
lea r8d, [rax - 1]
mov rdx, r9
call qword [sym.imp.msys_ncursesw6.dll__nc_tiparm]
mov rcx, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
jbe 0x1004024f3
mov rax, qword [rbx]
mov rdx, qword [rax + 0x20]
jmp 0x1004022b6
xor edx, edx
mov rcx, r9
mov edi, 1
lea r8, [0x1004019c0]
call qword [sym.imp.msys_ncursesw6.dll_tputs]
mov rcx, qword [rbx]
mov rdx, qword [rcx + 0x20]
jmp 0x10040225f
lea r8, [0x1004019c0]
xor edx, edx
mov edi, 1
call qword [sym.imp.msys_ncursesw6.dll_tputs]
jmp 0x1004024bf