Function at 0x180017680
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x118]
sub rsp, 0x218
mov rax, qword [0x18028f9a8]
xor rax, rsp
mov qword [rbp + 0x100], rax
mov dword [rsp + 0x50], r9d
mov qword [rsp + 0x60], r8
mov rsi, rdx
mov rdi, rcx
mov qword [rbp + 0xb0], rcx
mov qword [rbp + 0xb8], rdx
xor r13d, r13d
mov r15d, r13d
mov dword [rsp + 0x48], r13d
cmp qword [rcx + 0x18], 8
jb 0x1800176e0
mov rcx, qword [rcx]
mov rax, qword [rdi + 0x10]
cmp word [rcx + rax*2 - 2], 0x5c
je 0x180017701
mov r8d, 1
lea rdx, [0x1801e47c0]
mov rcx, rdi
call fcn.18001c830
mov r14, qword [rsi + 0x10]
mov r11, rsi
mov r12, qword [rsi + 0x18]
cmp r12, 8
jb 0x180017715
mov r11, qword [rsi]
cmp r14, 1
jb 0x18001778d
lea rcx, [r14 - 1]
mov rax, 0xffffffffffffffff
cmp rcx, rax
cmovb rax, rcx
lea r9, [r11 + rax*2]
lea rbx, [0x1801e47c4]
mov r10, r9
sub r10, rbx
nop
cmp word [r9], 0x5c
jne 0x180017776
mov r8d, 1
mov rax, rbx
mov ecx, 0x5c
mov edx, ecx
cmp cx, dx
ja 0x180017776
cmp r8, 1
je 0x180017785
dec r8
add rax, 2
movzx ecx, word [r10 + rax]
movzx edx, word [rax]
cmp cx, dx
jae 0x18001775a
cmp r9, r11
je 0x18001778d
sub r9, 2
sub r10, 2
jmp 0x180017740
sub r9, r11
sar r9, 1
jmp 0x180017794
mov r9, 0xffffffffffffffff
mov qword [rbp + 0xf0], r13
mov ebx, 7
mov qword [rbp + 0xf8], rbx
mov word [rbp + 0xe0], r13w
lea rax, [r9 - 1]
cmp rax, 0xfffffffffffffffd
ja 0x180017815
mov qword [rbp + 0xd0], r13
mov qword [rbp + 0xd8], rbx
mov word [rbp + 0xc0], r13w
cmp r14, r9
cmovb r9, r14
mov rdx, rsi
cmp r12, 8
jb 0x1800177e2
mov rdx, qword [rsi]
mov r8, r9
lea rcx, [rbp + 0xc0]
call fcn.18001ccd0
mov r15d, 1
movups xmm0, xmmword [rbp + 0xc0]
movups xmmword [rbp + 0xe0], xmm0
movups xmm1, xmmword [rbp + 0xd0]
movups xmmword [rbp + 0xf0], xmm1
jmp 0x18001782b
xor r8d, r8d
lea rdx, [0x1801e47c8]
lea rcx, [rbp + 0xe0]
call fcn.18001ccd0
mov rcx, qword [rdi + 0x10]
movabs r14, 0x7ffffffffffffffe
mov rax, r14
sub rax, rcx
mov rdx, qword [rbp + 0xf0]
cmp rax, rdx
jb 0x180017d4e
mov r9, rdi
cmp qword [rdi + 0x18], 8
jb 0x18001785c
mov r9, qword [rdi]
lea rax, [rbp + 0xe0]
cmp qword [rbp + 0xf8], 8
cmovae rax, qword [rbp + 0xe0]
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
mov r8, rdi
movzx edx, byte [rsp + 0x40]
lea rcx, [rbp + 0xc0]
call fcn.180019e80
or r15d, 2
lea rax, [rbp + 0xc0]
mov qword [rsp + 0x58], rax
lea rcx, [rbp + 0xc0]
cmp qword [rbp + 0xd8], 8
cmovae rcx, qword [rbp + 0xc0]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1800178cc
test al, 0x10
jne 0x1800178e6
lea rdx, [rbp + 0xc0]
lea rcx, [rsp + 0x78]
call fcn.180019de0
mov rcx, rax
call fcn.180015ae0
nop
lea rcx, [rbp + 0xc0]
call fcn.18001c540
lea rax, [0x1801e4cb0]
mov qword [rbp - 0x60], rax
or r15d, 4
mov dword [rsp + 0x48], r15d
lea rax, vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov qword [rbp + 0x48], rax
mov dword [rbp + 0x44], 0x98
xor r8d, r8d
lea rdx, [rbp - 0x58]
lea rcx, [rbp + 0x48]
call fcn.18001e2b0
nop
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x60], rax
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx - 0x64], edx
lea rcx, [rbp - 0x58]
call fcn.1800199e0
nop
mov rcx, qword [rdi + 0x10]
mov qword [rsp + 0x48], rcx
mov rdx, qword [rsi + 0x10]
mov qword [rsp + 0x58], rdx
mov rax, r14
sub rax, rcx
cmp rax, rdx
jb 0x180017d54
mov r13, rdi
cmp qword [rdi + 0x18], 8
jb 0x180017987
mov r13, qword [rdi]
mov r12, rsi
cmp qword [rsi + 0x18], 8
jb 0x180017994
mov r12, qword [rsi]
xor eax, eax
mov qword [rbp + 0xd0], rax
mov qword [rbp + 0xd8], rax
lea r15, [rdx + rcx]
lea r14, [rbp + 0xc0]
cmp r15, 7
jbe 0x1800179fb
mov rbx, r15
or rbx, 7
movabs rax, 0x7ffffffffffffffe
cmp rbx, rax
jbe 0x1800179d0
mov rbx, rax
jmp 0x1800179dc
mov eax, 0xa
cmp rbx, rax
cmovb rbx, rax
lea rdx, [rbx + 1]
lea rcx, [rbp + 0xc0]
call fcn.18001c6a0
mov r14, rax
mov qword [rbp + 0xc0], rax
mov rcx, qword [rsp + 0x48]
mov qword [rbp + 0xd0], r15
mov qword [rbp + 0xd8], rbx
lea rbx, [rcx + rcx]
mov r8, rbx
mov rdx, r13
mov rcx, r14
call fcn.1801a4560
mov r8, qword [rsp + 0x58]
add r8, r8
lea rcx, [rbx + r14]
mov rdx, r12
call fcn.1801a4560
xor r12d, r12d
mov word [r14 + r15*2], r12w
lea rdx, [rbp + 0xc0]
cmp qword [rbp + 0xd8], 8
cmovae rdx, qword [rbp + 0xc0]
lea r9d, [r12 + 0x40]
lea r8d, [r12 + 0x22]
lea rcx, [rbp - 0x58]
call fcn.18001e590
lea ebx, [r12 + 6]
lea r15d, [r12 + 2]
test rax, rax
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
je 0x180017a96
mov eax, 4
cmp qword [rbp + rcx - 0x18], r12
cmovne eax, r12d
mov dword [rbp + rcx - 0x50], eax
test dword [rbp + rcx - 0x4c], eax
jne 0x180017d19
jmp 0x180017ab9
mov eax, ebx
cmp qword [rbp + rcx - 0x18], 0
cmovne eax, r15d
or eax, dword [rbp + rcx - 0x50]
and eax, 0x17
mov dword [rbp + rcx - 0x50], eax
mov edx, dword [rbp + rcx - 0x4c]
and edx, eax
jne 0x180017d5a
mov rdx, qword [rbp + 0xd8]
cmp rdx, 8
jb 0x180017aff
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0xc0]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180017afa
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180017dae
call fcn.180186100
cmp qword [rbp + 0x28], 0
jne 0x180017bd3
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x60], rax
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx - 0x64], edx
lea rcx, [rbp - 0x58]
call fcn.18001a9b0
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x60], rax
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x10]
mov dword [rbp + rcx - 0x64], edx
lea rax, vtable.std::ios_base.0
mov qword [rbp + 0x48], rax
lea rcx, [rbp + 0x48]
call fcn.180162f48
nop
mov rdx, qword [rbp + 0xf8]
cmp rdx, 8
jb 0x180017bb8
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0xe0]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180017bb2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180017d13
call fcn.180186100
nop
mov rcx, rdi
call fcn.18001c540
nop
mov rcx, rsi
call fcn.18001c540
mov eax, 0xffffffff
jmp 0x180017cf0
mov r8d, dword [rsp + 0x50]
mov rdx, qword [rsp + 0x60]
lea rcx, [rbp - 0x60]
call fcn.18001f730
lea rdx, [rsp + 0x60]
lea rcx, [rbp - 0x60]
call fcn.18001ee90
mov r14d, dword [rax + 8]
add r14d, dword [rax]
lea rcx, [rbp - 0x58]
call fcn.18001cf30
test rax, rax
jne 0x180017c32
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
cmp qword [rbp + rcx - 0x18], 0
cmovne ebx, r15d
or ebx, dword [rbp + rcx - 0x50]
and ebx, 0x17
mov dword [rbp + rcx - 0x50], ebx
mov eax, dword [rbp + rcx - 0x4c]
and eax, ebx
jne 0x180017db4
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x60], rax
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx - 0x64], edx
lea rcx, [rbp - 0x58]
call fcn.18001a9b0
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x60], rax
mov rax, qword [rbp - 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x10]
mov dword [rbp + rcx - 0x64], edx
lea rax, vtable.std::ios_base.0
mov qword [rbp + 0x48], rax
lea rcx, [rbp + 0x48]
call fcn.180162f48
nop
mov rdx, qword [rbp + 0xf8]
cmp rdx, 8
jb 0x180017cdc
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0xe0]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180017cd6
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180017d13
call fcn.180186100
nop
mov rcx, rdi
call fcn.18001c540
nop
mov rcx, rsi
call fcn.18001c540
mov eax, r14d
mov rcx, qword [rbp + 0x100]
xor rcx, rsp
call fcn.180186840
add rsp, 0x218
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
call fcn.1801a8e8c
nop
mov edx, 1
lea rcx, [rsp + 0x60]
call fcn.18001e430
mov r8, rax
lea rdx, str.ios_base::badbit_set
lea rcx, [rsp + 0x78]
call fcn.18001a6a0
lea rdx, [0x18028ba58]
lea rcx, [rsp + 0x78]
call fcn.1801a3720
nop
call fcn.18001c5d0
nop
call fcn.18001c5d0
nop
test dl, 4
je 0x180017d68
lea rbx, str.ios_base::badbit_set
jmp 0x180017d7d
test r15b, dl
lea rbx, str.ios_base::failbit_set
lea rax, str.ios_base::eofbit_set
cmove rbx, rax
mov edx, 1
lea rcx, [rsp + 0x60]
call fcn.18001e430
mov r8, rax
mov rdx, rbx
lea rcx, [rsp + 0x78]
call fcn.18001a6a0
lea rdx, [0x18028ba58]
lea rcx, [rsp + 0x78]
call fcn.1801a3720
nop
call fcn.1801a8e8c
int3
test al, 4
je 0x180017dc1
lea rbx, str.ios_base::badbit_set
jmp 0x180017dd5
test al, 2
lea rbx, str.ios_base::failbit_set
lea rax, str.ios_base::eofbit_set
cmove rbx, rax
mov edx, 1
lea rcx, [rsp + 0x60]
call fcn.18001e430
mov r8, rax
mov rdx, rbx
lea rcx, [rsp + 0x78]
call fcn.18001a6a0
lea rdx, [0x18028ba58]
lea rcx, [rsp + 0x78]
call fcn.1801a3720
int3