Function at 0x100402000
Capabilities:
Execute command

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
test rdx, rdx
je 0x100402021
mov eax, dword [rdx + 4]
and eax, 0x182c
jne 0x1004022a0
cmp byte [0x100409121], 0
jne 0x100402188
movzx eax, byte [0x100409120]
test al, al
je 0x100402172
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 0x100402388
mov rcx, qword [rax + 0x180]
xor esi, esi
lea rdx, [rcx - 1]
cmp rdx, 0xfffffffffffffffd
jbe 0x1004023c8
mov rcx, qword [rax + 0x188]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1004021e5
lea r8, [0x100401a90]
xor edx, edx
mov esi, 1
call sub.msys_ncursesw6.dll_tputs
jmp 0x1004021e5
mov rax, qword [rax + 0x18]
mov rcx, r9
xor edx, edx
movsx r8d, word [rax]
sub r8d, 1
movsxd r8, r8d
call sub.msys_ncursesw6.dll_tparm
mov rcx, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
jbe 0x100402288
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 0x10040210a
mov rax, qword [rcx + 0x420]
sub rax, 1
cmp rax, 0xfffffffffffffffd
jbe 0x100402440
cmp byte [0x100409121], 0
je 0x100402408
mov r8, qword [rcx + 0x3e8]
test r8, r8
je 0x100402408
mov rcx, r8
call fcn.100401b20
mov rdx, qword [rbx]
cmp byte [0x100409121], 0
mov rdx, qword [rdx + 0x20]
je 0x1004023f8
mov rcx, qword [rdx + 0x3e0]
test rcx, rcx
je 0x1004023f8
lea rdx, [rcx - 1]
or eax, esi
cmp rdx, 0xfffffffffffffffd
ja 0x100402172
lea r8, [0x100401a90]
xor edx, edx
call sub.msys_ncursesw6.dll_tputs
mov eax, 1
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
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 0x100402388
mov rcx, qword [rax + 0x3d0]
test rcx, rcx
je 0x1004023b0
xor esi, esi
cmp rcx, 0xffffffffffffffff
jne 0x1004023c8
mov rcx, qword [rax + 0x3d8]
test rcx, rcx
je 0x100402077
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
jbe 0x10040208c
mov rax, qword [rbx]
mov rcx, qword [rax + 0x20]
mov r9, qword [rcx + 0x870]
lea rdx, [r9 - 1]
cmp rdx, 0xfffffffffffffffd
jbe 0x100402418
mov r9, qword [rcx + 0xb80]
lea rdx, [r9 - 1]
cmp rdx, 0xfffffffffffffffd
jbe 0x1004020a8
mov r8, qword [rcx + 0xab0]
lea rdx, [r8 - 1]
cmp rdx, 0xfffffffffffffffd
ja 0x1004022b8
mov rdi, qword [rcx + 0xab8]
lea rdx, [rdi - 1]
cmp rdx, 0xfffffffffffffffd
ja 0x1004022b8
mov rcx, r8
xor edx, edx
call sub.msys_ncursesw6.dll_tparm
mov rcx, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
jbe 0x1004024b0
mov rax, qword [rbx]
mov rdx, qword [rax + 0x18]
mov rax, qword [rax + 0x20]
movsx edx, word [rdx]
mov rcx, qword [rax + 0xab8]
sub edx, 1
movsxd rdx, edx
call sub.msys_ncursesw6.dll_tparm
mov rcx, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1004020d2
lea r8, [0x100401a90]
xor edx, edx
mov esi, 1
call sub.msys_ncursesw6.dll_tputs
jmp 0x1004020d2
mov dword [rdx + 4], eax
mov r8, rdx
mov edx, 3
call fcn.100402cb0
jmp 0x100402021
mov rdi, qword [rcx + 0x878]
lea rdx, [rdi - 1]
cmp rdx, 0xfffffffffffffffd
ja 0x1004020d9
mov rdi, qword [rcx + 0x880]
lea rdx, [rdi - 1]
cmp rdx, 0xfffffffffffffffd
ja 0x1004020d9
call fcn.100401d30
mov rcx, qword [rbx]
mov rdx, qword [rcx + 0x20]
mov r9, qword [rdx + 0x878]
lea r8, [r9 - 1]
cmp r8, 0xfffffffffffffffd
jbe 0x100402580
or eax, esi
mov edi, eax
mov r8, qword [rdx + 0x380]
mov rax, qword [rcx + 0x18]
lea rcx, [r8 - 1]
movzx eax, word [rax]
cmp rcx, 0xfffffffffffffffd
jbe 0x100402550
xor esi, esi
cmp ax, 1
jle 0x10040235e
nop dword [rax + rax]
mov rdx, qword [0x100409128]
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 0x100402330
mov rdx, qword [rdx + 0x20]
mov edi, 1
mov rcx, qword [rdx + 0x880]
xor esi, esi
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
jbe 0x100402538
call fcn.100401d30
or esi, eax
or esi, edi
jmp 0x1004020d2
call sub.msys_2.0.dll_system
mov rax, qword [rbx]
cmp byte [0x100409121], 0
mov rax, qword [rax + 0x20]
je 0x100402060
jmp 0x1004021ab
mov rcx, qword [rax + 0x180]
xor esi, esi
lea rdx, [rcx - 1]
cmp rdx, 0xfffffffffffffffd
ja 0x1004023e2
nop dword [rax + rax]
lea r8, [0x100401a90]
xor edx, edx
mov esi, 1
call sub.msys_ncursesw6.dll_tputs
mov rax, qword [rbx]
mov rax, qword [rax + 0x20]
cmp byte [0x100409121], 0
jne 0x1004021c7
jmp 0x100402077
mov rcx, qword [rdx + 0x190]
jmp 0x100402153
mov r8, qword [rcx + 0x198]
jmp 0x100402127
mov rcx, r9
lea r8, [0x100401a90]
xor edx, edx
mov esi, 1
call sub.msys_ncursesw6.dll_tputs
mov rax, qword [rbx]
mov rcx, qword [rax + 0x20]
jmp 0x1004020d9
mov rax, qword [rcx + 0x20]
sub rax, 1
cmp rax, 0xfffffffffffffffd
ja 0x10040210a
movzx r12d, word [r8]
call fcn.100401d30
mov rax, qword [rbx]
lea r8, [0x100401a90]
xor edx, edx
mov rax, qword [rax + 0x20]
mov rcx, qword [rax + 0x20]
call sub.msys_ncursesw6.dll_tputs
mov rax, qword [rbx]
mov rdx, qword [rax + 0x18]
movsx r8d, word [rdx + 2]
cmp r8w, 1
jle 0x1004024a0
movsx ebp, r12w
mov esi, r8d
cmp ebp, r8d
jge 0x1004024d0
mov word [rdx + 2], r12w
call fcn.100401d30
mov rax, qword [rbx]
mov rcx, qword [rax + 0x20]
mov esi, edi
jmp 0x10040210a
lea r8, [0x100401a90]
xor edx, edx
mov esi, 1
call sub.msys_ncursesw6.dll_tputs
jmp 0x100402257
jle 0x100402498
lea r13, [0x100405756]
lea r14, [0x100405754]
lea r12, [0x100401a90]
nop word [rax + rax]
mov rcx, qword [0x100409128]
mov r9, r14
mov rdx, r13
call sub.msys_2.0.dll_fprintf
mov rax, qword [rbx]
mov r8, r12
xor edx, edx
mov rax, qword [rax + 0x20]
mov rcx, qword [rax + 0x420]
call sub.msys_ncursesw6.dll_tputs
mov rax, qword [rbx]
mov rax, qword [rax + 0x18]
movsx r8d, word [rax + 2]
add esi, r8d
cmp ebp, esi
jg 0x1004024f0
jmp 0x100402498
lea r8, [0x100401a90]
xor edx, edx
mov esi, 1
call sub.msys_ncursesw6.dll_tputs
jmp 0x100402375
movsx edx, ax
mov rcx, r8
sub edx, 1
movsxd rdx, edx
call sub.msys_ncursesw6.dll_tparm
mov rcx, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
jbe 0x1004025a2
mov rax, qword [rbx]
mov rdx, qword [rax + 0x20]
jmp 0x10040235e
xor edx, edx
mov rcx, r9
mov edi, 1
lea r8, [0x100401a90]
call sub.msys_ncursesw6.dll_tputs
mov rcx, qword [rbx]
mov rdx, qword [rcx + 0x20]
jmp 0x100402307
lea r8, [0x100401a90]
xor edx, edx
mov edi, 1
call sub.msys_ncursesw6.dll_tputs
jmp 0x10040256e