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

Disassembly:
mov qword [rsp + 0x20], rbx
push rsi
mov eax, 0x1c20
call fcn.14003e4b0
sub rsp, rax
cmp qword [rcx], 0
mov rbx, rdx
mov rsi, rcx
je 0x1400134ca
mov r8d, 0x1000
lea rdx, [rsp + 0x20]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x1400131b8
lea r8, str..local
mov edx, 0x1000
lea rcx, [rsp + 0x20]
call fcn.14004cd24
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x1400131b8
cmp qword [rsi + 8], 0
jne 0x1400131d0
mov r8d, 0x1000
lea rdx, [rsp + 0x20]
lea rcx, str.ProgramFiles
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x140013104
lea r8, str.Debugging_Tools_for_Windows__x64_dbghelp.dll
mov edx, 0x1000
lea rcx, [rsp + 0x20]
call fcn.14004cd24
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x140013104
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [rsi + 8], rax
cmp qword [rsi + 8], 0
jne 0x1400131d0
mov r8d, 0x1000
lea rdx, [rsp + 0x20]
lea rcx, str.ProgramFiles
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x140013160
lea r8, str.Debugging_Tools_for_Windowsdbghelp.dll
mov edx, 0x1000
lea rcx, [rsp + 0x20]
call fcn.14004cd24
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x140013160
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [rsi + 8], rax
cmp qword [rsi + 8], 0
jne 0x1400131d0
mov r8d, 0x1000
lea rdx, [rsp + 0x20]
lea rcx, str.ProgramFiles
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x1400131b8
lea r8, str.Debugging_Tools_for_Windows_64_Bitdbghelp.dll
mov edx, 0x1000
lea rcx, [rsp + 0x20]
call fcn.14004cd24
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1400131b8
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [rsi + 8], rax
cmp qword [rsi + 8], 0
jne 0x1400131d0
lea rcx, [0x140085b28]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov qword [rsi + 8], rax
mov rcx, qword [rsi + 8]
test rcx, rcx
je 0x1400134ca
lea rdx, str.SymInitialize
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rsi + 8]
lea rdx, str.SymCleanup
mov qword [rsi + 0x58], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rsi + 8]
lea rdx, str.StackWalk64
mov qword [rsi + 0x20], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rsi + 8]
lea rdx, str.SymGetOptions
mov qword [rsi + 0x70], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rsi + 8]
lea rdx, str.SymSetOptions
mov qword [rsi + 0x48], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rsi + 8]
lea rdx, str.SymFunctionTableAccess64
mov qword [rsi + 0x68], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rsi + 8]
lea rdx, str.SymGetLineFromAddr64
mov qword [rsi + 0x28], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rsi + 8]
lea rdx, str.SymGetModuleBase64
mov qword [rsi + 0x30], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rsi + 8]
lea rdx, str.SymGetModuleInfo64
mov qword [rsi + 0x38], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rsi + 8]
lea rdx, str.SymGetSymFromAddr64
mov qword [rsi + 0x40], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rsi + 8]
lea rdx, str.UnDecorateSymbolName
mov qword [rsi + 0x50], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rsi + 8]
lea rdx, str.SymLoadModule64
mov qword [rsi + 0x78], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rsi + 8]
lea rdx, str.SymGetSearchPath
mov qword [rsi + 0x60], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp qword [rsi + 0x20], 0
mov qword [rsi + 0x80], rax
je 0x1400134a5
cmp qword [rsi + 0x28], 0
je 0x1400134a5
cmp qword [rsi + 0x38], 0
je 0x1400134a5
cmp qword [rsi + 0x40], 0
je 0x1400134a5
cmp qword [rsi + 0x48], 0
je 0x1400134a5
cmp qword [rsi + 0x50], 0
je 0x1400134a5
cmp qword [rsi + 0x58], 0
je 0x1400134a5
cmp qword [rsi + 0x68], 0
je 0x1400134a5
cmp qword [rsi + 0x70], 0
je 0x1400134a5
cmp qword [rsi + 0x78], 0
je 0x1400134a5
cmp qword [rsi + 0x60], 0
je 0x1400134a5
mov qword [rsp + 0x1c38], rbp
test rbx, rbx
je 0x14001337f
mov rcx, rbx
call fcn.14004ce70
mov qword [rsi + 0x18], rax
mov rax, qword [rsi + 0x58]
xor r8d, r8d
mov rdx, qword [rsi + 0x18]
mov rcx, qword [rsi + 0x10]
mov qword [rsp + 0x1c40], rdi
call rax
test eax, eax
jne 0x1400133be
mov rdi, qword [rsi]
mov rax, qword [rdi]
mov rbx, qword [rax + 0x20]
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor r9d, r9d
lea rdx, str.SymInitialize
mov r8d, eax
mov rcx, rdi
call rbx
call qword [rsi + 0x48]
mov ecx, eax
mov rax, qword [rsi + 0x68]
or ecx, 0x214
call rax
xor edx, edx
lea rcx, [rsp + 0x1420]
mov r8d, 0x800
mov ebp, eax
call fcn.140042410
mov r9, qword [rsi + 0x80]
test r9, r9
je 0x14001342d
mov rcx, qword [rsi + 0x10]
lea rdx, [rsp + 0x1420]
mov r8d, 0x800
call r9
test eax, eax
jne 0x14001342d
mov rdi, qword [rsi]
mov rax, qword [rdi]
mov rbx, qword [rax + 0x20]
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor r9d, r9d
lea rdx, str.SymGetSearchPath
mov r8d, eax
mov rcx, rdi
call rbx
xor edx, edx
lea rcx, [rsp + 0x1020]
mov r8d, 0x400
call fcn.140042410
lea rdx, [rsp + 0x1c30]
mov dword [rsp + 0x1c30], 0x400
lea rcx, [rsp + 0x1020]
call qword [sym.imp.ADVAPI32.dll_GetUserNameA]
mov rcx, qword [rsi]
lea r9, [rsp + 0x1020]
mov r8d, ebp
lea rdx, [rsp + 0x1420]
mov rax, qword [rcx]
call qword [rax + 8]
mov rdi, qword [rsp + 0x1c40]
mov eax, 1
mov rbp, qword [rsp + 0x1c38]
mov rbx, qword [rsp + 0x1c48]
add rsp, 0x1c20
pop rsi
ret
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
mov rbx, qword [rsp + 0x1c48]
add rsp, 0x1c20
pop rsi
ret
mov rbx, qword [rsp + 0x1c48]
xor eax, eax
add rsp, 0x1c20
pop rsi
ret