joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14003b960
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
mov eax, 0x1098
call fcn.140042e50
sub rsp, rax
lea rbp, [rsp + 0x80]
movaps xmmword [rbp + 0x1000], xmm6
mov qword [rbp + 0xff8], 0xfffffffffffffffe
mov qword [rbp + 0xfd8], rdx
mov r14, rcx
lea rsi, [rbp - 0x50]
mov r8d, 0x1000
mov rcx, rsi
xor edx, edx
call fcn.140043d80
mov dword [rbp + 0xfec], 0
xorps xmm6, xmm6
movaps xmmword [rbp + 0xfb0], xmm6
mov qword [rbp + 0xfc0], 0
lea r15, [rbp + 0xfec]
mov qword [rbp + 0xfc8], r15
lea r12, case.0x14002e982.351
mov qword [rsp + 0x20], r12
lea r9, [rbp + 0xfb0]
mov rcx, r14
mov rdx, rsi
mov r8d, 0x1000
call qword [sym.imp.KERNEL32.dll_ReadFileEx]
test eax, eax
je 0x14003bb4e
mov r13, qword [sym.imp.KERNEL32.dll_SleepEx]
lea rsi, [rbp + 0xfb0]
mov rdi, qword [sym.imp.KERNEL32.dll_WriteFileEx]
mov qword [rbp + 0xfe0], r14
mov ecx, 0xffffffff
mov edx, 1
call r13
cmp dword [rbp + 0xfec], 0
je 0x14003ba27
cmp dword [rbp + 0xff0], 0
jne 0x14003bb63
mov ebx, dword [rbp + 0xff4]
test rbx, rbx
je 0x14003bb63
cmp ebx, 0x1000
ja 0x14003bba7
xor r14d, r14d
nop dword [rax + rax]
cmp r14, rbx
ja 0x14003bb93
lea rdx, [r14 + rbp]
add rdx, 0xffffffffffffffb0
mov r8d, ebx
sub r8d, r14d
mov dword [rbp + 0xfec], 0
movaps xmmword [rbp + 0xfb0], xmm6
mov qword [rbp + 0xfc0], 0
mov qword [rbp + 0xfc8], r15
mov qword [rsp + 0x20], r12
mov rcx, qword [rbp + 0xfd8]
mov r9, rsi
call rdi
test eax, eax
je 0x14003bb56
nop word cs:[rax + rax]
mov ecx, 0xffffffff
mov edx, 1
call r13
cmp dword [rbp + 0xfec], 0
je 0x14003bad0
cmp dword [rbp + 0xff0], 0
jne 0x14003bb5c
mov eax, dword [rbp + 0xff4]
add r14, rax
cmp r14, rbx
jne 0x14003ba70
mov dword [rbp + 0xfec], 0
movaps xmmword [rbp + 0xfb0], xmm6
mov qword [rbp + 0xfc0], 0
mov qword [rbp + 0xfc8], r15
mov qword [rsp + 0x20], r12
mov r14, qword [rbp + 0xfe0]
mov rcx, r14
lea rdx, [rbp - 0x50]
mov r8d, 0x1000
mov r9, rsi
call qword [sym.imp.KERNEL32.dll_ReadFileEx]
test eax, eax
jne 0x14003ba27
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x14003bb63
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14, qword [rbp + 0xfe0]
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r14
call rsi
mov rcx, qword [rbp + 0xfd8]
call rsi
movaps xmm6, xmmword [rbp + 0x1000]
add rsp, 0x1098
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea r8, [0x1413d8328]
mov rcx, r14
mov rdx, rbx
call fcn.140051520
jmp 0x14003bbbb
lea r8, [0x1413d8328]
mov edx, 0x1000
mov rcx, rbx
call fcn.1400512f0
ud2
Function at 0x14003bc10
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push rbp
sub rsp, 0x80
lea rbp, [rsp + 0x80]
mov qword [rbp - 8], 0xfffffffffffffffe
xorps xmm0, xmm0
movaps xmmword [rbp - 0x20], xmm0
lea rcx, [rbp - 0x20]
mov edx, 0x10
call qword [sym.imp.ADVAPI32.dll_SystemFunction036]
test al, al
je 0x14003bc4f
mov rax, qword [rbp - 0x20]
add rsp, 0x80
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
shl rax, 0x20
or rax, 2
mov qword [rbp - 0x10], rax
lea rax, [rbp - 0x10]
mov qword [rbp - 0x30], rax
lea rax, [0x140029d90]
mov qword [rbp - 0x28], rax
lea rax, [0x1413d84a0]
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x58], 1
mov qword [rbp - 0x40], 0
lea rax, [rbp - 0x30]
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], 1
lea rdx, [0x1413d84d8]
lea rcx, [rbp - 0x60]
call fcn.1400511d0
ud2

Function at 0x14003daa0
Capabilities:
Read file on windows

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x60
mov rdi, rdx
cmp qword [rdx], 0
jne 0x14003dbaf
mov rsi, rcx
mov rbx, qword [rdi + 0x18]
mov rax, qword [rbx + 8]
test rax, rax
jne 0x14003dad8
mov rdx, qword [rbx + 0x10]
lea rax, [rdx + 0xf]
cmp rax, 0xf
jbe 0x14003db72
xor eax, eax
mov rdx, qword [rbx + 0x10]
cmp rax, rdx
je 0x14003db91
sub rax, rdx
add rdx, qword [rbx]
mov r8, qword [rdi + 0x10]
mov ecx, 0xffffffff
cmp rax, rcx
cmovae rax, rcx
mov dword [rsp + 0x30], 0
mov rcx, qword [rdi + 0x20]
mov qword [rsp + 0x20], r8
lea r9, [rsp + 0x30]
mov r8d, eax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14003db2e
mov eax, dword [rsp + 0x30]
mov ecx, 2
test rax, rax
jne 0x14003db4b
jmp 0x14003db40
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x14003db46
cmp eax, 0x6d
jne 0x14003db62
mov byte [rsi + 1], 0
jmp 0x14003db56
mov ecx, 1
mov qword [rdi], rcx
mov qword [rdi + 8], rax
mov byte [rsi + 1], 1
xor eax, eax
mov byte [rsi], al
add rsp, 0x60
pop rbx
pop rdi
pop rsi
ret
shl rax, 0x20
or rax, 2
mov qword [rsi + 8], rax
mov al, 1
jmp 0x14003db58
mov r8d, 0x10
mov rcx, rbx
call fcn.140051040
mov rax, qword [rbx + 8]
mov rdx, qword [rbx + 0x10]
cmp rax, rdx
jne 0x14003dae5
mov r8d, 1
mov rcx, rbx
mov rdx, rax
call fcn.140051040
mov rax, qword [rbx + 8]
mov rdx, qword [rbx + 0x10]
jmp 0x14003dae5
mov qword [rsp + 0x30], 0
lea rdx, [rsp + 0x30]
mov rcx, rdi
call fcn.140052410
ud2

Function at 0x14004745c
Capabilities:
Parse pe header

Disassembly:
xor r8d, r8d
xor edx, edx
jmp 0x140047258
Function at 0x140001100
Capabilities:
Find process by pid

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
mov rbx, rcx
mov ecx, dword [rcx + 0x18]
mov rax, qword [rbx + 0x10]
lea r8, [rax + rcx]
cmp r8, rax
jb 0x140001295
mov rax, qword [rbx + 8]
lea rdx, [rax + rcx]
cmp rdx, rax
jb 0x140001295
mov rax, qword [sym.imp.ntoskrnl.exe_MmHighestUserAddress]
mov rcx, qword [rax]
cmp r8, rcx
ja 0x140001295
cmp rdx, rcx
ja 0x140001295
and qword [rbp + 0x30], 0
cmp dword [rbx + 0x1c], 0
mov eax, dword [rbx]
je 0x140001214
test eax, eax
je 0x14000120a
mov ecx, eax
lea rdx, [rbp + 0x30]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov edi, eax
test eax, eax
jne 0x14000129a
mov rcx, qword [rbp + 0x30]
mov r15, qword [0x140004058]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov esi, dword [rbx + 0x18]
xor r14d, r14d
jmp 0x1400011fe
mov rdx, qword [rbx + 0x10]
mov rcx, r15
add rdx, r14
call fcn.140002330
test rax, rax
je 0x14000120a
and qword [rbp + 0x38], 0
lea r9, [rbp + 0x38]
mov rcx, rax
mov edx, 0x1000
and ecx, 0xfff
mov r8, rsi
sub rdx, rcx
mov rcx, rax
cmp rdx, rsi
cmovb r8, rdx
mov rdx, qword [rbx + 8]
add rdx, r14
call fcn.14000230c
mov edi, eax
mov rax, qword [rbp + 0x38]
sub rsi, rax
add r14, rax
test edi, edi
jne 0x140001203
test rax, rax
je 0x140001203
test rsi, rsi
jne 0x1400011a2
mov eax, edi
jmp 0x14000129a
mov eax, 0xc0000001
jmp 0x14000129a
mov rcx, rax
lea rdx, [rbp + 0x30]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov edi, eax
test eax, eax
js 0x140001203
and qword [rbp + 0x38], 0
call qword [sym.imp.ntoskrnl.exe_IoGetCurrentProcess]
mov rdx, qword [rbx + 0x10]
lea r9, [rbp - 0x40]
mov rcx, qword [rbp + 0x30]
mov r8, rax
lea rax, [rbp + 0x38]
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x28], 0
mov qword [rsp + 0x20], 0x40
call sub.ntoskrnl.exe_MmCopyVirtualMemory
mov rcx, qword [rbp + 0x30]
mov edi, eax
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
test edi, edi
js 0x140001203
movaps xmm0, xmmword [rbp - 0x40]
mov rax, qword [rbx + 8]
movups xmmword [rax], xmm0
movaps xmm1, xmmword [rbp - 0x30]
movups xmmword [rax + 0x10], xmm1
movaps xmm0, xmmword [rbp - 0x20]
movups xmmword [rax + 0x20], xmm0
movaps xmm1, xmmword [rbp - 0x10]
movups xmmword [rax + 0x30], xmm1
jmp 0x140001203
mov eax, 0xc0000005
mov rbx, qword [rsp + 0xc0]
add rsp, 0x80
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x1400012b4
Capabilities:
Find process by pid

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xa0
mov rbx, rcx
mov ecx, dword [rcx + 0x18]
mov rax, qword [rbx + 0x10]
lea r8, [rax + rcx]
cmp r8, rax
jb 0x140001494
mov rax, qword [rbx + 8]
lea rdx, [rax + rcx]
cmp rdx, rax
jb 0x140001494
mov rax, qword [sym.imp.ntoskrnl.exe_MmHighestUserAddress]
mov rcx, qword [rax]
cmp r8, rcx
ja 0x140001494
cmp rdx, rcx
ja 0x140001494
and qword [rbp + 0x67], 0
cmp dword [rbx + 0x1c], 0
mov eax, dword [rbx]
je 0x1400013ca
test eax, eax
je 0x1400013c0
mov ecx, eax
lea rdx, [rbp + 0x67]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov edi, eax
test eax, eax
jne 0x140001499
mov rcx, qword [rbp + 0x67]
mov r15, qword [0x140004058]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov esi, dword [rbx + 0x18]
xor r14d, r14d
jmp 0x1400013b4
mov rdx, qword [rbx + 0x10]
mov rcx, r15
add rdx, r14
call fcn.140002330
test rax, rax
je 0x1400013c0
and qword [rbp + 0x6f], 0
lea r9, [rbp + 0x6f]
mov rcx, rax
mov edx, 0x1000
and ecx, 0xfff
mov r8, rsi
sub rdx, rcx
mov rcx, rax
cmp rdx, rsi
cmovb r8, rdx
mov rdx, qword [rbx + 8]
add rdx, r14
call fcn.14000230c
mov edi, eax
mov rax, qword [rbp + 0x6f]
sub rsi, rax
add r14, rax
test edi, edi
jne 0x1400013b9
test rax, rax
je 0x1400013b9
test rsi, rsi
jne 0x140001358
mov eax, edi
jmp 0x140001499
mov eax, 0xc0000001
jmp 0x140001499
mov rcx, rax
lea rdx, [rbp + 0x67]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov edi, eax
test eax, eax
js 0x1400013b9
and qword [rbp + 0x6f], 0
call qword [sym.imp.ntoskrnl.exe_IoGetCurrentProcess]
mov rdx, qword [rbx + 0x10]
lea r9, [rbp - 0x29]
mov rcx, qword [rbp + 0x67]
mov r8, rax
lea rax, [rbp + 0x6f]
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x28], 0
mov qword [rsp + 0x20], 0x20
call sub.ntoskrnl.exe_MmCopyVirtualMemory
mov rcx, qword [rbp + 0x67]
mov edi, eax
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
test edi, edi
js 0x1400013b9
xor ecx, ecx
xorps xmm0, xmm0
xorps xmm1, xmm1
xorps xmm2, xmm2
movups xmmword [rbp - 9], xmm0
mov qword [rbp + 0x27], rcx
movups xmmword [rbp + 7], xmm1
mov dword [rbp + 0x2f], ecx
movups xmmword [rbp + 0x17], xmm2
cmp byte [rbp - 0x29], cl
je 0x140001473
mov al, byte [rbp + rcx - 0x29]
mov byte [rbp + rcx - 9], al
inc rcx
cmp byte [rbp + rcx - 9], 0xb8
jne 0x14000145d
mov byte [rbp + rcx - 9], 0
cmp byte [rbp + rcx - 0x29], 0
jne 0x140001446
mov ecx, dword [rbp + 0x2f]
movups xmm2, xmmword [rbp + 0x17]
movups xmm1, xmmword [rbp + 7]
movups xmm0, xmmword [rbp - 9]
mov rax, qword [rbx + 0x20]
movups xmmword [rax], xmm0
movsd xmm0, qword [rbp + 0x27]
movups xmmword [rax + 0x10], xmm1
movups xmmword [rax + 0x20], xmm2
movsd qword [rax + 0x30], xmm0
mov dword [rax + 0x38], ecx
jmp 0x1400013b9
mov eax, 0xc0000005
mov rbx, qword [rsp + 0xe0]
add rsp, 0xa0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x1400014b0
Capabilities:
Find process by pid

Disassembly:
push rbx
sub rsp, 0x20
and qword [rsp + 0x30], 0
mov rbx, rcx
mov eax, dword [rcx]
test eax, eax
je 0x140001506
mov ecx, eax
lea rdx, [rsp + 0x30]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
test eax, eax
jne 0x140001506
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ntoskrnl.exe_PsGetProcessSectionBaseAddress]
mov rcx, qword [rbx + 8]
mov qword [rcx], rax
mov rcx, rax
call fcn.140001970
mov rcx, qword [rsp + 0x30]
mov qword [0x140004058], rax
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
xor eax, eax
jmp 0x14000150b
mov eax, 0xc0000001
add rsp, 0x20
pop rbx
ret

Function at 0x140001514
Capabilities:
Find process by pid

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
sub rsp, 0x20
and qword [rax + 8], 0
lea rdx, [rax + 8]
mov rbp, rcx
mov ecx, dword [rcx]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov esi, eax
test eax, eax
js 0x140001598
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ntoskrnl.exe_KeAttachProcess]
mov rcx, qword [rsp + 0x30]
lea rdx, [rbp + 4]
call fcn.1400022a4
test rax, rax
je 0x140001582
mov rbx, qword [rax + 0x30]
mov edi, dword [rax + 0x40]
call qword [sym.imp.ntoskrnl.exe_KeDetachProcess]
mov rax, qword [rbp + 0x208]
mov qword [rax], rbx
mov rax, qword [rbp + 0x210]
mov dword [rax], edi
jmp 0x14000158d
mov esi, 0xc0000225
call qword [sym.imp.ntoskrnl.exe_KeDetachProcess]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov rbx, qword [rsp + 0x38]
mov eax, esi
mov rsi, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret

Function at 0x1400015b0
Capabilities:
Allocate or change rwx memory
Find process by pid

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x30
mov eax, dword [rcx]
mov rbx, rcx
test eax, eax
je 0x140001668
cmp qword [rcx + 8], 0
je 0x140001668
cmp dword [rcx + 0x10], 0
je 0x140001668
cmp qword [rcx + 0x18], 0
je 0x140001668
and qword [rsp + 0x48], 0
lea rdx, [rsp + 0x48]
mov ecx, eax
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
test eax, eax
jns 0x140001605
mov eax, 0xc0000225
jmp 0x14000166d
mov eax, dword [rbx + 0x10]
mov qword [rsp + 0x50], rax
mov rax, qword [rbx + 0x18]
mov ecx, dword [rax]
mov dword [rsp + 0x40], ecx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ntoskrnl.exe_KeAttachProcess]
mov r9d, dword [rsp + 0x40]
lea rax, [rsp + 0x40]
lea r8, [rsp + 0x50]
mov qword [rsp + 0x20], rax
lea rdx, [rbx + 8]
or rcx, 0xffffffffffffffff
call sub.ntoskrnl.exe_ZwProtectVirtualMemory
mov edi, eax
call qword [sym.imp.ntoskrnl.exe_KeDetachProcess]
test edi, edi
js 0x140001659
mov rdx, qword [rbx + 0x18]
mov ecx, dword [rsp + 0x40]
mov dword [rdx], ecx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov eax, edi
jmp 0x14000166d
mov eax, 0xc000000d
mov rbx, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret
Function at 0x140001678
Capabilities:
Find process by pid

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
mov rbp, rsp
sub rsp, 0x40
mov rdi, rcx
mov ecx, dword [rcx + 0x18]
mov rax, qword [rdi + 0x10]
lea r8, [rax + rcx]
cmp r8, rax
jb 0x1400017d9
mov rax, qword [rdi + 8]
lea rdx, [rax + rcx]
cmp rdx, rax
jb 0x1400017d9
mov rax, qword [sym.imp.ntoskrnl.exe_MmHighestUserAddress]
mov rcx, qword [rax]
cmp r8, rcx
ja 0x1400017d9
cmp rdx, rcx
ja 0x1400017d9
and qword [rbp + 0x30], 0
cmp dword [rdi + 0x1c], 0
mov eax, dword [rdi]
je 0x140001783
test eax, eax
je 0x14000177c
mov ecx, eax
lea rdx, [rbp + 0x30]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov ebx, eax
test eax, eax
jne 0x1400017de
mov rcx, qword [rbp + 0x30]
mov r15, qword [0x140004058]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov esi, dword [rdi + 0x18]
xor r14d, r14d
jmp 0x140001773
mov rdx, qword [rdi + 0x10]
mov rcx, r15
add rdx, r14
call fcn.140002330
test rax, rax
je 0x14000177c
and qword [rbp + 0x38], 0
lea r9, [rbp + 0x38]
mov rcx, rax
mov edx, 0x1000
and ecx, 0xfff
mov r8, rsi
sub rdx, rcx
mov rcx, rax
cmp rdx, rsi
cmovb r8, rdx
mov rdx, qword [rdi + 8]
add rdx, r14
call fcn.14000230c
mov ebx, eax
mov rax, qword [rbp + 0x38]
sub rsi, rax
add r14, rax
test ebx, ebx
jne 0x140001778
test rax, rax
je 0x140001778
test rsi, rsi
jne 0x140001717
mov eax, ebx
jmp 0x1400017de
mov eax, 0xc0000001
jmp 0x1400017de
mov rcx, rax
lea rdx, [rbp + 0x30]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov ebx, eax
test eax, eax
js 0x140001778
and qword [rbp + 0x38], 0
mov ebx, dword [rdi + 0x18]
call qword [sym.imp.ntoskrnl.exe_IoGetCurrentProcess]
mov r9, qword [rdi + 8]
mov r8, rax
mov rdx, qword [rdi + 0x10]
lea rax, [rbp + 0x38]
mov rcx, qword [rbp + 0x30]
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x28], 0
mov qword [rsp + 0x20], rbx
call sub.ntoskrnl.exe_MmCopyVirtualMemory
mov rcx, qword [rbp + 0x30]
mov ebx, eax
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
jmp 0x140001778
mov eax, 0xc0000005
mov rbx, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x1400017f4
Capabilities:
Find process by pid

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
mov rbp, rsp
sub rsp, 0x40
mov rdi, rcx
mov ecx, dword [rcx + 0x18]
mov rax, qword [rdi + 0x10]
lea r8, [rax + rcx]
cmp r8, rax
jb 0x140001955
mov rax, qword [rdi + 8]
lea rdx, [rax + rcx]
cmp rdx, rax
jb 0x140001955
mov rax, qword [sym.imp.ntoskrnl.exe_MmHighestUserAddress]
mov rcx, qword [rax]
cmp r8, rcx
ja 0x140001955
cmp rdx, rcx
ja 0x140001955
and qword [rbp + 0x30], 0
cmp dword [rdi + 0x1c], 0
mov eax, dword [rdi]
je 0x1400018ff
test eax, eax
je 0x1400018f8
mov ecx, eax
lea rdx, [rbp + 0x30]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov ebx, eax
test eax, eax
jne 0x14000195a
mov rcx, qword [rbp + 0x30]
mov r15, qword [0x140004058]
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
mov esi, dword [rdi + 0x18]
xor r14d, r14d
jmp 0x1400018ef
mov rdx, qword [rdi + 0x10]
mov rcx, r15
add rdx, r14
call fcn.140002330
test rax, rax
je 0x1400018f8
and qword [rbp + 0x38], 0
lea r9, [rbp + 0x38]
mov rcx, rax
mov edx, 0x1000
and ecx, 0xfff
mov r8, rsi
sub rdx, rcx
mov rcx, rax
cmp rdx, rsi
cmovb r8, rdx
mov rdx, qword [rdi + 8]
add rdx, r14
call fcn.1400024b8
mov ebx, eax
mov rax, qword [rbp + 0x38]
sub rsi, rax
add r14, rax
test ebx, ebx
jne 0x1400018f4
test rax, rax
je 0x1400018f4
test rsi, rsi
jne 0x140001893
mov eax, ebx
jmp 0x14000195a
mov eax, 0xc0000001
jmp 0x14000195a
mov rcx, rax
lea rdx, [rbp + 0x30]
call qword [sym.imp.ntoskrnl.exe_PsLookupProcessByProcessId]
mov ebx, eax
test eax, eax
js 0x1400018f4
and qword [rbp + 0x38], 0
mov ebx, dword [rdi + 0x18]
call qword [sym.imp.ntoskrnl.exe_IoGetCurrentProcess]
mov r9, qword [rdi + 8]
mov rcx, rax
mov r8, qword [rbp + 0x30]
lea rax, [rbp + 0x38]
mov rdx, qword [rdi + 0x10]
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x28], 0
mov qword [rsp + 0x20], rbx
call sub.ntoskrnl.exe_MmCopyVirtualMemory
mov rcx, qword [rbp + 0x30]
mov ebx, eax
call qword [sym.imp.ntoskrnl.exe_ObfDereferenceObject]
jmp 0x1400018f4
mov eax, 0xc0000005
mov rbx, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
Function at 0x140001c34
Capabilities:
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x60
and qword [rbp - 0x28], 0
lea r8, [rbp - 0x30]
mov r14, rdx
mov qword [rbp - 0x20], rcx
xorps xmm0, xmm0
mov dword [rbp - 0x30], 0x30
mov edx, 0xf003f
mov dword [rbp - 0x18], 0x240
lea rcx, [rbp + 0x30]
movdqu xmmword [rbp - 0x10], xmm0
call qword [sym.imp.ntoskrnl.exe_ZwOpenKey]
test eax, eax
js 0x140001d1e
mov rcx, qword [rbp + 0x30]
mov rdx, r14
call fcn.140002268
mov esi, eax
test eax, eax
jne 0x140001ca4
mov rcx, qword [rbp + 0x30]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
jmp 0x140001d1e
mov rdx, rsi
xor ecx, ecx
call qword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov r8, rsi
xor edx, edx
mov rcx, rax
mov rdi, rax
call fcn.140002700
mov rcx, qword [rbp + 0x30]
lea rax, [rbp + 0x20]
mov qword [rsp + 0x28], rax
mov r9, rdi
mov r8d, 1
mov dword [rsp + 0x20], esi
mov rdx, r14
call qword [sym.imp.ntoskrnl.exe_ZwQueryValueKey]
test eax, eax
js 0x140001d09
cmp esi, dword [rbp + 0x20]
jne 0x140001d09
mov rcx, qword [rbp + 0x30]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
mov eax, dword [rdi + 8]
mov rax, qword [rax + rdi]
jmp 0x140001d20
mov rcx, qword [rbp + 0x30]
call qword [sym.imp.ntoskrnl.exe_ZwClose]
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ntoskrnl.exe_ExFreePoolWithTag]
xor eax, eax
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret

Function at 0x140002268
Capabilities:
Query or enumerate registry value

Disassembly:
sub rsp, 0x38
xor r9d, r9d
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
and dword [rsp + 0x20], 0
lea r8d, [r9 + 1]
call qword [sym.imp.ntoskrnl.exe_ZwQueryValueKey]
cmp eax, 0xc0000023
je 0x14000229a
cmp eax, 0x80000005
je 0x14000229a
xor eax, eax
jmp 0x14000229e
mov eax, dword [rsp + 0x50]
add rsp, 0x38
ret

Function at 0x14000252c
Capabilities:
Set registry value

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
sub rsp, 0x60
mov rsi, r8
mov qword [rax - 0x28], rcx
mov rbp, rdx
mov dword [rax - 0x38], 0x30
xorps xmm0, xmm0
mov dword [rax - 0x20], 0x240
xor ebx, ebx
lea r8, [rax - 0x38]
mov edx, 0xf003f
mov qword [rax - 0x30], rbx
lea rcx, [rax + 8]
mov edi, r9d
movdqu xmmword [rax - 0x18], xmm0
call qword [sym.imp.ntoskrnl.exe_ZwOpenKey]
test eax, eax
js 0x1400025b7
mov eax, dword [rsp + 0x90]
mov r9d, edi
mov rcx, qword [rsp + 0x70]
xor r8d, r8d
mov dword [rsp + 0x28], eax
mov rdx, rbp
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ntoskrnl.exe_ZwSetValueKey]
mov rcx, qword [rsp + 0x70]
mov ebx, eax
call qword [sym.imp.ntoskrnl.exe_ZwClose]
shr ebx, 0x1f
xor bl, 1
lea r11, [rsp + 0x60]
mov al, bl
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
Function at 0x140001180
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov rcx, rax
lea r8d, [rdx + 6]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
xor r11d, r11d
lea rsi, [0x140010040]
mov r10, rax
sub rbx, rax
movabs rdi, 0xf74e3fc22c700f75
lea r9, [rax + 1]
nop dword [rax + rax]
movsxd r8, r11d
mov rax, rdi
mul r8
mov rcx, r8
shr rdx, 9
imul rax, rdx, 0x212
sub rcx, rax
movzx eax, byte [rcx + rsi]
lea rcx, [r8 + 1]
xor al, byte [rbx + r9 - 1]
mov byte [r9 - 1], al
mov rax, rdi
mul rcx
shr rdx, 9
imul rax, rdx, 0x212
sub rcx, rax
movzx eax, byte [rcx + rsi]
lea rcx, [r8 + 2]
xor al, byte [rbx + r9]
mov byte [r9], al
mov rax, rdi
mul rcx
shr rdx, 9
imul rax, rdx, 0x212
sub rcx, rax
movzx eax, byte [rcx + rsi]
lea rcx, [r8 + 3]
xor al, byte [rbx + r9 + 1]
mov byte [r9 + 1], al
mov rax, rdi
mul rcx
shr rdx, 9
imul rax, rdx, 0x212
sub rcx, rax
movzx eax, byte [rcx + rsi]
lea rcx, [r8 + 4]
xor al, byte [rbx + r9 + 2]
mov byte [r9 + 2], al
mov rax, rdi
mul rcx
shr rdx, 9
imul rax, rdx, 0x212
sub rcx, rax
movzx eax, byte [rcx + rsi]
lea rcx, [r8 + 5]
xor al, byte [rbx + r9 + 3]
mov byte [r9 + 3], al
mov rax, rdi
mul rcx
shr rdx, 9
imul rax, rdx, 0x212
sub rcx, rax
movzx eax, byte [rcx + rsi]
lea rcx, [r8 + 6]
xor al, byte [rbx + r9 + 4]
mov byte [r9 + 4], al
mov rax, rdi
mul rcx
shr rdx, 9
imul rax, rdx, 0x212
sub rcx, rax
movzx eax, byte [rcx + rsi]
lea rcx, [r8 + 7]
xor al, byte [rbx + r9 + 5]
mov byte [r9 + 5], al
mov rax, rdi
mul rcx
shr rdx, 9
imul rax, rdx, 0x212
sub rcx, rax
movzx eax, byte [rcx + rsi]
lea rcx, [r8 + 8]
xor al, byte [rbx + r9 + 6]
mov byte [r9 + 6], al
mov rax, rdi
mul rcx
shr rdx, 9
imul rax, rdx, 0x212
sub rcx, rax
movzx eax, byte [rcx + rsi]
xor al, byte [rbx + r9 + 7]
mov byte [r9 + 7], al
lea rcx, [r8 + 9]
mov rax, rdi
lea r9, [r9 + 0xe]
mul rcx
add r11d, 0xe
shr rdx, 9
imul rax, rdx, 0x212
sub rcx, rax
movzx eax, byte [rcx + rsi]
lea rcx, [r8 + 0xa]
xor al, byte [rbx + r9 - 6]
mov byte [r9 - 6], al
mov rax, rdi
mul rcx
shr rdx, 9
imul rax, rdx, 0x212
sub rcx, rax
movzx eax, byte [rcx + rsi]
lea rcx, [r8 + 0xb]
xor al, byte [rbx + r9 - 5]
mov byte [r9 - 5], al
mov rax, rdi
mul rcx
shr rdx, 9
imul rax, rdx, 0x212
sub rcx, rax
movzx eax, byte [rcx + rsi]
lea rcx, [r8 + 0xc]
xor al, byte [rbx + r9 - 4]
mov byte [r9 - 4], al
mov rax, rdi
mul rcx
shr rdx, 9
imul rax, rdx, 0x212
sub rcx, rax
movzx eax, byte [rcx + rsi]
lea rcx, [r8 + 0xd]
xor al, byte [rbx + r9 - 3]
mov byte [r9 - 3], al
mov rax, rdi
mul rcx
shr rdx, 9
imul rax, rdx, 0x212
sub rcx, rax
movzx eax, byte [rcx + rsi]
xor al, byte [rbx + r9 - 2]
mov byte [r9 - 2], al
cmp r11d, 0xe
jb 0x1400011d0
mov rbx, qword [rsp + 0x30]
mov rax, r10
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret