Function at 0x140001a30
Capabilities:
Check if file exists
Extract resource via kernel32 functions
Get common file path
Query environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r12
lea rbp, [rsp - 0x420]
sub rsp, 0x520
mov rsi, rdx
mov edi, ecx
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov ecx, 0x80004000
mov rbx, rax
call qword [sym.imp.dbghelp.dll_SymSetOptions]
xor r8d, r8d
lea rcx, str._NT_SYMBOL_PATH
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor r12d, r12d
lea rdx, str.cache_srvhttps:__msdl.microsoft.com_download_symbols
cmp eax, 0xcb
mov rcx, rbx
cmovne rdx, r12
xor r8d, r8d
call qword [sym.imp.dbghelp.dll_SymInitializeW]
test eax, eax
jne 0x140001aab
lea rax, [r12 - 1]
jmp 0x14000212f
mov qword [rsp + 0x548], r15
lea rcx, [rbp - 0x30]
cmp edi, 2
jl 0x140001ac2
mov rdx, qword [rsi + 8]
jmp 0x140001add
mov edx, 0x105
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov eax, eax
lea rcx, [rbp - 0x30]
add rcx, rax
lea rdx, str._termsrv.dll
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
xor edx, edx
lea rcx, [rbp - 0x30]
lea r8d, [rdx + 2]
call qword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov r15, rax
test rax, rax
jne 0x140001b04
lea eax, [r15 - 2]
jmp 0x140002127
mov qword [rsp + 0x540], r14
lea rdi, [0x1400036c0]
mov r14, r15
and r14, 0xfffffffffffffffc
movsxd rsi, dword [r14 + 0x3c]
add rsi, r14
movzx eax, word [rsi + 0x14]
mov ecx, dword [rax + rsi + 0x2c]
mov eax, dword [rax + rsi + 0x24]
sub rcx, rax
mov eax, 0x20b
add r14, rcx
lea rcx, [rbp - 0x50]
cmp word [rsi + 0x18], ax
jne 0x140001b50
xor edx, edx
lea r8d, [rdx + 2]
call qword [sym.imp.Zydis.dll_ZydisDecoderInit]
jmp 0x140001b65
mov edx, 1
mov r8d, edx
call qword [sym.imp.Zydis.dll_ZydisDecoderInit]
lea rdi, [0x1400036c4]
xor edx, edx
mov dword [rbp + 0xe0], 0x33c
mov r8d, 0x338
lea rcx, [rbp + 0xe4]
call sub.VCRUNTIME140.dll_memset
xor r8d, r8d
lea rdx, [rbp + 0xe0]
lea rcx, [rbp - 0x30]
call qword [sym.imp.dbghelp.dll_SymSrvGetFileIndexInfo]
test eax, eax
jne 0x140001ba5
mov eax, 0xfffffffa
jmp 0x14000211f
mov qword [rsp + 0x48], r12
lea rax, [rbp - 0x30]
mov qword [rsp + 0x40], r12
lea r9, [rbp + 0x404]
mov qword [rsp + 0x38], rax
lea r8, [rbp + 0x2fd]
mov eax, dword [rbp + 0x418]
xor edx, edx
mov dword [rsp + 0x30], 8
mov rcx, rbx
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], eax
call qword [sym.imp.dbghelp.dll_SymFindFileInPath]
test eax, eax
jne 0x140001c0e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x140001c04
lea rcx, str.Symbol_not_found
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_puts]
mov eax, 0xfffffff9
jmp 0x14000211f
mov eax, dword [rsi + 0x50]
lea r8, [rbp - 0x30]
mov dword [rsp + 0x38], r12d
xor r9d, r9d
mov qword [rsp + 0x30], r12
xor edx, edx
mov dword [rsp + 0x28], eax
mov rcx, rbx
mov rax, qword [rsi + 0x30]
mov qword [rsp + 0x20], rax
call qword [sym.imp.dbghelp.dll_SymLoadModuleEx]
test rax, rax
jne 0x140001c49
mov eax, 0xfffffffd
jmp 0x14000211f
mov edx, 1
mov rcx, r15
lea r8d, [rdx + 0xf]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
test rax, rax
jne 0x140001c6a
mov eax, 0xfffffffc
jmp 0x14000211f
mov rdx, rax
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov r15, rax
test rax, rax
jne 0x140001c87
lea eax, [r15 - 5]
jmp 0x14000211f
mov dword [rsp + 0x50], 0x58
lea rcx, str.__hu._hu._hu._hu__n
mov dword [rbp - 0x60], r12d
movzx eax, word [rax + 0x34]
movzx r9d, word [r15 + 0x36]
movzx r8d, word [r15 + 0x30]
movzx edx, word [r15 + 0x32]
mov dword [rsp + 0x20], eax
call fcn.140001010
lea r8, [rsp + 0x50]
mov rcx, rbx
lea rdx, str.__imp_VerifyVersionInfoW
mov rsi, 0xffffffffffffffff
call qword [sym.imp.dbghelp.dll_SymFromNameW]
test eax, eax
jne 0x140001cef
lea r8, [rsp + 0x50]
mov rcx, rbx
lea rdx, str.__imp__VerifyVersionInfoW_16
call qword [sym.imp.dbghelp.dll_SymFromNameW]
test eax, eax
je 0x140001cf8
mov rsi, qword [rbp - 0x78]
sub rsi, qword [rsp + 0x70]
mov ecx, 0x80000002
call qword [sym.imp.dbghelp.dll_SymSetOptions]
lea r8, [rsp + 0x50]
mov rcx, rbx
lea rdx, [0x140003770]
call qword [sym.imp.dbghelp.dll_SymFromNameW]
test eax, eax
jne 0x140001d39
lea r8, [rsp + 0x50]
mov rcx, rbx
lea rdx, str._memset
call qword [sym.imp.dbghelp.dll_SymFromNameW]
test eax, eax
je 0x140001dc3
mov r12, qword [rbp - 0x78]
lea r8, [rsp + 0x50]
sub r12, qword [rsp + 0x70]
lea rdx, str.CSessionArbitrationHelper::IsSingleSessionPerUserEnabled
mov rcx, rbx
call qword [sym.imp.dbghelp.dll_SymFromNameW]
test eax, eax
je 0x140001d7c
mov rdx, qword [rbp - 0x78]
lea rcx, [rbp - 0x50]
sub rdx, qword [rsp + 0x70]
mov r9, r12
mov r8, r14
mov qword [rsp + 0x20], rsi
call fcn.140001760
test eax, eax
jne 0x140001dc3
lea r8, [rsp + 0x50]
mov rcx, rbx
lea rdx, str.CUtils::IsSingleSessionPerUser
call qword [sym.imp.dbghelp.dll_SymFromNameW]
test eax, eax
je 0x140001dc3
mov rdx, qword [rbp - 0x78]
lea rcx, [rbp - 0x50]
sub rdx, qword [rsp + 0x70]
mov r9, r12
mov r8, r14
mov qword [rsp + 0x20], rsi
call fcn.140001760
test eax, eax
jne 0x140001dc3
lea rcx, str.ERROR:_SingleUserPatch_not_found
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_puts]
lea r8, [rsp + 0x50]
mov rcx, rbx
lea rdx, str.CDefPolicy::Query
call qword [sym.imp.dbghelp.dll_SymFromNameW]
test eax, eax
je 0x140001df3
mov rdx, qword [rbp - 0x78]
lea rcx, [rbp - 0x50]
sub rdx, qword [rsp + 0x70]
mov r8, r14
call fcn.1400013b0
jmp 0x140001e00
lea rcx, str.ERROR:_CDefPolicy_Query_not_found
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_puts]
mov eax, dword [r15 + 0x30]
cmp eax, 0x60001
jbe 0x14000211d
lea r8, [rsp + 0x50]
mov rcx, rbx
cmp eax, 0x60002
jne 0x140001e58
lea rdx, str.SLGetWindowsInformationDWORDWrapper
call qword [sym.imp.dbghelp.dll_SymFromNameW]
test eax, eax
je 0x140001e4c
mov r8, qword [rbp - 0x78]
lea rcx, str.SLPolicyInternal._1_s1_nSLPolicyOffset._1_s_2_llX_nSLPolicyFunc._1_sNew_Win8SL_n
sub r8, qword [rsp + 0x70]
mov rdx, rdi
call fcn.140001070
jmp 0x14000211d
lea rcx, str.ERROR:_SLGetWindowsInformationDWORDWrapper_not_found
jmp 0x140002117
lea rdx, str.CEnforcementCore::GetInstanceOfTSLicense
call qword [sym.imp.dbghelp.dll_SymFromNameW]
test eax, eax
je 0x140001eae
mov rsi, qword [rbp - 0x78]
lea r8, [rsp + 0x50]
sub rsi, qword [rsp + 0x70]
lea rdx, str.CSLQuery::IsLicenseTypeLocalOnly
mov rcx, rbx
call qword [sym.imp.dbghelp.dll_SymFromNameW]
test eax, eax
je 0x140001ea5
mov r9, qword [rbp - 0x78]
lea rcx, [rbp - 0x50]
sub r9, qword [rsp + 0x70]
mov r8, r14
mov rdx, rsi
call fcn.1400010d0
jmp 0x140001ebb
lea rcx, str.ERROR:_IsLicenseTypeLocalOnly_not_found
jmp 0x140001eb5
lea rcx, str.ERROR:_GetInstanceOfTSLicense_not_found
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_puts]
lea r8, [rsp + 0x50]
mov rcx, rbx
lea rdx, str.CSLQuery::Initialize
call qword [sym.imp.dbghelp.dll_SymFromNameW]
test eax, eax
je 0x140002110
mov r8, qword [rbp - 0x78]
lea rcx, str.SLInitHook._1_s1_nSLInitOffset._1_s_2_llX_nSLInitFunc._1_sNew_CSLQuery_Initialize_n
sub r8, qword [rsp + 0x70]
mov rdx, rdi
call fcn.140001070
movzx eax, word [r15 + 0x34]
lea rcx, str._n__hu._hu._hu._hu_SLInit__n
movzx r9d, word [r15 + 0x36]
movzx r8d, word [r15 + 0x30]
movzx edx, word [r15 + 0x32]
mov dword [rsp + 0x20], eax
call fcn.140001010
lea r8, [rsp + 0x50]
mov rcx, rbx
lea rdx, str.CSLQuery::bServerSku
call qword [sym.imp.dbghelp.dll_SymFromNameW]
test eax, eax
je 0x140001f47
mov r8, qword [rbp - 0x78]
lea rcx, str.bServerSku._s_llX_n
sub r8, qword [rsp + 0x70]
mov rdx, rdi
call fcn.140001010
jmp 0x140001f54
lea rcx, str.ERROR:_bServerSku_not_found
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_puts]
lea r8, [rsp + 0x50]
mov rcx, rbx
lea rdx, str.CSLQuery::bRemoteConnAllowed
call qword [sym.imp.dbghelp.dll_SymFromNameW]
test eax, eax
je 0x140001f87
mov r8, qword [rbp - 0x78]
lea rcx, str.bRemoteConnAllowed._s_llX_n
sub r8, qword [rsp + 0x70]
mov rdx, rdi
call fcn.140001010
jmp 0x140001f94
lea rcx, str.ERROR:_bRemoteConnAllowed_not_found
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_puts]
lea r8, [rsp + 0x50]
mov rcx, rbx
lea rdx, str.CSLQuery::bFUSEnabled
call qword [sym.imp.dbghelp.dll_SymFromNameW]
test eax, eax
je 0x140001fc7
mov r8, qword [rbp - 0x78]
lea rcx, str.bFUSEnabled._s_llX_n
sub r8, qword [rsp + 0x70]
mov rdx, rdi
call fcn.140001010
jmp 0x140001fd4
lea rcx, str.ERROR:_bFUSEnabled_not_found
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_puts]
lea r8, [rsp + 0x50]
mov rcx, rbx
lea rdx, str.CSLQuery::bAppServerAllowed
call qword [sym.imp.dbghelp.dll_SymFromNameW]
test eax, eax
je 0x140002007
mov r8, qword [rbp - 0x78]
lea rcx, str.bAppServerAllowed._s_llX_n
sub r8, qword [rsp + 0x70]
mov rdx, rdi
call fcn.140001010
jmp 0x140002014
lea rcx, str.ERROR:_bAppServerAllowed_not_found
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_puts]
lea r8, [rsp + 0x50]
mov rcx, rbx
lea rdx, str.CSLQuery::bMultimonAllowed
call qword [sym.imp.dbghelp.dll_SymFromNameW]
test eax, eax
je 0x140002047
mov r8, qword [rbp - 0x78]
lea rcx, str.bMultimonAllowed._s_llX_n
sub r8, qword [rsp + 0x70]
mov rdx, rdi
call fcn.140001010
jmp 0x140002054
lea rcx, str.ERROR:_bMultimonAllowed_not_found
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_puts]
lea r8, [rsp + 0x50]
mov rcx, rbx
lea rdx, str.CSLQuery::lMaxUserSessions
call qword [sym.imp.dbghelp.dll_SymFromNameW]
test eax, eax
je 0x140002087
mov r8, qword [rbp - 0x78]
lea rcx, str.lMaxUserSessions._s_llX_n
sub r8, qword [rsp + 0x70]
mov rdx, rdi
call fcn.140001010
jmp 0x140002094
lea rcx, str.ERROR:_lMaxUserSessions_not_found
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_puts]
lea r8, [rsp + 0x50]
mov rcx, rbx
lea rdx, str.CSLQuery::ulMaxDebugSessions
call qword [sym.imp.dbghelp.dll_SymFromNameW]
test eax, eax
je 0x1400020c7
mov r8, qword [rbp - 0x78]
lea rcx, str.ulMaxDebugSessions._s_llX_n
sub r8, qword [rsp + 0x70]
mov rdx, rdi
call fcn.140001010
jmp 0x1400020d4
lea rcx, str.ERROR:_ulMaxDebugSessions_not_found
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_puts]
lea r8, [rsp + 0x50]
mov rcx, rbx
lea rdx, str.CSLQuery::bInitialized
call qword [sym.imp.dbghelp.dll_SymFromNameW]
test eax, eax
je 0x140002107
mov r8, qword [rbp - 0x78]
lea rcx, str.bInitialized._s_llX_n
sub r8, qword [rsp + 0x70]
mov rdx, rdi
call fcn.140001010
jmp 0x14000211d
lea rcx, str.ERROR:_bInitialized_not_found
jmp 0x140002117
lea rcx, str.ERROR:_CSLQuery_Initialize_not_found
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_puts]
xor eax, eax
mov r14, qword [rsp + 0x540]
mov r15, qword [rsp + 0x548]
lea r11, [rsp + 0x520]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r12
pop rdi
pop rbp
ret