Function at 0x1004011d0
Capabilities:
Terminate process
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x168
mov rdi, qword [rsp + 0x1d0]
mov r13d, ecx
mov rcx, qword [rdi]
mov r12, rdx
xor edx, edx
mov ebx, r8d
mov esi, r9d
call fcn.100401080
cmp byte [0x100409001], 0
mov r14, rax
mov rax, qword [rsp + 0x1d8]
mov dword [rax], 1
jne 0x100401318
cmp byte [0x100409002], 0
jne 0x100401280
lea rdx, str.longname
mov rcx, r14
call sub.msys_2.0.dll_strcmp
mov r12d, eax
test eax, eax
je 0x100401518
lea rdx, str.clear
mov rcx, r14
call sub.msys_2.0.dll_strcmp
test eax, eax
je 0x1004014f8
mov rcx, r14
call qword [sym.imp.msys_ncursesw6.dll_tigetflag]
cmp eax, 0xffffffff
je 0x100401348
xor r12d, r12d
test eax, eax
sete r12b
jmp 0x1004012fa
call sub.msys_2.0.dll___getreent
mov r8d, 1
xor edx, edx
mov rcx, qword [rax + 0x10]
call fcn.1004024b0
mov rax, qword [sym.imp.msys_ncursesw6.dll_cur_term]
mov ecx, r13d
lea r15, [rsp + 0x110]
mov rax, qword [rax]
mov r8, qword [rax + 0x18]
lea rdx, [r8 + 4]
call fcn.100402570
mov edx, 0xffffffff
mov r9d, 0xffffffff
mov rcx, r12
mov r8d, 0xffffffff
call fcn.100401da0
mov rcx, r12
call fcn.100401e70
mov rdx, r15
mov ecx, r13d
call fcn.100401ee0
test al, al
jne 0x1004014e8
mov rdx, r12
mov rcx, r15
xor r12d, r12d
call fcn.100402990
mov eax, r12d
add rsp, 0x168
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
call sub.msys_2.0.dll___getreent
xor r8d, r8d
mov edx, 1
mov rcx, qword [rax + 0x10]
call fcn.1004024b0
xor r8d, r8d
mov rdx, r12
mov ecx, r13d
call fcn.100401c60
jmp 0x100401296
mov rcx, r14
call qword [sym.imp.msys_ncursesw6.dll_tigetnum]
mov edx, eax
cmp eax, 0xfffffffe
jne 0x100401540
mov rcx, r14
call qword [sym.imp.msys_ncursesw6.dll_tigetstr]
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x1004017ad
lea rax, [rax - 1]
mov r12d, 1
cmp rax, 0xfffffffffffffffd
ja 0x1004012fa
cmp esi, 1
jle 0x1004014d0
mov ebp, 2
lea r15, [rsp + 0x110]
lea rbx, [rsp + 0x70]
lea r12, [rsp + 0xc0]
jmp 0x1004013b5
cmp eax, 9
jg 0x1004013fa
mov rcx, qword [rdi + rbp*8 - 8]
xor r8d, r8d
mov rdx, rbx
mov qword [rsp + 0x70], 0
mov qword [r15 + rbp*8 - 8], rcx
call sub.msys_2.0.dll_strtol
mov qword [r12 + rbp*8 - 8], rax
mov rax, qword [rsp + 0x70]
test rax, rax
je 0x1004013e7
cmp byte [rax], 0
je 0x1004013f0
mov qword [r12 + rbp*8 - 8], 0
mov eax, ebp
add rbp, 1
cmp esi, eax
jg 0x1004013b0
cmp esi, 9
jg 0x100401460
mov r8d, 0xa
movsxd rdx, esi
xor eax, eax
sub r8d, esi
shl rdx, 3
shl r8, 3
add r12, rdx
add r15, rdx
mov r9d, r8d
lea ecx, [r8 - 8]
sub r8d, 8
mov qword [r12], 0
lea rdi, [r12 + 8]
shr ecx, 3
shr r8d, 3
mov qword [r12 + r9 - 8], 0
rep stosq qword [rdi], rax
lea rdi, [r15 + 8]
mov ecx, r8d
mov qword [r15], 0
mov qword [r9 + r15 - 8], 0
rep stosq qword [rdi], rax
mov rcx, r14
call fcn.100402600
mov esi, eax
test eax, eax
je 0x100401554
xor ecx, ecx
mov dword [rsp + 0x6c], 0
call qword [sym.imp.msys_ncursesw6.dll__nc_reset_tparm]
cmp esi, 1
je 0x100401614
cmp esi, 2
jne 0x100401640
mov rcx, r13
mov r9, qword [rsp + 0x128]
mov r8, qword [rsp + 0x120]
mov ebx, 3
mov rdx, qword [rsp + 0xc8]
call qword [sym.imp.msys_ncursesw6.dll_tparm]
mov r13, rax
mov eax, dword [rsp + 0x6c]
cmp ebx, eax
cmovl ebx, eax
mov rax, qword [rsp + 0x1d8]
add dword [rax], ebx
mov rcx, r13
xor r12d, r12d
call qword [sym.imp.msys_ncursesw6.dll_putp]
jmp 0x1004012fa
call fcn.1004024d0
jmp 0x1004012ec
movzx ecx, bl
xor r12d, r12d
call fcn.1004018c0
cmp eax, 0xffffffff
sete r12b
add r12d, r12d
jmp 0x1004012fa
call sub.msys_2.0.dll___getreent
mov r13, qword [rax + 0x10]
call qword [sym.imp.msys_ncursesw6.dll_longname]
mov rcx, rax
mov rdx, r13
call sub.msys_2.0.dll_fputs
jmp 0x1004012fa
lea rcx, [0x100405031]
xor r12d, r12d
call sub.msys_2.0.dll_printf
jmp 0x1004012fa
mov rcx, r14
xor r8d, r8d
mov edx, 2
call qword [sym.imp.msys_ncursesw6.dll__nc_find_type_entry]
mov dword [rsp + 0x6c], 0
xor ecx, ecx
test rax, rax
je 0x10040163a
call qword [sym.imp.msys_ncursesw6.dll__nc_reset_tparm]
mov r8, rbx
mov rdx, r13
lea r9, [rsp + 0x6c]
xor ecx, ecx
call qword [sym.imp.msys_ncursesw6.dll__nc_tparm_analyze]
mov rdx, r13
mov ecx, 9
mov r9, qword [rsp + 0xd0]
mov ebx, eax
mov rax, qword [rsp + 0x108]
mov r8, qword [rsp + 0xc8]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x100]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0xf8]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0xf0]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0xe8]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0xe0]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0xd8]
mov qword [rsp + 0x20], rax
call qword [sym.imp.msys_ncursesw6.dll__nc_tiparm]
mov r13, rax
jmp 0x1004014bd
mov rcx, r13
mov r8, qword [rsp + 0x120]
mov ebx, 2
mov rdx, qword [rsp + 0xc8]
call qword [sym.imp.msys_ncursesw6.dll_tparm]
mov r13, rax
jmp 0x1004014bd
call qword [sym.imp.msys_ncursesw6.dll__nc_reset_tparm]
mov r8, rbx
xor ecx, ecx
lea r9, [rsp + 0x6c]
mov rdx, r13
call qword [sym.imp.msys_ncursesw6.dll__nc_tparm_analyze]
cmp qword [rsp + 0xb0], 0
mov ebx, eax
je 0x1004017a0
mov rdi, qword [rsp + 0x158]
cmp qword [rsp + 0xa8], 0
je 0x100401793
mov rsi, qword [rsp + 0x150]
cmp qword [rsp + 0xa0], 0
je 0x100401786
mov r11, qword [rsp + 0x148]
cmp qword [rsp + 0x98], 0
je 0x100401779
mov r10, qword [rsp + 0x140]
cmp qword [rsp + 0x90], 0
je 0x10040176c
mov rcx, qword [rsp + 0x138]
cmp qword [rsp + 0x88], 0
je 0x10040175f
mov rax, qword [rsp + 0x130]
cmp qword [rsp + 0x80], 0
je 0x100401755
mov r9, qword [rsp + 0x128]
cmp qword [rsp + 0x78], 0
je 0x10040174b
mov r8, qword [rsp + 0x120]
cmp qword [rsp + 0x70], 0
je 0x100401741
mov rdx, qword [rsp + 0x118]
mov qword [rsp + 0x28], rcx
mov rcx, r13
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], r11
mov qword [rsp + 0x30], r10
mov qword [rsp + 0x20], rax
call qword [sym.imp.msys_ncursesw6.dll_tparm]
mov r13, rax
jmp 0x1004014bd
mov rdx, qword [rsp + 0xc8]
jmp 0x100401712
mov r8, qword [rsp + 0xd0]
jmp 0x100401702
mov r9, qword [rsp + 0xd8]
jmp 0x1004016f2
mov rax, qword [rsp + 0xe0]
jmp 0x1004016df
mov rcx, qword [rsp + 0xe8]
jmp 0x1004016c8
mov r10, qword [rsp + 0xf0]
jmp 0x1004016b1
mov r11, qword [rsp + 0xf8]
jmp 0x10040169a
mov rsi, qword [rsp + 0x100]
jmp 0x100401683
mov rdi, qword [rsp + 0x108]
jmp 0x10040166c
mov r8, r14
lea rdx, str.unknown_terminfo_capability__s
mov ecx, 4
call fcn.100401150
nop
nop word cs:[rax + rax]
nop dword [rax]