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

Disassembly:
mov rax, rsp
push rdi
sub rsp, 0x70
mov qword [rax - 0x48], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x14003a970]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov rdi, rcx
cmp qword [rcx + 0x78], 0
je 0x1400049d5
cmp byte [rcx + 0x82], 0
je 0x1400049d5
mov rax, qword [rcx]
mov ebx, 0xffff
mov edx, ebx
call qword [rax + 0x18]
cmp bx, ax
jne 0x1400048cb
xor al, al
jmp 0x1400049d7
mov qword [rsp + 0x58], 0xf
mov qword [rsp + 0x50], 0
mov byte [rsp + 0x40], 0
xor r8d, r8d
lea edx, [r8 + 8]
lea rcx, [rsp + 0x40]
call fcn.140004c10
nop
lea rdx, [rsp + 0x40]
cmp qword [rsp + 0x58], 0x10
cmovae rdx, qword [rsp + 0x40]
lea r8, [rsp + 0x40]
cmovae r8, qword [rsp + 0x40]
mov rcx, qword [rdi + 0x78]
mov r10, qword [rcx]
mov r9, qword [rsp + 0x50]
add r9, rdx
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
lea rdx, [rdi + 0x84]
call qword [r10 + 0x40]
test eax, eax
je 0x14000493e
dec eax
jne 0x1400049b3
jmp 0x140004945
mov byte [rdi + 0x82], 0
lea rax, [rsp + 0x40]
mov r9, qword [rsp + 0x40]
mov r10, qword [rsp + 0x58]
cmp r10, 0x10
cmovae rax, r9
mov rbx, qword [rsp + 0x38]
sub rbx, rax
je 0x14000498c
lea rcx, [rsp + 0x40]
cmp r10, 0x10
cmovae rcx, r9
mov r9, qword [rdi + 0x90]
mov r8, rbx
mov edx, 1
call fcn.14000ee74
cmp rbx, rax
jne 0x1400049b8
cmp byte [rdi + 0x82], 0
je 0x1400049bc
test rbx, rbx
jne 0x1400048f4
xor r8d, r8d
lea edx, [rbx + 8]
lea rcx, [rsp + 0x40]
call fcn.140004290
jmp 0x1400048f4
sub eax, 2
je 0x1400049bc
xor bl, bl
jmp 0x1400049be
mov bl, 1
cmp qword [rsp + 0x58], 0x10
jb 0x1400049d0
mov rcx, qword [rsp + 0x40]
call fcn.14000c0f0
movzx eax, bl
jmp 0x1400049d7
mov al, 1
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.14000bee0
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret
Function at 0x140006340
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x220
mov rax, qword [0x14003a970]
xor rax, rsp
mov qword [rsp + 0x210], rax
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
xor edx, edx
mov rcx, rax
mov r8d, 0x9c
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
xor edx, edx
mov r8d, 0x9c
mov rcx, rax
mov qword [rbx + 0x58], rax
call fcn.140011480
mov rax, qword [rbx + 0x58]
lea rbp, str.TS_CS_ETW_Monitor
movups xmm0, xmmword [str._K_]
mov dword [rax], 0x9c
mov rax, qword [rbx + 0x58]
lea rcx, [rbx + 0x68]
mov rdx, rbp
movups xmmword [rax + 0x18], xmm0
mov rax, qword [rbx + 0x58]
mov dword [rax + 0x28], 1
mov rax, qword [rbx + 0x58]
mov dword [rax + 0x2c], 0x20000
mov rax, qword [rbx + 0x58]
mov dword [rax + 0x48], 1
mov rax, qword [rbx + 0x58]
mov dword [rax + 0x3c], 1
mov rax, qword [rbx + 0x58]
mov dword [rax + 0x40], 0x100
mov rax, qword [rbx + 0x58]
mov dword [rax + 0x74], 0x78
mov r8, qword [rbx + 0x58]
call qword [sym.imp.ADVAPI32.dll_StartTraceW]
mov rcx, qword [rbx + 8]
xor esi, esi
test eax, eax
jne 0x140006464
test rcx, rcx
je 0x14000642e
lea r9, str.ERROR_SUCCESS
lea r8, str.RegisterPowerETW
xor edx, edx
call fcn.1400025c0
mov r8, qword [rbx + 0x68]
mov qword [rsp + 0x40], rsi
mov dword [rsp + 0x38], esi
mov qword [rsp + 0x30], rsi
lea rcx, [0x140032aa8]
mov r9d, 1
xor edx, edx
mov qword [rsp + 0x28], rsi
mov byte [rsp + 0x20], 4
call qword [sym.imp.ADVAPI32.dll_EnableTraceEx]
jmp 0x140006514
cmp eax, 5
jne 0x14000647e
test rcx, rcx
je 0x140006514
lea r9, str.ERROR_ACCESS_DENIED
jmp 0x140006503
cmp eax, 0xb7
jne 0x1400064f7
test rcx, rcx
je 0x1400064a2
lea r9, str.ERROR_ALREADY_EXISTS
lea r8, str.RegisterPowerETW
mov edx, 1
call fcn.1400025c0
lea rcx, [rsp + 0x50]
xor edx, edx
mov r8d, 0x1c0
call fcn.140011480
lea rax, [0x140006630]
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x1f8], rax
mov qword [rsp + 0x58], rbp
mov dword [rsp + 0x6c], 0x10000100
call qword [sym.imp.ADVAPI32.dll_OpenTraceW]
mov qword [rbx + 0x68], rax
cmp rax, 0xffffffffffffffff
jne 0x140006514
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x140006514
lea r9, str.INVALID_HANDLE_VALUE
jmp 0x140006503
test rcx, rcx
je 0x140006514
lea r9, str.StartTrace_fail
lea r8, str.RegisterPowerETW
mov edx, 2
call fcn.1400025c0
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x140006535
lea r9, [0x1400329a0]
lea r8, str.RegisterPowerETW
mov edx, 2
call fcn.1400025c0
lea r8, [0x140006580]
xor r9d, r9d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], esi
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rbx + 0x60], rax
mov rcx, qword [rsp + 0x210]
xor rcx, rsp
call fcn.14000bee0
lea r11, [rsp + 0x220]
mov rbx, qword [r11 + 0x18]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
Function at 0x140006e40
Capabilities:
Create service
Persist via windows service

Disassembly:
sub rsp, 0x298
mov rax, qword [0x14003a970]
xor rax, rsp
mov qword [rsp + 0x280], rax
lea rdx, [rsp + 0x70]
mov r8d, 0x104
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x140006e9c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.GetModuleFileName_failed_w_err_0x_08lx_n
mov edx, eax
call fcn.14000f8e4
mov rcx, qword [rsp + 0x280]
xor rcx, rsp
call fcn.14000bee0
add rsp, 0x298
ret
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x2a0], rbx
lea r8d, [rdx + 3]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbx, rax
test rax, rax
jne 0x140006ed3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.OpenSCManager_failed_w_err_0x_08lx_n
mov edx, eax
call fcn.14000f8e4
jmp 0x140006fa4
xor ecx, ecx
lea rax, [0x140031e74]
lea r8, str.ACC_Service
mov qword [rsp + 0x60], rcx
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x40], rcx
lea rax, [rsp + 0x70]
mov qword [rsp + 0x38], rax
lea r9d, [rcx + 2]
mov dword [rsp + 0x30], 1
lea rdx, [0x140032d60]
mov rcx, rbx
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x10
mov qword [rsp + 0x290], rdi
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rdi, rax
test rax, rax
jne 0x140006f58
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.CreateService_failed_w_err_0x_08lx_n
mov edx, eax
call fcn.14000f8e4
jmp 0x140006f93
lea rdx, [0x140032d60]
lea rcx, str._s_is_installed._n
call fcn.14000f8e4
mov rcx, rdi
call fcn.140006fd0
test eax, eax
jne 0x140006f8a
lea rdx, [0x140032d60]
lea rcx, str.Set_trigger_start_is_fail._n
call fcn.14000f8e4
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdi, qword [rsp + 0x290]
mov rbx, qword [rsp + 0x2a0]
mov rcx, qword [rsp + 0x280]
xor rcx, rsp
call fcn.14000bee0
add rsp, 0x298
ret

Function at 0x140006fd0
Capabilities:
Modify service

Disassembly:
mov r11, rsp
sub rsp, 0x68
mov rax, qword [0x14003a970]
xor rax, rsp
mov qword [rsp + 0x58], rax
xor eax, eax
lea r8, [r11 - 0x28]
mov edx, 8
mov qword [r11 - 0x44], rax
mov qword [r11 - 0x3c], rax
mov qword [r11 - 0x34], rax
mov dword [rsp + 0x3c], eax
lea rax, [0x140032d38]
mov dword [rsp + 0x20], 0x14
mov dword [rsp + 0x24], 1
mov qword [r11 - 0x40], rax
xor eax, eax
mov qword [r11 - 0x20], rax
mov qword [r11 - 0x18], rax
lea rax, [r11 - 0x48]
mov dword [rsp + 0x40], 1
mov qword [r11 - 0x20], rax
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14000bee0
add rsp, 0x68
ret
Function at 0x140007050
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
push rdi
sub rsp, 0x50
mov rax, qword [0x14003a970]
xor rax, rsp
mov qword [rsp + 0x40], rax
xor eax, eax
xor edx, edx
xor ecx, ecx
lea r8d, [rax + 1]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x38], eax
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
jne 0x1400070b7
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.OpenSCManager_failed_w_err_0x_08lx_n
mov edx, eax
call fcn.14000f8e4
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14000bee0
add rsp, 0x50
pop rdi
ret
lea rdx, [0x140032d60]
mov r8d, 0x10024
mov rcx, rax
mov qword [rsp + 0x60], rbx
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x1400070f3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.OpenService_failed_w_err_0x_08lx_n
mov edx, eax
call fcn.14000f8e4
jmp 0x1400071cb
lea r8, [rsp + 0x20]
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x140007195
lea rdx, [0x140032d60]
lea rcx, str.Stopping__s.
call fcn.14000f8e4
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x140007172
nop
mov eax, dword [rsp + 0x24]
cmp eax, 3
jne 0x140007176
lea rcx, [0x140032358]
call fcn.14000f8e4
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rsp + 0x20]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x140007140
mov eax, dword [rsp + 0x24]
lea rdx, [0x140032d60]
lea rcx, str._n_s_is_stopped._n
cmp eax, 1
je 0x140007190
lea rcx, str._n_s_failed_to_stop._n
call fcn.14000f8e4
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x1400071b8
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.DeleteService_failed_w_err_0x_08lx_n
mov edx, eax
call fcn.14000f8e4
jmp 0x1400071cb
lea rdx, [0x140032d60]
lea rcx, str._s_is_removed._n
call fcn.14000f8e4
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test rbx, rbx
je 0x1400071e2
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14000bee0
add rsp, 0x50
pop rdi
ret
Function at 0x140007810
Capabilities:
Enumerate processes

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x280
mov rax, qword [0x14003a970]
xor rax, rsp
mov qword [rsp + 0x270], rax
mov rsi, rdx
mov edi, ecx
lea rdx, [rsp + 0x30]
mov rcx, r8
mov rbx, r8
mov dword [rsp + 0x30], 0x238
call qword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x1400078ae
mov qword [rsp + 0x2a0], rbp
xor ebp, ebp
nop dword [rax]
lea rdx, str.winlogon.exe
lea rcx, [rsp + 0x5c]
call fcn.14000f990
test eax, eax
jne 0x140007892
mov ecx, dword [rsp + 0x38]
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], ebp
call qword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x140007892
cmp dword [rsp + 0x20], edi
je 0x1400078c9
lea rdx, [rsp + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x140007860
xor eax, eax
mov rbp, qword [rsp + 0x2a0]
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.14000bee0
add rsp, 0x280
pop rdi
pop rsi
pop rbx
ret
mov r8d, dword [rsp + 0x38]
test r8d, r8d
je 0x1400078a4
xor edx, edx
mov ecx, 0x2000000
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov r8, rsi
mov edx, 2
mov rcx, rax
mov rdi, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x1400078a4
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
jmp 0x1400078a6
Function at 0x140009990
Capabilities:
Write file on windows

Disassembly:
mov r11, rsp
mov dword [r11 + 0x18], r8d
mov qword [r11 + 0x20], r9
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x58
mov rax, qword [0x14003a970]
xor rax, rsp
mov qword [rsp + 0x40], rax
lea r15, [r11 + 0x20]
mov r13, rcx
mov edi, edx
lea rcx, [r11 - 0x68]
mov rdx, r15
mov ebx, r8d
call fcn.14000fcf0
mov esi, 3
mov ebp, esi
test ebx, ebx
je 0x140009a0a
mov rcx, qword [rsp + 0x30]
mov edx, ebx
nop dword [rax]
nop dword [rax + rax]
add rcx, 8
add ebp, 4
mov qword [rsp + 0x30], rcx
mov eax, dword [rcx - 8]
add rcx, 8
add ebp, eax
dec rdx
jne 0x1400099f0
xor r12d, r12d
mov ecx, ebp
mov qword [rsp + 0x30], r12
call fcn.14000be54
mov word [rax], di
mov byte [rax + 2], bl
mov r14, rax
test ebx, ebx
je 0x140009a57
lea rdi, [r15 - 8]
mov r15, rbx
nop dword [rax]
mov ebx, dword [rdi + 8]
mov eax, esi
lea rdi, [rdi + 0x10]
mov dword [rax + r14], ebx
mov rdx, qword [rdi]
add esi, 4
mov ecx, esi
mov r8d, ebx
add rcx, r14
call fcn.14000c110
add esi, ebx
dec r15
jne 0x140009a30
mov rcx, qword [r13 + 0x28]
lea r9, [rsp + 0x38]
mov r8d, ebp
mov rdx, r14
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140009a7b
cmp ebp, dword [rsp + 0x38]
je 0x140009a84
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r12d, eax
mov rcx, r14
call fcn.14000fb28
mov eax, r12d
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.14000bee0
add rsp, 0x58
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x140009ab0
Capabilities:
Create pipe

Disassembly:
mov rax, rsp
push rbp
lea rbp, [rax - 0x47]
sub rsp, 0x90
mov qword [rbp + 0xf], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rdi
mov rax, qword [0x14003a970]
xor rax, rsp
mov qword [rbp + 0x37], rax
mov rbx, rcx
mov qword [rbp + 7], rcx
mov qword [rcx + 0x18], 7
xor edi, edi
mov qword [rcx + 0x10], rdi
mov word [rcx], di
lea r8d, [rdi + 9]
lea rdx, str..pipe_
call fcn.140008ec0
nop
mov qword [rbx + 0x20], rdi
mov qword [rbx + 0x28], rdi
movzx eax, word [str.treadstone_service_LightMode]
neg ax
sbb r8, r8
and r8d, 0x1c
lea rdx, str.treadstone_service_LightMode
mov rcx, rbx
call fcn.140008d50
mov dword [rbx + 0x20], 3
mov dword [rbx + 0x24], 6
lea ecx, [rdi + 0x28]
call fcn.14000fcf4
mov rdi, rax
test rax, rax
jne 0x140009b80
lea rax, str.Allocation_failed.
mov qword [rbp + 0x17], rax
lea rdx, [rbp + 0x17]
lea rcx, [rbp - 0x11]
call fcn.14000bf50
lea rax, vtable.std::runtime_error.0
mov qword [rbp - 0x11], rax
lea rdx, [0x140037f90]
lea rcx, [rbp - 0x11]
call fcn.140010478
int3
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x140009bc6
lea rax, str.SD_initialization_failed.
mov qword [rbp + 0x17], rax
lea rdx, [rbp + 0x17]
lea rcx, [rbp - 0x11]
call fcn.14000bf50
lea rax, vtable.std::runtime_error.0
mov qword [rbp - 0x11], rax
lea rdx, [0x140037f90]
lea rcx, [rbp - 0x11]
call fcn.140010478
int3
mov dword [rbp + 0x1f], 0x18
mov dword [rbp + 0x2f], 1
mov qword [rbp + 0x27], rdi
lea rax, [rbp + 0x1f]
test rax, rax
je 0x140009c94
xor r9d, r9d
lea r8, [rbp + 0x27]
lea edx, [r9 + 1]
lea rcx, str.D:_A_OICI_GA___BG__D_OICI_GA___AN__A_OICI_GRGWGX___AU__A_OICI_GA___BA_
call qword [sym.imp.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW]
test eax, eax
je 0x140009c94
cmp qword [rbx + 0x18], 8
jb 0x140009c11
mov rcx, qword [rbx]
jmp 0x140009c14
mov rcx, rbx
lea rax, [rbp + 0x1f]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0x3e8
mov dword [rsp + 0x28], 0x200
mov dword [rsp + 0x20], 0x200
mov r9d, 0xff
mov r8d, dword [rbx + 0x24]
mov edx, dword [rbx + 0x20]
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov qword [rbx + 0x28], rax
mov rcx, rdi
call fcn.14000c700
cmp qword [rbx + 0x28], 0xffffffffffffffff
jne 0x140009c8f
lea rax, str.Named_pipe_creation_failed.
mov qword [rbp + 0x17], rax
lea rdx, [rbp + 0x17]
lea rcx, [rbp - 0x11]
call fcn.14000bf50
lea rax, vtable.std::runtime_error.0
mov qword [rbp - 0x11], rax
lea rdx, [0x140037f90]
lea rcx, [rbp - 0x11]
call fcn.140010478
nop
mov rax, rbx
jmp 0x140009cc8
lea rax, str.DACL_creation_failed.
mov qword [rbp + 0x17], rax
lea rdx, [rbp + 0x17]
lea rcx, [rbp - 0x11]
call fcn.14000bf50
lea rax, vtable.std::runtime_error.0
mov qword [rbp - 0x11], rax
lea rdx, [0x140037f90]
lea rcx, [rbp - 0x11]
call fcn.140010478
nop
mov rcx, qword [rbp + 0x37]
xor rcx, rsp
call fcn.14000bee0
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret
Function at 0x140009cf0
Capabilities:
Set registry value

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x60
mov rax, qword [0x14003a970]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov r14, qword [rsp + 0xb0]
lea rax, [rsp + 0x50]
mov ebp, r9d
mov rsi, r8
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rdi, rdx
mov rbx, rcx
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140009d4a
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x140009d91
xor ecx, ecx
lea rax, [rsp + 0x50]
xor r9d, r9d
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], ecx
xor r8d, r8d
mov rcx, rbx
mov rdx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x140009db3
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x140009db3
mov eax, dword [rsp + 0xb8]
mov r9d, ebp
mov r8, rsi
mov dword [rsp + 0x28], eax
mov rdx, rdi
mov rcx, rbx
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_RegSetKeyValueW]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14000bee0
add rsp, 0x60
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret

Function at 0x140009dd0
Capabilities:
Query or enumerate 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, 0x40
mov r14, qword [rsp + 0x88]
mov r15, qword [rsp + 0x80]
mov ebx, r9d
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], r15
mov rdi, r8
mov qword [rsp + 0x20], 0
mov rsi, rdx
mov rbp, rcx
call qword [sym.imp.ADVAPI32.dll_RegGetValueW]
test eax, eax
je 0x140009e97
cmp ebx, 0xffff
je 0x140009e97
mov rcx, qword [rsp + 0x90]
test rcx, rcx
je 0x140009e97
cmp ebx, 2
je 0x140009e4a
mov r9d, 4
cmp ebx, 0x10
cmovne r9d, ebx
jmp 0x140009e50
mov r9d, 1
mov eax, dword [rsp + 0x98]
mov r8, rdi
mov rdx, rsi
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
mov rcx, rbp
call fcn.140009cf0
test eax, eax
jne 0x140009e97
mov qword [rsp + 0x30], r14
mov r9d, ebx
mov r8, rdi
mov rdx, rsi
mov rcx, rbp
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_RegGetValueW]
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x40
pop r15
pop r14
pop rdi
ret
Function at 0x140009fa0
Capabilities:
Delete registry key

Disassembly:
push rdi
sub rsp, 0x50
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x68], rbx
mov rax, qword [0x14003a970]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov rbx, rcx
call fcn.14000a3f0
mov rdi, rax
test rax, rax
jne 0x140009fd8
lea eax, [rdi + 2]
jmp 0x14000a028
mov rdx, rbx
lea rcx, [rsp + 0x28]
call fcn.14000a7c0
nop
lea rdx, [rsp + 0x28]
cmp qword [rsp + 0x40], 8
cmovae rdx, qword [rsp + 0x28]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegDeleteTreeW]
mov edi, eax
cmp eax, 5
jne 0x14000a014
mov rdx, rbx
lea ecx, [rax - 3]
call fcn.14000a8e0
mov edi, eax
cmp qword [rsp + 0x40], 8
jb 0x14000a026
mov rcx, qword [rsp + 0x28]
call fcn.14000c0f0
mov eax, edi
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.14000bee0
mov rbx, qword [rsp + 0x68]
add rsp, 0x50
pop rdi
ret

Function at 0x14000a120
Capabilities:
Delete registry value

Disassembly:
push rdi
sub rsp, 0x50
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rsi
mov rax, qword [0x14003a970]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov rsi, rdx
mov rdi, rcx
call fcn.14000a3f0
mov rbx, rax
test rax, rax
jne 0x14000a160
lea eax, [rbx + 2]
jmp 0x14000a1b3
mov rdx, rdi
lea rcx, [rsp + 0x28]
call fcn.14000a7c0
nop
lea rdx, [rsp + 0x28]
cmp qword [rsp + 0x40], 8
cmovae rdx, qword [rsp + 0x28]
mov r8, rsi
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyValueW]
mov ebx, eax
cmp eax, 5
jne 0x14000a19f
mov r8, rsi
mov rdx, rdi
call fcn.14000aa30
mov ebx, eax
cmp qword [rsp + 0x40], 8
jb 0x14000a1b1
mov rcx, qword [rsp + 0x28]
call fcn.14000c0f0
mov eax, ebx
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.14000bee0
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
add rsp, 0x50
pop rdi
ret
Function at 0x14000a8e0
Capabilities:
Read file on windows

Disassembly:
mov r11, rsp
push rdi
sub rsp, 0x90
mov qword [r11 - 0x68], 0xfffffffffffffffe
mov qword [r11 + 8], rbx
mov rax, qword [0x14003a970]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov rbx, rdx
mov edi, ecx
xor eax, eax
mov qword [r11 - 0x58], rax
mov qword [r11 - 0x50], rax
mov qword [r11 - 0x48], rax
mov qword [r11 - 0x40], rax
mov qword [r11 - 0x38], rax
mov qword [r11 - 0x30], rax
lea r8, str.treadstone_service_LightMode
lea rcx, [r11 - 0x58]
call fcn.1400096f0
nop
lea rcx, [rsp + 0x40]
call fcn.1400098c0
test rbx, rbx
jne 0x14000a94c
xor eax, eax
jmp 0x14000a959
mov edx, 0xff
mov rcx, rbx
call fcn.14000fdac
lea r9, [rax*2 + 2]
mov qword [rsp + 0x20], rbx
mov r8d, 1
mov edx, edi
lea rcx, [rsp + 0x40]
call fcn.140009990
mov ebx, eax
test eax, eax
jne 0x14000a9b6
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x38]
lea r8d, [rax + 9]
lea rdx, [rsp + 0x70]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14000a9aa
cmp dword [rsp + 0x38], ebx
jne 0x14000a9bd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
je 0x14000a9bd
mov rcx, qword [rsp + 0x68]
jmp 0x14000a9d8
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x14000a9d4
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ecx, ecx
mov qword [rsp + 0x68], rcx
mov ebx, dword [rsp + 0x75]
test rcx, rcx
je 0x14000a9ec
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x68], 0
cmp qword [rsp + 0x58], 8
jb 0x14000a9fe
mov rcx, qword [rsp + 0x40]
call fcn.14000c0f0
mov eax, ebx
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.14000bee0
mov rbx, qword [rsp + 0xa0]
add rsp, 0x90
pop rdi
ret
Function at 0x14000abb0
Capabilities:
Read file on windows

Disassembly:
mov r11, rsp
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0xc0
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov rax, qword [0x14003a970]
xor rax, rsp
mov qword [rsp + 0xb8], rax
mov rbx, r8
mov rdi, rdx
mov ebp, ecx
mov dword [r11 - 0x80], r9d
mov r14, qword [rsp + 0x110]
xor eax, eax
mov qword [r11 - 0x70], rax
mov qword [r11 - 0x68], rax
mov qword [r11 - 0x60], rax
mov qword [r11 - 0x58], rax
mov qword [r11 - 0x50], rax
mov qword [r11 - 0x48], rax
lea r8, str.treadstone_service_LightMode
lea rcx, [r11 - 0x70]
call fcn.1400096f0
nop
lea rcx, [rsp + 0x78]
call fcn.1400098c0
test rdi, rdi
jne 0x14000ac2d
xor eax, eax
jmp 0x14000ac3a
mov edx, 0xff
mov rcx, rdi
call fcn.14000fdac
lea rsi, [rax*2 + 2]
test rbx, rbx
jne 0x14000ac4b
xor eax, eax
jmp 0x14000ac58
mov edx, 0xff
mov rcx, rbx
call fcn.14000fdac
lea rcx, [rax*2 + 2]
mov qword [rsp + 0x50], r14
mov eax, dword [rsp + 0x118]
mov dword [rsp + 0x48], eax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], 4
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rdi
mov r9, rsi
mov r8d, 4
mov edx, ebp
lea rcx, [rsp + 0x78]
call fcn.140009990
mov ebx, eax
test eax, eax
jne 0x14000aceb
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x70]
lea r8d, [rax + 9]
lea rdx, [rsp + 0xa8]
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14000acdf
cmp dword [rsp + 0x70], ebx
jne 0x14000acf5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
je 0x14000acf5
mov rcx, qword [rsp + 0xa0]
jmp 0x14000ad19
mov rcx, qword [rsp + 0xa0]
test rcx, rcx
je 0x14000ad12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ecx, ecx
mov qword [rsp + 0xa0], rcx
mov ebx, dword [rsp + 0xad]
test rcx, rcx
je 0x14000ad30
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0xa0], 0
cmp qword [rsp + 0x90], 8
jb 0x14000ad45
mov rcx, qword [rsp + 0x78]
call fcn.14000c0f0
mov eax, ebx
mov rcx, qword [rsp + 0xb8]
xor rcx, rsp
call fcn.14000bee0
add rsp, 0xc0
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret