Function at 0x1400224e8
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r14
mov rbp, rsp
sub rsp, 0x60
mov rsi, r8
mov rbx, rdx
lea r12, vtable.CRegHandle.0
mov qword [rbp - 0x18], r12
xor r14d, r14d
mov qword [rbp - 0x10], r14
mov dword [rbp + 0x30], r14d
mov edi, 0x20a
mov ecx, edi
call fcn.1400e9a18
mov qword [rbp - 0x20], rax
mov dword [rbp + 0x48], 0x208
mov ecx, edi
call fcn.1400e9a18
mov qword [rbp - 0x28], rax
mov ecx, edi
call fcn.1400e9a18
mov qword [rbp - 0x30], rax
mov qword [rsp + 0x28], rbx
lea rax, str.System
mov qword [rsp + 0x20], rax
lea r9, str.SYSTEMCurrentControlSetServicesEventlog
lea r8, [0x140125fb8]
mov edi, 0x104
mov edx, edi
mov rcx, qword [rbp - 0x20]
call fcn.140022fcc
mov ebx, eax
test eax, eax
jns 0x1400225ba
lea rax, [0x140158280]
mov rcx, qword [0x140158280]
cmp rcx, rax
je 0x1400225ae
test byte [rcx + 0x1c], 1
je 0x1400225ae
lea edx, [r14 + 0x29]
mov r9d, ebx
lea r8, [0x1401266a0]
mov rcx, qword [rcx + 0x10]
call fcn.1400059f4
lea rcx, str.ERROR:_StringCchPrintfW_failed___lx__n
jmp 0x1400227fc
lea rax, [rbp - 0x10]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rdx, qword [rbp - 0x20]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov eax, ebx
shr eax, 0x1f
test al, al
je 0x140022631
lea rax, [0x140158280]
mov rcx, qword [0x140158280]
cmp rcx, rax
je 0x140022625
test byte [rcx + 0x1c], 1
je 0x140022625
mov edx, 0x2a
mov r9d, ebx
lea r8, [0x1401266a0]
mov rcx, qword [rcx + 0x10]
call fcn.1400059f4
lea rcx, str.ERROR:_RegOpenKeyEx_failed___lx__n
jmp 0x1400227fc
lea rax, [rbp + 0x48]
mov qword [rsp + 0x28], rax
mov rax, qword [rbp - 0x28]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x30]
xor r8d, r8d
lea rdx, str.EventMessageFile
mov rcx, qword [rbp - 0x10]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov eax, ebx
shr eax, 0x1f
test al, al
je 0x1400226af
lea rax, [0x140158280]
mov rcx, qword [0x140158280]
cmp rcx, rax
je 0x1400226a3
test byte [rcx + 0x1c], 1
je 0x1400226a3
mov edx, 0x2b
mov r9d, ebx
lea r8, [0x1401266a0]
mov rcx, qword [rcx + 0x10]
call fcn.1400059f4
lea rcx, str.ERROR:_RegQueryValueEx_failed___lx__n
jmp 0x1400227fc
mov rax, qword [rbp - 0x28]
mov word [rax + 0x208], r14w
cmp dword [rbp + 0x30], 2
jne 0x14002271e
mov r8d, edi
mov rdx, qword [rbp - 0x30]
mov rcx, qword [rbp - 0x28]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x140022799
call fcn.1400b4f5c
mov ebx, eax
lea rax, [0x140158280]
mov rcx, qword [0x140158280]
cmp rcx, rax
je 0x140022712
test byte [rcx + 0x1c], 1
je 0x140022712
mov edx, 0x2c
mov r9d, ebx
lea r8, [0x1401266a0]
mov rcx, qword [rcx + 0x10]
call fcn.1400059f4
lea rcx, str.ERROR:_ExpandEnvironmentStrings_failed___lx__n
jmp 0x1400227fc
mov rdx, qword [rbp - 0x28]
mov rcx, qword [rbp - 0x30]
mov ebx, r14d
lea rax, [rdi + 0x7ffffefa]
test rax, rax
je 0x140022795
movzx eax, word [rdx]
test ax, ax
je 0x14002274e
add rdx, 2
mov word [rcx], ax
add rcx, 2
sub rdi, 1
jne 0x140022729
test rdi, rdi
jne 0x140022795
mov ebx, 0x8007007a
mov word [rcx - 2], r14w
lea rax, [0x140158280]
mov rcx, qword [0x140158280]
cmp rcx, rax
je 0x14002278c
test byte [rcx + 0x1c], 1
je 0x14002278c
lea edx, [rdi + 0x2d]
mov r9d, ebx
lea r8, [0x1401266a0]
mov rcx, qword [rcx + 0x10]
call fcn.1400059f4
lea rcx, str.ERROR:_StringCchCopy_failed___lx__n
jmp 0x1400227fc
mov word [rcx], r14w
mov rax, qword [rbp - 0x30]
mov word [rax + 0x208], r14w
xor edx, edx
lea r8d, [rdx + 2]
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov qword [rsi], rax
test rax, rax
jne 0x140022803
call fcn.1400b4f5c
mov ebx, eax
lea rax, [0x140158280]
mov rcx, qword [0x140158280]
cmp rcx, rax
je 0x1400227f5
test byte [rcx + 0x1c], 1
je 0x1400227f5
mov edx, 0x2e
mov r9d, ebx
lea r8, [0x1401266a0]
mov rcx, qword [rcx + 0x10]
call fcn.1400059f4
lea rcx, str.ERROR:_LoadLibraryEx_failed___lx__n
mov edx, ebx
call fcn.1400ae8a0
mov rcx, r14
xchg qword [rbp - 0x30], rcx
test rcx, rcx
je 0x140022815
call fcn.1400e9470
nop
mov rcx, r14
xchg qword [rbp - 0x28], rcx
test rcx, rcx
je 0x140022827
call fcn.1400e9470
nop
mov rcx, r14
xchg qword [rbp - 0x20], rcx
test rcx, rcx
je 0x140022839
call fcn.1400e9470
nop
mov qword [rbp - 0x18], r12
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x14002284c
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
mov rbx, qword [rsp + 0x98]
add rsp, 0x60
pop r14
pop r12
pop rdi
pop rsi
pop rbp
ret