Function at 0x140040af8
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xc0
mov eax, dword [rcx]
xor r13d, r13d
mov rdi, rcx
mov r14, r8
mov r15, rdx
mov ecx, 1
test eax, eax
jne 0x140040b7b
lock cmpxchg dword [rdi], ecx
jne 0x140040b7b
lea eax, [rcx + 1]
xchg dword [rdi], eax
mov rcx, qword [0x140085648]
test rcx, rcx
je 0x140040b7b
mov rax, qword [rcx]
movabs r10, 0x88152eea7ad06070
mov rax, qword [rax]
lea rdx, str.CEnumKeys
mov r8, rdi
call qword [case.0x14005dcc6.0]
mov dword [rdi + 4], eax
jmp 0x140040b7b
call qword [sym.imp.ntdll.dll_NtYieldExecution]
nop dword [rax + rax]
test eax, eax
js 0x140040e2d
mov eax, dword [rdi]
cmp eax, 2
jne 0x140040b67
mov rcx, qword gs:[0x60]
xor edx, edx
mov r8d, 0x98
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
nop dword [rax + rax]
mov rbx, rax
test rax, rax
je 0x140040df1
mov qword [rbx + 0x40], r13
lea rax, [0x1400651f0]
mov qword [rbx], rax
lea rdx, [rbx + 0x40]
mov byte [rbx + 0x48], r13b
lea rax, [0x140065c38]
mov qword [rbx + 0x50], r13
xorps xmm0, xmm0
mov qword [rbx + 0x58], r13
mov qword [rbx], rax
lea rax, [rbx + 0x20]
mov qword [rax + 0x18], r13
mov qword [rax], rax
mov qword [rax + 8], rax
mov qword [rax + 0x10], rax
mov dword [rbx + 8], r13d
movups xmmword [rbx + 0x60], xmm0
movups xmmword [rbx + 0x70], xmm0
movups xmmword [rbx + 0x80], xmm0
mov dword [rbx + 0x90], r13d
mov byte [rbx + 0x94], r13b
mov rcx, qword [r15]
call fcn.14003ac1c
mov esi, eax
test eax, eax
js 0x140040cae
mov rcx, qword [rbx + 0x40]
lea rdx, [rbx + 0x48]
mov rax, qword [rcx]
movabs r10, 0x85b8af5276569b70
mov r8, qword [r15 + 8]
mov rax, qword [rax + 0x28]
mov dword [rsp + 0x38], r13d
mov dword [rsp + 0x30], r13d
mov dword [rsp + 0x28], 8
mov qword [rsp + 0x20], rdx
or rdx, 0xffffffffffffffff
mov r9, rdx
call qword [case.0x14005dcc6.0]
mov esi, eax
test eax, eax
js 0x140040cae
lea rdx, [rbx + 0x60]
lea rcx, [r15 + 0x10]
call fcn.14005876c
mov esi, eax
test eax, eax
jns 0x140040cd3
lea rax, str.onecore_basewcp_silenumkey.cpp
mov dword [rbp - 0x31], 0x38
mov qword [rbp - 0x41], rax
lea rcx, [rbp - 0x41]
lea rax, str.Windows::Rtl::SystemImplementation::CEnumKeys::Initialize
mov r8d, esi
mov qword [rbp - 0x39], rax
lea rax, str.RtlDuplicateLUnicodeString__Source.KeyName__m_KeyName.GetMutablePointer___
mov qword [rbp - 0x29], rax
call fcn.140059c64
mov r8, qword [rbx]
movabs r10, 0xe2b896ea10d7a870
mov rax, qword [r8]
mov edx, 1
mov rcx, rbx
call qword [case.0x14005dcc6.0]
mov eax, esi
jmp 0x140040e2d
mov byte [rbx + 0x94], 1
xor edx, edx
mov qword [rbx + 0x10], rbx
mov qword [rbx + 0x18], rdi
mov rcx, qword gs:[0x60]
lea r8d, [rdx + 0x18]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
nop dword [rax + rax]
mov rsi, rax
test rax, rax
je 0x140040d9a
mov qword [rax + 8], r13
lea rax, [0x140065260]
mov qword [rsi], rax
lea rax, [0x140065c68]
mov qword [rsi + 0x10], rax
mov qword [rsi + 8], rbx
mov rcx, qword [rbx]
mov rax, qword [rcx + 8]
movabs r10, 0x9b149f3f3ade7270
mov rcx, rbx
call qword [case.0x14005dcc6.0]
mov rcx, qword [0x140085648]
test rcx, rcx
je 0x140040d7d
mov rax, qword [rcx]
movabs r10, 0x9b8c3faa10d2f170
mov r8d, dword [rdi + 4]
lea rdx, str.CEnumKeys
mov rax, qword [rax + 0x10]
mov r9d, 0x98
mov byte [rsp + 0x20], 1
call qword [case.0x14005dcc6.0]
lea rax, [rsi + 0x10]
neg rsi
sbb rcx, rcx
and rcx, rax
cmp qword [r14], r13
je 0x140040d90
int3
mov qword [r14], rcx
xor eax, eax
jmp 0x140040e2d
lea rax, str.onecoreinternalBaseinc_rtl_object_library.h
mov dword [rbp - 0x11], 0x1dc
mov qword [rbp - 0x21], rax
lea rcx, [rbp - 0x21]
lea rax, str.Windows::Rtl::CRtlObjectTypeDescription_class_Windows::Rtl::SystemImplementation::CEnumKeys_::CreateInstance
mov r8d, 0xc0000017
mov qword [rbp - 0x19], rax
lea rax, str.NewTearoff.Allocate__
mov qword [rbp - 9], rax
call fcn.140059c64
mov rax, qword [rbx]
movabs r10, 0xe2b896ea10d7a870
mov rax, qword [rax]
mov edx, 1
mov rcx, rbx
call qword [case.0x14005dcc6.0]
jmp 0x140040e28
lea rax, str.onecoreinternalBaseinc_rtl_object_library.h
mov dword [rbp + 0xf], 0x1cb
mov qword [rbp - 1], rax
lea rcx, [rbp - 1]
lea rax, str.Windows::Rtl::CRtlObjectTypeDescription_class_Windows::Rtl::SystemImplementation::CEnumKeys_::CreateInstance
mov r8d, 0xc0000017
mov qword [rbp + 7], rax
lea rax, str.NewInstance.Allocate__
mov qword [rbp + 0x17], rax
call fcn.140059c64
mov eax, 0xc0000017
mov rbx, qword [rsp + 0x118]
add rsp, 0xc0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret