Function at 0x14000b8a0
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x2c8]
sub rsp, 0x3a0
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov rax, qword [0x140042010]
xor rax, rsp
mov qword [rbp + 0x290], rax
movzx esi, dl
movzx ebx, cl
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov r13, rax
xor r14d, r14d
mov dword [rsp + 0x30], r14d
lea rdx, [rsp + 0x30]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x14000c046
mov r15d, dword [rsp + 0x30]
test bl, bl
je 0x14000b927
test r15b, r15b
js 0x14000b927
or r15d, 0xe0
mov eax, r15d
and eax, 0xfffffff8
or eax, 8
test bl, bl
je 0x14000b93c
and eax, 0xffffffbf
or eax, 0x10
jmp 0x14000b93f
and eax, 0xffffffef
mov edi, eax
bts edi, 9
test sil, sil
cmove edi, eax
mov edx, edi
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
test eax, eax
je 0x14000c06a
lea rcx, str._nPress_any_keys____Ctrl_D_exits_n_n
call fcn.14000b380
mov dword [rsp + 0x34], r14d
xor r12b, r12b
lea rsi, [0x140000000]
lea rbx, str.gained
lea r9, [rsp + 0x34]
mov r8d, 0x20
lea rdx, [rbp + 0x10]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReadConsoleInputW]
test eax, eax
je 0x14000bffe
mov eax, dword [rsp + 0x34]
cmp eax, 1
jb 0x14000bffe
mov qword [rbp - 0x80], 0
mov qword [rbp - 0x78], 0xf
mov byte [rsp + 0x70], 0
xor r14d, r14d
test eax, eax
je 0x14000bf15
nop dword [rax]
mov eax, r14d
lea rcx, [r14 + r14*4]
lea rdi, [rbp + 0x10]
lea rdi, [rdi + rcx*4]
movzx eax, word [rdi]
cmp ax, 1
jne 0x14000bc78
movzx eax, word [rdi + 0xa]
mov word [rsp + 0x58], ax
movzx eax, word [rdi + 0xe]
mov dword [rsp + 0x5c], eax
movzx eax, word [rdi + 0x10]
mov word [rsp + 0x60], ax
lea r9, [rsp + 0x38]
xor r8d, r8d
mov edx, 0xc
movzx r10d, word [rdi + 0xc]
nop dword [rax + rax]
mov ecx, edx
mov eax, r10d
shr eax, cl
test al, 0xf
jne 0x14000ba37
inc r8d
sub edx, 4
cmp r8d, 3
jl 0x14000ba20
cmp r8d, 4
jge 0x14000ba73
mov eax, 4
sub eax, r8d
mov r8d, eax
nop dword [rax + rax]
mov rax, r10
movzx ecx, dl
shr rax, cl
and eax, 0xf
movzx eax, byte [rax + rsi + 0x38000]
mov byte [r9], al
inc r9
sub edx, 4
sub r8, 1
jne 0x14000ba50
mov byte [r9], 0
lea rsi, [r9 + 1]
mov qword [rsp + 0x40], 0
lea rax, [rsp + 0x38]
sub rsi, rax
dec rsi
mov qword [rsp + 0x48], rsi
movups xmm0, xmmword [rsp + 0x38]
movups xmmword [rbp - 0x30], xmm0
movsd xmm1, qword [rsp + 0x48]
movsd qword [rbp - 0x20], xmm1
mov r8d, 5
lea rdx, str.key:
lea rcx, [rsp + 0x70]
call fcn.140004db0
lea rdx, [0x140038268]
cmp dword [rdi + 4], 0
lea rax, [0x140038264]
cmovne rdx, rax
mov r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp byte [rdx + r8], 0
jne 0x14000bae0
lea rcx, [rsp + 0x70]
call fcn.140004db0
mov r8d, 5
lea rdx, str._rpt
lea rcx, [rsp + 0x70]
call fcn.140004db0
movzx edx, word [rdi + 8]
lea rcx, [rsp + 0x70]
call fcn.14000c0b0
mov rbx, rax
mov r8d, 5
lea rdx, str._scn
mov rcx, rax
call fcn.140004db0
lea rdx, [0x1400380e9]
cmp word [rdi + 0xc], 0
lea rax, [0x14003827c]
cmovne rdx, rax
mov r8, 0xffffffffffffffff
nop
inc r8
cmp byte [rdx + r8], 0
jne 0x14000bb50
mov rcx, rbx
call fcn.140004db0
mov r8, rsi
lea rdx, [rbp - 0x30]
mov rcx, rbx
call fcn.140004db0
mov rcx, qword [rbx + 0x10]
mov rdx, qword [rbx + 0x18]
cmp rcx, rdx
jae 0x14000bb9a
lea rax, [rcx + 1]
mov qword [rbx + 0x10], rax
mov rax, rbx
cmp rdx, 0x10
jb 0x14000bb92
mov rax, qword [rbx]
mov word [rax + rcx], 0x20
jmp 0x14000bba5
mov r9b, 0x20
mov rcx, rbx
call fcn.140007810
lea rdx, [rbp - 0x50]
lea rcx, [rsp + 0x58]
call fcn.14000d6a0
nop
mov r8, qword [rax + 0x10]
cmp qword [rax + 0x18], 0x10
jb 0x14000bbc2
mov rax, qword [rax]
mov rdx, rax
mov rcx, rbx
call fcn.140004db0
mov rcx, qword [rbx + 0x10]
mov rdx, qword [rbx + 0x18]
cmp rcx, rdx
jae 0x14000bbf3
lea rax, [rcx + 1]
mov qword [rbx + 0x10], rax
cmp rdx, 0x10
jb 0x14000bbeb
mov rbx, qword [rbx]
mov word [rbx + rcx], 0xa
jmp 0x14000bbff
mov r9b, 0xa
mov rcx, rbx
call fcn.140007810
nop
mov rdx, qword [rbp - 0x38]
cmp rdx, 0x10
jb 0x14000bc3a
inc rdx
mov rcx, qword [rbp - 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000bc35
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000c09d
call fcn.140017530
test byte [rdi + 0x10], 0xc
je 0x14000bc4b
cmp word [rdi + 0xa], 0x44
je 0x14000bf0b
cmp word [rdi + 0xa], 0
jne 0x14000be99
cmp word [rdi + 0xc], 0
jne 0x14000be99
cmp word [rdi + 0xe], 4
je 0x14000bf0b
lea rbx, str.gained
jmp 0x14000bef5
cmp ax, 2
jne 0x14000bd47
mov r8d, 7
lea rdx, str.mouse:
lea rcx, [rsp + 0x70]
call fcn.140004db0
lea rdx, [rdi + 4]
lea rcx, [rbp - 0x50]
call fcn.14000b6e0
nop
mov r8, qword [rax + 0x10]
cmp qword [rax + 0x18], 0x10
jb 0x14000bcb5
mov rax, qword [rax]
mov rdx, rax
lea rcx, [rsp + 0x70]
call fcn.140004db0
mov rcx, qword [rbp - 0x80]
mov rdx, qword [rbp - 0x78]
cmp rcx, rdx
jae 0x14000bcee
lea rax, [rcx + 1]
mov qword [rbp - 0x80], rax
lea rax, [rsp + 0x70]
cmp rdx, 0x10
cmovae rax, qword [rsp + 0x70]
mov word [rax + rcx], 0xa
jmp 0x14000bcfc
mov r9b, 0xa
lea rcx, [rsp + 0x70]
call fcn.140007810
nop
mov rdx, qword [rbp - 0x38]
cmp rdx, 0x10
jb 0x14000be99
inc rdx
mov rcx, qword [rbp - 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000bd36
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000c0a3
call fcn.140017530
lea rbx, str.gained
jmp 0x14000bef5
cmp ax, 4
jne 0x14000bdda
mov r8d, 0x18
lea rdx, str.buffer_resized:_dwSize_
lea rcx, [rsp + 0x70]
call fcn.140004db0
movzx edx, word [rdi + 4]
lea rcx, [rsp + 0x70]
call fcn.14000a2c0
mov rbx, rax
mov rax, qword [rax + 0x10]
mov rdx, qword [rbx + 0x18]
cmp rax, rdx
jae 0x14000bda2
lea rcx, [rax + 1]
mov qword [rbx + 0x10], rcx
mov rcx, rbx
cmp rdx, 0x10
jb 0x14000bd9a
mov rcx, qword [rbx]
mov word [rcx + rax], 0x2c
jmp 0x14000bdad
mov r9b, 0x2c
mov rcx, rbx
call fcn.140007810
movzx edx, word [rdi + 6]
mov rcx, rbx
call fcn.14000a2c0
mov r8d, 2
lea rdx, [0x1400382a4]
mov rcx, rax
call fcn.140004db0
lea rbx, str.gained
jmp 0x14000bef5
cmp ax, 8
jne 0x14000bea2
mov r8d, dword [rdi + 4]
lea rbx, [rsp + 0x38]
xor edx, edx
mov ecx, 0x1c
mov eax, r8d
shr eax, cl
test al, 0xf
jne 0x14000be07
inc edx
sub ecx, 4
cmp edx, 7
jl 0x14000bdf4
cmp edx, 8
jge 0x14000be34
mov eax, 8
sub eax, edx
mov edx, eax
mov rax, r8
shr rax, cl
and eax, 0xf
movzx eax, byte [rax + rsi + 0x38000]
mov byte [rbx], al
inc rbx
sub ecx, 4
sub rdx, 1
jne 0x14000be15
mov byte [rbx], 0
inc rbx
mov qword [rsp + 0x48], 0
lea rax, [rsp + 0x38]
sub rbx, rax
dec rbx
mov qword [rsp + 0x50], rbx
movups xmm0, xmmword [rsp + 0x38]
movups xmmword [rbp - 0x18], xmm0
movups xmm1, xmmword [rsp + 0x48]
movups xmmword [rbp - 8], xmm1
mov r8d, 0x18
lea rdx, str.menu_event:_commandId0x
lea rcx, [rsp + 0x70]
call fcn.140004db0
mov r8, rbx
lea rdx, [rbp - 0x18]
lea rcx, [rsp + 0x70]
call fcn.140004db0
mov dl, 0xa
lea rcx, [rsp + 0x70]
call fcn.14000a3a0
lea rbx, str.gained
jmp 0x14000bef5
cmp ax, 0x10
jne 0x14000bef5
mov r8d, 7
lea rdx, str.focus:
lea rcx, [rsp + 0x70]
call fcn.140004db0
lea rdx, str.lost
cmp dword [rdi + 4], 0
cmovne rdx, rbx
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rdx + r8], 0
jne 0x14000bed5
lea rcx, [rsp + 0x70]
call fcn.140004db0
mov dl, 0xa
lea rcx, [rsp + 0x70]
call fcn.14000a3a0
inc r14d
lea rsi, [0x140000000]
cmp r14d, dword [rsp + 0x34]
jae 0x14000bf15
jmp 0x14000b9d0
lea rsi, [0x140000000]
mov r12b, 1
movups xmm0, xmmword [rsp + 0x70]
movups xmmword [rbp - 0x70], xmm0
movups xmm1, xmmword [rbp - 0x80]
movups xmmword [rbp - 0x60], xmm1
xor r14d, r14d
mov qword [rbp - 0x80], r14
mov qword [rbp - 0x78], 0xf
mov byte [rsp + 0x70], r14b
lea ecx, [r14 + 1]
call fcn.14001e144
lea rcx, [rbp - 0x70]
cmp qword [rbp - 0x58], 0x10
cmovae rcx, qword [rbp - 0x70]
mov r9, rax
mov r8, qword [rbp - 0x60]
lea edx, [r14 + 1]
call fcn.14001e770
lea ecx, [r14 + 1]
call fcn.14001e144
mov rcx, rax
call fcn.14001e4b8
mov rdx, qword [rbp - 0x58]
cmp rdx, 0x10
jb 0x14000bfad
inc rdx
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000bfa8
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000c03a
call fcn.140017530
mov qword [rbp - 0x60], r14
mov qword [rbp - 0x58], 0xf
mov byte [rbp - 0x70], r14b
mov rdx, qword [rbp - 0x78]
cmp rdx, 0x10
jb 0x14000bff5
inc rdx
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000bff0
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000c040
call fcn.140017530
test r12b, r12b
je 0x14000b979
mov edx, r15d
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
mov rcx, qword [rbp + 0x290]
xor rcx, rsp
call fcn.1400174d0
lea r11, [rsp + 0x3a0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.14001bb5c
nop
call fcn.14001bb5c
int3
mov ecx, 2
call fcn.14001e144
mov rcx, rax
lea rdx, str.Error:_could_not_read_console_mode____is_STDIN_a_console_handle__n
call fcn.14000b330
mov ecx, 1
call fcn.14001e018
int3
mov ebx, dword [rsp + 0x30]
mov ecx, 2
call fcn.14001e144
mov dword [rsp + 0x20], r15d
mov r9d, edi
mov r8d, ebx
lea rdx, str.Error:_could_not_set_console_mode__0x_x____0x_x____0x_x__n
mov rcx, rax
call fcn.14000b330
mov ecx, 1
call fcn.14001e018
nop
call fcn.14001bb5c
int3
call fcn.14001bb5c
int3