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

Disassembly:
push rbx
push r14
push r15
sub rsp, 0x380
mov rax, qword [0x18003f390]
xor rax, rsp
mov qword [rsp + 0x360], rax
mov rbx, rcx
mov rcx, qword [rcx + 0x48]
mov qword [rsp + 0x3a8], rbp
cmp rcx, 0xffffffffffffffff
je 0x180009852
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x48], 0xffffffffffffffff
mov rcx, qword [rbx + 0x40]
cmp rcx, 0xffffffffffffffff
je 0x18000986a
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x40], 0xffffffffffffffff
mov r15d, 4
xor r14d, r14d
lea ebp, [r15 - 3]
cmp dword [rbx + 0x2ec], r14d
je 0x180009b37
cmp dword [rbx + 0x2f0], r14d
mov qword [rsp + 0x40], 0x100
mov qword [rsp + 0x3b0], rsi
lea rax, [rsp + 0x60]
mov qword [rsp + 0x3b8], rdi
mov qword [rsp + 0x378], r12
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x160]
mov qword [rsp + 0x30], 0x100
mov qword [rsp + 0x28], rax
lea rcx, [rbx + 0x2f8]
lea r9, [rsp + 0x260]
lea r8d, [r15 - 1]
lea rdx, [rsp + 0x50]
mov r12d, 2
mov qword [rsp + 0x20], 0x100
mov qword [rsp + 0x370], r13
cmovne r12d, r15d
call fcn.180016280
lea rax, [rsp + 0x60]
lea r9, [rsp + 0x50]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x160]
lea r8, str._s_s_s_s
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x260]
lea rcx, [rbx + 0xe4]
mov edx, 0x104
mov qword [rsp + 0x20], rax
call fcn.180004ac0
lea rax, [rsp + 0x60]
lea r9, [rsp + 0x50]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x160]
lea r8, str._s_s_s.old_s
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x260]
lea rcx, [rbx + 0x1e8]
mov edx, 0x104
mov qword [rsp + 0x20], rax
call fcn.180004ac0
mov qword [rsp + 0x30], r14
lea r8d, [r15 + 1]
lea rcx, [rbx + 0xe4]
xor r9d, r9d
mov edx, 0x40000000
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r12d
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rbx + 0x40], rax
mov edi, ebp
cmp rax, 0xffffffffffffffff
jne 0x180009aba
nop
cmp edi, 0x3e8
jae 0x180009aba
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x1800099f8
lea rcx, [rbx + 0xe4]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x1800099f8
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x180009aba
lea rax, [rsp + 0x60]
lea r9, [rsp + 0x50]
lea r8, str._s_s_s._d_s
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x160]
mov dword [rsp + 0x30], edi
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x260]
lea rcx, [rbx + 0xe4]
mov edx, 0x104
mov qword [rsp + 0x20], rax
call fcn.180004ac0
lea r11, [rsp + 0x60]
lea rax, [rsp + 0x160]
mov qword [rsp + 0x38], r11
mov dword [rsp + 0x30], edi
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x260]
lea r9, [rsp + 0x50]
lea r8, str._s_s_s._d.old_s
lea rcx, [rbx + 0x1e8]
mov edx, 0x104
mov qword [rsp + 0x20], rax
call fcn.180004ac0
xor r9d, r9d
mov qword [rsp + 0x30], r14
lea rcx, [rbx + 0xe4]
lea r8d, [r9 + 5]
mov edx, 0x40000000
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r12d
call qword [sym.imp.KERNEL32.dll_CreateFileA]
inc edi
mov qword [rbx + 0x40], rax
cmp rax, 0xffffffffffffffff
je 0x1800099c0
cmp qword [rbx + 0x40], 0xffffffffffffffff
mov r13, qword [rsp + 0x370]
mov r12, qword [rsp + 0x378]
mov rdi, qword [rsp + 0x3b8]
je 0x180009b2f
xor r9d, r9d
mov qword [rsp + 0x30], r14
lea rcx, [rbx + 0xe4]
lea r8d, [r9 + 3]
mov edx, 0x80000000
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rcx, qword [rbx + 0x40]
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov qword [rbx + 0x48], rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov r8d, dword [rbx + 0x50]
mov rcx, qword [rbx + 0x40]
test eax, eax
setne dl
call fcn.180006320
mov rsi, qword [rsp + 0x3b0]
cmp qword [rbx + 0x40], 0xffffffffffffffff
jne 0x180009b47
cmp qword [rbx + 0x30], r14
jne 0x180009b47
mov ebp, r14d
mov byte [rbx + 0xc], bpl
test bpl, bpl
mov rbp, qword [rsp + 0x3a8]
je 0x180009b97
mov dword [rsp + 0x40], r14d
lea rax, [0x180031722]
lea r8, str.......CommonTraceLog.cpp
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], r15d
lea rdx, str.Start_of_log_file
mov r9d, 0x4be
mov rcx, rbx
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 0x10
call fcn.180008870
mov rcx, qword [rsp + 0x360]
xor rcx, rsp
call fcn.180014930
add rsp, 0x380
pop r15
pop r14
pop rbx
ret