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 0x100401350
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 0x100401580
lea rdx, str.clear
mov rcx, r14
call sub.msys_2.0.dll_strcmp
test eax, eax
je 0x100401560
mov rcx, r14
call qword [sym.imp.msys_ncursesw6.dll_tigetflag]
cmp eax, 0xffffffff
je 0x1004013b0
xor r12d, r12d
test eax, eax
sete r12b
jmp 0x100401330
mov rax, qword [r12 + 0x20]
movdqu xmm2, xmmword [r12]
movdqu xmm3, xmmword [r12 + 0x10]
mov qword [rsp + 0x130], rax
mov eax, dword [r12 + 0x28]
movaps xmmword [rsp + 0x110], xmm2
mov dword [rsp + 0x138], eax
movaps xmmword [rsp + 0x120], xmm3
call sub.msys_2.0.dll___getreent
mov r8d, 1
xor edx, edx
mov rcx, qword [rax + 0x10]
call fcn.100402510
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.1004025d0
mov edx, 0xffffffff
mov r9d, 0xffffffff
mov rcx, r12
mov r8d, 0xffffffff
call fcn.100401e00
mov rcx, r12
call fcn.100401ed0
mov rdx, r15
mov ecx, r13d
call fcn.100401f40
test al, al
jne 0x100401550
mov rdx, r12
mov rcx, r15
xor r12d, r12d
call fcn.1004029f0
mov eax, r12d
add rsp, 0x168
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [r12 + 0x20]
movdqu xmm0, xmmword [r12]
movdqu xmm1, xmmword [r12 + 0x10]
mov qword [rsp + 0x130], rax
mov eax, dword [r12 + 0x28]
movaps xmmword [rsp + 0x110], xmm0
movaps xmmword [rsp + 0x120], xmm1
mov dword [rsp + 0x138], eax
call sub.msys_2.0.dll___getreent
xor r8d, r8d
mov edx, 1
mov rcx, qword [rax + 0x10]
call fcn.100402510
xor r8d, r8d
mov rdx, r12
mov ecx, r13d
call fcn.100401cc0
jmp 0x1004012cc
mov rcx, r14
call qword [sym.imp.msys_ncursesw6.dll_tigetnum]
mov edx, eax
cmp eax, 0xfffffffe
jne 0x1004015a0
mov rcx, r14
call qword [sym.imp.msys_ncursesw6.dll_tigetstr]
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x10040180d
lea rax, [rax - 1]
mov r12d, 1
cmp rax, 0xfffffffffffffffd
ja 0x100401330
cmp esi, 1
jle 0x100401538
mov ebp, 2
lea r15, [rsp + 0x110]
lea rbx, [rsp + 0x70]
lea r12, [rsp + 0xc0]
jmp 0x10040141d
cmp eax, 9
jg 0x100401462
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 0x10040144f
cmp byte [rax], 0
je 0x100401458
mov qword [r12 + rbp*8 - 8], 0
mov eax, ebp
add rbp, 1
cmp esi, eax
jg 0x100401418
cmp esi, 9
jg 0x1004014c8
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.100402660
mov esi, eax
test eax, eax
je 0x1004015b4
xor ecx, ecx
mov dword [rsp + 0x6c], 0
call qword [sym.imp.msys_ncursesw6.dll__nc_reset_tparm]
cmp esi, 1
je 0x100401674
cmp esi, 2
jne 0x1004016a0
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 0x100401330
call fcn.100402530
jmp 0x100401322
movzx ecx, bl
xor r12d, r12d
call fcn.100401920
cmp eax, 0xffffffff
sete r12b
add r12d, r12d
jmp 0x100401330
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 0x100401330
lea rcx, [0x100405031]
xor r12d, r12d
call sub.msys_2.0.dll_printf
jmp 0x100401330
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 0x10040169a
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 0x100401525
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 0x100401525
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 0x100401800
mov rdi, qword [rsp + 0x158]
cmp qword [rsp + 0xa8], 0
je 0x1004017f3
mov rsi, qword [rsp + 0x150]
cmp qword [rsp + 0xa0], 0
je 0x1004017e6
mov r11, qword [rsp + 0x148]
cmp qword [rsp + 0x98], 0
je 0x1004017d9
mov r10, qword [rsp + 0x140]
cmp qword [rsp + 0x90], 0
je 0x1004017cc
mov rcx, qword [rsp + 0x138]
cmp qword [rsp + 0x88], 0
je 0x1004017bf
mov rax, qword [rsp + 0x130]
cmp qword [rsp + 0x80], 0
je 0x1004017b5
mov r9, qword [rsp + 0x128]
cmp qword [rsp + 0x78], 0
je 0x1004017ab
mov r8, qword [rsp + 0x120]
cmp qword [rsp + 0x70], 0
je 0x1004017a1
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 0x100401525
mov rdx, qword [rsp + 0xc8]
jmp 0x100401772
mov r8, qword [rsp + 0xd0]
jmp 0x100401762
mov r9, qword [rsp + 0xd8]
jmp 0x100401752
mov rax, qword [rsp + 0xe0]
jmp 0x10040173f
mov rcx, qword [rsp + 0xe8]
jmp 0x100401728
mov r10, qword [rsp + 0xf0]
jmp 0x100401711
mov r11, qword [rsp + 0xf8]
jmp 0x1004016fa
mov rsi, qword [rsp + 0x100]
jmp 0x1004016e3
mov rdi, qword [rsp + 0x108]
jmp 0x1004016cc
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]