Function at 0x180057010
Capabilities:
Check if file exists

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x210]
sub rsp, 0x310
mov qword [rbp + 0x168], 0xfffffffffffffffe
mov qword [rsp + 0x368], rbx
mov rax, qword [0x1801485f0]
xor rax, rsp
mov qword [rbp + 0x200], rax
mov r14, r8
mov rsi, rdx
mov rbx, rcx
xor r15d, r15d
mov dword [rsp + 0x24], r15d
cmp qword [rdx + 0x10], r15
jne 0x18005706d
xor al, al
jmp 0x1800578d5
call fcn.1800588d0
mov rdx, rsi
lea rcx, [rbp + 0x1b8]
call fcn.18001b8b0
nop
cmp qword [rax + 0x10], 0
jne 0x18005708d
xor al, al
jmp 0x1800570a6
cmp qword [rax + 0x18], 8
jb 0x180057097
mov rax, qword [rax]
mov rcx, rax
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
sete al
test al, al
sete dil
cmp qword [rbp + 0x1d0], 8
jb 0x1800570c2
mov rcx, qword [rbp + 0x1b8]
call fcn.1800b5700
mov qword [rbp + 0x1d0], 7
mov qword [rbp + 0x1c8], r15
mov word [rbp + 0x1b8], r15w
lea rcx, [rbp + 0x1b8]
test dil, dil
je 0x180057138
mov byte [0x18014d728], 1
mov rdx, rsi
call fcn.18001b8b0
nop
mov rcx, rax
call fcn.180025c70
mov byte [rbx + 0x18], al
cmp qword [rbp + 0x1d0], 8
jb 0x180057119
mov rcx, qword [rbp + 0x1b8]
call fcn.1800b5700
mov qword [rbp + 0x1d0], 7
mov qword [rbp + 0x1c8], r15
mov word [rbp + 0x1b8], r15w
jmp 0x1800578d1
mov qword [rbp + 0x1c8], r15
mov qword [rbp + 0x1d0], r15
mov qword [rbp + 0x1d0], 7
mov qword [rbp + 0x1c8], r15
mov word [rbp + 0x1b8], r15w
xor r8d, r8d
lea rdx, [0x180100a4c]
call fcn.1800166f0
nop
mov dword [rbp + 0x150], 0x18
mov dword [rbp + 0x160], r15d
lea rax, [rbp + 0x170]
mov qword [rbp + 0x158], rax
lea rcx, [rbp + 0x198]
call fcn.180027960
mov rdi, rax
cmp qword [rax + 0x18], 0x10
jb 0x1800571a8
mov rdi, qword [rax]
call fcn.18001f1d0
mov rcx, rax
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdi, rax
cmp qword [rbp + 0x1b0], 0x10
jb 0x1800571d2
mov rcx, qword [rbp + 0x198]
call fcn.1800b5700
mov qword [rbp + 0x1b0], 0xf
mov qword [rbp + 0x1a8], r15
mov byte [rbp + 0x198], 0
test rdi, rdi
je 0x1800572ff
mov edx, 1
lea rcx, [rbp + 0x170]
call rdi
test eax, eax
je 0x1800572ff
call fcn.180028380
test rax, rax
je 0x1800572ff
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
lea rcx, [rbp + 0x170]
call rax
test eax, eax
je 0x1800572ff
call fcn.1800285c0
test eax, eax
je 0x1800572ff
cmp qword [rbp + 0x1c8], 0
je 0x1800572ff
mov qword [rsp + 0x30], r15
call fcn.180028410
test rax, rax
je 0x1800572ff
lea rcx, [rbp + 0x1b8]
cmp qword [rbp + 0x1d0], 8
cmovae rcx, qword [rbp + 0x1b8]
xor r9d, r9d
lea r8, [rsp + 0x30]
lea edx, [r9 + 1]
call rax
test eax, eax
je 0x1800572ff
mov qword [rbp + 0x198], r15
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x2c], r15d
call fcn.1800284a0
test rax, rax
je 0x1800572ff
lea r9, [rsp + 0x2c]
lea r8, [rbp + 0x198]
lea rdx, [rsp + 0x28]
mov rcx, qword [rsp + 0x30]
call rax
test eax, eax
je 0x1800572ff
call fcn.1800282f0
test rax, rax
je 0x1800572ff
mov edx, 1
lea rcx, [rbp + 0x170]
call rax
test eax, eax
je 0x1800572ff
call fcn.180028530
test rax, rax
je 0x1800572ff
xor r9d, r9d
mov r8, qword [rbp + 0x198]
lea edx, [r9 + 1]
lea rcx, [rbp + 0x170]
call rax
nop
cmp qword [rbp + 0x1d0], 8
jb 0x180057315
mov rcx, qword [rbp + 0x1b8]
call fcn.1800b5700
mov qword [rbp + 0x1d0], 7
mov qword [rbp + 0x1c8], r15
mov word [rbp + 0x1b8], r15w
mov rcx, r14
call fcn.180013890
mov r9, rax
xor r8d, r8d
xor edx, edx
lea rcx, [rbp + 0x150]
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov rdi, rax
test rax, rax
je 0x180057391
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x180057391
mov edx, 0xbb8
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x180057391
mov byte [rbx + 0x18], 0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1800578d1
lea rax, [0x180000000]
lea rax, [rax + 0x100a18]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x10]
mov qword [rbp + 0x198], rax
lea r14, vtable.std::ios_base.0
mov qword [rbp - 0x10], r14
lea r12, vtable.std::basic_ios_char__struct_std::char_traits_char__.0
mov qword [rbp - 0x10], r12
mov dword [rsp + 0x24], 1
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea r13, vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x40], r13
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x18]
mov dword [rsp + rcx + 0x3c], edx
mov qword [rsp + 0x48], r15
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x40]
add rcx, rax
xor r8d, r8d
lea rdx, [rsp + 0x50]
call fcn.1800160d0
nop
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x40], rax
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x3c], edx
lea rax, [rsp + 0x50]
mov qword [rbp + 0x198], rax
lea rcx, [rsp + 0x50]
call fcn.1800183d0
nop
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rsp + 0x50], rax
mov byte [rbp - 0x28], 0
mov byte [rbp - 0x2f], 0
lea rax, [rsp + 0x58]
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x70], rax
lea rax, [rsp + 0x78]
mov qword [rbp - 0x78], rax
lea rax, [rbp - 0x80]
mov qword [rbp - 0x70], rax
lea rax, [rbp - 0x68]
mov qword [rbp - 0x60], rax
lea rax, [rbp - 0x64]
mov qword [rbp - 0x58], rax
mov qword [rsp + 0x60], r15
mov qword [rbp - 0x80], r15
mov qword [rbp - 0x68], r15
mov qword [rsp + 0x58], r15
mov qword [rsp + 0x78], r15
mov qword [rbp - 0x20], r15
mov eax, dword [0x18014d6f8]
mov dword [rbp - 0x2c], eax
mov qword [rbp - 0x38], r15
cmp qword [rsi + 0x18], 0x10
jb 0x1800574d2
mov rdx, qword [rsi]
jmp 0x1800574d5
mov rdx, rsi
mov r9d, 0x40
lea r8d, [r9 - 0x3f]
lea rcx, [rsp + 0x40]
call fcn.1800581a0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp qword [rbp - 0x20], 0
jne 0x180057523
mov byte [rbx + 0x18], 0
lea rcx, [rbp - 0x10]
call fcn.180014b70
lea rax, [rbp - 0x10]
mov qword [rbp + 0x198], rax
mov qword [rbp - 0x10], r12
jmp 0x1800578c4
lea rcx, [0x180000000]
lea rax, [rcx + 0x101800]
mov qword [rbp + 0x50], rax
lea rax, [rcx + 0x100a10]
mov qword [rbp + 0x60], rax
lea rax, [rbp + 0xe8]
mov qword [rbp + 0x198], rax
mov qword [rbp + 0xe8], r14
mov qword [rbp + 0xe8], r12
mov dword [rsp + 0x24], 5
mov rax, qword [rbp + 0x50]
movsxd rcx, dword [rax + 4]
mov qword [rbp + rcx + 0x50], r13
mov rax, qword [rbp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x18]
mov dword [rbp + rcx + 0x4c], edx
mov qword [rbp + 0x58], r15
mov rax, qword [rbp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rbp + 0x50]
add rcx, rax
xor r8d, r8d
lea rdx, [rbp + 0x68]
call fcn.1800160d0
nop
lea rax, [rbp + 0x60]
mov qword [rbp + 0x198], rax
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 + 0x5c], edx
mov rax, qword [rbp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_iostream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx + 0x50], rax
mov rax, qword [rbp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x20]
mov dword [rbp + rcx + 0x4c], edx
mov rax, qword [rbp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp + rcx + 0x50], rax
mov rax, qword [rbp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rbp + rcx + 0x4c], edx
lea rax, [rbp + 0x68]
mov qword [rbp + 0x198], rax
lea rcx, [rbp + 0x68]
call fcn.1800183d0
nop
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 + 0xd0], r15
mov dword [rbp + 0xd8], r15d
lea rdx, [rsp + 0x50]
lea rcx, [rbp + 0x60]
call fcn.180012ec0
lea rcx, [rsp + 0x50]
call fcn.180017210
test rax, rax
jne 0x18005772b
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
mov eax, dword [rsp + rcx + 0x50]
or eax, 2
cmp qword [rbp + rcx - 0x78], 0
jne 0x180057681
or eax, 4
and eax, 0x17
mov dword [rsp + rcx + 0x50], eax
mov ecx, dword [rsp + rcx + 0x54]
and ecx, eax
je 0x18005772b
mov dword [rbp + 0x198], 1
lea rax, vtable.std::error_category.0
lea r8, [rbp + 0x198]
mov qword [rbp + 0x1a0], rax
test cl, 4
je 0x1800576df
lea rdx, str.ios_base::badbit_set
lea rcx, [rbp + 0x1b8]
call fcn.180001ab0
lea rdx, [0x180144f50]
lea rcx, [rbp + 0x1b8]
call fcn.1800b6400
int3
test cl, 2
lea rcx, [rbp + 0x1b8]
je 0x18005770b
lea rdx, str.ios_base::failbit_set
call fcn.180001ab0
lea rdx, [0x180144f50]
lea rcx, [rbp + 0x1b8]
call fcn.1800b6400
int3
lea rdx, str.ios_base::eofbit_set
call fcn.180001ab0
lea rdx, [0x180144f50]
lea rcx, [rbp + 0x1b8]
call fcn.1800b6400
int3
lea rdx, [rbp + 0x1e0]
lea rcx, [rbp + 0x50]
call fcn.180057f20
nop
lea r8, [rbp + 0x1e0]
mov rdx, rsi
lea rcx, [rsp + 0x20]
call fcn.180024800
cmp qword [rbp + 0x1f0], 0
jne 0x1800577e3
mov byte [rbx + 0x18], 1
cmp qword [rbp + 0x1f8], 0x10
jb 0x180057778
mov rcx, qword [rbp + 0x1e0]
call fcn.1800b5700
mov qword [rbp + 0x1f8], 0xf
mov qword [rbp + 0x1f0], r15
mov byte [rbp + 0x1e0], 0
lea rcx, [rbp + 0xe8]
call fcn.180057e50
lea rax, [rbp + 0xe8]
mov qword [rbp + 0x198], rax
mov qword [rbp + 0xe8], r12
mov qword [rbp + 0xe8], r14
lea rcx, [rbp + 0xe8]
call fcn.1800b1648
nop
lea rcx, [rbp - 0x10]
call fcn.180014b70
lea rax, [rbp - 0x10]
mov qword [rbp + 0x198], rax
mov qword [rbp - 0x10], r12
jmp 0x1800578c4
lea rdx, [rbp + 0x1e0]
mov rcx, rbx
call fcn.180058a30
mov byte [rbx + 0x18], al
cmp qword [rbp + 0x1f8], 0x10
jb 0x18005780b
mov rcx, qword [rbp + 0x1e0]
call fcn.1800b5700
mov qword [rbp + 0x1f8], 0xf
mov qword [rbp + 0x1f0], r15
mov byte [rbp + 0x1e0], 0
lea rcx, [rbp + 0xe8]
call fcn.180057e50
lea rax, [rbp + 0xe8]
mov qword [rbp + 0x198], rax
mov qword [rbp + 0xe8], r12
mov qword [rbp + 0xe8], r14
lea rcx, [rbp + 0xe8]
call fcn.1800b1648
nop
lea rax, [rbp - 0x10]
mov qword [rbp + 0x198], rax
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x40], rax
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x3c], edx
lea rcx, [rsp + 0x50]
call fcn.180013a80
nop
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x40], r13
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x18]
mov dword [rsp + rcx + 0x3c], edx
lea rax, [rbp - 0x10]
mov qword [rbp + 0x198], rax
mov qword [rbp - 0x10], r12
mov qword [rbp - 0x10], r14
lea rcx, [rbp - 0x10]
call fcn.1800b1648
movzx eax, byte [rbx + 0x18]
mov rcx, qword [rbp + 0x200]
xor rcx, rsp
call fcn.1800b6c40
mov rbx, qword [rsp + 0x368]
add rsp, 0x310
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret