Function at 0x140037540
Capabilities:
Read file on windows

Disassembly:
push rbp
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x98
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x10], 0xfffffffffffffffe
mov rbx, rdx
mov qword [rbp - 0x10], rcx
lea rsi, [rbp - 0x40]
mov r8d, 4
mov rcx, rdx
mov rdx, rsi
call fcn.14001c620
xor edi, edi
nop dword [rax]
mov rax, qword [rbx]
movsxd rax, dword [rax + 4]
cmp dword [rbx + rax + 0x10], 0
jne 0x1400375b8
mov r8d, 2
mov rcx, rbx
mov rdx, rsi
call fcn.14001c620
movzx eax, word [rbp - 0x40]
mov rcx, qword [rbp - 0x10]
mov word [rcx + rdi*2 + 0x20], ax
inc rdi
cmp rdi, 0x400
jne 0x140037580
mov qword [rbp], rbx
xor eax, eax
jmp 0x1400375c7
mov rax, qword [rbp - 0x18]
inc rax
mov qword [rbp - 0x18], rax
cmp rax, 0x5800
jae 0x14003781b
mov rcx, qword [rbp]
mov rax, qword [rcx]
movsxd rax, dword [rax + 4]
cmp dword [rcx + rax + 0x10], 0
jne 0x14003781b
xor edx, edx
nop
mov qword [rbp - 0x48], rdx
cmp rdx, 0x3ff
ja 0x1400375c0
mov rdx, qword [rbp]
mov rax, qword [rdx]
movsxd rcx, dword [rax + 4]
cmp dword [rdx + rcx + 0x10], 0
jne 0x1400375c0
mov rcx, qword [rbp]
mov qword [rcx + 8], 0
movsxd rax, dword [rax + 4]
mov rcx, qword [rcx + rax + 0x48]
test rcx, rcx
je 0x140037651
mov rax, qword [rcx]
mov rax, qword [rax + 8]
lea rdx, [method.std::basic_filebuf_char__struct_std::char_traits_char__.virtual_8]
cmp rax, rdx
jne 0x14003780b
mov rcx, qword [rcx + 0x80]
test rcx, rcx
je 0x140037651
call fcn.1400398f8
mov rdx, qword [rbp]
mov rax, qword [rdx]
movsxd rax, dword [rax + 4]
lea rcx, [rdx + rax]
mov edx, dword [rdx + rax + 0x10]
test edx, edx
jne 0x1400379c2
mov rcx, qword [rcx + 0x50]
test rcx, rcx
jne 0x1400379e8
mov rcx, qword [rbp]
mov rsi, qword [rcx + rax + 0x48]
mov rax, qword [rsi]
mov rax, qword [rax + 0x40]
lea rcx, [method.std::basic_filebuf_char__struct_std::char_traits_char__.virtual_64]
cmp rax, rcx
jne 0x140037a0f
cmp qword [rsi + 0x68], 0
jne 0x140037a36
mov rax, qword [rsi + 0x38]
mov rdx, qword [rax]
mov edi, 2
test rdx, rdx
je 0x140037812
mov r14, qword [rsi + 0x50]
mov r15d, dword [r14]
lea rcx, [rbp + 0xe]
test r15d, r15d
je 0x1400376fb
cmp r15d, 2
mov ebx, 2
cmovb ebx, r15d
cmp ebx, 2
jne 0x1400377db
movzx eax, word [rdx]
mov word [rbp + 0xe], ax
lea rcx, [rbp + rbx + 0xe]
sub rdi, rbx
sub r15d, ebx
mov dword [r14], r15d
mov rax, qword [rsi + 0x38]
add qword [rax], rbx
cmp qword [rsi + 0x80], 0
je 0x140037721
mov rax, qword [rsi + 0x18]
lea rdx, [rsi + 0x70]
cmp qword [rax], rdx
je 0x140037a4d
test rdi, rdi
jne 0x1400377ef
xor edi, edi
mov eax, 2
sub rax, rdi
mov rcx, qword [rbp]
mov qword [rcx + 8], rax
mov dword [rbp - 4], 0
cmp rax, 2
jne 0x140037a23
mov rdx, qword [rbp]
mov rax, qword [rdx]
movsxd rcx, dword [rax + 4]
mov eax, dword [rdx + rcx + 0x10]
cmp qword [rdx + rcx + 0x48], 0
je 0x1400379b8
xor edx, edx
mov r8d, dword [rbp - 4]
or r8d, edx
and eax, 0x17
or eax, r8d
mov rdx, qword [rbp]
mov dword [rdx + rcx + 0x10], eax
and eax, dword [rdx + rcx + 0x14]
jne 0x140037a72
mov rax, qword [rdx]
movsxd rax, dword [rax + 4]
mov rcx, qword [rdx + rax + 0x48]
test rcx, rcx
je 0x1400377b7
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
lea rdx, [method.std::basic_filebuf_char__struct_std::char_traits_char__.virtual_16]
cmp rax, rdx
jne 0x140037a2f
mov rcx, qword [rcx + 0x80]
test rcx, rcx
je 0x1400377b7
call fcn.140039380
movzx eax, word [rbp + 0xe]
mov rcx, qword [rbp - 0x18]
shl rcx, 0xb
add rcx, qword [rbp - 0x10]
mov rdx, qword [rbp - 0x48]
mov word [rcx + rdx*2 + 0x820], ax
inc rdx
jmp 0x1400375f0
cmp ebx, 1
jne 0x140037acc
movzx eax, byte [rdx]
mov byte [rbp + 0xe], al
jmp 0x1400376e6
mov r9, qword [rsi + 0x80]
mov edx, 1
mov r8, rdi
call fcn.14003a620
sub rdi, rax
jmp 0x140037721
call rax
jmp 0x140037651
lea rcx, [rbp + 0xe]
jmp 0x1400376fb
xor edi, edi
lea rsi, [rbp - 0x40]
mov rbx, qword [rbp]
mov r14, qword [rbp - 0x10]
nop dword [rax]
mov rax, qword [rbx]
movsxd rax, dword [rax + 4]
cmp dword [rbx + rax + 0x10], 0
jne 0x1400379a5
mov r8d, 4
mov rcx, rbx
mov rdx, rsi
call fcn.14001c620
mov eax, dword [rbp - 0x40]
mov dword [r14 + rdi + 0x2c00820], eax
mov rax, qword [rbx]
movsxd rax, dword [rax + 4]
cmp dword [rbx + rax + 0x10], 0
jne 0x140037994
mov r8d, 4
mov rcx, rbx
mov rdx, rsi
call fcn.14001c620
mov eax, dword [rbp - 0x40]
mov dword [r14 + rdi + 0x2c00824], eax
mov rax, qword [rbx]
movsxd rax, dword [rax + 4]
cmp dword [rbx + rax + 0x10], 0
jne 0x140037994
mov r8d, 4
mov rcx, rbx
mov rdx, rsi
call fcn.14001c620
mov eax, dword [rbp - 0x40]
mov dword [r14 + rdi + 0x2c00828], eax
mov rax, qword [rbx]
movsxd rax, dword [rax + 4]
cmp dword [rbx + rax + 0x10], 0
jne 0x140037994
mov r8d, 4
mov rcx, rbx
mov rdx, rsi
call fcn.14001c620
mov eax, dword [rbp - 0x40]
mov dword [r14 + rdi + 0x2c0082c], eax
mov rax, qword [rbx]
movsxd rax, dword [rax + 4]
cmp dword [rbx + rax + 0x10], 0
jne 0x140037994
mov r8d, 4
mov rcx, rbx
mov rdx, rsi
call fcn.14001c620
mov eax, dword [rbp - 0x40]
mov dword [r14 + rdi + 0x2c00830], eax
mov rax, qword [rbx]
movsxd rax, dword [rax + 4]
cmp dword [rbx + rax + 0x10], 0
jne 0x140037994
mov r8d, 4
mov rcx, rbx
mov rdx, rsi
call fcn.14001c620
mov eax, dword [rbp - 0x40]
mov dword [r14 + rdi + 0x2c00834], eax
mov rax, qword [rbx]
movsxd rax, dword [rax + 4]
cmp dword [rbx + rax + 0x10], 0
jne 0x140037994
mov r8d, 4
mov rcx, rbx
mov rdx, rsi
call fcn.14001c620
mov eax, dword [rbp - 0x40]
mov dword [r14 + rdi + 0x2c00838], eax
mov rax, qword [rbx]
movsxd rax, dword [rax + 4]
cmp dword [rbx + rax + 0x10], 0
jne 0x140037994
mov r8d, 4
mov rcx, rbx
mov rdx, rsi
call fcn.14001c620
mov eax, dword [rbp - 0x40]
mov dword [r14 + rdi + 0x2c0083c], eax
add rdi, 0x20
cmp rdi, 0xb0000
jne 0x140037830
mov rax, rbx
add rsp, 0x98
pop rbx
pop rdi
pop rsi
pop r14
pop r15
pop rbp
ret
mov edx, 4
jmp 0x14003775f
xor eax, eax
cmp qword [rcx + 0x48], 0
sete al
shl eax, 2
or edx, eax
or edx, 2
mov dword [rbp - 4], 0
xor r8d, r8d
call fcn.1400265b0
jmp 0x140037742
call fcn.140074270
mov rcx, qword [rbp]
mov rax, qword [rcx]
movsxd rax, dword [rax + 4]
mov dword [rbp - 4], 0
cmp dword [rcx + rax + 0x10], 0
je 0x140037679
jmp 0x140037742
mov r8d, 2
mov rcx, rsi
lea rdx, [rbp + 0xe]
call rax
jmp 0x140037729
mov dword [rbp - 4], 3
jmp 0x140037742
call rax
jmp 0x1400377b7
mov r8d, 2
mov rcx, rsi
lea rdx, [rbp + 0xe]
call fcn.140080b80
jmp 0x140037729
mov edx, dword [rsi + 0x90]
mov r8, qword [rsi + 0x88]
mov qword [rax], r8
mov rax, qword [rsi + 0x38]
mov qword [rax], r8
sub edx, r8d
mov rax, qword [rsi + 0x50]
mov dword [rax], edx
jmp 0x140037716
test al, 2
lea rcx, str.ios_base::eofbit_set
lea rdx, str.ios_base::failbit_set
cmove rdx, rcx
test al, 4
lea rsi, str.ios_base::badbit_set
cmove rsi, rdx
call fcn.140081150
lea rdx, [rbp - 0x58]
mov dword [rdx], 1
mov qword [rdx + 8], rax
lea rcx, [rbp - 0x40]
mov r8, rsi
call fcn.140081320
lea rax, vtable.std::ios_base::failure.0
lea rcx, [rbp - 0x40]
mov qword [rcx], rax
lea rdx, [0x140104f38]
call fcn.14003d7d8
mov r8, rbx
call fcn.14006dc20
jmp 0x1400376e6