Function at 0x14021d170
Capabilities:
Check if file exists

Disassembly:
mov rax, rsp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xc0
mov qword [rax - 0x78], 0xfffffffffffffffe
mov rax, qword [0x14049e510]
xor rax, rsp
mov qword [rsp + 0xb8], rax
mov rdi, r8
mov r13, rdx
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x70], rdx
mov qword [rsp + 0x48], r9
mov rsi, qword [rsp + 0x120]
mov qword [rsp + 0x28], rsi
and dword [rsp + 0x30], 0
mov rcx, rdx
call fcn.14018884c
mov dword [rsp + 0x30], 1
mov rdx, qword [r13 + 0x10]
mov rax, qword [rsi + 0x10]
sub rax, qword [rsi]
sar rax, 5
cmp rdx, rax
jbe 0x14021d205
movabs rax, 0x7ffffffffffffff
cmp rdx, rax
ja 0x14021d413
mov rcx, rsi
call fcn.1401d847c
mov rdi, qword [rdi + 8]
mov rbx, qword [rdi]
mov qword [rsp + 0x60], rdi
lea rdx, str.process
lea r8, str.file
mov qword [rsp + 0x38], rbx
cmp rbx, rdi
je 0x14021d3ed
lea r14, [rbx + 0x10]
lea r10, [r14 + 0x20]
mov rax, r14
cmp qword [r14 + 0x18], 8
jb 0x14021d242
mov rax, qword [r14]
cmp qword [r14 + 0x10], 4
jne 0x14021d2c7
mov r9d, 4
mov rcx, r8
sub rax, r8
movzx edx, word [rax + rcx]
movzx r8d, word [rcx]
cmp dx, r8w
jne 0x14021d271
add rcx, 2
sub r9, 1
jne 0x14021d255
xor eax, eax
jmp 0x14021d278
sbb eax, eax
and eax, 0xfffffffe
inc eax
test eax, eax
jne 0x14021d2c0
cmp qword [r10 + 0x18], 8
jb 0x14021d286
mov r10, qword [r10]
mov rcx, r10
call qword [sym.imp.api_ms_win_core_shlwapi_legacy_l1_1_0.dll_PathFileExistsW]
test eax, eax
je 0x14021d3c1
mov r9b, byte [rsp + 0x20]
mov r8, r14
lea rdx, [rsp + 0x88]
mov rcx, r13
call fcn.14018963c
lea rdx, [r14 + 0x40]
mov rcx, rsi
call fcn.14006e540
jmp 0x14021d3c1
lea rdx, str.process
mov rcx, r14
cmp qword [r14 + 0x18], 8
jb 0x14021d2d4
mov rcx, qword [r14]
cmp qword [r14 + 0x10], 7
jne 0x14021d297
mov r9d, 7
mov rax, rdx
sub rcx, rdx
movzx edx, word [rcx + rax]
movzx r8d, word [rax]
cmp dx, r8w
jne 0x14021d303
add rax, 2
sub r9, 1
jne 0x14021d2e7
xor eax, eax
jmp 0x14021d30a
sbb eax, eax
and eax, 0xfffffffe
inc eax
test eax, eax
jne 0x14021d297
or r9, 0xffffffffffffffff
lea r8d, [rax + 4]
lea rdx, [rsp + 0x98]
mov rcx, r10
call fcn.14005d1b4
mov rsi, rax
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__errno]
mov r15, rax
cmp qword [rsi + 0x18], 8
jb 0x14021d33c
mov rsi, qword [rsi]
and dword [rax], 0
mov r8d, 0xa
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_wcstoul]
mov r12d, eax
cmp rsi, qword [rsp + 0x40]
jne 0x14021d36a
lea rcx, str.invalid_stoul_argument
call qword [sym.imp.msvcp_win.dll_void___cdecl_std::_Xinvalid_argument_char_const____ptr64_]
cmp dword [r15], 0x22
jne 0x14021d37e
lea rcx, str.stoul_argument_out_of_range
call qword [sym.imp.msvcp_win.dll_void___cdecl_std::_Xout_of_range_char_const____ptr64_]
nop
lea rcx, [rsp + 0x98]
call fcn.14004e0f0
nop
mov r8d, r12d
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.KERNEL32.dll_OpenProcess]
lea rcx, [rax + 1]
test rcx, 0xfffffffffffffffe
jne 0x14021d3c9
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x14021d3bc
mov rcx, rax
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov rsi, qword [rsp + 0x28]
mov rbx, qword [rbx]
jmp 0x14021d211
mov rcx, rax
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov rsi, qword [rsp + 0x28]
jmp 0x14021d297
mov rax, r13
mov rcx, qword [rsp + 0xb8]
xor rcx, rsp
call fcn.1402dfdb0
add rsp, 0xc0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
call fcn.14005510c
int3