Function at 0x140017c40
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0xc0]
sub rsp, 0x1c0
mov rbx, rdx
mov rsi, rcx
xor r12d, r12d
mov dword [rbp + 0x100], r12d
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov qword [rsp + 0x48], 4
mov qword [rsp + 0x50], 0xf
mov dword [rsp + 0x38], 0x6e69622e
mov byte [rsp + 0x3c], r12b
lea rdx, [rsp + 0x38]
mov rcx, rbx
call fcn.1400215c0
movzx edi, al
mov rdx, qword [rsp + 0x50]
cmp rdx, 0x10
jb 0x140017ce5
inc rdx
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140017ce0
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140018539
call fcn.140138d84
xorps xmm0, xmm0
test dil, dil
je 0x1400180d4
movdqu xmmword [rsp + 0x20], xmm0
mov qword [rsp + 0x30], r12
mov rcx, rbx
cmp qword [rbx + 0x18], 0x10
jb 0x140017d09
mov rcx, qword [rbx]
lea rdx, [0x1401e7140]
call fcn.140144eb4
mov rdi, rax
test rax, rax
jne 0x140017fe3
lea rcx, [0x140000000]
lea rax, [rcx + 0x1e6bd0]
mov qword [rbp - 0x80], rax
lea rax, [rcx + 0x1e6aa8]
mov qword [rbp - 0x70], rax
mov qword [rbp + 0x20], r12
mov qword [rbp + 0x48], r12
xorps xmm0, xmm0
movdqa xmmword [rbp + 0x50], xmm0
mov dword [rbp + 0x100], 0x40
lea r15, vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov qword [rbp + 0x18], r15
mov dword [rbp + 0x14], 0x80
mov qword [rbp - 0x78], r12
xor r8d, r8d
lea rdx, [rbp - 0x68]
lea rcx, [rbp + 0x18]
call fcn.140009c10
nop
mov rax, qword [rbp - 0x70]
movsxd rcx, dword [rax + 4]
lea r14, vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x70], r14
mov rax, qword [rbp - 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x10]
mov dword [rbp + rcx - 0x74], edx
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea rsi, vtable.std::basic_iostream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x80], rsi
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x20]
mov dword [rsp + rcx + 0x7c], edx
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea rdi, vtable.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp + rcx - 0x80], rdi
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rsp + rcx + 0x7c], edx
lea rcx, [rbp - 0x68]
call fcn.140009780
lea rax, vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp - 0x68], rax
mov qword [rbp], r12
mov dword [rbp + 8], r12d
lea rdx, str.loadFile
lea rcx, [rbp - 0x70]
call fcn.140003440
mov rcx, rax
lea rdx, [0x1401e68f8]
call fcn.140003440
mov edx, 0x1f
mov rcx, rax
call fcn.140006c40
mov rcx, rax
lea rdx, [0x14017bbd0]
call fcn.140003440
mov rcx, rax
lea rdx, str.Failed_to_open_demo_file
call fcn.140003440
mov r8, qword [rbx + 0x10]
cmp qword [rbx + 0x18], 0x10
jb 0x140017e5f
mov rbx, qword [rbx]
mov rdx, rbx
mov rcx, rax
call fcn.140003b70
nop
xorps xmm0, xmm0
movups xmmword [rsp + 0x58], xmm0
movdqa xmm1, xmmword [0x1401fb460]
movdqu xmmword [rsp + 0x68], xmm1
mov byte [rsp + 0x58], 0
mov dword [rbp + 0x100], 0x840
movups xmmword [rsp + 0x38], xmm0
mov ecx, dword [rbp + 8]
mov eax, ecx
and al, 0x22
cmp al, 2
je 0x140017ec1
mov rax, qword [rbp - 0x28]
mov r8, qword [rax]
test r8, r8
je 0x140017ec1
mov rax, qword [rbp - 0x48]
mov rdx, qword [rax]
cmp r8, qword [rbp]
cmovb r8, qword [rbp]
sub r8, rdx
jmp 0x140017ef2
test cl, 4
jne 0x140017ee8
mov rax, qword [rbp - 0x30]
mov rcx, qword [rax]
test rcx, rcx
je 0x140017ee8
mov rax, qword [rbp - 0x50]
mov rdx, qword [rax]
mov rax, qword [rbp - 0x18]
movsxd r8, dword [rax]
add r8, rcx
sub r8, rdx
jmp 0x140017ef2
mov r8, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x38]
test rdx, rdx
je 0x140017f02
lea rcx, [rsp + 0x58]
call fcn.140009a50
nop
lea rcx, [rsp + 0x58]
call fcn.14003a9c0
nop
mov rdx, qword [rsp + 0x70]
cmp rdx, 0x10
jb 0x140017f4b
inc rdx
mov rcx, qword [rsp + 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140017f45
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001853f
call fcn.140138d84
nop
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx - 0x80], rdi
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rsp + rcx + 0x7c], edx
lea rcx, [rbp - 0x68]
call fcn.1400067c0
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx - 0x80], rsi
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x20]
mov dword [rsp + rcx + 0x7c], edx
mov rax, qword [rbp - 0x70]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx - 0x70], r14
mov rax, qword [rbp - 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x10]
mov dword [rbp + rcx - 0x74], edx
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx - 0x80], r15
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x18]
mov dword [rsp + rcx + 0x7c], edx
lea rax, vtable.std::ios_base.0
mov qword [rbp + 0x18], rax
lea rcx, [rbp + 0x18]
call fcn.1401379a8
nop
xor bl, bl
jmp 0x140018090
xor edx, edx
lea r8d, [rdx + 2]
mov rcx, rdi
call fcn.140145384
mov rcx, rdi
call fcn.140144c80
movsxd r8, eax
mov r9, qword [rsp + 0x28]
mov rcx, r9
mov rdx, qword [rsp + 0x20]
sub rcx, rdx
cmp r8, rcx
jae 0x14001801c
lea rax, [rdx + r8]
mov qword [rsp + 0x28], rax
jmp 0x140018050
jbe 0x140018050
mov rax, qword [rsp + 0x30]
sub rax, rdx
cmp r8, rax
jbe 0x14001803a
mov rdx, r8
lea rcx, [rsp + 0x20]
call fcn.140016d90
jmp 0x140018050
sub r8, rcx
lea rbx, [r9 + r8]
xor edx, edx
mov rcx, r9
call fcn.14013b710
mov qword [rsp + 0x28], rbx
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.140145384
mov r8, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x20]
sub r8, rcx
mov r9, rdi
mov edx, 1
call fcn.140145680
mov rcx, rdi
call fcn.140144fe4
mov rax, qword [rsi]
lea rdx, [rsp + 0x20]
mov rcx, rsi
call qword [rax + 0x10]
movzx ebx, al
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x1400180cc
mov rdx, qword [rsp + 0x30]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400180c7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140018545
call fcn.140138d84
movzx eax, bl
jmp 0x14001851d
movdqu xmmword [rbp + 0x80], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x90], xmm1
movdqu xmmword [rbp + 0xa0], xmm0
mov dword [rbp + 0xb0], 0x87f0001
mov word [rbp + 0xb4], 0xffff
mov rdx, rbx
lea rcx, [rbp + 0x80]
call fcn.140019780
test al, al
je 0x14001813d
mov rax, qword [rbp + 0xa0]
cmp qword [rbp + 0x98], rax
je 0x14001813d
mov rax, qword [rsi]
lea rdx, [rbp + 0x98]
mov rcx, rsi
call qword [rax + 0x10]
movzx esi, al
jmp 0x14001840a
lea rcx, [0x140000000]
lea rax, [rcx + 0x1e6bd0]
mov qword [rbp - 0x80], rax
lea rax, [rcx + 0x1e6aa8]
mov qword [rbp - 0x70], rax
mov qword [rbp + 0x20], r12
mov qword [rbp + 0x48], r12
xorps xmm0, xmm0
movdqa xmmword [rbp + 0x50], xmm0
mov dword [rbp + 0x100], 1
lea r15, vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov qword [rbp + 0x18], r15
mov dword [rbp + 0x14], 0x80
mov qword [rbp - 0x78], r12
xor r8d, r8d
lea rdx, [rbp - 0x68]
lea rcx, [rbp + 0x18]
call fcn.140009c10
nop
mov rax, qword [rbp - 0x70]
movsxd rcx, dword [rax + 4]
lea r14, vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x70], r14
mov rax, qword [rbp - 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x10]
mov dword [rbp + rcx - 0x74], edx
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea rsi, vtable.std::basic_iostream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x80], rsi
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x20]
mov dword [rsp + rcx + 0x7c], edx
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea rdi, vtable.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp + rcx - 0x80], rdi
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rsp + rcx + 0x7c], edx
lea rcx, [rbp - 0x68]
call fcn.140009780
lea rax, vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp - 0x68], rax
mov qword [rbp], r12
mov dword [rbp + 8], r12d
lea rdx, str.loadFile
lea rcx, [rbp - 0x70]
call fcn.140003440
mov rcx, rax
lea rdx, [0x1401e68f8]
call fcn.140003440
mov edx, 0x2d
mov rcx, rax
call fcn.140006c40
mov rcx, rax
lea rdx, [0x14017bbd0]
call fcn.140003440
mov rcx, rax
lea rdx, str.Failed_to_load_demo_midi_file
call fcn.140003440
mov r8, qword [rbx + 0x10]
cmp qword [rbx + 0x18], 0x10
jb 0x14001827b
mov rbx, qword [rbx]
mov rdx, rbx
mov rcx, rax
call fcn.140003b70
mov rcx, rax
lea rdx, str.__no_valid_data_found_in_file
call fcn.140003440
nop
xorps xmm0, xmm0
movups xmmword [rsp + 0x58], xmm0
movdqa xmm1, xmmword [0x1401fb460]
movdqu xmmword [rsp + 0x68], xmm1
mov byte [rsp + 0x58], 0
mov dword [rbp + 0x100], 0x21
movups xmmword [rsp + 0x38], xmm0
mov ecx, dword [rbp + 8]
mov eax, ecx
and al, 0x22
cmp al, 2
je 0x1400182ec
mov rax, qword [rbp - 0x28]
mov r8, qword [rax]
test r8, r8
je 0x1400182ec
mov rax, qword [rbp - 0x48]
mov rdx, qword [rax]
cmp r8, qword [rbp]
cmovb r8, qword [rbp]
sub r8, rdx
jmp 0x14001831d
test cl, 4
jne 0x140018313
mov rax, qword [rbp - 0x30]
mov rcx, qword [rax]
test rcx, rcx
je 0x140018313
mov rax, qword [rbp - 0x50]
mov rdx, qword [rax]
mov rax, qword [rbp - 0x18]
movsxd r8, dword [rax]
add r8, rcx
sub r8, rdx
jmp 0x14001831d
mov r8, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x38]
test rdx, rdx
je 0x14001832d
lea rcx, [rsp + 0x58]
call fcn.140009a50
nop
lea rcx, [rsp + 0x58]
call fcn.14003a9c0
nop
mov rdx, qword [rsp + 0x70]
cmp rdx, 0x10
jb 0x140018376
inc rdx
mov rcx, qword [rsp + 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140018370
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001854b
call fcn.140138d84
nop
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx - 0x80], rdi
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rsp + rcx + 0x7c], edx
lea rcx, [rbp - 0x68]
call fcn.1400067c0
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx - 0x80], rsi
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x20]
mov dword [rsp + rcx + 0x7c], edx
mov rax, qword [rbp - 0x70]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx - 0x70], r14
mov rax, qword [rbp - 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x10]
mov dword [rbp + rcx - 0x74], edx
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx - 0x80], r15
mov rax, qword [rbp - 0x80]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x18]
mov dword [rsp + rcx + 0x7c], edx
lea rax, vtable.std::ios_base.0
mov qword [rbp + 0x18], rax
lea rcx, [rbp + 0x18]
call fcn.1401379a8
nop
xor sil, sil
mov rcx, qword [rbp + 0x98]
test rcx, rcx
je 0x14001845c
mov rdx, qword [rbp + 0xa8]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140018445
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140018539
call fcn.140138d84
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x98], xmm0
mov qword [rbp + 0xa8], r12
mov rbx, qword [rbp + 0x80]
test rbx, rbx
je 0x140018519
mov rdi, qword [rbp + 0x88]
cmp rbx, rdi
je 0x1400184cc
mov rcx, qword [rbx]
test rcx, rcx
je 0x1400184bc
mov rdx, qword [rbx + 0x10]
sub rdx, rcx
cmp rdx, 0x1000
jb 0x1400184ac
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140018539
mov rcx, r8
call fcn.140138d84
mov qword [rbx], r12
mov qword [rbx + 8], r12
mov qword [rbx + 0x10], r12
add rbx, 0x18
cmp rbx, rdi
jne 0x140018478
mov rbx, qword [rbp + 0x80]
mov rax, qword [rbp + 0x90]
sub rax, rbx
sar rax, 3
movabs rcx, 0xaaaaaaaaaaaaaaab
imul rax, rcx
lea rdx, [rax + rax*2]
shl rdx, 3
mov rax, rbx
cmp rdx, 0x1000
jb 0x140018511
add rdx, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140018539
mov rcx, rbx
call fcn.140138d84
movzx eax, sil
lea r11, [rsp + 0x1c0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
call fcn.14013fad4
nop
call fcn.14013fad4
nop
call fcn.14013fad4
nop
call fcn.14013fad4
int3