joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1400785a4
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
xor ebp, ebp
mov rbx, rax
test rax, rax
je 0x14007862b
mov rsi, rbx
cmp word [rax], bp
je 0x1400785ea
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], bp
jne 0x1400785d4
lea rsi, [rsi + rax*2]
add rsi, 2
cmp word [rsi], bp
jne 0x1400785d0
sub rsi, rbx
add rsi, 2
sar rsi, 1
add rsi, rsi
mov rcx, rsi
call fcn.1400722b0
mov rdi, rax
test rax, rax
je 0x140078618
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.1400811e0
mov rbp, rdi
xor ecx, ecx
call fcn.140072274
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov rax, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x14007de50
Capabilities:
Get disk information

Disassembly:
push rbx
sub rsp, 0x30
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x28], rax
cmp ecx, 0x1a
jbe 0x14007de9a
call fcn.14006e954
mov dword [rax], reloc.WS2_32.dll_ntohs
call fcn.14006e974
mov dword [rax], reloc.WS2_32.dll_listen
call fcn.1400653e0
xor eax, eax
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.14000dbb0
add rsp, 0x30
pop rbx
ret
xor ebx, ebx
test ecx, ecx
jne 0x14007dea5
lea eax, [rbx + 1]
jmp 0x14007de87
add cx, 0x40
mov dword [rsp + 0x22], 0x5c003a
mov word [rsp + 0x20], cx
lea rcx, [rsp + 0x20]
mov word [rsp + 0x26], bx
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
test eax, eax
je 0x14007de85
cmp eax, 1
setne bl
mov eax, ebx
jmp 0x14007de87

Function at 0x14007f70c
Capabilities:
Clear file content

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 r12
push r14
push r15
sub rsp, 0x20
mov rbx, rdx
mov rsi, r8
xor edx, edx
mov r14d, ecx
lea r8d, [rdx + 1]
call fcn.1400717c8
xor edx, edx
mov ecx, r14d
mov r12, rax
lea r8d, [rdx + 2]
call fcn.1400717c8
mov rbp, rbx
sub rbp, rax
cmp r12, 0xffffffffffffffff
je 0x14007f85c
cmp rax, 0xffffffffffffffff
je 0x14007f85c
xor edi, edi
test rbp, rbp
jle 0x14007f807
lea edx, [rdi + 1]
mov ecx, 0x1000
call fcn.1400772cc
mov rbx, rax
test rax, rax
jne 0x14007f794
lea edi, [rax + 0xc]
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], edi
jmp 0x14007f7fd
mov edx, 0x8000
mov ecx, r14d
call fcn.14006828c
mov r15d, eax
mov eax, 0x1000
mov r8d, ebp
cmp rbp, rax
mov r9, rsi
mov rdx, rbx
mov ecx, r14d
cmovge r8d, eax
call fcn.140076c88
cmp eax, 0xffffffff
je 0x14007f7dd
cdqe
sub rbp, rax
test rbp, rbp
jg 0x14007f7a4
mov edx, r15d
mov ecx, r14d
call fcn.14006828c
jmp 0x14007f7fd
cmp byte [rsi + 0x38], dil
je 0x14007f7f4
cmp dword [rsi + 0x34], 5
jne 0x14007f7f4
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], reloc.WS2_32.dll_listen
cmp byte [rsi + 0x30], dil
je 0x14007f7fd
mov edi, dword [rsi + 0x2c]
mov rcx, rbx
call fcn.140072274
jmp 0x14007f870
jns 0x14007f870
xor r8d, r8d
mov rdx, rbx
mov ecx, r14d
call fcn.1400717c8
cmp rax, 0xffffffffffffffff
jne 0x14007f828
cmp byte [rsi + 0x30], dil
je 0x14007f870
mov edi, dword [rsi + 0x2c]
jmp 0x14007f870
mov ecx, r14d
call fcn.140078fec
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x14007f870
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [rsi + 0x38], 1
mov edi, reloc.WS2_32.dll_listen
mov dword [rsi + 0x34], eax
mov byte [rsi + 0x30], 1
mov dword [rsi + 0x2c], reloc.WS2_32.dll_listen
jmp 0x14007f870
xor edi, edi
cmp byte [rsi + 0x30], dil
je 0x14007f869
mov eax, dword [rsi + 0x2c]
jmp 0x14007f86e
mov eax, reloc.WLDAP32.dll_Ordinal_22
mov edi, eax
xor r8d, r8d
mov rdx, r12
mov ecx, r14d
call fcn.1400717c8
mov rbx, qword [rsp + 0x40]
mov eax, edi
mov rdi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop r12
ret
Function at 0x140080710
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x140080738
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x140080738
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret

Function at 0x140080c54
Capabilities:
Delete file

Disassembly:
sub rsp, 0x28
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140080c74
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.14006e8e8
or eax, 0xffffffff
jmp 0x140080c76
xor eax, eax
add rsp, 0x28
ret
Function at 0x1400012d0
Capabilities:
Create directory
Query environment variable

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x6b0
mov rax, qword [0x14006b9c0]
xor rax, rsp
mov qword [rsp + 0x6a0], rax
mov rax, rdx
mov rdi, r8
mov rbx, rcx
mov byte [rcx + 8], r9b
xor esi, esi
lea rdx, [rsp + 0x70]
mov qword [rcx], rsi
mov rcx, rax
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea rdx, [rsp + 0x70]
mov r8, rdi
mov rcx, rbx
call fcn.14000b82c
cmp eax, 2
jne 0x1400013b0
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], rsi
lea r9, [rsp + 0x280]
lea r8d, [rsi + 0xa]
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x70]
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], 0x104
call fcn.14000b960
lea r9, [rsp + 0x280]
lea r8, [rsp + 0x50]
lea rcx, [rsp + 0x490]
mov edx, 0x104
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rsi
call fcn.14000bfec
lea rdx, [rsp + 0x490]
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
lea rdx, [rsp + 0x70]
mov r8, rdi
mov rcx, rbx
call fcn.14000b82c
mov rax, rbx
mov rcx, qword [rsp + 0x6a0]
xor rcx, rsp
call fcn.14000b090
add rsp, 0x6b0
pop rdi
pop rsi
pop rbx
ret

Function at 0x140001490
Capabilities:
Print debug messages

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x440
mov rax, qword [0x14006b9c0]
xor rax, rsp
mov qword [rsp + 0x430], rax
mov r14, rcx
mov r12, r8
mov r15, rdx
lea rcx, [rsp + 0x32]
xor edx, edx
mov r8d, 0x3fe
call fcn.14000b0c0
xor r13d, r13d
mov word [rsp + 0x30], r13w
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebp, 0x200
lea r9, str.__TID:__d_
lea rcx, [rsp + 0x30]
mov r8d, ebp
mov edx, ebp
mov dword [rsp + 0x20], eax
call fcn.14000c1f4
mov esi, eax
test eax, eax
jns 0x140001516
mov word [rsp + 0x42e], r13w
mov esi, 0x1ff
movsxd rax, esi
lea rbx, [rsp + 0x30]
mov edi, ebp
lea rbx, [rbx + rax*2]
sub edi, esi
mov rdx, rbx
mov r8d, edi
call fcn.140001880
movsxd rcx, eax
sub edi, eax
add esi, eax
lea rbx, [rbx + rcx*2]
mov r8d, edi
mov rcx, r14
mov rdx, rbx
call fcn.140001780
mov r9, r15
mov qword [rsp + 0x20], r12
sub edi, eax
add esi, eax
cdqe
lea ecx, [rdi - 1]
movsxd rdx, edi
movsxd r8, ecx
lea rcx, [rbx + rax*2]
call fcn.14000a308
test eax, eax
js 0x1400015a2
add esi, eax
cmp esi, 0x1ff
jge 0x1400015a2
movsxd rax, esi
lea ebp, [rsi + 1]
mov ecx, 0xa
mov word [rsp + rax*2 + 0x30], cx
movsxd rax, ebp
add rax, rax
cmp rax, 0x400
jae 0x14000161f
mov word [rsp + rax + 0x30], r13w
jmp 0x1400015ad
mov dword [rsp + 0x42c], 0xa
mov eax, dword [0x14006efa0]
test al, 1
jne 0x1400015cd
or eax, 1
mov dword [0x14006efa0], eax
call fcn.140001bc0
mov dword [0x14006ef8c], eax
jmp 0x1400015d3
mov eax, dword [0x14006ef8c]
cmp eax, 1
jne 0x1400015e5
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x1400015f2
lea rdx, [rsp + 0x30]
mov rcx, r14
call fcn.140001630
mov eax, ebp
mov rcx, qword [rsp + 0x430]
xor rcx, rsp
call fcn.14000b090
mov rbx, qword [rsp + 0x498]
add rsp, 0x440
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.14000c3ec
int3
Function at 0x140001ab0
Capabilities:
Read .ini file

Disassembly:
sub rsp, 0x38
xor eax, eax
mov word [0x14006ed80], ax
mov eax, dword [0x14006ef9c]
test al, 1
jne 0x140001ade
or eax, 1
mov dword [0x14006ef9c], eax
call fcn.140001e20
mov qword [0x14006ed78], rax
jmp 0x140001ae5
mov rax, qword [0x14006ed78]
mov qword [rsp + 0x28], rax
lea r9, [0x14006ed80]
lea r8, str._LocalAppData_TOSHIBAlog.txt
lea rdx, str.LogFile
lea rcx, [0x140027b00]
mov dword [rsp + 0x20], 0x104
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea rax, [0x14006ed80]
add rsp, 0x38
ret

Function at 0x140001b20
Capabilities:
Read .ini file

Disassembly:
sub rsp, 0x28
mov eax, dword [0x14006ed60]
test al, 1
jne 0x140001b83
or eax, 1
mov dword [0x14006ed60], eax
mov eax, dword [0x14006ef9c]
test al, 1
jne 0x140001b58
or eax, 1
mov dword [0x14006ef9c], eax
call fcn.140001e20
mov qword [0x14006ed78], rax
jmp 0x140001b5f
mov rax, qword [0x14006ed78]
lea rdx, str.Level
lea rcx, [0x140027b00]
mov r9, rax
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov ecx, eax
mov dword [0x14006eb08], eax
jmp 0x140001b89
mov ecx, dword [0x14006eb08]
test ecx, ecx
je 0x140001bb5
dec ecx
je 0x140001bab
dec ecx
je 0x140001ba1
dec ecx
jne 0x140001bb5
lea eax, [rcx + 3]
add rsp, 0x28
ret
mov eax, 2
add rsp, 0x28
ret
mov eax, 1
add rsp, 0x28
ret
xor eax, eax
add rsp, 0x28
ret

Function at 0x140001bc0
Capabilities:
Read .ini file

Disassembly:
sub rsp, 0x28
mov eax, dword [0x14006eb2c]
test al, 1
jne 0x140001c23
or eax, 1
mov dword [0x14006eb2c], eax
mov eax, dword [0x14006ef9c]
test al, 1
jne 0x140001bf8
or eax, 1
mov dword [0x14006ef9c], eax
call fcn.140001e20
mov qword [0x14006ed78], rax
jmp 0x140001bff
mov rax, qword [0x14006ed78]
lea rdx, str.Destination
lea rcx, [0x140027b00]
mov r9, rax
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov ecx, eax
mov dword [0x14006eb24], eax
jmp 0x140001c29
mov ecx, dword [0x14006eb24]
test ecx, ecx
je 0x140001c63
dec ecx
je 0x140001c59
dec ecx
je 0x140001c4f
dec ecx
je 0x140001c45
dec ecx
jne 0x140001c63
lea eax, [rcx + 4]
add rsp, 0x28
ret
mov eax, 3
add rsp, 0x28
ret
mov eax, 2
add rsp, 0x28
ret
mov eax, 1
add rsp, 0x28
ret
xor eax, eax
add rsp, 0x28
ret

Function at 0x140001c70
Capabilities:
Read .ini file

Disassembly:
sub rsp, 0x28
mov eax, dword [0x14006ef90]
test al, 1
jne 0x140001cd3
or eax, 1
mov dword [0x14006ef90], eax
mov eax, dword [0x14006ef9c]
test al, 1
jne 0x140001ca8
or eax, 1
mov dword [0x14006ef9c], eax
call fcn.140001e20
mov qword [0x14006ed78], rax
jmp 0x140001caf
mov rax, qword [0x14006ed78]
lea rdx, str.SourceFileFormat
lea rcx, [0x140027b00]
mov r9, rax
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov ecx, eax
mov dword [0x14006ed48], eax
jmp 0x140001cd9
mov ecx, dword [0x14006ed48]
test ecx, ecx
je 0x140001ceb
dec ecx
jne 0x140001ceb
mov eax, 1
add rsp, 0x28
ret
xor eax, eax
add rsp, 0x28
ret
Function at 0x140001d00
Capabilities:
Read .ini file

Disassembly:
sub rsp, 0x28
mov eax, dword [0x14006ef88]
test al, 1
jne 0x140001d64
or eax, 1
mov dword [0x14006ef88], eax
mov eax, dword [0x14006ef9c]
test al, 1
jne 0x140001d38
or eax, 1
mov dword [0x14006ef9c], eax
call fcn.140001e20
mov qword [0x14006ed78], rax
jmp 0x140001d3f
mov rax, qword [0x14006ed78]
lea rdx, str.TimeDateFormat
lea rcx, [0x140027b00]
mov r9, rax
mov r8d, 1
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [0x14006ed64], eax
jmp 0x140001d6a
mov eax, dword [0x14006ed64]
test eax, eax
je 0x140001d98
dec eax
je 0x140001d8e
dec eax
je 0x140001d84
dec eax
jne 0x140001d8e
mov eax, 3
add rsp, 0x28
ret
mov eax, 2
add rsp, 0x28
ret
mov eax, 1
add rsp, 0x28
ret
xor eax, eax
add rsp, 0x28
ret

Function at 0x140001da0
Capabilities:
Read .ini file

Disassembly:
sub rsp, 0x28
mov eax, dword [0x14006ef94]
test al, 1
jne 0x140001e03
or eax, 1
mov dword [0x14006ef94], eax
mov eax, dword [0x14006ef9c]
test al, 1
jne 0x140001dd8
or eax, 1
mov dword [0x14006ef9c], eax
call fcn.140001e20
mov qword [0x14006ed78], rax
jmp 0x140001ddf
mov rax, qword [0x14006ed78]
lea rdx, str.Flush
lea rcx, [0x140027b00]
mov r9, rax
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov ecx, eax
mov dword [0x14006ed68], eax
jmp 0x140001e09
mov ecx, dword [0x14006ed68]
test ecx, ecx
je 0x140001e18
dec ecx
jne 0x140001e18
mov al, 1
add rsp, 0x28
ret
xor al, al
add rsp, 0x28
ret

Function at 0x140002370
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov edi, r8d
mov rsi, rdx
mov rbp, rcx
call qword [sym.imp.KERNEL32.dll_LoadResource]
test rax, rax
jne 0x1400023a3
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov rcx, rax
mov qword [rsp + 0x30], rbx
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rbx, rax
test rax, rax
je 0x1400023e9
mov rdx, rsi
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, eax
add rcx, rbx
and edi, 0xf
jbe 0x1400023e4
nop
cmp rbx, rcx
jae 0x1400023e9
movzx eax, word [rbx]
lea rbx, [rbx + rax*2]
add rbx, 2
dec edi
jne 0x1400023d0
cmp rbx, rcx
jb 0x1400023ed
xor eax, eax
jmp 0x1400023f9
xor eax, eax
cmp word [rbx], ax
cmove rbx, rax
mov rax, rbx
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
Function at 0x140003000
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov dword [rsp + 0x18], r8d
push rbp
push rsi
push rdi
sub rsp, 0x60
mov rdi, rdx
lea rcx, str..pipe_thpsrv
or edx, 0xffffffff
mov rbp, r9
call qword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
jne 0x14000304f
nop word [rax + rax]
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, str..pipe_thpsrv
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
je 0x140003030
mov qword [rsp + 0x30], 0
lea rcx, str..pipe_thpsrv
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140003093
xor eax, eax
add rsp, 0x60
pop rdi
pop rsi
pop rbp
ret
mov qword [rsp + 0x80], rbx
mov qword [rsp + 0x88], r14
mov r14d, 1
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov edx, r14d
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov rbx, rax
test rax, rax
jne 0x1400030d2
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1400031be
xor eax, eax
mov rcx, rbx
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rax
call qword [sym.imp.KERNEL32.dll_ResetEvent]
lea rax, [rsp + 0x40]
lea r9, [rsp + 0x90]
mov r8d, 0xa0
mov rdx, rdi
mov rcx, rsi
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, eax
test eax, eax
jne 0x14000313d
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x1400031aa
or edx, 0xffffffff
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x1400031aa
xor eax, eax
mov rcx, rbx
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rax
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov r9, qword [rsp + 0xa8]
lea rax, [rsp + 0x40]
mov r8d, 0x104
mov rdx, rbp
mov rcx, rsi
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, eax
test eax, eax
jne 0x1400031aa
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x1400031aa
or edx, 0xffffffff
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
cmove edi, r14d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov rbx, qword [rsp + 0x80]
mov r14, qword [rsp + 0x88]
add rsp, 0x60
pop rdi
pop rsi
pop rbp
ret
Function at 0x140003a50
Capabilities:
Persist via windows service
Set registry value

Disassembly:
push rbp
lea rbp, [rsp - 0x50]
sub rsp, 0x150
mov qword [rbp - 0x68], 0xfffffffffffffffe
mov qword [rsp + 0x168], rbx
mov rax, qword [0x14006b9c0]
xor rax, rsp
mov qword [rbp + 0x40], rax
mov dword [rsp + 0x50], ecx
lea r8, str.SetEnableSerializationFlag
mov qword [rsp + 0x68], r8
lea rax, str.ThpsrvLib.cpp
mov qword [rsp + 0x70], rax
mov dword [rsp + 0x78], 0x25c
lea rax, str.__SetEnableSerializationFlag_
mov qword [rbp - 0x80], rax
lea rax, [0x1400278f0]
mov qword [rbp - 0x78], rax
mov dword [rbp - 0x70], 3
lea rdx, str.ENTER__s
lea rcx, [rsp + 0x70]
call fcn.1400013f0
nop
mov eax, dword [0x14006d588]
mov ecx, eax
xor ecx, dword [rsp + 0x50]
and ecx, 1
xor eax, ecx
mov dword [0x14006d588], eax
lea rdx, str.SYSTEMCurrentControlSetServicesDSDHDDProtectService
lea rcx, [rbp - 0x60]
call qword [sym.imp.USER32.dll_wsprintfW]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r9d, 0x20006
xor r8d, r8d
lea rdx, [rbp - 0x60]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
xor ebx, ebx
test eax, eax
jne 0x140003bf3
lea rdx, str.Parameters
lea rcx, [rbp - 0x60]
call qword [sym.imp.USER32.dll_wsprintfW]
mov qword [rsp + 0x40], rbx
lea rax, [rsp + 0x60]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x20006
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp - 0x60]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x140003b7c
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140003bf3
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.EnableSerialization
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, str.SYSTEMCurrentControlSetServicesmsahciController0
call fcn.140004a90
lea rcx, str.SYSTEMCurrentControlSetServices_storahciController0
call fcn.140004a90
lea rcx, str.SYSTEMCurrentControlSetServices_storahciParametersDevice
call fcn.140004a90
mov ebx, 1
mov r8, qword [rsp + 0x68]
lea rdx, str.LEAVE__s
lea rcx, [rsp + 0x70]
call fcn.1400013f0
mov eax, ebx
mov rcx, qword [rbp + 0x40]
xor rcx, rsp
call fcn.14000b090
mov rbx, qword [rsp + 0x168]
add rsp, 0x150
pop rbp
ret
Function at 0x1400041f0
Capabilities:
Query or enumerate registry value

Disassembly:
push rdi
sub rsp, 0xf0
mov rax, qword [0x14006b9c0]
xor rax, rsp
mov qword [rsp + 0xe0], rax
lea rdx, str.SYSTEMCurrentControlSetServicesDSDHDDProtectServiceParameters
lea rcx, [rsp + 0x40]
xor edi, edi
mov dword [rsp + 0x30], edi
call qword [sym.imp.USER32.dll_wsprintfW]
lea rax, [rsp + 0x38]
lea rdx, [rsp + 0x40]
mov r9d, 0x20019
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x140004250
xor eax, eax
jmp 0x1400042a9
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x34]
lea rdx, str.PtlvTabletBatteryMode
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x30]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x100], rbx
mov dword [rsp + 0x34], 4
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x38]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
mov rbx, qword [rsp + 0x100]
sete dil
mov eax, edi
mov rcx, qword [rsp + 0xe0]
xor rcx, rsp
call fcn.14000b090
add rsp, 0xf0
pop rdi
ret
Function at 0x140004a90
Capabilities:
Delete registry value
Set registry value

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rsp - 0x70]
sub rsp, 0x170
mov qword [rbp - 0x48], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x14006b9c0]
xor rax, rsp
mov qword [rbp + 0x60], rax
mov rbx, rcx
lea r8, str.SetNCQStatus
mov qword [rbp - 0x78], r8
lea rsi, str.ThpsrvLib.cpp
mov qword [rbp - 0x70], rsi
mov dword [rbp - 0x68], 0x592
lea r14, str.__SetNCQStatus_
mov qword [rbp - 0x60], r14
lea r15, [0x1400278f0]
mov qword [rbp - 0x58], r15
mov dword [rbp - 0x50], 3
lea rdx, str.ENTER__s
lea rcx, [rbp - 0x70]
call fcn.1400013f0
nop
mov eax, dword [0x14006efc4]
test al, 1
jne 0x140004b34
or eax, 1
mov dword [0x14006efc4], eax
call fcn.140004eb0
mov dword [0x14006efbc], eax
jmp 0x140004b3a
mov eax, dword [0x14006efbc]
mov qword [rsp + 0x58], rsi
mov dword [rsp + 0x60], 0x595
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x70], r15
mov dword [rsp + 0x78], 3
lea rcx, str.true
lea r9, str.false
test eax, eax
cmovne r9, rcx
lea r8, str.bNCQSupportCondition
lea rdx, str._s___s
lea rcx, [rsp + 0x58]
call fcn.1400013f0
cmp dword [0x14006efbc], 1
sete al
test al, al
jne 0x140004bc9
mov qword [rsp + 0x58], rsi
mov dword [rsp + 0x60], 0x596
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x70], r15
xor ebx, ebx
mov dword [rsp + 0x78], ebx
xor r8d, r8d
lea rdx, str.Error_Code:_0x_x
lea rcx, [rsp + 0x58]
call fcn.1400013f0
jmp 0x140004cbd
mov rdx, rbx
lea rcx, [rbp - 0x40]
call qword [sym.imp.USER32.dll_wsprintfW]
xor ebx, ebx
mov qword [rsp + 0x40], rbx
lea rax, [rsp + 0x50]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp - 0x40]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edi, ebx
test eax, eax
setne dil
test edi, edi
jns 0x140004c25
mov dword [rsp + 0x60], 0x5a2
jmp 0x140004c7b
mov eax, dword [0x14006d588]
lea rdx, str.NcqDisabled
mov rcx, qword [rsp + 0x50]
and eax, 1
je 0x140004c61
mov dword [rbp - 0x80], eax
mov dword [rsp + 0x28], 4
lea rax, [rbp - 0x80]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
jmp 0x140004c67
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov edi, ebx
test eax, eax
setne dil
test edi, edi
jns 0x140004ca6
mov dword [rsp + 0x60], 0x5ae
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x70], r15
mov dword [rsp + 0x78], ebx
mov r8d, edi
lea rdx, str.Error_Code:_0x_x
lea rcx, [rsp + 0x58]
call fcn.1400013f0
mov ebx, edi
jmp 0x140004cbd
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
mov r8, qword [rbp - 0x78]
lea rdx, str.LEAVE__s
lea rcx, [rbp - 0x70]
call fcn.1400013f0
mov eax, ebx
mov rcx, qword [rbp + 0x60]
xor rcx, rsp
call fcn.14000b090
lea r11, [rsp + 0x170]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret