Function at 0x100406d10
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 0x100406fa0
movzx ecx, word [rdx + 0x38]
test cx, cx
je 0x100406de9
mov r12, qword [sym.imp.msys_ncursesw6.dll__nc_user_definable]
xor esi, esi
jmp 0x100406d5f
xor ecx, ecx
call rdi
movzx ecx, word [rbx + 0x38]
add rsi, 1
movzx eax, cx
cmp eax, esi
jbe 0x100406de0
mov edx, esi
cmp esi, 0x2b
ja 0x100406d79
cmp dword [0x1004110d0], 1
je 0x100406dc8
mov rax, qword [0x100411070]
mov edx, dword [rax + rsi*4]
movsxd rax, edx
cmp edx, 0x2b
jle 0x100406dcb
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 0x100406d48
cmp dword [0x1004110d0], 3
je 0x100406d48
cmp byte [r12], 0
jne 0x100406d48
cmp byte [r8], 0x4f
jne 0x100406d48
cmp byte [r8 + 1], 0x54
jne 0x100406d48
jmp 0x100406d50
movsxd rax, esi
mov r8, qword [0x100411058]
mov r8, qword [r8 + rax*8]
jmp 0x100406d9d
test bpl, bpl
je 0x100406fd0
movzx r9d, word [rbx + 0x3a]
test r9w, r9w
je 0x100406ea9
mov r12, qword [sym.imp.msys_ncursesw6.dll__nc_user_definable]
xor esi, esi
jmp 0x100406e24
mov ecx, 1
call rdi
movzx r9d, word [rbx + 0x3a]
add rsi, 1
movzx eax, r9w
cmp eax, esi
jbe 0x100406ea0
mov edx, esi
cmp esi, 0x26
ja 0x100406e3e
cmp dword [0x1004110d0], 1
je 0x100406e90
mov rax, qword [0x100411068]
mov edx, dword [rax + rsi*4]
movsxd rax, edx
cmp edx, 0x26
jle 0x100406e93
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 0x100406e08
cmp dword [0x1004110d0], 3
je 0x100406e08
cmp byte [r12], 0
jne 0x100406e08
cmp byte [r8], 0x4f
jne 0x100406e08
cmp byte [r8 + 1], 0x54
jne 0x100406e08
jmp 0x100406e14
movsxd rax, esi
mov rcx, qword [0x100411050]
mov r8, qword [rcx + rax*8]
jmp 0x100406e64
test bpl, bpl
je 0x100407000
movzx r9d, word [rbx + 0x3c]
test r9w, r9w
je 0x100406f80
mov rbp, qword [sym.imp.msys_ncursesw6.dll__nc_user_definable]
xor esi, esi
jmp 0x100406ee4
mov ecx, 2
call rdi
movzx r9d, word [rbx + 0x3c]
add rsi, 1
movzx eax, r9w
cmp eax, esi
jbe 0x100406f80
mov edx, esi
cmp esi, 0x19d
ja 0x100406f01
cmp dword [0x1004110d0], 1
je 0x100406f70
mov rax, qword [0x100411060]
mov edx, dword [rax + rsi*4]
movsxd rax, edx
cmp edx, 0x19d
jle 0x100406f73
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 0x100406ec8
cmp dword [0x1004110d0], 3
je 0x100406ec8
cmp byte [rbp], 0
jne 0x100406ec8
cmp byte [r8], 0x4f
jne 0x100406ec8
cmp byte [r8 + 1], 0x54
jne 0x100406ec8
jmp 0x100406ed4
movsxd rax, esi
mov rcx, qword [0x100411048]
mov r8, qword [rcx + rax*8]
jmp 0x100406f32
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 0x100406d39
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 0x100406df8
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 0x100406ea9