Function at 0x18007bd78
Capabilities:
Check for peb beingdebugged flag

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
push r12
push r15
lea rbp, [rax - 0xb8]
sub rsp, 0x1a0
mov rax, qword [0x1801724e0]
xor rax, rsp
mov qword [rbp + 0x90], rax
xor edi, edi
cmp byte [0x18015c298], dil
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x48], rdi
jne 0x18007bfb6
mov rdx, qword gs:[0x60]
lea ebx, [rdi + 3]
lea r9, [rsp + 0x78]
xor r8d, r8d
mov ecx, ebx
mov rdx, qword [rdx + 0x10]
call sym.ntdll.dll_RtlImageNtHeaderEx
mov rax, qword [rsp + 0x78]
lea r12d, [rdi + 2]
lea r15d, [rdi + 1]
movzx ecx, word [rax + 0x5c]
sub cx, r12w
cmp cx, r15w
ja 0x18007bfb6
lea r8, [0x180110810]
mov edx, ebx
lea rcx, [rsp + 0x60]
call sym.ntdll.dll_NtOpenKey
test eax, eax
jns 0x1800c3a58
lea r8, [0x1801565e8]
mov qword [rsp + 0x40], rdi
mov edx, 0x20019
lea rcx, [rsp + 0x40]
mov sil, dil
call sym.ntdll.dll_NtOpenKey
test eax, eax
jns 0x1800c3ab8
lea r8, [0x1801107e0]
mov edx, r15d
lea rcx, [rsp + 0x38]
call sym.ntdll.dll_NtOpenKey
test eax, eax
js 0x18007bea0
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea r9, [rbp - 0x10]
mov r8d, r12d
mov dword [rsp + 0x20], 0x50
lea rdx, [0x180110840]
call sym.ntdll.dll_NtQueryValueKey
test eax, eax
jns 0x1800c3b26
mov rcx, qword [rsp + 0x38]
call sym.ntdll.dll_NtClose
test sil, sil
jne 0x1800c3aff
lea rcx, [rbp - 0x80]
call sym.ntdll.dll_RtlFormatCurrentUserKeyPath
test eax, eax
js 0x18007bf88
movzx ecx, word [rbp - 0x80]
add ecx, 0x78
mov word [rsp + 0x50], di
cmp ecx, 0xfffe
ja 0x18007bf76
mov edx, dword [0x18015c294]
mov word [rsp + 0x52], cx
add edx, 0x180000
movzx r8d, cx
mov rcx, qword gs:[0x60]
mov rcx, qword [rcx + 0x30]
call sym.ntdll.dll_RtlAllocateHeap
mov qword [rsp + 0x58], rax
test rax, rax
je 0x18007bf76
lea rdx, [rbp - 0x80]
lea rcx, [rsp + 0x50]
call sym.ntdll.dll_RtlAppendUnicodeStringToString
test eax, eax
js 0x18007bf5d
lea rdx, str.SoftwarePoliciesMicrosoftWindowsSaferCodeIdentifiers
lea rcx, [rsp + 0x50]
call sym.ntdll.dll_RtlAppendUnicodeToString
test eax, eax
js 0x18007bf5d
lea rax, [rsp + 0x50]
mov dword [rbp - 0x70], 0x30
xorps xmm0, xmm0
mov qword [rbp - 0x60], rax
lea r8, [rbp - 0x70]
mov qword [rbp - 0x68], rdi
mov edx, r15d
mov dword [rbp - 0x58], 0x40
lea rcx, [rsp + 0x38]
movdqu xmmword [rbp - 0x50], xmm0
call sym.ntdll.dll_NtOpenKey
test eax, eax
jns 0x1800c3b77
mov rcx, qword gs:[0x60]
xor edx, edx
mov r8, qword [rsp + 0x58]
mov rcx, qword [rcx + 0x30]
call sym.ntdll.dll_RtlFreeHeap
lea rcx, [rbp - 0x80]
call sym.ntdll.dll_RtlFreeAnsiString
test sil, sil
jne 0x1800c3aff
mov eax, edi
mov rcx, qword [rbp + 0x90]
xor rcx, rsp
call fcn.18008b0e0
lea r11, [rsp + 0x1a0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r12
pop rbp
ret
xor eax, eax
jmp 0x18007bf8a
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x70]
mov qword [rsp + 0x28], rax
lea r9, [rbp + 0x40]
mov r8d, r12d
mov dword [rsp + 0x20], 0x50
lea rdx, [0x180111298]
call sym.ntdll.dll_NtQueryValueKey
mov rcx, qword [rsp + 0x60]
mov ebx, eax
call sym.ntdll.dll_NtClose
test ebx, ebx
js 0x18007be1d
cmp dword [rbp + 0x44], 4
jne 0x18007be1d
cmp dword [rbp + 0x48], 4
jne 0x18007be1d
cmp dword [rbp + 0x4c], edi
ja 0x18007bf88
jmp 0x18007be1d
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x30]
mov r9d, 0x30
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x40]
mov edx, r12d
call sym.ntdll.dll_NtQueryKey
mov rcx, qword [rsp + 0x40]
mov ebx, eax
call sym.ntdll.dll_NtClose
cmp ebx, 0x80000005
cmove ebx, edi
test ebx, ebx
js 0x18007be43
cmp dword [rbp - 0x2c], edi
je 0x18007be43
lea r9, [rsp + 0x68]
xor edx, edx
lea r8, [0x180111278]
xor ecx, ecx
call sym.ntdll.dll_LdrLoadDll
test eax, eax
jns 0x1800c3bda
mov edi, 0xc0000135
jmp 0x18007bf88
cmp dword [rbp - 0xc], 4
jne 0x18007be8d
cmp dword [rbp - 8], 4
jne 0x18007be8d
cmp dword [rbp - 4], r15d
jbe 0x18007be8d
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea r9, [rbp - 0x10]
mov r8d, r12d
mov dword [rsp + 0x20], 0x50
lea rdx, [0x180111288]
mov sil, r15b
call sym.ntdll.dll_NtQueryValueKey
nop
jmp 0x18007be8d
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea r9, [rbp - 0x10]
mov r8d, r12d
mov dword [rsp + 0x20], 0x50
lea rdx, [0x180110840]
call sym.ntdll.dll_NtQueryValueKey
mov rcx, qword [rsp + 0x38]
mov ebx, eax
call sym.ntdll.dll_NtClose
test ebx, ebx
js 0x18007bf5d
cmp dword [rbp - 0xc], 4
jne 0x18007bf5d
cmp dword [rbp - 8], 4
jne 0x18007bf5d
cmp dword [rbp - 4], r15d
movzx esi, sil
cmova esi, r15d
jmp 0x18007bf5d
mov rax, qword [rbp + 0xb8]
lea r9, [rsp + 0x48]
mov rbx, qword [rsp + 0x68]
lea rdx, [0x1801112a8]
mov qword [rsp + 0x28], rax
mov rcx, rbx
xor r8d, r8d
mov dword [rsp + 0x20], edi
call sym.ntdll.dll_LdrGetProcedureAddressForCaller
test eax, eax
js 0x1800c3c3a
cmp qword [rsp + 0x48], rdi
je 0x1800c3c3a
mov eax, dword [0x7ffe0330]
mov ecx, eax
mov edx, eax
and ecx, 0x3f
xor rdx, qword [rsp + 0x48]
ror rdx, cl
mov qword [0x18015bfa8], rdx
mov qword [0x18015d410], rbx
jmp 0x18007bf88
mov rcx, rbx
call sym.ntdll.dll_LdrUnloadDll
mov edi, 0xc0000139
jmp 0x18007bf88