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

Disassembly:
mov rax, rsp
push rbp
lea rbp, [rax - 0x2c8]
sub rsp, 0x3c0
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
mov rax, qword [0x1801003f0]
xor rax, rsp
mov qword [rbp + 0x2b0], rax
cmp dword [0x1801161a0], 0
je 0x1800053a4
lea r9, str.AvoidSRPolicy_____
lea r8, str.OSecurity
mov edx, 0xf
lea rcx, [0x1801160e8]
call fcn.180011c50
mov byte [rbp + 0x1a0], 0
xor edx, edx
mov r8d, 0x103
lea rcx, [rbp + 0x1a1]
call fcn.1800369b0
lea r9, [0x1800c1fd4]
lea r8, str.SOFTWAREPoliciesMicrosoftWindowsSaferCodeIdentifiers
lea rdx, [0x1800c1ec8]
lea rcx, [rbp + 0x1a0]
call fcn.18003756c
lea rcx, [rsp + 0x38]
call fcn.180029050
nop
mov r9d, 0x2001f
lea r8, [rbp + 0x1a0]
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x38]
call fcn.180028a50
mov rsi, rax
test rax, rax
jne 0x180005449
cmp dword [0x1801161a0], eax
je 0x180005856
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea r9, str.AvoidSRPolicy_Open_failed__err___08x
lea r8, str.OSecurity
lea edx, [rsi + 0xf]
lea rcx, [0x1801160e8]
call fcn.180011c50
jmp 0x18000582d
mov byte [rbp + 0x90], 0
xor edx, edx
mov r8d, 0x103
lea rcx, [rbp + 0x91]
call fcn.1800369b0
lea rcx, [rsp + 0x58]
call fcn.18001cc20
nop
lea r8, [rsp + 0x58]
lea rdx, str.Hashes
lea rcx, [rsp + 0x38]
call fcn.180029000
xor r12d, r12d
test eax, eax
je 0x1800055f3
cmp dword [0x180115ea4], r12d
jbe 0x1800055f3
cmp dword [0x1801161a0], r12d
je 0x1800054c5
lea r9, str.AvoidSRPolicy_Hashes
lea r8, str.OSecurity
lea edx, [r12 + 0xf]
lea rcx, [0x1801160e8]
call fcn.180011c50
mov ebx, r12d
cmp dword [rsp + 0x60], ebx
jle 0x1800055f3
nop word [rax + rax]
xor edx, edx
mov r8d, 0x104
lea rcx, [rbp + 0x90]
call fcn.1800369b0
movsxd rdx, ebx
mov r9, qword [rsp + 0x58]
mov r9, qword [r9 + rdx*8]
lea r8, str.Hashes
lea rdx, [0x1800c1ec8]
lea rcx, [rbp + 0x90]
call fcn.18003756c
mov qword [rsp + 0x48], r12
lea r8, [rsp + 0x48]
lea rdx, [rbp + 0x90]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x1800055e7
mov dword [rsp + 0x30], SafeArrayCreate
mov byte [rsp + 0x78], r12b
xor eax, eax
mov dword [rsp + 0x79], eax
mov word [rsp + 0x7d], ax
mov byte [rsp + 0x7f], al
mov dword [rsp + 0x50], 8
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x78]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
xor r8d, r8d
lea rdx, str.ItemSize
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, r12d
test eax, eax
cmove edi, dword [rsp + 0x78]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, dword [0x180115ea4]
jne 0x1800055e7
xor r8d, r8d
lea rdx, [rbp + 0x90]
lea rcx, [rsp + 0x38]
call fcn.1800278f0
cmp dword [0x1801161a0], r12d
je 0x1800055e7
lea r9, str.AvoidSRPolicy_Hashes_Delete
lea r8, str.OSecurity
mov edx, 0xf
lea rcx, [0x1801160e8]
call fcn.180011c50
inc ebx
cmp ebx, dword [rsp + 0x60]
jl 0x1800054e0
or r8d, 0xffffffff
xor edx, edx
lea rcx, [rsp + 0x58]
call fcn.1800223e0
lea r8, [rsp + 0x58]
lea rdx, str.Paths
lea rcx, [rsp + 0x38]
call fcn.180029000
test eax, eax
je 0x180005819
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [0x180115da0]
repne scasb al, byte [rdi]
not rcx
dec rcx
je 0x180005819
cmp dword [0x1801161a0], eax
je 0x180005661
lea r9, str.AvoidSRPolicy_Paths
lea r8, str.OSecurity
lea edx, [rax + 0xf]
lea rcx, [0x1801160e8]
call fcn.180011c50
mov ebx, r12d
cmp dword [rsp + 0x60], ebx
jle 0x180005819
nop
xor edx, edx
mov r8d, 0x104
lea rcx, [rbp + 0x90]
call fcn.1800369b0
movsxd rdx, ebx
mov r9, qword [rsp + 0x58]
mov r9, qword [r9 + rdx*8]
lea r8, str.Paths
lea rdx, [0x1800c1ec8]
lea rcx, [rbp + 0x90]
call fcn.18003756c
mov qword [rsp + 0x20], r12
lea r9, str.ItemData
lea r8, [rbp + 0x90]
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x38]
call fcn.180028aa0
nop
mov rcx, qword [rsp + 0x30]
cmp dword [rcx - 8], 0
je 0x180005803
mov r8d, dword [0x1800fe004]
lea rdx, str._HKEY_
call fcn.180038268
test eax, eax
jne 0x18000570c
lea rdx, [0x1800c2230]
mov rcx, qword [rsp + 0x30]
call fcn.180037e64
test rax, rax
jmp 0x1800057c4
mov byte [rbp - 0x80], 0
xor edx, edx
mov r8d, 0x103
lea rcx, [rbp - 0x7f]
call fcn.1800369b0
mov dl, 0x25
lea rcx, [rsp + 0x30]
call fcn.180020f20
cmp eax, 0xffffffff
jne 0x180005748
mov r8d, 0x104
mov rdx, qword [rsp + 0x30]
lea rcx, [rbp - 0x80]
call fcn.180036c70
jmp 0x18000575d
mov r8d, 0x104
lea rdx, [rbp - 0x80]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp byte [rbp - 0x80], 0
je 0x180005803
mov edx, 0x5c
lea rcx, [rbp - 0x80]
call fcn.180037d10
lea rdx, [rbp - 0x80]
test rax, rax
jne 0x180005787
lea rcx, [0x1800c2240]
jmp 0x1800057bd
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rbp - 0x80]
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
lea rcx, [0x180115da0]
call fcn.180038268
mov ecx, r12d
test eax, eax
sete cl
test ecx, ecx
jne 0x1800057c6
lea rdx, [rbp - 0x80]
lea rcx, [0x180115da0]
call fcn.180009a90
test eax, eax
je 0x180005803
xor r8d, r8d
lea rdx, [rbp + 0x90]
lea rcx, [rsp + 0x38]
call fcn.1800278f0
cmp dword [0x1801161a0], 0
je 0x180005803
lea r9, str.AvoidSRPolicy_Paths_Delete
lea r8, str.OSecurity
mov edx, 0xf
lea rcx, [0x1801160e8]
call fcn.180011c50
nop
lea rcx, [rsp + 0x30]
call fcn.18001d340
inc ebx
cmp ebx, dword [rsp + 0x60]
jl 0x180005670
lea rcx, [rsp + 0x58]
call fcn.1800223b0
lea rcx, [rsp + 0x38]
call fcn.1800276e0
cmp dword [0x1801161a0], 0
je 0x180005856
lea r9, str.AvoidSRPolicy_
lea r8, str.OSecurity
mov edx, 0xf
lea rcx, [0x1801160e8]
call fcn.180011c50
nop
lea rcx, [rsp + 0x38]
call fcn.1800289d0
mov rcx, qword [rbp + 0x2b0]
xor rcx, rsp
call fcn.180036980
lea r11, [rsp + 0x3c0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r12, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret