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

Disassembly:
push rbp
push rsi
lea rbp, [rsp - 0x4f]
sub rsp, 0x88
cmp byte [0x14034ee3c], 0
mov rsi, rcx
jne 0x140227aea
lea r9, [0x14034ec34]
mov dword [rsp + 0x20], 0x104
lea r8, [0x140296e88]
mov ecx, 0x1a
lea rdx, [0x140296ea0]
call fcn.1400eab60
lea rdx, [0x14034ec34]
lea rcx, [0x14034ee3c]
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
lea rdx, str.SAS_CURRENTUSER.DB3
lea rcx, [0x14034ee3c]
call qword [sym.imp.SHLWAPI.dll_PathAppendA]
mov qword [rsp + 0xa0], rbx
lea rcx, [0x14034ee3c]
mov qword [rsp + 0x80], rdi
mov qword [rsp + 0x78], r14
mov qword [rsp + 0x70], r15
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x140227d16
mov r8d, 1
lea rdx, [0x14034ee3c]
mov rcx, rsi
call fcn.14006d170
test eax, eax
je 0x140227d16
xor ebx, ebx
lea rcx, [rsi + 0x40]
mov edi, ebx
lea r15d, [rbx + 1]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, qword [rsi + 0x30]
test rcx, rcx
je 0x140227b67
mov rax, qword [rcx]
lea r8, [rbp + 0x6f]
xor r9d, r9d
lea rdx, str.select_sql_FROM_sqlite_master_WHERE_name__ScheduledTasks
call qword [rax]
mov edi, eax
lea rcx, [rsi + 0x40]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
je 0x140227ccc
mov rcx, qword [rbp + 0x6f]
lea r9, [rbp + 0x77]
mov qword [rbp + 0x77], rbx
xor r8d, r8d
xor edx, edx
mov edi, ebx
mov rax, qword [rcx]
call qword [rax + 0x28]
test eax, eax
je 0x140227bb7
mov rcx, qword [rbp + 0x77]
test rcx, rcx
je 0x140227bb7
lea rdx, str.CREATE_TABLE_ScheduledTasks__id_INTEGER_PRIMARY_KEY__taskid_TEXT__type_TEXT__time_TEXT__days_TEXT__hours_INTEGER__wake_TEXT__restart_TEXT__shutdown_TEXT__clean_TEXT__hide_TEXT__updatebefore_TEXT__runifmissed_TEXT__lastruntime_TEXT__disabled_TEXT__
call fcn.1402523a0
test eax, eax
je 0x140227bb4
mov edi, r15d
jmp 0x140227bb7
mov r15d, ebx
mov rdx, qword [rbp + 0x6f]
mov rcx, rsi
call fcn.140075720
test edi, edi
je 0x140227cc7
lea rcx, [rsi + 0x40]
mov edi, ebx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, qword [rsi + 0x30]
test rcx, rcx
je 0x140227bf5
mov rax, qword [rcx]
lea r8, [rbp + 0x6f]
xor r9d, r9d
lea rdx, str.SELECT_taskid_FROM_ScheduledTasks
call qword [rax]
mov edi, eax
lea rcx, [rsi + 0x40]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
je 0x140227c7e
mov rcx, qword [rbp + 0x6f]
lea r9, [rbp + 0x7f]
xor r8d, r8d
xor edx, edx
mov edi, ebx
mov rax, qword [rcx]
call qword [rax + 0x28]
test eax, eax
je 0x140227c72
nop dword [rax]
mov rcx, qword [rbp + 0x7f]
inc edi
test rcx, rcx
je 0x140227c5b
xor eax, eax
mov dword [rbp + 7], ebx
lea rdx, [rbp - 9]
mov qword [rbp - 9], rax
mov qword [rbp - 1], rax
mov qword [rbp + 0xb], rax
mov qword [rbp + 0x13], rax
mov word [rbp + 0x1b], bx
mov qword [rbp + 0x1f], rbx
call qword [sym.imp.RPCRT4.dll_UuidFromStringA]
lea rcx, [rbp - 9]
call fcn.140222510
mov rcx, qword [rbp + 0x6f]
lea r9, [rbp + 0x7f]
xor r8d, r8d
mov edx, edi
mov rax, qword [rcx]
call qword [rax + 0x28]
test eax, eax
jne 0x140227c20
mov rdx, qword [rbp + 0x6f]
mov rcx, rsi
call fcn.140075720
lea rcx, [rsi + 0x40]
mov edi, ebx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, qword [rsi + 0x30]
test rcx, rcx
je 0x140227ca8
mov rax, qword [rcx]
lea r8, [rbp + 0x6f]
xor r9d, r9d
lea rdx, str.DROP_TABLE_ScheduledTasks
call qword [rax]
mov edi, eax
lea rcx, [rsi + 0x40]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
je 0x140227cc7
mov rdx, qword [rbp + 0x6f]
test rdx, rdx
je 0x140227cc7
mov rcx, rsi
call fcn.140075720
test r15d, r15d
je 0x140227d0f
lea rcx, [rsi + 0x40]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, qword [rsi + 0x30]
test rcx, rcx
je 0x140227cf5
mov r10, qword [rcx]
lea r8, [rbp + 0x6f]
xor r9d, r9d
lea rdx, str.CREATE_TABLE_ScheduledTasks__id_INTEGER_PRIMARY_KEY__taskid_TEXT__type_TEXT__time_TEXT__days_TEXT__hours_INTEGER__wake_TEXT__restart_TEXT__shutdown_TEXT__clean_TEXT__hide_TEXT__updatebefore_TEXT__runifmissed_TEXT__lastruntime_TEXT__disabled_TEXT__
call qword [r10]
mov ebx, eax
lea rcx, [rsi + 0x40]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test ebx, ebx
je 0x140227d16
mov rdx, qword [rbp + 0x6f]
mov rcx, rsi
call fcn.140075720
mov eax, 1
jmp 0x140227d18
xor eax, eax
mov r15, qword [rsp + 0x70]
mov r14, qword [rsp + 0x78]
mov rdi, qword [rsp + 0x80]
mov rbx, qword [rsp + 0xa0]
add rsp, 0x88
pop rsi
pop rbp
ret