Function at 0x100406d00
Capabilities:
Write file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rdi, rcx
mov rbx, rdx
mov ebp, r8d
test r8b, r8b
je 0x100406f90
movzx ecx, word [rdx + 0x38]
test cx, cx
je 0x100406dd9
mov r12, qword [sym.imp.msys_ncursesw6.dll__nc_user_definable]
xor esi, esi
jmp 0x100406d4f
xor ecx, ecx
call rdi
movzx ecx, word [rbx + 0x38]
add rsi, 1
movzx eax, cx
cmp eax, esi
jbe 0x100406dd0
mov edx, esi
cmp esi, 0x2b
ja 0x100406d69
cmp dword [0x1004110d0], 1
je 0x100406db8
mov rax, qword [0x100411070]
mov edx, dword [rax + rsi*4]
movsxd rax, edx
cmp edx, 0x2b
jle 0x100406dbb
movzx r8d, word [rbx + 0x3e]
movzx eax, cx
sub eax, r8d
mov r8d, edx
sub r8d, eax
movsxd rax, r8d
mov r8, qword [rbx + 0x30]
mov r8, qword [r8 + rax*8]
cmp dword [0x1004110d4], 1
ja 0x100406d38
cmp dword [0x1004110d0], 3
je 0x100406d38
cmp byte [r12], 0
jne 0x100406d38
cmp byte [r8], 0x4f
jne 0x100406d38
cmp byte [r8 + 1], 0x54
jne 0x100406d38
jmp 0x100406d40
movsxd rax, esi
mov r8, qword [0x100411058]
mov r8, qword [r8 + rax*8]
jmp 0x100406d8d
test bpl, bpl
je 0x100406fc0
movzx r9d, word [rbx + 0x3a]
test r9w, r9w
je 0x100406e99
mov r12, qword [sym.imp.msys_ncursesw6.dll__nc_user_definable]
xor esi, esi
jmp 0x100406e14
mov ecx, 1
call rdi
movzx r9d, word [rbx + 0x3a]
add rsi, 1
movzx eax, r9w
cmp eax, esi
jbe 0x100406e90
mov edx, esi
cmp esi, 0x26
ja 0x100406e2e
cmp dword [0x1004110d0], 1
je 0x100406e80
mov rax, qword [0x100411068]
mov edx, dword [rax + rsi*4]
movsxd rax, edx
cmp edx, 0x26
jle 0x100406e83
movzx eax, word [rbx + 0x40]
movzx ecx, r9w
sub ecx, eax
mov eax, edx
sub eax, ecx
movzx ecx, word [rbx + 0x3e]
add eax, ecx
mov rcx, qword [rbx + 0x30]
cdqe
mov r8, qword [rcx + rax*8]
cmp dword [0x1004110d4], 1
ja 0x100406df8
cmp dword [0x1004110d0], 3
je 0x100406df8
cmp byte [r12], 0
jne 0x100406df8
cmp byte [r8], 0x4f
jne 0x100406df8
cmp byte [r8 + 1], 0x54
jne 0x100406df8
jmp 0x100406e04
movsxd rax, esi
mov rcx, qword [0x100411050]
mov r8, qword [rcx + rax*8]
jmp 0x100406e54
test bpl, bpl
je 0x100406ff0
movzx r9d, word [rbx + 0x3c]
test r9w, r9w
je 0x100406f70
mov rbp, qword [sym.imp.msys_ncursesw6.dll__nc_user_definable]
xor esi, esi
jmp 0x100406ed4
mov ecx, 2
call rdi
movzx r9d, word [rbx + 0x3c]
add rsi, 1
movzx eax, r9w
cmp eax, esi
jbe 0x100406f70
mov edx, esi
cmp esi, 0x19d
ja 0x100406ef1
cmp dword [0x1004110d0], 1
je 0x100406f60
mov rax, qword [0x100411060]
mov edx, dword [rax + rsi*4]
movsxd rax, edx
cmp edx, 0x19d
jle 0x100406f63
movzx eax, word [rbx + 0x42]
movzx ecx, r9w
movzx r8d, word [rbx + 0x3e]
sub ecx, eax
mov eax, edx
sub eax, ecx
movzx ecx, word [rbx + 0x40]
add ecx, r8d
add eax, ecx
mov rcx, qword [rbx + 0x30]
cdqe
mov r8, qword [rcx + rax*8]
cmp dword [0x1004110d4], 1
ja 0x100406eb8
cmp dword [0x1004110d0], 3
je 0x100406eb8
cmp byte [rbp], 0
jne 0x100406eb8
cmp byte [r8], 0x4f
jne 0x100406eb8
cmp byte [r8 + 1], 0x54
jne 0x100406eb8
jmp 0x100406ec4
movsxd rax, esi
mov rcx, qword [0x100411048]
mov r8, qword [rcx + rax*8]
jmp 0x100406f22
lea r8, [0x10040b96a]
xor edx, edx
mov ecx, 3
mov rax, rdi
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp rax
call sub.msys_2.0.dll___getreent
mov r8d, 0x18
mov edx, 1
lea rcx, str.____comparing_booleans._n
mov r9, qword [rax + 0x10]
call sub.msys_2.0.dll_fwrite
movzx ecx, word [rbx + 0x38]
test cx, cx
jne 0x100406d29
nop dword [rax]
call sub.msys_2.0.dll___getreent
mov r8d, 0x17
mov edx, 1
lea rcx, str.____comparing_numbers._n
mov r9, qword [rax + 0x10]
call sub.msys_2.0.dll_fwrite
movzx r9d, word [rbx + 0x3a]
test r9w, r9w
jne 0x100406de8
nop
call sub.msys_2.0.dll___getreent
mov r8d, 0x17
mov edx, 1
lea rcx, str.____comparing_strings._n
mov r9, qword [rax + 0x10]
call sub.msys_2.0.dll_fwrite
jmp 0x100406e99