joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140040790
Capabilities:
Set thread local storage value

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r14
sub rsp, 0x20
mov r14, rcx
mov esi, r9d
mov rcx, r8
mov rbx, r8
mov rbp, rdx
call fcn.14003ca38
xor edi, edi
test eax, eax
jne 0x1400407cd
mov eax, 0x57
jmp 0x14004089e
cmp dword [r8], 3
je 0x1400407e6
mov ecx, 0x7c
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop dword [rax + rax]
jmp 0x1400407c3
mov ecx, esi
call fcn.140003a6c
test eax, eax
jne 0x140040802
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
jmp 0x14004089e
mov ecx, dword [0x1400b9680]
mov edx, 1
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
nop dword [rax + rax]
mov r9, qword [rbx + 8]
mov rdx, rbp
mov r8d, dword [rbx]
mov rcx, r14
call sym.spoolsv.exe_PrvSetPortW
mov ecx, dword [0x1400b9680]
xor edx, edx
mov ebx, eax
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
nop dword [rax + rax]
mov ecx, esi
call fcn.1400038bc
test ebx, ebx
jne 0x14004089c
mov rax, qword [0x1400b72f8]
lea rcx, [0x1400b72f8]
cmp rax, rcx
je 0x14004088e
test byte [rax + 0x44], 1
je 0x14004088e
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov rcx, qword [0x1400b72f8]
lea edx, [rbx + 0x56]
mov r9d, eax
lea r8, [0x14009c6a8]
mov rcx, qword [rcx + 0x38]
call fcn.140030af8
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
mov eax, edi
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret

Function at 0x140041554
Capabilities:
Query or enumerate registry value

Disassembly:
push rbx
sub rsp, 0x30
lea rax, [rsp + 0x58]
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [0x14009c7d0]
mov rcx, 0xffffffff80000002
mov ebx, 0x3200000
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
nop dword [rax + rax]
test eax, eax
jne 0x1400415e8
and dword [rsp + 0x40], eax
lea r9, [rsp + 0x50]
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
lea rdx, str.MaxRpcSize
lea rax, [rsp + 0x40]
mov dword [rsp + 0x48], 4
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x58]
test eax, eax
cmove ebx, dword [rsp + 0x40]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
mov eax, ebx
add rsp, 0x30
pop rbx
ret
Function at 0x1400532a0
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
push rdi
sub rsp, 0x60
mov ebx, edx
mov edi, ecx
test edx, edx
jne 0x1400532c5
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
jmp 0x1400532c7
mov eax, ebx
and dword [rsp + 0x40], 0
lea r8, [rsp + 0x30]
and dword [rsp + 0x58], 0
lea rdx, [rsp + 0x48]
xor r9d, r9d
mov dword [rsp + 0x30], eax
lea rcx, [0x1400a9ab8]
mov qword [rsp + 0x38], 4
mov dword [rsp + 0x48], edi
mov qword [rsp + 0x50], 4
call fcn.1400534e8
mov rcx, qword [0x1400b72f8]
lea rbp, [0x1400b72f8]
cmp rcx, rbp
je 0x140053339
test byte [rcx + 0x1c], 4
je 0x140053339
mov rcx, qword [rcx + 0x10]
lea r8, [0x14009c878]
mov edx, 0x1f
mov dword [rsp + 0x20], ebx
mov r9d, edi
call fcn.140037b14
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentProcess]
nop dword [rax + rax]
mov rcx, rax
xor edx, edx
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TerminateProcess]
nop dword [rax + rax]
test eax, eax
jne 0x1400533c9
mov rcx, qword [0x1400b72f8]
cmp rcx, rbp
je 0x1400533be
test byte [rcx + 0x1c], 4
je 0x14005339e
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov rcx, qword [0x1400b72f8]
lea r8, [0x14009c878]
mov r9d, eax
mov edx, 0x20
mov rcx, qword [rcx + 0x10]
call fcn.140030af8
mov rcx, qword [0x1400b72f8]
cmp rcx, rbp
je 0x1400533be
test byte [rcx + 0x1c], 4
je 0x1400533be
mov rcx, qword [rcx + 0x10]
lea r8, [0x14009c878]
mov edx, 0x21
call fcn.140030acc
xor eax, eax
movabs byte [0], al
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x78]
add rsp, 0x60
pop rdi
ret
Function at 0x140053ea8
Capabilities:
Get token membership

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0x57]
sub rsp, 0x90
mov rax, qword [0x1400b77a8]
xor rax, rsp
mov qword [rbp + 0x47], rax
xor edi, edi
lea rdx, [rbp + 0x27]
mov bl, dil
call qword [sym.imp.RPCRT4.dll_I_RpcBindingIsClientLocal]
nop dword [rax + rax]
test eax, eax
jne 0x140053fac
cmp dword [rbp + 0x27], edi
je 0x140053fac
lea ebx, [rdi + 1]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentThread]
nop dword [rax + rax]
lea r9, [rbp + 0x37]
mov r8d, ebx
mov rcx, rax
lea edx, [rdi + 8]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_OpenThreadToken]
nop dword [rax + rax]
test eax, eax
je 0x140053fac
lea rax, [rbp + 0x2f]
mov dword [rbp + 0x3f], edi
mov qword [rsp + 0x50], rax
lea r8d, [rdi + 2]
mov dword [rsp + 0x48], edi
lea rcx, [rbp + 0x3f]
mov dword [rsp + 0x40], edi
xor r9d, r9d
mov dword [rsp + 0x38], edi
mov dl, bl
mov dword [rsp + 0x30], edi
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], edi
mov word [rbp + 0x43], 0x500
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_AllocateAndInitializeSid]
nop dword [rax + rax]
test eax, eax
je 0x140053f9c
mov rdx, qword [rbp + 0x2f]
lea r8, [rbp + 0x2b]
mov rcx, qword [rbp + 0x37]
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_CheckTokenMembership]
nop dword [rax + rax]
test eax, eax
je 0x140053f8c
cmp dword [rbp + 0x2b], edi
cmovne ebx, edi
mov rcx, qword [rbp + 0x2f]
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_FreeSid]
nop dword [rax + rax]
mov rcx, qword [rbp + 0x37]
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
mov al, bl
mov rcx, qword [rbp + 0x47]
xor rcx, rsp
call fcn.140013440
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret
Function at 0x140054130
Capabilities:
Get session user name

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x290]
sub rsp, 0x390
mov rax, qword [0x1400b77a8]
xor rax, rsp
mov qword [rbp + 0x280], rax
xor r12d, r12d
mov r15, r8
cmp qword [0x1400b9948], r12
mov rbx, rcx
jne 0x14005417e
mov eax, 0x80004005
jmp 0x14005435e
mov qword [rsp + 0x28], r12
mov byte [rsp + 0x30], r12b
test rbx, rbx
je 0x1400541e3
mov rdx, rbx
lea rcx, [rsp + 0x28]
call fcn.140053e44
mov rcx, rbx
call fcn.140053ea8
test al, al
je 0x1400541e3
mov rcx, qword [0x1400b72f8]
lea rsi, [0x1400b72f8]
cmp rcx, rsi
je 0x1400541d9
mov r14d, 2
test byte [rcx + 0x1c], r14b
je 0x1400541d9
mov rcx, qword [rcx + 0x10]
lea edx, [r14 + 8]
lea r8, [0x1400ab9e8]
call fcn.140030acc
mov edi, 1
jmp 0x140054344
xor edx, edx
lea rcx, [rsp + 0x54]
mov r8d, 0x29c
call sub.msvcrt.dll_memset
mov dword [rsp + 0x40], 0x2b0
mov edi, 1
lea rsi, [0x1400b72f8]
movups xmm0, xmmword [0x1400ab9d8]
lea r14d, [rdi + 1]
movdqu xmmword [rsp + 0x44], xmm0
test r15, r15
je 0x140054232
mov r8, r15
lea rcx, [rbp - 0x18]
mov edx, 0x104
call fcn.14000c1e0
jmp 0x140054298
lea r8, [rsp + 0x20]
mov dword [rsp + 0x20], 0x104
lea rdx, [rbp - 0x18]
mov ecx, r14d
call qword [sym.imp.SspiCli.dll_GetUserNameExW]
nop dword [rax + rax]
test al, al
jne 0x140054298
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jle 0x14005426e
movzx eax, ax
or eax, 0x80070000
mov rcx, qword [0x1400b72f8]
cmp rcx, rsi
je 0x140054298
test byte [rcx + 0x1c], dil
je 0x140054298
mov rcx, qword [rcx + 0x10]
lea r8, [0x1400ab9e8]
mov edx, 0xb
mov r9d, eax
call fcn.140030af8
lea rdx, [rbp + 0x1f0]
mov rcx, rbx
call fcn.140053c40
mov ebx, eax
test eax, eax
js 0x1400542c4
lea rdx, [rsp + 0x40]
lea rcx, [rbp + 0x1f0]
call fcn.140053db4
mov ebx, eax
test eax, eax
jns 0x140054300
mov rcx, qword [0x1400b72f8]
cmp rcx, rsi
je 0x1400542ee
test byte [rcx + 0x1c], r14b
je 0x1400542ee
mov rcx, qword [rcx + 0x10]
lea r8, [0x1400ab9e8]
mov edx, 0xc
mov r9d, ebx
call fcn.140030af8
mov word [rsp + 0x68], r14w
mov dword [rsp + 0x6c], r12d
cmp word [rbp - 0x18], r12w
je 0x140054342
mov rax, qword [0x1400b9948]
lea rcx, [rsp + 0x40]
call qword [0x140098d68]
mov ebx, eax
test eax, eax
jns 0x140054342
mov rcx, qword [0x1400b72f8]
cmp rcx, rsi
je 0x140054342
test byte [rcx + 0x1c], dil
je 0x140054342
mov rcx, qword [rcx + 0x10]
lea r8, [0x1400ab9e8]
mov edx, 0xd
mov r9d, eax
call fcn.140030af8
mov edi, ebx
cmp byte [rsp + 0x30], r12b
je 0x14005435c
mov rcx, qword [rsp + 0x28]
call qword [sym.imp.RPCRT4.dll_RpcRevertToSelfEx]
nop dword [rax + rax]
mov eax, edi
mov rcx, qword [rbp + 0x280]
xor rcx, rsp
call fcn.140013440
lea r11, [rsp + 0x390]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
Function at 0x1400549c0
Capabilities:
Access peb ldr_data

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, rcx
xor edx, edx
mov rcx, qword gs:[0x60]
lea r8d, [rdx + 0x20]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
nop dword [rax + rax]
xor ecx, ecx
mov rbx, rax
test rax, rax
jne 0x1400549fd
mov edi, 0xc0000017
jmp 0x140054a3c
mov qword [rax + 0x10], rcx
mov qword [rax + 0x18], rcx
mov eax, 1
mov qword [rbx], rax
mov qword [rbx + 8], rax
mov rdx, rbx
mov rcx, rdi
call fcn.140054930
mov edi, eax
mov rcx, qword gs:[0x60]
mov r8, rbx
xor edx, edx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
nop dword [rax + rax]
mov rbx, qword [rsp + 0x30]
mov eax, edi
add rsp, 0x20
pop rdi
ret

Function at 0x140054b18
Capabilities:
Query or enumerate registry value

Disassembly:
mov r11, rsp
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0x40
and qword [r11 - 0x28], 0
mov rdi, r9
mov rsi, r8
mov rbp, rdx
mov r14, rcx
test rcx, rcx
je 0x140054be0
test rdx, rdx
je 0x140054be0
test r8, r8
je 0x140054be0
lea rax, [r11 - 0x28]
mov r9d, 0x20019
xor r8d, r8d
mov qword [r11 - 0x38], rax
lea rdx, [0x1400abac0]
mov rcx, 0xffffffff80000002
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
nop dword [rax + rax]
mov ecx, eax
call fcn.14001ab3c
mov ebx, eax
test eax, eax
js 0x140054be5
mov rcx, qword [rsp + 0x30]
lea r9, [rsp + 0x60]
mov qword [rsp + 0x28], rsi
xor r8d, r8d
mov rdx, r14
mov qword [rsp + 0x20], rbp
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
nop dword [rax + rax]
mov ecx, eax
call fcn.14001ab3c
mov ebx, eax
test eax, eax
js 0x140054bcd
test rdi, rdi
je 0x140054bcd
mov eax, dword [rsp + 0x60]
mov dword [rdi], eax
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
jmp 0x140054be5
mov ebx, 0x80004003
mov rbp, qword [rsp + 0x70]
mov eax, ebx
mov rbx, qword [rsp + 0x68]
add rsp, 0x40
pop r14
pop rdi
pop rsi
ret
Function at 0x14005654c
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
xor r15d, r15d
mov dword [rbp + 0x40], 0x410
mov rax, rdx
mov qword [r8], r15
mov r14, r8
mov qword [rbp + 0x48], r15
mov rsi, rcx
mov qword [rbp - 0x10], r15
lea r8, [rbp - 0x10]
mov edx, 0x20019
mov rcx, rax
mov ebx, r15d
call fcn.1400573b0
mov edi, eax
test eax, eax
jne 0x140056602
mov ecx, dword [rbp + 0x40]
call sym.spoolsv.exe_PrvDllAllocSplMem
mov rbx, rax
test rax, rax
je 0x1400565fd
mov rcx, qword [rbp - 0x10]
lea rax, [rbp + 0x40]
mov qword [rsp + 0x30], rax
lea rdx, str.SoftwareMicrosoftWindows_NTCurrentVersionDevices
mov qword [rsp + 0x28], rbx
mov r9d, 2
mov r8, rsi
mov qword [rsp + 0x20], r15
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegGetValueW]
nop dword [rax + rax]
mov edi, eax
cmp eax, 0xea
jne 0x140056602
mov rcx, qword [0x1400b9528]
mov r8, rbx
xor edx, edx
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
nop dword [rax + rax]
jmp 0x140056597
mov edi, 8
test edi, edi
mov r8, r15
cmovne r8, rbx
cmovne rbx, r15
test r8, r8
je 0x140056629
mov rcx, qword [0x1400b9528]
xor edx, edx
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
nop dword [rax + rax]
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x14005663e
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
test edi, edi
je 0x14005669d
mov edi, 0x709
mov r8, qword [rbp + 0x48]
test r8, r8
je 0x140056669
mov rcx, qword [0x1400b9528]
xor edx, edx
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
nop dword [rax + rax]
mov qword [rbp + 0x48], r15
test rbx, rbx
je 0x140056686
mov rcx, qword [0x1400b9528]
mov r8, rbx
xor edx, edx
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
nop dword [rax + rax]
mov rbx, qword [rsp + 0x80]
mov eax, edi
add rsp, 0x50
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
mov r9, rbx
mov qword [rsp + 0x20], r15
lea r8, [0x1400abc20]
mov rdx, rsi
lea rcx, [rbp + 0x48]
call fcn.14001109c
mov edi, eax
test eax, eax
jne 0x140056647
mov rcx, qword [rbp + 0x48]
mov r8, r15
mov qword [r14], rcx
mov qword [rbp + 0x48], r15
jmp 0x14005664b
Function at 0x140056864
Capabilities:
Query or enumerate registry value

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rbp
mov qword [r11 + 0x20], rsi
push rdi
sub rsp, 0x40
mov rax, rdx
xor ebp, ebp
mov dword [r8], ebp
mov rdi, r8
mov rsi, rcx
mov qword [r11 + 0x18], rbp
lea r8, [r11 + 0x18]
mov edx, 0x20019
mov rcx, rax
call fcn.1400573b0
mov ebx, eax
test eax, eax
jne 0x1400568df
mov rcx, qword [rsp + 0x60]
lea rdx, str.SoftwareMicrosoftWindows_NTCurrentVersionDevices
mov qword [rsp + 0x30], rbp
mov r9d, 0xffff
mov qword [rsp + 0x28], rbp
mov r8, rsi
mov qword [rsp + 0x20], rbp
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegGetValueW]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
jne 0x1400568df
mov dword [rdi], 1
jmp 0x1400568e5
cmp ebx, 2
cmove ebx, ebp
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x1400568fb
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
mov rbp, qword [rsp + 0x58]
mov eax, ebx
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret

Function at 0x14005691c
Capabilities:
Delete registry value

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
mov rbp, rsp
sub rsp, 0x40
xor ebx, ebx
mov rdi, rdx
and qword [rbp + 0x38], rbx
mov rsi, rcx
and qword [rbp + 0x30], rbx
and qword [rbp + 0x28], rbx
test rdx, rdx
jne 0x14005695b
lea rdx, [rbp + 0x30]
xor ecx, ecx
call fcn.14001187c
lea ecx, [rdi + 2]
test eax, eax
mov rdi, qword [rbp + 0x30]
cmove ebx, ecx
test ebx, ebx
jne 0x1400569c7
lea r8, [rbp + 0x38]
mov edx, 0x20006
mov rcx, rsi
call fcn.1400573b0
mov ebx, eax
test eax, eax
jne 0x1400569c7
and qword [rsp + 0x30], 0
lea r8, [0x1400a9a20]
mov qword [rsp + 0x28], rdi
lea r9, str.SessionDefaultDevices
lea rdx, str.SoftwareMicrosoftWindows_NTCurrentVersionWindows
mov qword [rsp + 0x20], r8
lea rcx, [rbp + 0x28]
call fcn.14001109c
mov ebx, eax
test eax, eax
jne 0x1400569c7
mov rdx, qword [rbp + 0x28]
lea r8, str.Device
mov rcx, qword [rbp + 0x38]
call qword [sym.imp.api_ms_win_core_registry_l1_1_1.dll_RegDeleteKeyValueW]
nop dword [rax + rax]
mov ebx, eax
mov r8, qword [rbp + 0x28]
test r8, r8
je 0x1400569ea
mov rcx, qword [0x1400b9528]
xor edx, edx
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
nop dword [rax + rax]
and qword [rbp + 0x28], 0
mov rcx, qword [rbp + 0x30]
test rcx, rcx
je 0x140056a04
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
nop dword [rax + rax]
and qword [rbp + 0x30], 0
mov rcx, qword [rbp + 0x38]
test rcx, rcx
je 0x140056a19
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
mov eax, ebx
mov rbx, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
pop rsi
pop rbp
ret
Function at 0x140056d2c
Capabilities:
Query or enumerate registry value

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
push rbp
push rsi
push rdi
sub rsp, 0x40
xor ebp, ebp
mov dword [rax + 0x10], 0x410
mov qword [rdx], rbp
lea r8, [rax + 0x18]
mov rsi, rdx
mov qword [rax + 0x18], rbp
mov edx, 0x20019
mov ebx, ebp
call fcn.1400573b0
mov edi, eax
test eax, eax
jne 0x140056dd5
mov ecx, dword [rsp + 0x68]
call sym.spoolsv.exe_PrvDllAllocSplMem
mov rbx, rax
test rax, rax
je 0x140056dd0
mov rcx, qword [rsp + 0x70]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x30], rax
lea r8, str.Device
mov qword [rsp + 0x28], rbx
lea rdx, str.SoftwareMicrosoftWindows_NTCurrentVersionWindows
mov r9d, 2
mov qword [rsp + 0x20], rbp
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegGetValueW]
nop dword [rax + rax]
mov edi, eax
cmp eax, 0xea
jne 0x140056dd5
mov rcx, qword [0x1400b9528]
mov r8, rbx
xor edx, edx
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
nop dword [rax + rax]
jmp 0x140056d63
mov edi, 8
test edi, edi
mov r8, rbp
cmovne r8, rbx
cmovne rbx, rbp
test r8, r8
je 0x140056dfc
mov rcx, qword [0x1400b9528]
xor edx, edx
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x140056e12
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
test edi, edi
jne 0x140056e2a
mov rcx, rbx
call fcn.140057400
mov edi, eax
test eax, eax
jne 0x140056e2a
mov qword [rsi], rbx
mov rbx, rbp
test rbx, rbx
je 0x140056e47
mov rcx, qword [0x1400b9528]
mov r8, rbx
xor edx, edx
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
nop dword [rax + rax]
mov rbx, qword [rsp + 0x60]
mov eax, edi
add rsp, 0x40
pop rdi
pop rsi
pop rbp
ret
Function at 0x140056e60
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
mov rbp, rsp
sub rsp, 0x40
xor ebx, ebx
mov rdi, rdx
mov rsi, rcx
test rdx, rdx
jne 0x140056e81
lea ebx, [rdx + 0x57]
jmp 0x140056e84
or dword [rdx], 0xffffffff
xor eax, eax
mov dword [rbp + 0x30], 4
mov dword [rbp + 0x28], eax
test ebx, ebx
jne 0x140056f4a
and qword [rbp - 8], rax
lea rcx, [rbp - 8]
call fcn.140012da8
and qword [rbp - 8], 0
lea rcx, [rbp - 0x10]
and qword [rbp - 0x10], 0
call fcn.140012da8
and qword [rbp - 0x10], 0
lea r8, [rbp - 8]
mov edx, 0x20019
mov rcx, rsi
call fcn.1400573b0
mov ebx, eax
test eax, eax
jne 0x140056f35
mov rcx, qword [rbp - 8]
lea rax, [rbp - 0x10]
mov r9d, 0x20019
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.SoftwareMicrosoftWindows_NTCurrentVersionWindows
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
jne 0x140056f35
mov rcx, qword [rbp - 0x10]
lea rax, [rbp + 0x30]
mov qword [rsp + 0x28], rax
lea r9, [rbp + 0x38]
lea rax, [rbp + 0x28]
xor r8d, r8d
lea rdx, str.LegacyDefaultPrinterMode
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
nop dword [rax + rax]
mov ebx, eax
lea rcx, [rbp - 0x10]
call fcn.140012da8
lea rcx, [rbp - 8]
call fcn.140012da8
mov eax, dword [rbp + 0x28]
cmp ebx, 2
je 0x140056f5c
cmp eax, 1
ja 0x140056f5c
test ebx, ebx
jne 0x140056f74
mov dword [rdi], eax
jmp 0x140056f74
call fcn.140004e9c
xor ecx, ecx
mov rdx, rsi
test al, al
setne cl
xor ebx, ebx
mov dword [rdi], ecx
call fcn.1400574ac
mov eax, ebx
mov rbx, qword [rsp + 0x60]
add rsp, 0x40
pop rdi
pop rsi
pop rbp
ret

Function at 0x140056f8c
Capabilities:
Query or enumerate registry value

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x40
xor ebx, ebx
mov rdi, rdx
and qword [rsp + 0x78], rbx
mov rsi, rcx
test rdx, rdx
jne 0x140056fab
lea ebx, [rdx + 0x57]
jmp 0x140056fae
or dword [rdx], 0xffffffff
xor eax, eax
mov dword [rsp + 0x70], 4
mov dword [rsp + 0x68], eax
test ebx, ebx
jne 0x140057018
lea r8, [rsp + 0x78]
mov edx, 0x20019
call fcn.1400573b0
mov ebx, eax
test eax, eax
jne 0x140057014
mov rcx, qword [rsp + 0x78]
lea rax, [rsp + 0x70]
mov qword [rsp + 0x30], rax
lea r9d, [rbx + 0x10]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea r8, str.IsMRUEstablished
and qword [rsp + 0x20], 0
lea rdx, str.SoftwareMicrosoftWindows_NTCurrentVersionWindows
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegGetValueW]
nop dword [rax + rax]
mov ebx, eax
mov eax, dword [rsp + 0x68]
cmp ebx, 2
je 0x14005702a
cmp eax, 1
ja 0x14005702a
test ebx, ebx
jne 0x140057039
mov dword [rdi], eax
jmp 0x140057039
and dword [rdi], 0
xor ebx, ebx
mov rdx, rsi
xor ecx, ecx
call fcn.1400575e4
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x14005704f
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
mov eax, ebx
add rsp, 0x40
pop rdi
pop rsi
pop rbx
ret
Function at 0x140057060
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
xor r12d, r12d
mov rsi, r8
mov qword [rbp - 0x10], r12
mov r14, rcx
mov qword [rbp + 0x50], r12
mov ebx, r12d
mov qword [r8], r12
lea r13d, [r12 + 2]
test rdx, rdx
jne 0x1400570ad
lea rdx, [rbp - 0x10]
xor ecx, ecx
call fcn.14001187c
mov rdx, qword [rbp - 0x10]
test eax, eax
cmove ebx, r13d
test ebx, ebx
jne 0x1400571ee
mov qword [rsp + 0x30], r12
lea r8, [0x1400a9a20]
mov qword [rsp + 0x28], rdx
lea r9, str.SessionDefaultDevices
lea rdx, str.SoftwareMicrosoftWindows_NTCurrentVersionWindows
mov qword [rsp + 0x20], r8
lea rcx, [rbp + 0x50]
call fcn.14001109c
mov ebx, eax
test eax, eax
jne 0x1400571ee
mov r15, qword [rbp + 0x50]
lea r8, [rbp + 0x58]
mov edx, 0x20019
mov dword [rbp + 0x48], 0x410
mov rcx, r14
mov qword [rbp + 0x58], r12
mov rdi, r12
call fcn.1400573b0
mov ebx, eax
test eax, eax
jne 0x14005717d
mov ecx, dword [rbp + 0x48]
call sym.spoolsv.exe_PrvDllAllocSplMem
mov rdi, rax
test rax, rax
je 0x140057178
mov rcx, qword [rbp + 0x58]
lea rax, [rbp + 0x48]
mov qword [rsp + 0x30], rax
lea r8, str.Device
mov qword [rsp + 0x28], rdi
mov r9d, r13d
mov rdx, r15
mov qword [rsp + 0x20], r12
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegGetValueW]
nop dword [rax + rax]
mov ebx, eax
cmp eax, 0xea
jne 0x14005717d
mov rcx, qword [0x1400b9528]
mov r8, rdi
xor edx, edx
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
nop dword [rax + rax]
jmp 0x140057115
mov ebx, 8
test ebx, ebx
mov r8, r12
cmovne r8, rdi
cmovne rdi, r12
test r8, r8
je 0x1400571a4
mov rcx, qword [0x1400b9528]
xor edx, edx
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
nop dword [rax + rax]
mov rcx, qword [rbp + 0x58]
test rcx, rcx
je 0x1400571b9
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop dword [rax + rax]
test ebx, ebx
jne 0x1400571d1
mov rcx, rdi
call fcn.140057400
mov ebx, eax
test eax, eax
jne 0x1400571d1
mov qword [rsi], rdi
mov rdi, r12
test rdi, rdi
je 0x1400571ee
mov rcx, qword [0x1400b9528]
mov r8, rdi
xor edx, edx
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
nop dword [rax + rax]
mov r8, qword [rbp + 0x50]
test r8, r8
je 0x140057210
mov rcx, qword [0x1400b9528]
xor edx, edx
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
nop dword [rax + rax]
mov qword [rbp + 0x50], r12
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x140057225
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
nop dword [rax + rax]
mov eax, ebx
mov rbx, qword [rsp + 0x90]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret