Function at 0x471390
Capabilities:
Check if file exists

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x338
cmp qword [rdx + 8], 0
mov r14, rcx
mov rsi, rdx
mov rbx, r8
jne 0x4713f0
test r8, r8
je 0x471a7b
lea rax, [0x006d1310]
mov dword [r8], 3
mov byte [r8 + 4], 1
mov qword [r8 + 8], rax
add rsp, 0x338
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
test r8, r8
je 0x47140c
lea rax, [0x006d1310]
mov dword [r8], 0
mov byte [r8 + 4], 0
mov qword [r8 + 8], rax
lea rbp, [rsp + 0x60]
mov r15, qword [rsi]
lea r12, [rsp + 0x80]
mov qword [rsp + 0x68], 0
lea rax, [rbp + 0x10]
mov qword [rsp + 0x60], rax
xor eax, eax
test r15, r15
mov word [rsp + 0x70], ax
lea rax, [r12 + 0x10]
mov qword [rsp + 0x80], rax
je 0x471691
mov rcx, r15
call sub.msvcrt.dll_wcslen
lea rdi, [rax + rax]
mov r13, rdi
sar r13, 1
cmp r13, 7
ja 0x471830
cmp r13, 1
mov rax, qword [rsp + 0x80]
je 0x4716a0
test r13, r13
jne 0x47185d
lea r8, [rax + rdi]
lea rdi, [rsp + 0xa0]
xor r9d, r9d
mov qword [rsp + 0x88], r13
mov r15, qword [r14]
lea rdx, [rdi + 0x10]
mov word [r8], r9w
mov rcx, rdi
xor r9d, r9d
mov qword [rsp + 0xa0], rdx
mov rdx, rax
call fcn.00643ae0
mov rax, qword [rsp + 0xa8]
lea r9, [0x0069281e]
test rax, rax
je 0x4714fe
mov rdx, qword [rsp + 0xa0]
movzx ecx, word [rdx + rax*2 - 2]
sub ecx, 0x2f
cmp cx, 0x2d
ja 0x4714fe
movabs rax, 0x200000000801
shr rax, cl
test al, 1
lea rax, [0x0069281a]
cmovne r9, rax
movzx eax, word [r9]
mov rcx, r9
mov qword [rsp + 0x30], r9
mov word [rsp + 0x38], ax
call sub.msvcrt.dll_wcslen
mov rdx, qword [rsp + 0xa8]
movabs rcx, 0x3fffffffffffffff
mov r9, qword [rsp + 0x30]
sub rcx, rdx
cmp rcx, rax
jb 0x471af9
mov rcx, qword [rsp + 0xa0]
lea r10, [rdi + 0x10]
lea r13, [rdx + rax]
mov r8d, 7
cmp rcx, r10
je 0x47155a
mov r8, qword [rsp + 0xb0]
cmp r13, r8
ja 0x471880
test rax, rax
je 0x471580
cmp rax, 1
lea r10, [rcx + rdx*2]
jne 0x4718e0
movzx eax, word [rsp + 0x38]
mov word [r10], ax
nop
xor r8d, r8d
mov qword [rsp + 0xa8], r13
mov word [rcx + r13*2], r8w
lea r13, [rsp + 0xe0]
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp rax, 0xffffffffffffffff
mov qword [r15 + 0x38], rax
je 0x4718a0
lea r15, [r13 + 0x2c]
mov rcx, r15
call sub.msvcrt.dll_wcslen
mov r8, qword [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov r9, r15
xor edx, edx
mov rcx, rbp
call fcn.006433f0
mov eax, dword [rsp + 0xe0]
test ah, 4
mov dword [rsp + 0x3c], eax
jne 0x4716b0
test al, 0x10
lea r15, [rsp + 0xc0]
lea rcx, [r13 + 0x2c]
setne al
movzx eax, al
add eax, 2
mov dword [rsp + 0x38], eax
lea rax, [r15 + 0x10]
mov qword [rsp + 0xc0], rax
call sub.msvcrt.dll_wcslen
mov qword [rsp + 0x40], rax
add rax, rax
mov qword [rsp + 0x48], rax
sar rax, 1
cmp rax, 7
mov qword [rsp + 0x30], rax
ja 0x4719e0
cmp qword [rsp + 0x30], 1
mov rax, qword [rsp + 0xc0]
je 0x4719c0
cmp qword [rsp + 0x30], 0
jne 0x471a19
mov rdx, qword [rsp + 0x30]
xor ecx, ecx
mov qword [rsp + 0xc8], rdx
mov rdx, qword [rsp + 0x40]
mov word [rax + rdx*2], cx
mov edx, dword [rsp + 0x3c]
mov rcx, r15
call fcn.0046c2c0
mov rcx, qword [rsp + 0xc0]
add r15, 0x10
mov dword [rsp + 0x30], eax
cmp rcx, r15
je 0x4716c0
call fcn.00670500
jmp 0x4716c0
lea rcx, [0x006923d0]
call fcn.0065f680
nop dword [rax]
movzx edx, word [r15]
mov word [rax], dx
jmp 0x471482
mov dword [rsp + 0x30], 0xffff
mov dword [rsp + 0x38], 0
xor r15d, r15d
mov rcx, qword [rsp + 0xa0]
add rdi, 0x10
cmp rcx, rdi
je 0x4716d9
call fcn.00670500
mov rcx, qword [rsp + 0x80]
add r12, 0x10
cmp rcx, r12
je 0x4716ef
call fcn.00670500
test r15d, r15d
mov rdi, qword [r14]
je 0x471740
test rdi, rdi
mov qword [r14], 0
je 0x47170d
lock sub dword [rdi], 1
je 0x471a40
lea r9, str.boost::filesystem::directory_iterator::construct
mov r8, rbx
mov rdx, rsi
mov ecx, r15d
call fcn.0046c9b0
mov rcx, qword [rsp + 0x60]
add rbp, 0x10
cmp rcx, rbp
je 0x4713d3
call fcn.00670500
jmp 0x4713d3
cmp qword [rdi + 0x38], 0
je 0x471900
lea r15, [rsp + 0xc0]
mov rdx, qword [rsp + 0x60]
xor r9d, r9d
lea rax, [r15 + 0x10]
mov rcx, r15
mov qword [rsp + 0xc0], rax
mov rax, qword [rsp + 0x68]
lea r8, [rdx + rax*2]
call fcn.00643ae0
lea rax, [r13 + 0x10]
mov rdx, qword [rsi]
xor r9d, r9d
mov rcx, r13
mov qword [rsp + 0xe0], rax
mov rax, qword [rsi + 8]
lea r8, [rdx + rax*2]
call fcn.00643ae0
mov rdx, r15
mov rcx, r13
call fcn.00477980
lea rcx, [rdi + 8]
mov rdx, r13
call fcn.006452c0
mov rcx, qword [rsp + 0xe0]
mov eax, dword [rsp + 0x38]
add r13, 0x10
mov esi, dword [rsp + 0x30]
cmp rcx, r13
mov dword [rdi + 0x28], eax
mov dword [rdi + 0x30], eax
mov dword [rdi + 0x2c], esi
mov dword [rdi + 0x34], esi
je 0x4717db
call fcn.00670500
mov rcx, qword [rsp + 0xc0]
add r15, 0x10
cmp rcx, r15
je 0x4717f1
call fcn.00670500
mov rcx, qword [rsp + 0x60]
cmp word [rcx], 0x2e
jne 0x471727
movzx eax, word [rcx + 2]
test ax, ax
je 0x47181e
cmp ax, 0x2e
jne 0x471727
cmp word [rcx + 4], 0
jne 0x471727
mov rdx, rbx
mov rcx, r14
call fcn.00470ac0
jmp 0x471722
movabs rax, 0x3fffffffffffffff
cmp r13, rax
ja 0x471bde
lea rcx, [r13 + r13 + 2]
call fcn.00670540
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x90], r13
mov r8, rdi
mov rdx, r15
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rax, qword [rsp + 0x80]
jmp 0x471482
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov rcx, rdi
call fcn.00645420
mov rcx, qword [rsp + 0xa0]
jmp 0x471580
mov qword [r15 + 0x38], 0
mov r15, qword [sym.imp.KERNEL32.dll_GetLastError]
call r15
cmp eax, 2
je 0x4718c3
call r15
cmp eax, 0x12
jne 0x4719d0
xor r15d, r15d
mov dword [rsp + 0x30], 0xffff
mov dword [rsp + 0x38], 0
jmp 0x4716c3
lea r8, [rax + rax]
mov rcx, r10
mov rdx, r9
call sub.msvcrt.dll_memcpy
mov rcx, qword [rsp + 0xa0]
jmp 0x471580
mov qword [r14], 0
lock sub dword [rdi], 1
jne 0x471722
mov rcx, qword [rdi + 0x38]
test rcx, rcx
je 0x471928
call qword [sym.imp.KERNEL32.dll_FindClose]
mov qword [rdi + 0x38], 0
mov rcx, qword [rdi + 8]
lea rax, [rdi + 0x18]
cmp rcx, rax
je 0x47193a
call fcn.00670500
mov rcx, rdi
mov edx, 0x40
call fcn.00670510
mov rcx, qword [rsp + 0x60]
jmp 0x471727
mov rcx, qword [rsp + 0x60]
add rbp, 0x10
cmp rcx, rbp
je 0x47196a
call fcn.00670500
sub rdi, 1
mov rcx, rsi
jne 0x471b61
call fcn.00670770
test rbx, rbx
je 0x471bea
mov rcx, qword [r14]
lea rax, [0x006d1320]
mov dword [rbx], 0xc
mov byte [rbx + 4], 1
mov qword [rbx + 8], rax
mov qword [r14], 0
test rcx, rcx
je 0x4719ae
call fcn.005ab100
call fcn.00670990
jmp 0x4713d3
movzx edx, word [rsp + 0x10c]
mov word [rax], dx
jmp 0x471651
call r15
mov r15d, eax
jmp 0x4718c6
movabs rax, 0x3fffffffffffffff
cmp qword [rsp + 0x30], rax
ja 0x471bbf
mov rax, qword [rsp + 0x30]
lea rcx, [rax + rax + 2]
call fcn.00670540
mov rdx, qword [rsp + 0x30]
mov qword [rsp + 0xc0], rax
mov qword [rsp + 0xd0], rdx
mov r8, qword [rsp + 0x48]
lea rdx, [r13 + 0x2c]
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rax, qword [rsp + 0xc0]
jmp 0x471651
mov rcx, qword [rdi + 0x38]
test rcx, rcx
je 0x471a57
call qword [sym.imp.KERNEL32.dll_FindClose]
mov qword [rdi + 0x38], 0
mov rcx, qword [rdi + 8]
lea rax, [rdi + 0x18]
cmp rcx, rax
je 0x471a69
call fcn.00670500
mov edx, 0x40
mov rcx, rdi
call fcn.00670510
jmp 0x47170d
mov ecx, 0x48
lea r13, [rsp + 0xe0]
call fcn.00670680
lea rdx, str.boost::filesystem::directory_iterator::construct
mov rcx, r13
mov rbx, rax
call fcn.0046c220
movabs rax, 0x100000003
lea r9, [rsp + 0x50]
mov rdx, r13
mov qword [rsp + 0x50], rax
lea rax, [0x006d1310]
mov rcx, rbx
mov r8, rsi
add r13, 0x10
mov qword [rsp + 0x58], rax
call fcn.005a8f70
mov rcx, qword [rsp + 0xe0]
cmp rcx, r13
je 0x471ae3
call fcn.00670500
lea r8, [0x005a9500]
lea rdx, [0x006d32e0]
mov rcx, rbx
call fcn.00670ef0
lea rcx, [0x00692859]
call fcn.0065f820
mov rsi, rax
mov r13, rdx
mov rcx, qword [rsp + 0xa0]
add rdi, 0x10
cmp rcx, rdi
je 0x471b21
call fcn.00670500
mov rdi, r13
mov rcx, qword [rsp + 0x80]
add r12, 0x10
cmp rcx, r12
je 0x471957
call fcn.00670500
jmp 0x471957
call fcn.0058e700
mov rcx, qword [rsp + 0xe0]
add r13, 0x10
mov rsi, rax
mov rdi, rdx
cmp rcx, r13
je 0x471b82
call fcn.00670500
mov rcx, qword [rsp + 0xc0]
add r15, 0x10
cmp rcx, r15
jne 0x471b39
jmp 0x471957
lea rcx, [0x0069244a]
call fcn.0065f820
mov rsi, rax
mov rdi, rdx
jmp 0x471b24
lea rcx, [0x0069244a]
call fcn.0065f820
call fcn.00670ea0
nop