Function at 0x180012924
Capabilities:
Query environment variable

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0xf8
mov rax, qword [0x180122658]
xor rax, rsp
mov qword [rbp + 7], rax
mov rax, qword [0x1800f3170]
xor esi, esi
mov r12, r9
mov r15d, r8d
mov r13, rdx
mov rbx, rcx
mov edi, esi
mov qword [rsp + 0x30], rsi
mov r14d, esi
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x48], rsi
sub rax, qword [rcx]
jne 0x180012984
mov rax, qword [0x1800f3178]
sub rax, qword [rcx + 8]
test rax, rax
je 0x180012a18
lea r9, [rsp + 0x50]
xor edx, edx
lea r8, [0x1800f2780]
call fcn.18000dd90
test eax, eax
jns 0x1800319a4
mov rcx, rbx
call sym.ole32.dll_CoIsOle1Class
mov qword [rsp + 0x40], rsi
lea rdx, [rsp + 0x40]
mov rcx, rbx
test eax, eax
jne 0x1800319eb
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_StringFromCLSID]
mov ebx, 0x40
lea r8, [0x1800f1f88]
mov edx, ebx
lea rcx, [rbp - 0x79]
call fcn.18000dd00
mov r8, qword [rsp + 0x40]
lea rcx, [rbp - 0x79]
mov edx, ebx
call fcn.18000dc7c
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
lea r8, [rsp + 0x38]
mov edx, 0x2000000
lea rcx, [rbp - 0x79]
call fcn.18000d8c8
test eax, eax
je 0x180031a75
mov ebx, esi
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.api_ms_win_core_winrt_string_l1_1_0.dll_WindowsDeleteString]
mov rcx, qword [rsp + 0x50]
mov qword [rsp + 0x48], rsi
test rcx, rcx
jne 0x180031b5b
mov eax, ebx
mov rcx, qword [rbp + 7]
xor rcx, rsp
call fcn.180023ec0
add rsp, 0xf8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov rcx, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x50]
call qword [sym.imp.api_ms_win_core_winrt_string_l1_1_0.dll_WindowsDeleteString]
mov qword [rsp + 0x48], rsi
lea rdx, [rsp + 0x48]
mov rax, qword [rbx]
mov rcx, rbx
mov rax, qword [rax + 0x20]
call qword [case.0x1800248fe.0]
test eax, eax
js 0x180012a18
mov rcx, qword [rsp + 0x48]
xor edx, edx
call qword [sym.imp.api_ms_win_core_winrt_string_l1_1_0.dll_WindowsGetStringRawBuffer]
mov rsi, rax
jmp 0x180031adc
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_ProgIDFromCLSID]
mov rcx, qword [rsp + 0x40]
lea r8, [rsp + 0x38]
mov edx, 0x2000000
call fcn.18000d8c8
mov rcx, qword [rsp + 0x40]
mov ebx, eax
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
test ebx, ebx
jne 0x180012a18
mov rcx, qword [rsp + 0x38]
lea r8, [rsp + 0x30]
lea rdx, str.ProtocolStdFileEditingServer
call fcn.1800924d8
mov rcx, qword [rsp + 0x38]
mov ebx, eax
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov rdi, qword [rsp + 0x30]
test ebx, ebx
jne 0x180031af2
mov r8d, r15d
mov rdx, r13
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x180031af2
cmp eax, r15d
ja 0x180031af2
mov dword [r12], esi
mov ebx, 1
jmp 0x180031af4
mov rcx, qword [rsp + 0x38]
lea r8, [rsp + 0x30]
lea rdx, str.DefaultIcon
call fcn.1800924d8
mov ebx, eax
test eax, eax
je 0x180031ac5
mov rcx, qword [rsp + 0x38]
lea r8, [rsp + 0x30]
lea rdx, str.LocalServer32
call fcn.1800924d8
mov ebx, eax
test eax, eax
je 0x180031ac5
mov rcx, qword [rsp + 0x38]
lea r8, [rsp + 0x30]
lea rdx, str.LocalServer
call fcn.1800924d8
mov ebx, eax
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov rdi, qword [rsp + 0x30]
test ebx, ebx
jne 0x180031af2
mov rsi, rdi
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_ExpandEnvironmentStringsW]
mov ebx, eax
test eax, eax
jne 0x180031b1a
xor esi, esi
mov ebx, esi
test rdi, rdi
je 0x180031b02
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
test r14, r14
je 0x180012a1a
mov rcx, r14
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop
jmp 0x180012a1a
mov rcx, rbx
add rcx, rcx
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemAlloc]
mov r8d, ebx
mov rcx, rsi
mov rdx, rax
mov r14, rax
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_ExpandEnvironmentStringsW]
xor esi, esi
test eax, eax
je 0x180031af2
cmp eax, ebx
ja 0x180031af2
mov r9d, r15d
mov qword [rsp + 0x20], r12
mov r8, r13
mov rdx, r14
mov ecx, ebx
call fcn.1800923d0
mov ebx, eax
jmp 0x180031af4
mov qword [rsp + 0x50], rsi
mov rax, qword [rcx]
mov rax, qword [rax + 0x10]
call qword [case.0x1800248fe.0]
nop
jmp 0x180012a38