Function at 0x140013810
Capabilities:
Check if file exists
Get file attributes
Get session user name
Link many functions at runtime
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x1b20]
mov eax, 0x1c20
call fcn.14003fc00
sub rsp, rax
mov rbx, rdx
mov rsi, rcx
cmp qword [rcx], 0
je 0x140013c84
mov r8d, 0x1000
lea rdx, [rsp + 0x20]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x140013996
lea r8, str..local
mov edx, 0x1000
lea rcx, [rsp + 0x20]
call fcn.14004e474
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x140013996
cmp qword [rsi + 8], 0
jne 0x1400139ae
mov r8d, 0x1000
lea rdx, [rsp + 0x20]
lea rcx, str.ProgramFiles
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x1400138e2
lea r8, str.Debugging_Tools_for_Windows__x64_dbghelp.dll
mov edx, 0x1000
lea rcx, [rsp + 0x20]
call fcn.14004e474
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1400138e2
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [rsi + 8], rax
cmp qword [rsi + 8], 0
jne 0x1400139ae
mov r8d, 0x1000
lea rdx, [rsp + 0x20]
lea rcx, str.ProgramFiles
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x14001393e
lea r8, str.Debugging_Tools_for_Windowsdbghelp.dll
mov edx, 0x1000
lea rcx, [rsp + 0x20]
call fcn.14004e474
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x14001393e
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [rsi + 8], rax
cmp qword [rsi + 8], 0
jne 0x1400139ae
mov r8d, 0x1000
lea rdx, [rsp + 0x20]
lea rcx, str.ProgramFiles
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x140013996
lea r8, str.Debugging_Tools_for_Windows_64_Bitdbghelp.dll
mov edx, 0x1000
lea rcx, [rsp + 0x20]
call fcn.14004e474
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x140013996
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [rsi + 8], rax
cmp qword [rsi + 8], 0
jne 0x1400139ae
lea rcx, [0x140088a90]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [rsi + 8], rax
mov rcx, qword [rsi + 8]
test rcx, rcx
je 0x140013c84
lea rdx, str.SymInitialize
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsi + 0x58], rax
lea rdx, str.SymCleanup
mov rcx, qword [rsi + 8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsi + 0x20], rax
lea rdx, str.StackWalk64
mov rcx, qword [rsi + 8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsi + 0x70], rax
lea rdx, str.SymGetOptions
mov rcx, qword [rsi + 8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsi + 0x48], rax
lea rdx, str.SymSetOptions
mov rcx, qword [rsi + 8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsi + 0x68], rax
lea rdx, str.SymFunctionTableAccess64
mov rcx, qword [rsi + 8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsi + 0x28], rax
lea rdx, str.SymGetLineFromAddr64
mov rcx, qword [rsi + 8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsi + 0x30], rax
lea rdx, str.SymGetModuleBase64
mov rcx, qword [rsi + 8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsi + 0x38], rax
lea rdx, str.SymGetModuleInfo64
mov rcx, qword [rsi + 8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsi + 0x40], rax
lea rdx, str.SymGetSymFromAddr64
mov rcx, qword [rsi + 8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsi + 0x50], rax
lea rdx, str.UnDecorateSymbolName
mov rcx, qword [rsi + 8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsi + 0x78], rax
lea rdx, str.SymLoadModule64
mov rcx, qword [rsi + 8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsi + 0x60], rax
lea rdx, str.SymGetSearchPath
mov rcx, qword [rsi + 8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsi + 0x80], rax
cmp qword [rsi + 0x20], 0
je 0x140013c6e
cmp qword [rsi + 0x28], 0
je 0x140013c6e
cmp qword [rsi + 0x38], 0
je 0x140013c6e
cmp qword [rsi + 0x40], 0
je 0x140013c6e
cmp qword [rsi + 0x48], 0
je 0x140013c6e
cmp qword [rsi + 0x50], 0
je 0x140013c6e
cmp qword [rsi + 0x58], 0
je 0x140013c6e
cmp qword [rsi + 0x68], 0
je 0x140013c6e
cmp qword [rsi + 0x70], 0
je 0x140013c6e
cmp qword [rsi + 0x78], 0
je 0x140013c6e
cmp qword [rsi + 0x60], 0
je 0x140013c6e
test rbx, rbx
je 0x140013b55
mov rcx, rbx
call fcn.14004e5c0
mov qword [rsi + 0x18], rax
xor edx, edx
mov r8d, 0x800
lea rcx, [rbp + 0x1320]
call fcn.140043b10
lea r15, [0x1400b0e00]
mov qword [rbp + 0x1b60], r15
mov rcx, r15
call fcn.140011d70
nop
mov rax, qword [rsi + 0x58]
xor r8d, r8d
mov rdx, qword [rsi + 0x18]
mov rcx, qword [rsi + 0x10]
call rax
test eax, eax
jne 0x140013bb7
mov rdi, qword [rsi]
mov rax, qword [rdi]
mov rbx, qword [rax + 0x20]
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor r9d, r9d
mov r8d, eax
lea rdx, str.SymInitialize
mov rcx, rdi
call rbx
call qword [rsi + 0x48]
mov ecx, eax
or ecx, 0x214
mov rax, qword [rsi + 0x68]
call rax
mov r14d, eax
mov r9, qword [rsi + 0x80]
test r9, r9
je 0x140013c12
mov r8d, 0x800
lea rdx, [rbp + 0x1320]
mov rcx, qword [rsi + 0x10]
call r9
test eax, eax
jne 0x140013c12
mov rdi, qword [rsi]
mov rax, qword [rdi]
mov rbx, qword [rax + 0x20]
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor r9d, r9d
mov r8d, eax
lea rdx, str.SymGetSearchPath
mov rcx, rdi
call rbx
nop
mov rcx, r15
call fcn.140011d80
nop
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp + 0xf20]
call fcn.140043b10
mov dword [rbp + 0x1b50], 0x400
lea rdx, [rbp + 0x1b50]
lea rcx, [rbp + 0xf20]
call qword [sym.imp.ADVAPI32.dll_GetUserNameA]
mov rcx, qword [rsi]
mov rax, qword [rcx]
lea r9, [rbp + 0xf20]
mov r8d, r14d
lea rdx, [rbp + 0x1320]
call qword [rax + 8]
mov eax, 1
jmp 0x140013c86
mov rcx, qword [rsi + 8]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
mov qword [rsi + 8], rax
mov qword [rsi + 0x20], rax
jmp 0x140013c86
xor eax, eax
mov rbx, qword [rsp + 0x1c58]
add rsp, 0x1c20
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret