joyce8/EMBER2024-capa huggingface dataset:
Function at 0x216591864
Capabilities:
Create process on windows
Create process suspended
Protect spawned processes with mitigation policies
Spoof parent pid

Disassembly:
push rbp
push rdi
push rbx
sub rsp, 0xd0
lea rbp, [rsp + 0xd0]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
lea rdx, [rbp - 0x70]
mov eax, 0
mov ecx, 0xe
mov rdi, rdx
rep stosq qword [rdi], rax
mov rax, qword [rbp + 0x20]
pxor xmm0, xmm0
movups xmmword [rax], xmm0
movq qword [rax + 0x10], xmm0
lea rax, [rbp - 0x78]
mov r9, rax
mov r8d, 0
mov edx, 2
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_InitializeProcThreadAttributeList]
call rax
mov rbx, qword [rbp - 0x78]
mov rax, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
call rax
mov r8, rbx
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_HeapAlloc]
call rax
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
lea rdx, [rbp - 0x78]
mov r9, rdx
mov r8d, 0
mov edx, 2
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_InitializeProcThreadAttributeList]
call rax
movabs rax, 0x100000000000
mov qword [rbp - 0x80], rax
mov rax, qword [rbp - 8]
lea rdx, [rbp - 0x80]
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 8
mov r9, rdx
mov r8d, 0x20007
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_UpdateProcThreadAttribute]
call rax
mov rax, qword [rbp - 8]
lea rdx, [rbp + 0x30]
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 8
mov r9, rdx
mov r8d, 0x20000
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_UpdateProcThreadAttribute]
call rax
mov dword [rbp - 0x70], 0x70
mov dword [rbp - 0x34], 0x80001
mov word [rbp - 0x30], 0
mov rax, qword [rbp + 0x28]
mov rdx, qword [rbp + 0x20]
mov qword [rsp + 0x48], rdx
lea rdx, [rbp - 0x70]
mov qword [rsp + 0x40], rdx
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x808000c
mov dword [rsp + 0x20], 1
mov r9d, 0
mov r8d, 0
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.dll_CreateProcessA]
call rax
test eax, eax
mov rax, qword [rbp - 8]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_DeleteProcThreadAttributeList]
call rax
nop
mov rax, qword [rbp + 0x20]
add rsp, 0xd0
pop rbx
pop rdi
pop rbp
ret
Function at 0x2165a4330
Capabilities:
Write file on windows

Disassembly:
push rsi
push rbx
sub rsp, 0x38
mov rbx, rcx
lea rax, [rsp + 0x58]
mov ecx, 2
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x28], rax
call fcn.2165ae600
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call fcn.2165ae600
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop dword [rax]

Function at 0x2165a43a0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x216870104]
mov rbx, rcx
test esi, esi
jle 0x2165a44d0
mov rax, qword [0x216870108]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x2165a43eb
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x2165a4475
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x2165a43d0
mov rcx, rbx
call fcn.2165a4c00
mov rdi, rax
test rax, rax
je 0x2165a44f2
mov rax, qword [0x216870108]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call fcn.2165a4d40
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x216870108]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x2165a44d7
mov eax, dword [rsp + 0x44]
lea edx, [rax - 0x40]
and edx, 0xffffffbf
je 0x2165a446e
lea edx, [rax - 4]
and edx, 0xfffffffb
jne 0x2165a4480
add dword [0x216870104], 1
add rsp, 0x50
pop rbx
pop rsi
pop rdi
ret
cmp eax, 2
mov rcx, qword [rsp + 0x20]
mov rdx, qword [rsp + 0x38]
mov r8d, 0x40
mov eax, 4
cmove r8d, eax
add rbx, qword [0x216870108]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x2165a446e
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call fcn.2165a4330
nop dword [rax]
xor esi, esi
jmp 0x2165a43f8
mov rax, qword [0x216870108]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call fcn.2165a4330
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call fcn.2165a4330
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x2165a4870
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x216870140]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x216870120]
test rbx, rbx
je 0x2165a48cc
mov rbp, qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax]
mov ecx, dword [rbx]
call rbp
mov rsi, rax
call rdi
test eax, eax
jne 0x2165a48c3
test rsi, rsi
je 0x2165a48c3
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x2165a48a8
mov rcx, r12
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
Function at 0x2165a4c00
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x21684a070]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x2165a4c20
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x2165a4c28
ret
cmp word [r8 + 0x18], 0x20b
jne 0x2165a4c20
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x2165a4c7d
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea r9, [rax + rdx*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rax + 0xc]
mov rdx, r8
cmp rcx, r8
jb 0x2165a4c74
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x2165a4c20
add rax, 0x28
cmp rax, r9
jne 0x2165a4c60
xor eax, eax
ret

Function at 0x2165a4c80
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x21684a070]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x2165a4c9f
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x2165a4ca8
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x2165a4c9f
movzx ecx, word [rax + 6]
mov eax, ecx
ret

Function at 0x2165a4d40
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x21684a070]
xor edx, edx
cmp word [rax], 0x5a4d
jne 0x2165a4d5f
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
je 0x2165a4d68
mov rax, rdx
ret
cmp word [rcx + 0x18], 0x20b
cmove rdx, rax
mov rax, rdx
ret

Function at 0x2165a5a00
Capabilities:
Allocate thread local storage

Disassembly:
sub rsp, 0x28
xor r9d, r9d
xor edx, edx
xor ecx, ecx
mov dword [0x2168701c0], 0xffffffff
mov r8d, 0xffff
call qword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov qword [0x2168701c8], rax
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x2165a5a50
lea rdx, [0x2165a5910]
mov ecx, eax
mov dword [0x2168701b8], eax
call fcn.2165af030
test eax, eax
jne 0x2165a5a58
add rsp, 0x28
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x2165a5a47
call sub.msvcrt.dll_abort
nop
nop
Function at 0x2165a5a60
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rsi, qword [0x2168494b0]
mov r11d, dword [rsi]
mov rbx, rcx
test r11d, r11d
jne 0x2165a5a98
mov rax, qword [rcx + 0x10]
test rax, rax
je 0x2165a5b00
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov r12, qword [rcx + 0x10]
test r12, r12
je 0x2165a5b10
mov esi, dword [0x2168701b8]
mov r13, qword [sym.imp.KERNEL32.dll_GetLastError]
call r13
mov edi, eax
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, edi
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rsi, rsi
je 0x2165a5b80
mov rbp, qword [rsi]
cmp rbp, r12
jb 0x2165a5bc8
sub r12, 1
mov rax, qword [rsi + r12*8 + 8]
test rax, rax
jne 0x2165a5a87
mov rcx, rbx
call fcn.2165a5960
mov qword [rsi + r12*8 + 8], rax
jmp 0x2165a5a87
call fcn.2165a5960
mov qword [rbx + 0x10], rax
jmp 0x2165a5a87
mov r10d, dword [rsi]
test r10d, r10d
je 0x2165a5c2a
mov r9d, dword [0x21683f4d0]
test r9d, r9d
je 0x2165a5c58
lock add dword [0x2168701c0], 1
jne 0x2165a5c8c
mov r12, qword [rbx + 0x10]
test r12, r12
je 0x2165a5c37
mov eax, dword [rsi]
test eax, eax
je 0x2165a5aa1
lock sub dword [0x2168701c0], 1
js 0x2165a5aa1
mov rcx, qword [0x2168701c8]
xor r8d, r8d
mov edx, 1
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
jmp 0x2165a5aa1
lea rcx, [r12 + 0x21]
mov edx, 8
lea rdi, [r12 + 0x20]
call sub.msvcrt.dll_calloc
mov rsi, rax
test rax, rax
je 0x2165a5cb3
mov qword [rax], rdi
mov ecx, dword [0x2168701b8]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x2165a5adb
call r13
jmp 0x2165a5adb
lea rdi, [rbp + rbp]
lea rax, [r12 + 0x20]
mov rcx, rsi
cmp rdi, r12
cmovb rdi, rax
lea rdx, [rdi*8 + 8]
call sub.msvcrt.dll_realloc
mov rsi, rax
test rax, rax
je 0x2165a5cb3
mov qword [rax], rdi
sub rdi, rbp
lea rcx, [rax + rbp*8 + 8]
xor edx, edx
lea r8, [rdi*8]
call sub.msvcrt.dll_memset
jmp 0x2165a5ba3
call fcn.2165a5a00
mov dword [0x21683f4d0], 1
mov edx, dword [rsi]
test edx, edx
jne 0x2165a5b2c
mov r12, qword [rbx + 0x10]
test r12, r12
jne 0x2165a5aa1
mov rax, qword [0x2168701b0]
lea r12, [rax + 1]
mov qword [0x2168701b0], r12
mov qword [rbx + 0x10], r12
jmp 0x2165a5b47
lock add dword [0x21683f4d4], 1
je 0x2165a5c11
mov r8d, dword [0x21683f4d0]
mov rbp, qword [sym.imp.KERNEL32.dll_Sleep]
lea rdi, [0x21683f4d0]
test r8d, r8d
jne 0x2165a5c20
nop dword [rax]
xor ecx, ecx
call rbp
mov ecx, dword [rdi]
test ecx, ecx
je 0x2165a5c80
jmp 0x2165a5c20
mov rcx, qword [0x2168701c8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x2165a5b3a
lock sub dword [0x2168701c0], 1
jmp 0x2165a5b3a
call sub.msvcrt.dll_abort
nop
nop dword [rax]
Function at 0x216612370
Capabilities:
Read file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
mov r12, qword [sym.imp.msvcrt.dll__errno]
mov rdi, rcx
mov rsi, rdx
mov ebx, r8d
mov rcx, qword [rdi]
call sub.msvcrt.dll__fileno_1
mov ecx, eax
mov r8d, ebx
mov rdx, rsi
call sub.msvcrt.dll__read
movsxd rbp, eax
cmp eax, 0xffffffff
je 0x2166123b8
mov rax, rbp
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
call r12
cmp dword [rax], 4
je 0x21661238a
mov rax, rbp
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret

Function at 0x21664ce70
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
lea rcx, [0x216842400]
jmp sym.z.dll___emutls_get_address

Function at 0x21664ce80
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
lea rcx, [0x216842400]
jmp sym.z.dll___emutls_get_address
Function at 0x140001000
Capabilities:
Link many functions at runtime

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
or esi, 0xffffffff
lea eax, [rsi - 1]
lock cmpxchg dword [0x14001a3a4], esi
jne 0x14000116a
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rcx, str.SACLog.dll
mov dword [0x14001b800], eax
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rdi, rax
test rax, rax
jne 0x140001057
call fcn.1400082ec
mov rdi, rax
test rax, rax
je 0x140001164
lea rdx, str.etLogEnterFunction_PrepareEx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.etLogEnterFunction_Execute
mov rcx, rdi
mov qword [0x14001b780], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.etLogLeaveFunction_Execute
mov rcx, rdi
mov qword [0x14001b790], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.etLogOutput_Execute
mov rcx, rdi
mov qword [0x14001b798], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.etLogBuffer
mov rcx, rdi
mov qword [0x14001b7a0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.etLogNumber
mov rcx, rdi
mov qword [0x14001b7a8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.etLogNumber64
mov rcx, rdi
mov qword [0x14001b7b0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.etLogStruct
mov rcx, rdi
mov qword [0x14001b7b8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.etLogEnable
mov rcx, rdi
mov qword [0x14001b7c0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, str.etLogLevel
mov rcx, rdi
mov qword [0x14001b7c8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp qword [0x14001b788], rbx
mov qword [0x14001b7d0], rax
jne 0x14000115f
cmp qword [0x14001b780], rbx
jne 0x14000115f
cmp qword [0x14001b7d8], rbx
je 0x140001164
mov ebx, 1
jmp 0x140001164
mov ebx, 2
mov dword [0x14001a3a4], ebx
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [0x14001b800]
cmp ecx, eax
je 0x140001191
jmp 0x140001187
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x14001a3a4]
cmp eax, esi
je 0x14000117c
mov eax, dword [0x14001a3a4]
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret

Function at 0x14000142c
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
test rcx, rcx
lea rdi, [0x14001445b]
cmovne rdi, rcx
mov rcx, rdi
call fcn.140009480
mov rbx, rax
lea ecx, [rax + 1]
call fcn.14000146c
lea edx, [rbx + 1]
mov rcx, rdi
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
jmp fcn.140005dc4

Function at 0x1400014d0
Capabilities:
Read file on windows

Disassembly:
mov edx, 4
jmp fcn.140005df0
Function at 0x140003a08
Capabilities:
Get disk information

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x50]
sub rsp, 0x150
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x40], rax
mov r14d, dword [0x14001b56c]
mov esi, edx
lea rcx, str.SACSrvETV
lea rdx, str.updateVolumes
call fcn.140001208
lea rdx, str.oldVolumes
mov r8d, r14d
mov rcx, rax
mov rdi, rax
call fcn.1400013fc
lea rdx, str.volumes
mov r8d, esi
mov rcx, rdi
call fcn.1400013fc
mov rcx, rdi
call fcn.140001214
mov bl, 0x41
lea ecx, [rbx - 0x41]
mov edx, 1
mov eax, r14d
shl edx, cl
mov ecx, esi
and ecx, edx
and eax, edx
cmp ecx, eax
je 0x140003b61
mov byte [rsp + 0x20], bl
mov word [rsp + 0x21], 0x5c3a
mov byte [rsp + 0x23], 0
test ecx, ecx
je 0x140003b57
lea rcx, [rsp + 0x31]
xor edx, edx
mov r8d, 0x103
mov byte [rsp + 0x24], bl
mov word [rsp + 0x25], 0x3a
mov byte [rsp + 0x30], 0
call fcn.140009540
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 2
je 0x140003afb
mov rax, qword [0x14001b580]
test rax, rax
je 0x140003afb
movsx ecx, bl
call qword [rax + 0x88]
test eax, eax
je 0x140003b61
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x24]
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_QueryDosDeviceA]
lea r8, [rsp + 0x30]
lea rdx, str.dosDevice
mov rcx, rdi
call fcn.140001354
lea rdx, str.QueryDosDevice
mov rcx, rdi
call fcn.1400012b0
lea rdx, str.Floppy
lea rcx, [rsp + 0x30]
call qword [sym.imp.SHLWAPI.dll_StrStrIA]
test rax, rax
jne 0x140003b61
lea rcx, [rsp + 0x20]
call fcn.1400037ac
jmp 0x140003b61
lea rcx, [rsp + 0x20]
call fcn.140003860
inc bl
lea eax, [rbx - 0x41]
cmp al, 0x20
jl 0x140003a7d
xor edx, edx
mov rcx, rdi
call fcn.140001238
mov rcx, qword [rbp + 0x40]
xor rcx, rsp
call fcn.140009450
lea r11, [rsp + 0x150]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret

Function at 0x140003b9c
Capabilities:
Get disk information

Disassembly:
push rbx
sub rsp, 0x20
call qword [sym.imp.KERNEL32.dll_GetLogicalDrives]
cmp dword [0x14001b56c], eax
mov ebx, eax
jne 0x140003bb6
xor eax, eax
jmp 0x140003bc8
mov edx, eax
call fcn.140003a08
mov dword [0x14001b56c], ebx
mov eax, 1
add rsp, 0x20
pop rbx
ret
Function at 0x140004084
Capabilities:
Enumerate files on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x290]
sub rsp, 0x390
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x280], rax
mov r14, rcx
mov r15, r8
mov r12, rdx
lea rcx, [rsp + 0x24]
xor esi, esi
xor edx, edx
and dword [rsp + 0x20], esi
mov r8d, 0x13c
call fcn.140009540
xor edi, edi
lea rcx, [rbp + 0x61]
xor edx, edx
mov r8d, 0x103
mov byte [rbp + 0x60], 0
call fcn.140009540
lea rcx, [rbp + 0x60]
mov r8d, 0x104
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_lstrcpynA]
test rdi, rdi
jne 0x14000418c
lea rcx, [rbp + 0x170]
mov r8d, 0x104
mov rdx, r14
call qword [sym.imp.KERNEL32.dll_lstrcpynA]
lea rdx, [0x140014d4c]
lea rcx, [rbp + 0x170]
call qword [sym.imp.SHLWAPI.dll_PathAppendA]
lea rdx, [rsp + 0x20]
lea rcx, [rbp + 0x170]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x14000419e
xor edi, edi
test rdi, rdi
je 0x14000415f
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
mov eax, esi
mov rcx, qword [rbp + 0x280]
xor rcx, rsp
call fcn.140009450
lea r11, [rsp + 0x390]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
lea rdx, [rsp + 0x20]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x140004151
lea rdx, [rsp + 0x4c]
lea rcx, [rbp + 0x60]
call qword [sym.imp.SHLWAPI.dll_PathAppendA]
cmp byte [rsp + 0x4c], 0x2e
je 0x1400040d9
lea rcx, [rbp + 0x60]
inc esi
call fcn.140004034
mov rbx, rax
lea rcx, [rax + 0x30]
mov qword [rax + 0x10], r15
call fcn.140008508
mov rdx, rbx
mov rcx, r12
call fcn.1400083d4
mov eax, dword [rsp + 0x20]
and eax, 0x10
mov dword [rbx + 0x28], eax
mov eax, dword [rsp + 0x40]
mov ecx, dword [rsp + 0x3c]
shl rcx, 0x20
or rcx, rax
movabs rax, 0xd6bf94d5e57a42bd
mov qword [rbx + 0x18], rcx
movabs rcx, 0xfe624e212ac18000
add rcx, qword [rsp + 0x34]
mul rcx
shr rdx, 0x17
mov qword [rbx + 0x20], rdx
jmp 0x1400040d9
Function at 0x1400059e8
Capabilities:
Delete service

Disassembly:
sub rsp, 0x28
xor edx, edx
mov r8d, 0xf003f
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
test rax, rax
je 0x140005a25
lea rdx, str.SACSRV
mov r8d, 0x10000
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
test rax, rax
je 0x140005a25
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_DeleteService]
add rsp, 0x28
ret

Function at 0x140005ae8
Capabilities:
Accept command line arguments

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
and dword [rsp + 0x20], 0
mov rdi, rcx
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea rdx, [rsp + 0x20]
mov rcx, rax
call qword [sym.imp.SHELL32.dll_CommandLineToArgvW]
cmp dword [rsp + 0x20], 1
mov rbx, rax
jle 0x140005b57
mov rcx, qword [rax + 8]
lea rdx, [0x1400150e0]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x140005b34
call fcn.140005a2c
jmp 0x140005b63
cmp dword [rsp + 0x20], 1
jle 0x140005b57
mov rcx, qword [rbx + 8]
lea rdx, [0x1400150e8]
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x140005b57
call fcn.1400059e8
jmp 0x140005b63
mov qword [0x14001b750], rdi
call fcn.1400066cc
xor eax, eax
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
ret

Function at 0x140005ce0
Capabilities:
Connect pipe

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x20
mov rcx, qword [0x14001b5a8]
or rdi, 0xffffffffffffffff
xor edx, edx
xor ebx, ebx
mov dword [rsp + 0x30], edi
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x140005d48
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [0x140014528]
mov rcx, rdi
mov r8d, eax
mov ebx, eax
call fcn.1400013fc
mov r8d, dword [0x14001b5a8]
lea rdx, str.PTR_TO_INT_eTSrvPipe_server_
mov rcx, rdi
call fcn.1400013fc
lea rdx, str.ConnectNamedPipe_failed
mov rcx, rdi
call fcn.1400012b0
jmp 0x140005d8a
lea rcx, [rsp + 0x30]
call fcn.1400014d0
and dword [0x14001b5a0], ebx
and dword [0x14001b59c], ebx
cmp dword [rsp + 0x30], 0x53414331
jne 0x140005d8a
lea rcx, [0x14001b5a0]
call fcn.1400014d0
lea rcx, [0x14001b59c]
call fcn.1400014d0
lea rcx, [rsp + 0x30]
call fcn.1400014d0
mov eax, dword [rsp + 0x30]
test ebx, ebx
mov rbx, qword [rsp + 0x38]
cmovne eax, edi
add rsp, 0x20
pop rdi
ret

Function at 0x140005dc4
Capabilities:
Write file on windows

Disassembly:
sub rsp, 0x38
test edx, edx
jle 0x140005dea
and qword [rsp + 0x20], 0
mov r8d, edx
mov rdx, rcx
mov rcx, qword [0x14001b5a8]
lea r9, [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_WriteFile]
add rsp, 0x38
ret

Function at 0x140005df0
Capabilities:
Read file on windows

Disassembly:
sub rsp, 0x38
test edx, edx
je 0x140005e16
and qword [rsp + 0x20], 0
mov r8d, edx
mov rdx, rcx
mov rcx, qword [0x14001b5a8]
lea r9, [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_ReadFile]
add rsp, 0x38
ret
Function at 0x140005fa4
Capabilities:
Get session user name

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x150
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x140], rax
mov rsi, rcx
lea rdx, str.eTSrvGetClientUpn_windows
lea rcx, [0x140014454]
xor ebx, ebx
call fcn.140001208
mov rcx, rax
mov rdi, rax
call fcn.140001214
lea rcx, [rsp + 0x31]
xor edx, edx
mov r8d, 0x103
mov byte [rsp + 0x30], bl
call fcn.140009540
mov rcx, qword [0x14001b5a8]
mov dword [rsp + 0x20], 0x104
call qword [sym.imp.ADVAPI32.dll_ImpersonateNamedPipeClient]
test eax, eax
jne 0x140006024
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x140006061
lea r8, [rsp + 0x20]
lea rdx, [rsp + 0x30]
mov ecx, 8
call qword [sym.imp.Secur32.dll_GetUserNameExA]
test al, al
jne 0x140006047
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x14000605b
lea rdx, [rsp + 0x30]
mov r8d, 0x104
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrcpynA]
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
test ebx, ebx
jne 0x140006077
lea rdx, [0x140015164]
mov r8, rsi
mov rcx, rdi
call fcn.140001354
mov edx, ebx
mov rcx, rdi
call fcn.140001238
mov eax, ebx
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.140009450
lea r11, [rsp + 0x150]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret

Function at 0x14000619c
Capabilities:
Check mutex on windows
Create pipe

Disassembly:
push rbx
sub rsp, 0x70
lea rcx, [rsp + 0x40]
call fcn.1400074e4
lea rcx, [rsp + 0x58]
call fcn.1400074e4
lea r8, str.GlobalF7125321_6639_4339_B3EE_D12760A2A83A_ETSRV_LIVE
lea rcx, [rsp + 0x40]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
or edx, 0xffffffff
mov rcx, rax
mov qword [0x14001b5b0], rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea r8, str.GlobalF7125321_6639_4339_B3EE_D12760A2A83A_ETSRV_MUTEX
lea rcx, [rsp + 0x40]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov qword [0x14001b5b8], rax
jmp 0x140006236
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [0x140014528]
or rcx, 0xffffffffffffffff
mov r8d, eax
mov ebx, eax
call fcn.1400013fc
lea rdx, str.CreateNamedPipe_failed
or rcx, 0xffffffffffffffff
call fcn.1400012b0
cmp ebx, 0xe7
jne 0x140006281
lea ecx, [rbx + 0x45]
call qword [sym.imp.KERNEL32.dll_Sleep]
mov r9d, 1
lea rax, [rsp + 0x58]
lea rcx, str..pipeF7125321_6639_4339_B3EE_D12760A2A83A_ETSRV_PIPE
mov qword [rsp + 0x38], rax
and dword [rsp + 0x30], 0
lea r8d, [r9 + 5]
lea edx, [r9 + 2]
mov dword [rsp + 0x28], 0x1000
mov dword [rsp + 0x20], 0x1000
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
mov qword [0x14001b5a8], rax
cmp rax, 0xffffffffffffffff
je 0x1400061fa
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_LocalFree]
add rsp, 0x70
pop rbx
ret