joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140025e80
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
sub rsp, 0x40
mov rbx, rdx
mov rdi, rcx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rdi + 0x30], rax
test rax, rax
jne 0x140025ecd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
mov rbx, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x58], rsi
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rdi + 0x38], rax
test rax, rax
jne 0x140025f1e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rdi + 0x30]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
mov rcx, rdi
mov qword [rdi + 0x30], rsi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rsi, qword [rsp + 0x58]
mov eax, ebx
mov rbx, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
lea rax, [rsp + 0x60]
lea r8, [0x140025ce0]
xor esi, esi
mov qword [rsp + 0x28], rax
mov r9, rbx
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], esi
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov r11, rax
mov qword [rdi + 0x28], rax
test rax, rax
jne 0x140025f8d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rdi + 0x30]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rdi + 0x38]
mov qword [rdi + 0x30], rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
mov qword [rdi + 0x38], rsi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rsi, qword [rsp + 0x58]
mov eax, ebx
mov rbx, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
mov rax, qword [rdi + 0x30]
xor r8d, r8d
lea rdx, [rsp + 0x30]
lea ecx, [r8 + 2]
or r9d, 0xffffffff
mov qword [rsp + 0x38], r11
mov qword [rsp + 0x30], rax
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
je 0x14002600d
mov rcx, qword [rdi + 0x28]
lea rdx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetExitCodeThread]
mov rcx, qword [rdi + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rdi + 0x38]
mov qword [rdi + 0x30], rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rdi + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [rsp + 0x50]
mov rcx, rdi
mov qword [rdi + 0x38], rsi
mov qword [rdi + 0x28], rsi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rsi, qword [rsp + 0x58]
mov eax, ebx
mov rbx, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
mov rcx, qword [rdi + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
mov qword [rdi + 0x30], rsi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rsi, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x68]
xor eax, eax
add rsp, 0x40
pop rdi
ret
Function at 0x140039d60
Capabilities:
Access the windows event log

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x50
mov esi, edx
movzx ebp, cx
lea rdx, str.waudit
xor ecx, ecx
mov rbx, r8
call qword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov rdi, rax
test rax, rax
je 0x140039dec
cmp qword [rbx + 0x18], 8
jb 0x140039da4
mov rax, qword [rbx]
mov qword [rsp + 0x78], rax
jmp 0x140039da9
mov qword [rsp + 0x78], rbx
xor ecx, ecx
mov edx, 1
lea rax, [rsp + 0x78]
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], ecx
mov word [rsp + 0x28], dx
mov qword [rsp + 0x20], rcx
xor r8d, r8d
mov rcx, rdi
mov r9d, esi
movzx edx, bp
call qword [sym.imp.ADVAPI32.dll_ReportEventW]
mov rcx, rdi
test eax, eax
jne 0x140039e00
call qword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x140039e08
movzx eax, ax
or eax, 0x80070000
jmp 0x140039e08
call qword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
xor eax, eax
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
ret

Function at 0x14003a6d0
Capabilities:
Initialize winsock library

Disassembly:
mov r11, rsp
push rbx
sub rsp, 0x260
mov rax, qword [0x1400f4d50]
xor rax, rsp
mov qword [rsp + 0x220], rax
mov qword [r11 - 0x10], rbp
mov qword [r11 - 0x18], rsi
mov rsi, rdx
mov rbx, rcx
mov qword [r11 - 0x20], rdi
mov qword [r11 - 0x28], r12
lea rdx, [r11 - 0x1e8]
mov ecx, 0x202
mov r12d, r9d
mov rbp, r8
call qword [sym.imp.WS2_32.dll_WSAStartup]
mov edx, 0x191
xor ecx, ecx
call fcn.14006aae0
movzx edi, al
test al, al
jne 0x14003a7ea
mov qword [rsp + 0x238], r13
xor r13d, r13d
lea rdx, str.main.cpp
lea rcx, [rsp + 0x58]
lea r8d, [r13 + 8]
mov qword [rsp + 0x70], 7
mov qword [rsp + 0x68], r13
mov word [rsp + 0x58], r13w
call fcn.140002510
lea r8d, [r13 + 0x17]
lea rdx, [0x1400c1078]
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x48], 7
mov qword [rsp + 0x40], r13
mov word [rsp + 0x30], r13w
call fcn.140002510
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r9d, [r13 + 0x1f]
lea r8, [rsp + 0x58]
lea rcx, [rsp + 0x30]
mov edx, eax
call fcn.14003a410
cmp qword [rsp + 0x48], 8
jb 0x14003a7bc
mov rcx, qword [rsp + 0x30]
call fcn.140095520
cmp qword [rsp + 0x70], 8
mov qword [rsp + 0x40], r13
mov word [rsp + 0x30], r13w
mov r13, qword [rsp + 0x238]
mov qword [rsp + 0x48], 7
jb 0x14003a7ea
mov rcx, qword [rsp + 0x58]
call fcn.140095520
call fcn.140039f10
mov r9, rbp
mov r8, rsi
mov rdx, rbx
mov rcx, rax
mov dword [rsp + 0x20], r12d
call fcn.14003c5e0
mov r12, qword [rsp + 0x240]
mov rsi, qword [rsp + 0x250]
mov rbp, qword [rsp + 0x258]
test edi, edi
mov rdi, qword [rsp + 0x248]
mov ebx, eax
je 0x14003a830
call fcn.14006abb0
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, ebx
mov rcx, qword [rsp + 0x220]
xor rcx, rsp
call fcn.1400959a0
add rsp, 0x260
pop rbx
ret
Function at 0x14003b730
Capabilities:
Create service
Modify service
Persist via windows service

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x2a0
mov rax, qword [0x1400f4d50]
xor rax, rsp
mov qword [rsp + 0x290], rax
xor edx, edx
mov rdi, rcx
xor ecx, ecx
lea r8d, [rdx + 2]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbx, rax
test rax, rax
je 0x14003b835
lea rdx, [rsp + 0x80]
mov r8d, 0x105
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x14003b82c
mov rax, qword [rdi + 0x68]
lea rdx, [rdi + 0x50]
cmp rax, 8
jb 0x14003b79d
mov r8, qword [rdx]
jmp 0x14003b7a0
mov r8, rdx
cmp rax, 8
jb 0x14003b7a9
mov rdx, qword [rdx]
xor ecx, ecx
lea rax, [rsp + 0x80]
mov r9d, 0xf01ff
mov qword [rsp + 0x60], rcx
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], ecx
mov rcx, rbx
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], reloc.WS2_32.dll_recv
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rdi, rax
test rax, rax
je 0x14003b826
lea rax, str.Information_collection_and_interprocess_communication_client
lea r8, [rsp + 0x70]
mov edx, 1
mov rcx, rdi
mov qword [rsp + 0x70], rax
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14003b82c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [rsp + 0x290]
xor rcx, rsp
call fcn.1400959a0
mov rbx, qword [rsp + 0x2b8]
add rsp, 0x2a0
pop rdi
ret

Function at 0x14003b860
Capabilities:
Delete service
Query service status

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x50
mov rax, qword [0x1400f4d50]
xor rax, rsp
mov qword [rsp + 0x40], rax
xor edx, edx
mov rbx, rcx
xor ecx, ecx
lea r8d, [rdx + 1]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
je 0x14003b8eb
cmp qword [rbx + 0x68], 8
lea rdx, [rbx + 0x50]
jb 0x14003b8a0
mov rdx, qword [rdx]
mov r8d, 0x10004
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
je 0x14003b8e2
lea rdx, [rsp + 0x20]
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x14003b8d9
cmp dword [rsp + 0x24], 1
jne 0x14003b8d9
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.1400959a0
mov rbx, qword [rsp + 0x68]
add rsp, 0x50
pop rdi
ret
Function at 0x14003e210
Capabilities:
Identify system language via api

Disassembly:
mov r11, rsp
push rdi
sub rsp, 0x60
mov qword [rsp + 0x28], 0xfffffffffffffffe
mov qword [r11 + 0x18], rbx
mov qword [r11 + 0x20], rsi
mov rax, qword [0x1400f4d50]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov rbx, rdx
mov rdi, rcx
mov qword [r11 - 0x48], rcx
mov qword [r11 - 0x20], 0xf
xor esi, esi
mov qword [r11 - 0x28], rsi
mov byte [rsp + 0x30], sil
lea r8d, [rsi + 0x10]
lea rdx, str.CNtServiceModule
lea rcx, [r11 - 0x38]
call fcn.140007a00
nop
mov qword [rdi + 0x18], reloc.WS2_32.dll_ntohs
mov qword [rdi + 0x10], rsi
mov byte [rdi], sil
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rsp + 0x30]
mov rcx, rdi
call fcn.140002a50
nop
cmp qword [rsp + 0x48], 0x10
jb 0x14003e2a0
mov rcx, qword [rsp + 0x30]
call fcn.140095520
lea rcx, [rdi + 0x28]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
nop
lea rcx, [rdi + 0x50]
mov qword [rcx + 0x18], 7
mov qword [rcx + 0x10], rsi
mov word [rcx], si
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rbx
call fcn.1400023e0
nop
mov qword [rdi + 0x98], rsi
mov dword [rdi + 0xa0], esi
xor eax, eax
mov qword [rdi + 0x78], rax
mov qword [rdi + 0x80], rax
mov qword [rdi + 0x88], rax
mov dword [rdi + 0x90], eax
call qword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
and al, 0x3f
cmp al, 9
je 0x14003e336
lea rcx, [rsp + 0x30]
call fcn.14003ca10
mov rbx, rax
call fcn.14003af50
mov rcx, rax
mov rdx, rbx
call fcn.14003d970
nop
cmp qword [rsp + 0x48], 8
jb 0x14003e334
mov rcx, qword [rsp + 0x30]
call fcn.140095520
nop
jmp 0x14003e336
jmp 0x14003e336
mov rax, rdi
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1400959a0
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
Function at 0x140040550
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov qword [rcx], r8
mov qword [rcx + 8], rdx
mov eax, dword [r9]
mov dword [rcx + 0x10], eax
mov eax, dword [r9 + 4]
xor edi, edi
mov dword [rcx + 0x14], eax
mov eax, dword [r9 + 8]
mov rbx, rcx
mov dword [rcx + 0x18], eax
mov eax, dword [r9 + 0xc]
mov dword [rcx + 0x1c], eax
mov eax, dword [r9 + 0x10]
mov dword [rcx + 0x20], eax
movzx eax, word [r9 + 0x14]
mov word [rcx + 0x24], ax
mov eax, dword [r9 + 0x18]
mov dword [rcx + 0x28], eax
mov eax, dword [r9 + 0x1c]
mov dword [rcx + 0x2c], eax
mov eax, dword [r9 + 0x20]
mov dword [rcx + 0x30], eax
mov eax, dword [r9 + 0x24]
mov dword [rcx + 0x34], eax
mov eax, dword [r9 + 0x28]
mov dword [rcx + 0x38], eax
movzx eax, word [r9 + 0x2c]
mov word [rcx + 0x3c], ax
mov eax, dword [r9 + 0x30]
mov dword [rcx + 0x40], eax
xor eax, eax
mov qword [rcx + 0x50], rdi
mov qword [rcx + 0x58], rdi
mov dword [rcx + 0x48], eax
mov word [rcx + 0x4c], ax
mov rcx, qword [rcx + 0x50]
test rcx, rcx
je 0x1400405e7
call fcn.14009667c
mov qword [rbx + 0x50], rdi
mov qword [rbx + 0x58], rdi
mov qword [rbx + 0x60], rdi
xor eax, eax
mov qword [rbx + 0x70], rdi
mov qword [rbx + 0x78], rdi
mov dword [rbx + 0x68], eax
mov word [rbx + 0x6c], ax
mov rcx, qword [rbx + 0x70]
test rcx, rcx
je 0x140040612
call fcn.14009667c
mov qword [rbx + 0x70], rdi
mov qword [rbx + 0x78], rdi
mov qword [rbx + 0x80], rdi
mov qword [rbx + 0xa0], reloc.WS2_32.dll_ntohs
mov qword [rbx + 0x98], rdi
mov rax, rbx
mov byte [rbx + 0x88], dil
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x14004c1c0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov qword [rcx], r8
mov qword [rcx + 8], rdx
mov eax, dword [r9]
mov dword [rcx + 0x10], eax
mov eax, dword [r9 + 4]
xor edi, edi
mov dword [rcx + 0x14], eax
mov eax, dword [r9 + 8]
mov rbx, rcx
mov dword [rcx + 0x18], eax
mov eax, dword [r9 + 0xc]
mov dword [rcx + 0x1c], eax
mov eax, dword [r9 + 0x10]
mov dword [rcx + 0x20], eax
movzx eax, word [r9 + 0x14]
mov word [rcx + 0x24], ax
mov eax, dword [r9 + 0x18]
mov dword [rcx + 0x28], eax
mov eax, dword [r9 + 0x1c]
mov dword [rcx + 0x2c], eax
mov eax, dword [r9 + 0x20]
mov dword [rcx + 0x30], eax
mov eax, dword [r9 + 0x24]
mov dword [rcx + 0x34], eax
mov eax, dword [r9 + 0x28]
mov dword [rcx + 0x38], eax
movzx eax, word [r9 + 0x2c]
mov word [rcx + 0x3c], ax
mov eax, dword [r9 + 0x30]
mov dword [rcx + 0x40], eax
xor eax, eax
mov qword [rcx + 0x60], rdi
mov qword [rcx + 0x68], rdi
mov qword [rcx + 0x48], rax
mov qword [rcx + 0x50], rax
mov dword [rcx + 0x58], eax
mov rcx, qword [rcx + 0x60]
test rcx, rcx
je 0x14004c25b
call fcn.14009667c
mov qword [rbx + 0x60], rdi
mov qword [rbx + 0x68], rdi
mov qword [rbx + 0x70], rdi
xor eax, eax
mov qword [rbx + 0x90], rdi
mov qword [rbx + 0x98], rdi
mov qword [rbx + 0x78], rax
mov qword [rbx + 0x80], rax
mov dword [rbx + 0x88], eax
mov rcx, qword [rbx + 0x90]
test rcx, rcx
je 0x14004c29c
call fcn.14009667c
mov qword [rbx + 0x90], rdi
mov qword [rbx + 0x98], rdi
mov rax, rbx
mov qword [rbx + 0xa0], rdi
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x140050190
Capabilities:
Acquire debug privileges

Disassembly:
sub rsp, 0x58
mov rax, qword [0x1400f4d50]
xor rax, rsp
mov qword [rsp + 0x48], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x30]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x1400501e3
lea r8, [rsp + 0x3c]
lea rdx, str.SeDebugPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov rcx, qword [rsp + 0x30]
test eax, eax
jne 0x1400501fb
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1400959a0
add rsp, 0x58
ret
xor eax, eax
lea r8, [rsp + 0x38]
xor r9d, r9d
mov qword [rsp + 0x28], rax
xor edx, edx
mov dword [rsp + 0x38], 1
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x44], 2
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov rcx, qword [rsp + 0x30]
test eax, eax
je 0x1400501dd
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.1400959a0
add rsp, 0x58
ret

Function at 0x140050560
Capabilities:
Enumerate process modules

Disassembly:
push rbx
push rsi
push rdi
mov eax, 0x1040
call fcn.140096530
sub rsp, rax
mov rax, qword [0x1400f4d50]
xor rax, rsp
mov qword [rsp + 0x1030], rax
mov rax, qword [rcx]
mov rdi, rcx
xor esi, esi
mov rcx, qword [rax]
mov qword [rax], rax
mov rax, qword [rdi]
mov qword [rax + 8], rax
mov qword [rdi + 8], rsi
cmp rcx, qword [rdi]
je 0x1400505b1
mov rbx, qword [rcx]
call fcn.140095520
mov rcx, rbx
cmp rbx, qword [rdi]
jne 0x1400505a1
lea r8, [rsp + 0x20]
lea rcx, [rsp + 0x30]
mov edx, 0x1000
call sub.PSAPI.DLL_EnumProcesses
test eax, eax
jne 0x1400505d4
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140050654
mov ebx, dword [rsp + 0x20]
mov qword [rsp + 0x1068], rbp
mov qword [rsp + 0x1070], r12
shr ebx, 2
test ebx, ebx
je 0x140050642
movabs r12, 0x3ffffffffffffffe
nop dword [rax]
mov rbp, qword [rdi]
mov eax, esi
mov rcx, rdi
mov r8, qword [rbp + 8]
lea r9, [rsp + rax*4 + 0x30]
mov rdx, rbp
call fcn.1400503e0
mov rdx, qword [rdi + 8]
mov rcx, r12
sub rcx, rdx
cmp rcx, 1
jb 0x14005066f
lea rcx, [rdx + 1]
inc esi
mov qword [rdi + 8], rcx
mov qword [rbp + 8], rax
mov rcx, qword [rax + 8]
mov qword [rcx], rax
cmp esi, ebx
jb 0x140050600
mov rbp, qword [rsp + 0x1068]
mov r12, qword [rsp + 0x1070]
xor eax, eax
mov rcx, qword [rsp + 0x1030]
xor rcx, rsp
call fcn.1400959a0
add rsp, 0x1040
pop rdi
pop rsi
pop rbx
ret
lea rcx, str.list_T__too_long
call fcn.140075718
int3
Function at 0x1400548b0
Capabilities:
Create thread

Disassembly:
push rdi
sub rsp, 0x70
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rsp + 0x90], rbx
mov rax, qword [0x1400f4d50]
xor rax, rsp
mov qword [rsp + 0x68], rax
mov rdi, rcx
mov qword [rcx + 0x58], r8
mov r8, rdx
lea rdx, str..pipe_
lea rcx, [rsp + 0x40]
call fcn.14000a460
nop
lea rcx, [rdi + 0x30]
mov rdx, rax
call fcn.140002c40
nop
cmp qword [rsp + 0x58], 8
jb 0x140054911
mov rcx, qword [rsp + 0x40]
call fcn.140095520
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rdi + 0x60], rax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
mov r9, rdi
lea r8, [0x140054880]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rdi + 0x68], rax
test rax, rax
jne 0x140054974
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rdi + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 0x60], 0
mov eax, ebx
jmp 0x140054976
xor eax, eax
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.1400959a0
mov rbx, qword [rsp + 0x90]
add rsp, 0x70
pop rdi
ret
Function at 0x140055d30
Capabilities:
Get session information

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
lea rbp, [rsp - 0x80]
sub rsp, 0x180
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rsp + 0x1c0], rbx
mov rax, qword [0x1400f4d50]
xor rax, rsp
mov qword [rbp + 0x78], rax
mov edi, edx
mov rsi, rcx
mov qword [rsp + 0x58], rcx
lea r12, [rcx + 8]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rcx, qword [rsi + 0x40]
mov rax, qword [rcx + 8]
cmp byte [rax + 0x29], 0
jne 0x140055da7
nop dword [rax]
cmp dword [rax + 0x18], edi
jae 0x140055d9b
mov rax, qword [rax + 0x10]
jmp 0x140055da1
mov rcx, rax
mov rax, qword [rax]
cmp byte [rax + 0x29], 0
je 0x140055d90
mov qword [rsp + 0x40], rcx
mov rax, qword [rsi + 0x40]
cmp rcx, rax
je 0x140055dc1
cmp edi, dword [rcx + 0x18]
jb 0x140055dc1
lea rbx, [rsp + 0x40]
jmp 0x140055dcb
mov qword [rsp + 0x30], rax
lea rbx, [rsp + 0x30]
mov rbx, qword [rbx]
cmp rbx, rax
jne 0x140055de6
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0x490
jmp 0x140055f0f
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x38]
mov r8d, 0x18
mov edx, edi
xor ecx, ecx
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
jne 0x140055e25
mov rax, qword [rsi]
mov edx, edi
mov rcx, rsi
call qword [rax + reloc.WS2_32.dll_htonl]
mov ebx, eax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
jmp 0x140055f0f
mov rsi, qword [rsp + 0x38]
mov rcx, qword [rbx + 0x20]
mov eax, dword [rsi]
mov dword [rcx + 4], eax
mov edx, 2
lea r8d, [rdx - 1]
lea rcx, [rsp + 0x60]
call fcn.140009740
nop
mov r13d, 0x5c
lea rdx, [rsi + 0x60]
lea rcx, [rsp + 0x60]
call fcn.140012430
mov rcx, rax
movzx edx, r13w
call fcn.140055160
mov rcx, rax
lea rdx, [rsi + 0x82]
call fcn.140012430
lea rdx, [rbp + 0x50]
lea rcx, [rsp + 0x60]
call fcn.14000a430
nop
mov rcx, qword [rbx + 0x20]
add rcx, 8
mov rdx, rax
call fcn.140002c40
nop
cmp qword [rbp + 0x68], 8
jb 0x140055ea6
mov rcx, qword [rbp + 0x50]
call fcn.140095520
mov rcx, qword [rsp + 0x38]
call sub.WTSAPI32.dll_WTSFreeMemory
nop
lea rax, [rbp - 0x18]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov qword [rsp + rcx + 0x60], rax
lea rcx, [rsp + 0x68]
call fcn.1400057c0
nop
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov qword [rsp + rcx + 0x60], rax
lea rax, vtable.std::ios_base.0
mov qword [rbp - 0x18], rax
lea rcx, [rbp - 0x18]
call fcn.14007610c
nop
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
mov rcx, qword [rbp + 0x78]
xor rcx, rsp
call fcn.1400959a0
mov rbx, qword [rsp + 0x1c0]
add rsp, 0x180
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x14006aae0
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
mov word [rsp + 0x10], dx
mov qword [rsp + 8], rcx
sub rsp, 0x248
movzx eax, word [rsp + 0x258]
test eax, eax
je 0x14006ab84
mov edx, 0x104
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea r8, [0x1400f3b28]
mov edx, 0x104
lea rcx, [rsp + 0x20]
call fcn.140099e8c
lea r8, [0x1400f3b40]
mov edx, 0x104
lea rcx, [rsp + 0x20]
call fcn.140099e8c
lea r8, str..sys
mov edx, 0x104
lea rcx, [rsp + 0x20]
call fcn.140099e8c
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x14006ab84
lea r8, [rsp + 0x20]
movzx edx, word [rsp + 0x258]
mov rcx, qword [rsp + 0x250]
call fcn.14006d370
mov dword [rsp + 0x230], eax
xor r8d, r8d
mov edx, 1
xor ecx, ecx
call fcn.14006a900
add rsp, 0x248
ret

Function at 0x14006af10
Capabilities:
Create service

Disassembly:
push rsi
push rdi
sub rsp, 0x6a8
mov byte [rsp + 0x694], 0
mov dword [rsp + 0x690], 0
lea rax, [rsp + 0x490]
lea rcx, [0x1400f3b90]
mov rdi, rax
mov rsi, rcx
mov ecx, 6
rep movsb byte [rdi], byte [rsi]
lea rax, [rsp + 0x496]
mov rdi, rax
xor eax, eax
mov ecx, 0x1fa
rep stosb byte [rdi], al
lea rax, [rsp + 0x280]
lea rcx, str.KHCap_Packet_Driver__KHCAP_
mov rdi, rax
mov rsi, rcx
mov ecx, 0x1c
rep movsb byte [rdi], byte [rsi]
lea rax, [rsp + 0x29c]
mov rdi, rax
xor eax, eax
mov ecx, 0x1e4
rep stosb byte [rdi], al
lea rax, [rsp + 0x70]
lea rcx, str.system32driversKHCAP.sys
mov rdi, rax
mov rsi, rcx
mov ecx, 0x1b
rep movsb byte [rdi], byte [rsi]
lea rax, [rsp + 0x8b]
mov rdi, rax
xor eax, eax
mov ecx, 0x1e5
rep stosb byte [rdi], al
mov r8d, GetCurrentThreadId
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov qword [rsp + 0x270], rax
cmp qword [rsp + 0x270], 0
jne 0x14006afe4
xor al, al
jmp 0x14006b0e5
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
lea rax, [rsp + 0x70]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 1
mov r9d, 0xf01ff
lea r8, [rsp + 0x280]
lea rdx, [rsp + 0x490]
mov rcx, qword [rsp + 0x270]
call qword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov qword [rsp + 0x480], rax
cmp qword [rsp + 0x480], 0
jne 0x14006b099
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x690], eax
cmp dword [rsp + 0x690], 0x431
jne 0x14006b097
mov dword [rsp + 0x690], 0
mov byte [rsp + 0x694], 1
jmp 0x14006b0a1
mov byte [rsp + 0x694], 1
cmp qword [rsp + 0x480], 0
je 0x14006b0ba
mov rcx, qword [rsp + 0x480]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
movzx eax, byte [rsp + 0x694]
mov rcx, qword [rsp + 0x270]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [rsp + 0x690]
call qword [sym.imp.KERNEL32.dll_SetLastError]
movzx eax, byte [rsp + 0x694]
add rsp, 0x6a8
pop rdi
pop rsi
ret