Function at 0x180004f30
Capabilities:
Check if file exists

Disassembly:
push rbp
push rbx
push rsi
push r15
lea rbp, [rsp - 0x218]
sub rsp, 0x318
mov rax, qword [0x180030048]
xor rax, rsp
mov qword [rbp + 0x200], rax
mov rbx, rcx
mov qword [0x180030eb0], rcx
lea rcx, [rbp - 0x10]
xor edx, edx
mov r8d, 0x20a
call fcn.18000abd0
mov r8d, 0x104
lea rdx, [rbp - 0x10]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov rsi, 0xffffffffffffffff
lea rcx, [rbp - 0x10]
mov rax, rsi
inc rax
cmp word [rcx + rax*2], 0
jne 0x180004f92
mov qword [rsp + 0x348], rdi
lea rdx, [rbp - 0x10]
mov r8d, eax
mov qword [rsp + 0x310], r14
lea rcx, [0x180030ec0]
call fcn.180004be0
mov rcx, qword [0x180030ec0]
mov edx, 0x5c
call fcn.180009fc4
xor r15d, r15d
test rax, rax
je 0x1800050d2
mov rcx, qword [0x180030ec0]
sub rax, rcx
sar rax, 1
test eax, eax
js 0x1800050d2
add eax, 1
mov edi, r15d
cmovns edi, eax
cmp edi, dword [rcx - 0x10]
jl 0x180005016
add rcx, 0xffffffffffffffe8
call fcn.180001660
lea rbx, [rax + 0x18]
mov qword [rsp + 0x48], rbx
jmp 0x1800050a8
mov rcx, qword [rcx - 0x18]
test rcx, rcx
je 0x18000502d
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, rax
test rax, rax
jne 0x18000503e
call fcn.1800029b0
mov rcx, rax
mov rdx, qword [rax]
call qword [rdx + 0x20]
mov rcx, rax
mov r14, qword [0x180030ec0]
test rcx, rcx
je 0x1800053c0
test r14, r14
jne 0x18000505b
test edi, edi
jne 0x1800053dc
mov rax, qword [rcx]
mov r8d, 2
mov edx, edi
call qword [rax]
test rax, rax
je 0x1800053cb
lea rbx, [rax + 0x18]
mov qword [rsp + 0x48], rbx
test edi, edi
js 0x1800053dc
cmp edi, dword [rbx - 0xc]
jg 0x1800053dc
movsxd rax, edi
mov r8, r14
mov dword [rbx - 0x10], edi
mov rcx, rbx
lea rdx, [rax + rax]
mov r9, rdx
mov word [rbx + rdx], r15w
call fcn.1800057a0
lea rdx, [rsp + 0x48]
lea rcx, [0x180030ec0]
call fcn.180001340
lea rdx, [rbx - 0x18]
mov eax, esi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1800050d2
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
xor edx, edx
mov qword [rsp + 0x358], r13
mov r8d, 0x104
lea rcx, [rbp - 0x10]
call fcn.18000abd0
mov r8d, 0x104
lea rdx, [rbp - 0x10]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor edx, edx
lea rcx, [rsp + 0x50]
call fcn.1800020b0
mov r13, rax
mov rcx, qword [rax]
mov rcx, qword [rcx - 0x18]
test rcx, rcx
je 0x180005126
mov rdx, qword [rcx]
call qword [rdx + 0x20]
mov rcx, rax
test rax, rax
jne 0x180005137
call fcn.1800029b0
mov rcx, rax
mov rdx, qword [rax]
call qword [rdx + 0x20]
mov rcx, rax
test rcx, rcx
je 0x1800053d1
mov rax, qword [rcx]
mov qword [rsp + 0x350], r12
call qword [rax + 0x18]
lea r12, str.AppTest.txt
mov r14, rsi
lea rbx, [rax + 0x18]
mov qword [rsp + 0x40], rbx
inc r14
cmp word [r12 + r14*2], r15w
jne 0x180005161
mov r13, qword [r13]
movsxd rdi, dword [r13 - 0x10]
lea r15d, [rdi + r14]
test r15d, r15d
js 0x1800053b5
mov eax, dword [rbx - 0xc]
mov ecx, 1
sub ecx, dword [rbx - 8]
sub eax, r15d
or ecx, eax
jge 0x1800051a4
mov edx, r15d
lea rcx, [rsp + 0x40]
call fcn.180004250
mov rbx, qword [rsp + 0x40]
add rdi, rdi
mov r8, r13
mov r9, rdi
mov rdx, rdi
mov rcx, rbx
call fcn.1800057a0
movsxd r8, r14d
lea rcx, [rdi + rbx]
add r8, r8
je 0x1800051e3
test rcx, rcx
jne 0x1800051db
call fcn.18000d1f4
mov dword [rax], 0x16
call fcn.18000d0d4
jmp 0x1800051e3
mov rdx, r12
call fcn.18000a760
cmp r15d, dword [rbx - 0xc]
jg 0x1800053b5
movsxd rax, r15d
xor r14d, r14d
mov dword [rbx - 0x10], r15d
mov word [rbx + rax*2], r14w
mov eax, esi
mov rdx, qword [rsp + 0x50]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x18000521a
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rbx, qword [rsp + 0x40]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea rdx, [rbx - 0x18]
mov ecx, esi
mov edi, eax
lock xadd dword [rdx + 0x10], ecx
sub ecx, 1
jg 0x180005244
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [r8 + 8]
test edi, edi
je 0x18000535e
lea rax, [rsp + 0x68]
mov qword [rsp + 0x60], rax
lea rax, [rbp - 0x10]
nop word [rax + rax]
inc rsi
cmp word [rax + rsi*2], r14w
jne 0x180005260
inc esi
lea r8, [rsp + 0x68]
mov r9d, 0x80
lea rcx, [rsp + 0x60]
lea ebx, [rsi*4]
mov edx, ebx
call fcn.180001060
mov rax, qword [rsp + 0x60]
lea r8, [rbp - 0x10]
mov qword [rsp + 0x38], r14
xor edx, edx
mov qword [rsp + 0x30], r14
mov r9d, esi
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rax
lea ecx, [rdx + 3]
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
mov ebx, r14d
sete bl
test eax, eax
jne 0x18000533c
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x18000533c
mov qword [rsp + 0x38], r14
lea r8, [rbp - 0x10]
mov qword [rsp + 0x30], r14
lea ecx, [rax - 0x77]
mov dword [rsp + 0x28], r14d
mov r9d, esi
xor edx, edx
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov r9d, 0x80
lea r8, [rsp + 0x68]
mov edx, eax
lea rcx, [rsp + 0x60]
mov ebx, eax
call fcn.180001060
mov rax, qword [rsp + 0x60]
lea r8, [rbp - 0x10]
mov qword [rsp + 0x38], r14
xor edx, edx
mov qword [rsp + 0x30], r14
mov r9d, esi
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rax
lea ecx, [rdx + 3]
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
mov ebx, r14d
sete bl
mov rcx, qword [rsp + 0x60]
test ebx, ebx
jne 0x18000539f
call fcn.180003930
mov rcx, qword [rsp + 0x60]
lea rdx, [rsp + 0x68]
cmp rcx, rdx
je 0x18000535e
call fcn.18000d924
mov r12, qword [rsp + 0x350]
mov eax, 1
mov r13, qword [rsp + 0x358]
mov r14, qword [rsp + 0x310]
mov rdi, qword [rsp + 0x348]
mov rcx, qword [rbp + 0x200]
xor rcx, rsp
call fcn.180009290
add rsp, 0x318
pop r15
pop rsi
pop rbx
pop rbp
ret
mov r8d, 0x80
lea rdx, [rsp + 0x68]
call fcn.180001180
call fcn.180001630
int3
mov ecx, 0x80070057
call fcn.180001600
int3
mov ecx, 0x80004005
call fcn.180001600
int3
call fcn.180004d00
int3
mov ecx, 0x80004005
call fcn.180001600
int3
mov ecx, 0x80070057
call fcn.180001600
int3