joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140055884
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x60
or rax, 0xffffffffffffffff
mov rdi, r8
xor r15d, r15d
mov r14, rdx
mov rsi, rcx
inc rax
cmp word [r8 + rax*2], r15w
jne 0x1400558ac
lea r8, [rsp + 0x50]
mov qword [rsp + 0x50], r15
mov edx, 0x20006
mov qword [rsp + 0x58], r15
mov rcx, r9
lea ebp, [rax*2 + 2]
call fcn.140055428
mov ebx, eax
test eax, eax
jne 0x14005594a
mov rcx, qword [rsp + 0x50]
cmp dword [rsp + 0xa0], r15d
je 0x14005592b
mov qword [rsp + 0x40], r15
lea rax, [rsp + 0x58]
mov qword [rsp + 0x38], rax
xor r9d, r9d
mov qword [rsp + 0x30], r15
xor r8d, r8d
mov dword [rsp + 0x28], 0x20006
mov rdx, rsi
mov dword [rsp + 0x20], 1
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCreateKeyExW]
mov rcx, qword [rsp + 0x58]
mov rsi, r15
mov ebx, eax
test ebx, ebx
jne 0x14005594a
mov dword [rsp + 0x28], ebp
lea r9d, [rbx + 1]
mov r8, r14
mov qword [rsp + 0x20], rdi
mov rdx, rsi
call qword [sym.imp.api_ms_win_core_registry_l1_1_1.dll_RegSetKeyValueW]
mov ebx, eax
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x14005595a
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x14005596a
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
lea r11, [rsp + 0x60]
mov eax, ebx
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rdi
ret

Function at 0x140057918
Capabilities:
Generate random numbers via winapi

Disassembly:
push rbx
sub rsp, 0x20
mov rcx, qword [0x1400aee10]
xor ebx, ebx
mov dword [rsp + 0x30], ebx
test rcx, rcx
je 0x140057957
cmp dword [rcx + 8], ebx
jl 0x140057957
mov rcx, qword [rcx]
lea r8, [rsp + 0x30]
lea edx, [rbx + 4]
call qword [sym.imp.CRYPTSP.dll_CryptGenRandom]
test eax, eax
jne 0x140057953
call fcn.14004d5c8
test eax, eax
js 0x140057957
mov ebx, dword [rsp + 0x30]
mov eax, ebx
add rsp, 0x20
pop rbx
ret
Function at 0x14005e6d0
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x10], rbx
push rsi
sub rsp, 0x270
mov rax, qword [0x1400ad768]
xor rax, rsp
mov qword [rsp + 0x260], rax
xor ebx, ebx
mov rsi, rcx
mov qword [rsp + 0x38], rbx
test rcx, rcx
je 0x14005e89b
mov rax, 0xffffffffffffffff
inc rax
cmp word [rcx + rax*2], bx
jne 0x14005e709
inc rax
cmp rax, 0x207
jae 0x14005e89b
mov ecx, 0x438
mov qword [rsp + 0x280], rdi
call sym.spoolsv.exe_PrvDllAllocSplMem
mov rdi, rax
test rax, rax
je 0x14005e86f
lea rcx, [rsp + 0x40]
call fcn.14006c4f0
lea r9, str.PrintersConnections
mov edx, 0x21c
sub r9, rdi
mov rcx, rdi
lea rax, [rdx + 0x7ffffde2]
test rax, rax
je 0x14005e77e
movzx eax, word [r9 + rcx]
test ax, ax
je 0x14005e77e
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x14005e75b
test rdx, rdx
lea rax, [rcx - 2]
lea rdx, [rdi + 0x2a]
mov r8d, 0x207
cmovne rax, rcx
mov rcx, rsi
mov word [rax], bx
mov eax, 0x5c
mov word [rdi + 0x28], ax
call sym.spoolsv.exe_PrvFormatPrinterForRegistryKey
mov ecx, 0x20019
call sym.spoolsv.exe_PrvSplGetClientUserHandle
mov rsi, rax
test rax, rax
je 0x14005e853
lea rax, [rsp + 0x38]
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x14005e84a
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rdx, [0x1400a1e30]
lea rax, [rsp + 0x50]
mov dword [rsp + 0x30], 0x208
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x14005e83f
mov rbx, qword [0x1400aede0]
test rbx, rbx
je 0x14005e83f
mov rcx, qword [rbx + 8]
lea rdx, [rsp + 0x50]
call qword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
je 0x14005e83f
mov rbx, qword [rbx]
test rbx, rbx
jne 0x14005e824
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov rcx, qword [0x1400af198]
mov r8, rdi
xor edx, edx
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
lea rcx, [rsp + 0x40]
call fcn.14006c530
mov rdi, qword [rsp + 0x280]
mov rax, rbx
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.14001aad0
mov rbx, qword [rsp + 0x288]
add rsp, 0x270
pop rsi
ret
mov rax, rbx
jmp 0x14005e87a
Function at 0x140060514
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x260
mov rax, qword [0x1400ad768]
xor rax, rsp
mov qword [rsp + 0x250], rax
xor edi, edi
mov dword [rsp + 0x38], 0x104
lea rax, [rsp + 0x30]
mov qword [rsp + 0x30], rdi
mov r9d, 0x20019
mov word [rsp + 0x40], di
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400605c8
mov rcx, qword [rsp + 0x30]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rdx, str.Name
lea rax, [rsp + 0x40]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x1400605c8
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov rbx, qword [0x1400aede0]
jmp 0x1400605be
mov rcx, qword [rbx + 8]
lea rdx, [rsp + 0x40]
call qword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
je 0x1400605c3
mov rbx, qword [rbx]
test rbx, rbx
jne 0x1400605a8
mov rax, rbx
jmp 0x1400605e2
mov ecx, eax
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x1400605e0
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
xor eax, eax
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.14001aad0
mov rbx, qword [rsp + 0x280]
add rsp, 0x260
pop rdi
ret
Function at 0x140060acc
Capabilities:
Set registry value

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
xor r14d, r14d
mov r12, rdx
mov qword [rax + 0x10], r14
mov r13, rcx
mov r15d, r14d
mov edi, r14d
mov rbx, rdx
mov ebp, r14d
test rdx, rdx
je 0x140060ba6
cmp word [rbx], r14w
je 0x140060ba6
mov rdx, rbx
mov rcx, r13
call fcn.140060514
mov rsi, rax
test rax, rax
je 0x140060c3a
lea r14, [rsp + 0x68]
test rdi, rdi
je 0x140060b50
mov rcx, rdi
cmp qword [rcx + 8], rsi
je 0x140060c3a
mov rax, qword [rcx]
mov r14, rcx
mov rcx, rax
test rax, rax
jne 0x140060b38
mov ecx, 0x10
call sym.spoolsv.exe_PrvDllAllocSplMem
test rax, rax
je 0x140060c3a
and qword [rax], r15
mov qword [rax + 8], rsi
mov qword [r14], rax
or rax, 0xffffffffffffffff
xor r14d, r14d
inc rax
cmp word [rbx + rax*2], r14w
jne 0x140060b74
lea ebp, [rbp + rax*2]
add ebp, 2
or rax, 0xffffffffffffffff
inc rax
cmp word [rbx + rax*2], r14w
jne 0x140060b89
mov rdi, qword [rsp + 0x68]
lea rbx, [rbx + rax*2]
add rbx, 2
jne 0x140060b0a
mov rax, qword [0x1400aede0]
add ebp, 2
mov edx, r14d
mov ebx, 1
jmp 0x140060bbf
mov rax, qword [rax]
add edx, ebx
test rax, rax
jne 0x140060bba
mov ecx, ebx
mov rax, rdi
test rdi, rdi
je 0x140060bd8
mov rax, qword [rax]
add ecx, ebx
test rax, rax
jne 0x140060bce
cmp ecx, edx
jne 0x140060c2f
mov dword [rsp + 0x28], ebp
lea rdx, str.Order
mov r9d, 7
mov qword [rsp + 0x20], r12
xor r8d, r8d
mov rcx, r13
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
test eax, eax
je 0x140060c06
mov ecx, eax
jmp 0x140060c34
mov rdx, qword [0x1400aede0]
mov rcx, rdi
test rdi, rdi
je 0x140060c27
mov rax, qword [rcx + 8]
mov qword [rdx], rax
mov rdx, rax
mov rcx, qword [rcx]
test rcx, rcx
jne 0x140060c15
mov qword [rdx], r14
mov r15d, ebx
jmp 0x140060c3a
mov ecx, 0x57
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
test rdi, rdi
je 0x140060c5c
mov rcx, qword [0x1400af198]
mov r8, rdi
mov rbx, qword [rdi]
xor edx, edx
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
mov rdi, rbx
test rbx, rbx
jne 0x140060c3f
mov rbx, qword [rsp + 0x60]
mov eax, r15d
mov rbp, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x1400641fc
Capabilities:
Set registry value

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov rax, qword [0x1400ad768]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov r14, qword [rbp + 0x50]
lea rax, [0x1400af054]
xor r15d, r15d
mov qword [rbp - 0x28], rax
mov rax, rdx
mov dword [rbp - 0x38], 0x20676572
neg rax
mov dword [rbp - 0x30], 0x67727473
mov rsi, r8
mov qword [rbp - 0x20], r15
sbb ebx, ebx
mov dword [rbp - 0x18], 0x80004005
not ebx
mov r10, rdx
and ebx, 0x80070057
test rdx, rdx
je 0x140064278
mov r8, rcx
lea r9, [rbp - 0x38]
mov rcx, r10
lea edx, [r15 + 6]
call fcn.14006357c
mov ebx, eax
test ebx, ebx
js 0x140064365
or rdi, 0xffffffffffffffff
test rsi, rsi
je 0x1400642cf
mov rax, rdi
inc rax
cmp word [rsi + rax*2], r15w
jne 0x14006428c
mov rcx, qword [rbp - 0x20]
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
lea rdx, str.Server
mov r9d, 1
mov qword [rsp + 0x20], rsi
xor r8d, r8d
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
mov ebx, eax
test eax, eax
jle 0x1400642cf
movzx ebx, ax
or ebx, 0x80070000
test ebx, ebx
js 0x140064365
test r14, r14
je 0x14006431f
inc rdi
cmp word [r14 + rdi*2], r15w
jne 0x1400642dc
mov rcx, qword [rbp - 0x20]
lea eax, [rdi*2 + 2]
mov dword [rsp + 0x28], eax
lea rdx, [0x1400a1e30]
mov r9d, 1
mov qword [rsp + 0x20], r14
xor r8d, r8d
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
mov ebx, eax
test eax, eax
jle 0x14006431f
movzx ebx, ax
or ebx, 0x80070000
test ebx, ebx
js 0x140064365
mov rcx, qword [rbp - 0x20]
lea rax, [rbp - 0x40]
mov r9d, 4
mov dword [rbp - 0x40], 1
mov dword [rsp + 0x28], r9d
lea rdx, str.LocalConnection
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
mov ebx, eax
test eax, eax
jle 0x140064361
movzx ebx, ax
or ebx, 0x80070000
test ebx, ebx
jns 0x140064396
mov rcx, qword [0x1400ad2f8]
lea rax, [0x1400ad2f8]
cmp rcx, rax
je 0x140064396
test byte [rcx + 0x1c], 0x20
je 0x140064396
mov rcx, qword [rcx + 0x10]
lea r8, [0x140093758]
mov edx, 0x18
mov r9d, ebx
call fcn.14002efb8
lea rcx, [rbp - 0x38]
call fcn.140011fb8
mov rdx, qword [rbp - 0x28]
call fcn.140011f88
mov eax, ebx
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.14001aad0
mov rbx, qword [rsp + 0xb8]
add rsp, 0x70
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x1400653dc
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
push rsi
push rdi
push r14
sub rsp, 0x40
mov rbp, rcx
mov rsi, rdx
mov ecx, 0x208
mov ebx, 1
call sym.spoolsv.exe_PrvDllAllocSplMem
xor r14d, r14d
mov rdi, rax
test rax, rax
je 0x1400654cb
lea rax, [rsp + 0x78]
mov r9d, 0x2001f
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rdx, rsi
mov rcx, rbp
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
je 0x140065452
mov ecx, eax
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
jmp 0x14006549a
mov rcx, qword [rsp + 0x78]
mov rdx, rdi
call fcn.1400653dc
mov ebx, eax
test eax, eax
je 0x140065487
mov rcx, qword [rsp + 0x78]
lea r9, [rsp + 0x70]
mov qword [rsp + 0x38], r14
mov r8, rdi
mov qword [rsp + 0x30], r14
xor edx, edx
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r14
mov dword [rsp + 0x70], 0x104
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegEnumKeyExW]
test eax, eax
je 0x14006543f
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
test ebx, ebx
je 0x1400654b7
test eax, eax
je 0x14006549f
mov ebx, r14d
jmp 0x1400654b7
xor r9d, r9d
xor r8d, r8d
mov rdx, rsi
mov rcx, rbp
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegDeleteKeyExW]
test eax, eax
cmovne ebx, r14d
mov rcx, qword [0x1400af198]
mov r8, rdi
xor edx, edx
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
jmp 0x1400654d9
mov ecx, 8
mov ebx, r14d
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
test ebx, ebx
jne 0x140065519
mov rax, qword [0x1400ad2f8]
lea rcx, [0x1400ad2f8]
cmp rax, rcx
je 0x140065519
test byte [rax + 0x1c], 0x20
je 0x140065519
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov rcx, qword [0x1400ad2f8]
lea edx, [rbx + 0xd]
mov r9d, eax
lea r8, [0x1400937b8]
mov rcx, qword [rcx + 0x10]
call fcn.14002efb8
mov rbp, qword [rsp + 0x68]
mov eax, ebx
mov rbx, qword [rsp + 0x60]
add rsp, 0x40
pop r14
pop rdi
pop rsi
ret
Function at 0x140065534
Capabilities:
Query or enumerate registry value

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x18], r8
mov qword [r11 + 0x10], rdx
push rdi
sub rsp, 0x30
mov rdi, r9
mov ebx, 0x57
test rcx, rcx
je 0x1400655c7
test r9, r9
je 0x1400655c7
and dword [r9], 0
lea rax, [r11 + 0x10]
and qword [r11 + 0x10], 0
lea rdx, str.LanMan_Print_ServicesServers
mov r9d, 0x20019
mov qword [r11 - 0x18], rax
xor r8d, r8d
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
mov ebx, eax
test eax, eax
jne 0x1400655c7
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea rdx, str.AddPrinterDrivers
xor r9d, r9d
mov qword [rsp + 0x20], rdi
xor r8d, r8d
mov dword [rsp + 0x50], 4
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x48]
mov ebx, eax
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
test ebx, ebx
je 0x1400655f8
mov rcx, qword [0x1400ad2f8]
lea rax, [0x1400ad2f8]
cmp rcx, rax
je 0x1400655f8
test byte [rcx + 0x1c], 0x20
je 0x1400655f8
mov rcx, qword [rcx + 0x10]
lea r8, [0x1400937b8]
mov edx, 0x2b
mov r9d, ebx
call fcn.14002efb8
mov eax, ebx
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret

Function at 0x14006560c
Capabilities:
Get token membership

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdi
push rbp
mov rbp, rsp
sub rsp, 0x80
mov rax, qword [0x1400ad768]
xor rax, rsp
mov qword [rbp - 8], rax
xor edi, edi
mov word [rbp - 0xc], 0x500
lea rax, [rbp - 0x18]
mov dword [rbp - 0x10], edi
mov qword [rsp + 0x50], rax
lea rcx, [rbp - 0x10]
mov dword [rsp + 0x48], edi
mov r9d, 0x220
mov dword [rsp + 0x40], edi
lea r8d, [rdi + 0x20]
mov dword [rsp + 0x38], edi
mov dl, 2
mov dword [rsp + 0x30], edi
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], edi
mov qword [rbp - 0x18], rdi
mov dword [rbp - 0x20], edi
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x140065695
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x140065691
movzx ebx, ax
or ebx, 0x80070000
test ebx, ebx
js 0x1400656d4
mov rdx, qword [rbp - 0x18]
lea r8, [rbp - 0x20]
xor ecx, ecx
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_CheckTokenMembership]
test eax, eax
jne 0x1400656c2
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x1400656be
movzx ebx, ax
or ebx, 0x80070000
test ebx, ebx
js 0x1400656ca
cmp dword [rbp - 0x20], edi
mov ebx, edi
sete bl
mov rcx, qword [rbp - 0x18]
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_FreeSid]
mov eax, ebx
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.14001aad0
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x18]
mov rsp, r11
pop rbp
ret
Function at 0x1400658a4
Capabilities:
Set registry value

Disassembly:
mov r11, rsp
mov dword [r11 + 0x20], r9d
mov qword [r11 + 0x18], r8
push rbx
sub rsp, 0x50
mov ebx, 0x57
test rcx, rcx
je 0x140065934
and qword [r11 - 0x18], 0
lea rax, [r11 + 0x18]
and qword [r11 + 0x18], 0
lea rdx, str.LanMan_Print_ServicesServers
mov qword [r11 - 0x20], rax
xor r9d, r9d
and qword [r11 - 0x28], 0
xor r8d, r8d
mov dword [rsp + 0x28], 2
and dword [rsp + 0x20], 0
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCreateKeyExW]
mov ebx, eax
test eax, eax
jne 0x140065934
mov rcx, qword [rsp + 0x70]
lea r9d, [rax + 4]
lea rax, [rsp + 0x78]
mov dword [rsp + 0x28], r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.AddPrinterDrivers
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x70]
mov ebx, eax
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
test ebx, ebx
je 0x140065965
mov rcx, qword [0x1400ad2f8]
lea rax, [0x1400ad2f8]
cmp rcx, rax
je 0x140065965
test byte [rcx + 0x1c], 0x20
je 0x140065965
mov rcx, qword [rcx + 0x10]
lea r8, [0x1400937b8]
mov edx, 0x2c
mov r9d, ebx
call fcn.14002efb8
mov eax, ebx
add rsp, 0x50
pop rbx
ret
Function at 0x140066420
Capabilities:
Get thread local storage value

Disassembly:
push rbx
sub rsp, 0x20
mov ecx, dword [0x1400af184]
xor ebx, ebx
cmp ecx, 0xffffffff
jne 0x140066437
mov eax, ebx
jmp 0x14006643d
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
lea rdx, [rsp + 0x30]
mov rcx, rax
call qword [sym.imp.RPCRT4.dll_I_RpcBindingInqTransportType]
test eax, eax
jne 0x140066459
cmp dword [rsp + 0x30], 4
je 0x140066459
lea ebx, [rax + 1]
mov eax, ebx
add rsp, 0x20
pop rbx
ret

Function at 0x14006681c
Capabilities:
Query or enumerate registry key

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rbp
push rdi
push r12
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
mov r15, rdx
mov r8, rdx
mov edx, 4
mov rsi, rcx
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetKeySecurity]
xor r12d, r12d
mov ebx, eax
test eax, eax
jne 0x140066996
mov qword [rsp + 0x58], r12
lea rax, [rbp + 0x40]
mov qword [rsp + 0x50], r12
xor r9d, r9d
mov qword [rsp + 0x48], r12
xor r8d, r8d
mov qword [rsp + 0x40], r12
xor edx, edx
mov qword [rsp + 0x38], r12
mov rcx, rsi
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x48]
mov qword [rsp + 0x20], rax
mov dword [rbp + 0x48], r12d
mov dword [rbp + 0x40], r12d
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryInfoKeyW]
mov ebx, eax
test eax, eax
jne 0x140066996
mov eax, dword [rbp + 0x40]
inc eax
mov qword [rbp - 0x10], r12
mov ecx, eax
mov dword [rbp + 0x40], eax
lea eax, [rbx + 2]
mul rcx
lea rcx, [r12 - 1]
cmovo rax, rcx
mov rcx, rax
call fcn.14001a74c
lea rcx, [rbp - 0x10]
mov r14, rax
call fcn.1400187a4
mov qword [rbp - 0x10], r14
test r14, r14
je 0x140066988
mov edi, r12d
cmp edi, dword [rbp + 0x48]
jae 0x14006698d
mov eax, dword [rbp + 0x40]
lea r9, [rbp - 0x20]
mov qword [rsp + 0x38], r12
test r14, r14
mov qword [rsp + 0x30], r12
mov r8, r12
cmovne r8, r14
mov qword [rsp + 0x28], r12
mov edx, edi
mov dword [rbp - 0x20], eax
mov rcx, rsi
mov qword [rsp + 0x20], r12
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegEnumKeyExW]
mov ebx, eax
test eax, eax
jne 0x140066970
lea rax, [rbp - 0x18]
mov qword [rbp - 0x18], r12
mov r9d, 0xf003f
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov rdx, r14
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
mov ebx, eax
test eax, eax
jne 0x140066965
mov rcx, qword [rbp - 0x18]
mov rdx, r15
call fcn.14006681c
mov ebx, eax
lea rcx, [rbp - 0x18]
call fcn.14001a430
jmp 0x140066977
cmp eax, 0x103
je 0x140066983
inc edi
test ebx, ebx
je 0x1400668ed
jmp 0x14006698d
mov ebx, r12d
jmp 0x14006698d
mov ebx, 8
lea rcx, [rbp - 0x10]
call fcn.1400187a4
lea r11, [rsp + 0x80]
mov eax, ebx
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
Function at 0x140066c50
Capabilities:
Query or enumerate registry key

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x160]
sub rsp, 0x260
mov rax, qword [0x1400ad768]
xor rax, rsp
mov qword [rbp + 0x150], rax
cmp dword [rbp + 0x1b0], 0
mov r14, r9
mov ebx, r8d
mov rsi, rdx
mov rdi, rcx
je 0x140066cae
mov r9, rdx
mov dword [rsp + 0x20], ebx
mov r8, rcx
xor edx, edx
mov rcx, 0xffffffff80000001
call sym.spoolsv.exe_PrvUpdatePrinterRegUser
jmp 0x140066d6f
xor r15d, r15d
lea rax, [rsp + 0x48]
mov qword [rsp + 0x38], rax
and qword [rsp + 0x30], r15
and qword [rsp + 0x28], r15
and qword [rsp + 0x20], r15
xor edx, edx
jmp 0x140066d48
lea rdx, str..Default
lea rcx, [rsp + 0x50]
call qword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
je 0x140066d26
mov edx, 0x5f
lea rcx, [rsp + 0x50]
call qword [sym.imp.msvcrt.dll_wcschr]
test rax, rax
jne 0x140066d26
test r14, r14
je 0x140066d10
mov rdx, r14
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNELBASE.dll_lstrcmpiW]
test eax, eax
jne 0x140066d26
mov r9, rsi
mov dword [rsp + 0x20], ebx
mov r8, rdi
lea rdx, [rsp + 0x50]
xor ecx, ecx
call sym.spoolsv.exe_PrvUpdatePrinterRegUser
inc r15d
lea rax, [rsp + 0x48]
mov qword [rsp + 0x38], rax
mov edx, r15d
and qword [rsp + 0x30], 0
and qword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov dword [rsp + 0x40], 0x100
lea r8, [rsp + 0x50]
mov rcx, 0xffffffff80000003
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegEnumKeyExW]
test eax, eax
je 0x140066cce
mov rcx, qword [rbp + 0x150]
xor rcx, rsp
call fcn.14001aad0
mov rbx, qword [rsp + 0x2a0]
add rsp, 0x260
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x140067238
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x390]
sub rsp, 0x490
mov rax, qword [0x1400ad768]
xor rax, rsp
mov qword [rbp + 0x380], rax
xor eax, eax
mov dword [rsp + 0x44], 0x104
xor ebx, ebx
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rax
lea r9, [rsp + 0x44]
lea rax, [rsp + 0x40]
mov dword [rsp + 0x40], 0x208
mov qword [rsp + 0x38], rax
lea r8, [rbp + 0x170]
lea rax, [rsp + 0x60]
mov r12, rdx
mov qword [rsp + 0x30], rax
xor edx, edx
mov qword [rsp + 0x28], rbx
mov r15, rcx
mov qword [rsp + 0x20], rbx
mov r14d, ebx
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegEnumValueW]
lea esi, [rbx + 1]
jmp 0x1400673d0
cmp word [rsp + 0x60], bx
je 0x140067387
mov edx, 0x2c
lea rcx, [rsp + 0x60]
call qword [sym.imp.msvcrt.dll_wcschr]
mov rdi, rax
test rax, rax
je 0x140067387
mov word [rax], bx
add rdi, 2
cmp word [rdi], 0x20
je 0x1400672f5
mov r8d, 2
lea rdx, [0x1400a21d0]
mov rcx, rdi
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
jne 0x140067387
add rdi, 4
mov ecx, ebx
mov word [rdi + 4], bx
jmp 0x14006733e
lea eax, [rdx - 0x30]
cmp ax, 9
ja 0x140067346
lea ecx, [rcx + rcx*4]
movzx eax, dx
lea ecx, [rcx - 0x18]
add rdi, 2
lea ecx, [rax + rcx*2]
movzx edx, word [rdi]
test dx, dx
jne 0x140067325
lea rax, [rbp + 0x170]
mov r9, r12
sub r9, rax
movzx edx, word [rax]
movzx r8d, word [rax + r9]
sub edx, r8d
jne 0x140067369
add rax, 2
test r8d, r8d
jne 0x140067353
test edx, edx
je 0x1400673f5
cmp ecx, 0x64
jae 0x140067387
mov edx, ecx
mov eax, esi
and ecx, 0x1f
shr rdx, 5
shl eax, cl
or dword [rsp + rdx*4 + 0x48], eax
lea rax, [rsp + 0x40]
mov dword [rsp + 0x44], 0x104
mov qword [rsp + 0x38], rax
lea r9, [rsp + 0x44]
lea rax, [rsp + 0x60]
mov dword [rsp + 0x40], 0x208
mov qword [rsp + 0x30], rax
lea r8, [rbp + 0x170]
add r14d, esi
mov qword [rsp + 0x28], rbx
mov edx, r14d
mov qword [rsp + 0x20], rbx
mov rcx, r15
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegEnumValueW]
test eax, eax
je 0x1400672cb
mov eax, ebx
mov ecx, ebx
shr rax, 5
and ecx, 0x1f
mov eax, dword [rsp + rax*4 + 0x48]
bt eax, ecx
jae 0x1400673f9
add ebx, esi
cmp ebx, 0x64
jb 0x1400673d8
jmp 0x1400673fb
mov eax, ecx
jmp 0x1400673fd
mov esi, ebx
mov eax, esi
mov rcx, qword [rbp + 0x380]
xor rcx, rsp
call fcn.14001aad0
lea r11, [rsp + 0x490]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret