joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140046c9c
Capabilities:
Encode data using xor

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, 0x30
mov rsi, qword [rsp + 0x78]
xor ebx, ebx
mov rbp, qword [rsp + 0x70]
mov r12, r9
mov r14d, r8d
mov r15d, edx
mov rdi, rcx
test edx, edx
jne 0x140046ce0
mov r8, rsi
mov rcx, rbp
call fcn.14005c700
mov qword [rsp + 0x28], rsi
mov r9, r12
mov r8d, r14d
mov qword [rsp + 0x20], rbp
mov edx, r15d
mov rcx, rdi
call fcn.1400469f8
test al, al
jne 0x140046da8
test r14d, r14d
jne 0x140046d5e
cmp qword [rdi + 0x38], rsi
je 0x140046d39
mov rcx, qword [rdi + 0x30]
call fcn.14005a488
mov rcx, 0xffffffffffffffff
lea eax, [r14 + 4]
mul rsi
cmovo rax, rcx
mov rcx, rax
call fcn.14005a480
mov qword [rdi + 0x30], rax
mov qword [rdi + 0x38], rsi
mov r8, rbx
test rsi, rsi
je 0x140046d5e
movzx edx, word [r8 + r12]
mov rax, qword [rdi + 8]
mov rcx, qword [rdi + 0x30]
mov eax, dword [rax + rdx*4]
mov dword [rcx + r8*4], eax
add r8, 2
cmp r8, rsi
jb 0x140046d41
mov ecx, dword [rdi + 0x14]
mov rax, qword [rdi + 0x28]
imul ecx, r14d
add ecx, r15d
mov edx, dword [rax + rcx*4]
mov rax, qword [rdi + 8]
mov r8d, dword [rax + rdx*4]
test rsi, rsi
je 0x140046da8
dec rsi
shr rsi, 1
inc rsi
mov rax, qword [rdi + 0x30]
mov ecx, dword [rbx + rax]
lea rbx, [rbx + 8]
mov rax, qword [rdi]
add ecx, r8d
movzx ecx, word [rax + rcx*4]
xor word [rbp], cx
lea rbp, [rbp + 2]
sub rsi, 1
jne 0x140046d85
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x68]
add rsp, 0x30
pop r15
pop r14
pop r12
ret

Function at 0x140046dc8
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, rcx
mov ecx, 0xffff4
call fcn.14005a480
mov ecx, 0x40000
mov qword [rdi], rax
call fcn.14005a480
xor r8d, r8d
mov qword [rdi + 8], rax
xor r9d, r9d
mov edx, 1
mov r10d, 0x3fffc
mov r11d, 0xffff
mov rax, qword [rdi + 8]
mov ecx, edx
mov dword [rax + rcx*4], r8d
inc r8d
mov rax, qword [rdi]
mov dword [r9 + rax], edx
lea r9, [r9 + 4]
mov rax, qword [rdi]
mov dword [r10 + rax], edx
add edx, edx
mov eax, edx
lea r10, [r10 + 4]
mov ecx, edx
xor edx, 0x1100b
cmp eax, r11d
cmovbe edx, eax
cmp r8d, r11d
jb 0x140046e07
mov rax, qword [rdi + 8]
mov ebx, 0x1fffe
mov dword [rax], ebx
mov rax, qword [rdi]
lea rcx, [rax + 0x7fff8]
add rax, 0xffff0
cmp rcx, rdi
ja 0x140046e66
cmp rax, rdi
jae 0x140046e78
xor edx, edx
mov r8d, 0x7fff0
mov ebx, 0x3fffa
call fcn.14005c700
mov rax, qword [rdi]
mov ecx, ebx
inc ebx
and dword [rax + rcx*4], 0
cmp ebx, 0x3fffc
jbe 0x140046e78
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x140047c38
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r14
mov eax, 0x1040
call fcn.14005a5a0
sub rsp, rax
mov rax, qword [0x14008a6c0]
xor rax, rsp
mov qword [rsp + 0x1030], rax
xor r14d, r14d
mov rbx, rdx
mov rsi, rcx
cmp byte [rdx], r14b
je 0x140047d56
lea rdi, [rcx + 0x2022]
mov rcx, rdi
call fcn.140034e14
mov rbp, rax
cmp rax, rdi
jbe 0x140047cb2
mov rcx, rdi
mov word [rax - 2], r14w
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea ecx, [r14 + 0x5c]
mov word [rbp - 2], cx
cmp eax, 0xffffffff
je 0x140047cb2
bt eax, 0xa
jae 0x140047cb2
mov byte [rbx], r14b
lea rdx, str.System_Volume_Information_
mov rcx, rdi
call fcn.14005debc
test rax, rax
je 0x140047cc9
mov byte [rbx], r14b
cmp byte [rbx], r14b
je 0x140047d56
mov rcx, qword [rsi + 0x51c8]
test rcx, rcx
je 0x140047cf8
mov r9b, 1
mov byte [rsp + 0x20], 1
xor r8d, r8d
mov rdx, rdi
call fcn.140014380
test al, al
je 0x140047cf8
mov byte [rbx], r14b
cmp byte [rbx], r14b
je 0x140047d56
mov rcx, qword [rsi + 0x41a8]
test rcx, rcx
je 0x140047d11
mov rdx, rdi
call fcn.14004aa48
mov rcx, qword [rsi + 0x41b0]
test rcx, rcx
je 0x140047d28
mov edx, dword [rsi + 0x41c0]
call fcn.140041080
mov r8d, 0x800
lea rdx, [rsp + 0x30]
mov rcx, rdi
call fcn.140033520
lea rdx, [rsp + 0x30]
mov ecx, 0x57
call fcn.140001168
lea rcx, [0x14009a888]
call fcn.14001cda4
mov rcx, qword [rsp + 0x1030]
xor rcx, rsp
call fcn.14005a610
lea r11, [rsp + 0x1040]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
Function at 0x140047f24
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x20], rsi
mov byte [rax + 0x18], r8b
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
mov rsi, qword [0x1400a1ef0]
xor ebx, ebx
mov r13b, r9b
mov al, r8b
mov r15, rdx
mov rbp, rcx
test rsi, rsi
jne 0x140047fd0
cmp byte [0x1400a1ee8], bl
jne 0x140047fd0
lea rcx, str.Crypt32.dll
call fcn.14004b3f0
mov qword [0x1400a1ee0], rax
test rax, rax
je 0x140047fb5
lea rdx, str.CryptProtectMemory
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1400a1ee0]
lea rdx, str.CryptUnprotectMemory
mov qword [0x1400a1ef0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdi, rax
mov qword [0x1400a1ef8], rax
jmp 0x140047fbc
mov rdi, qword [0x1400a1ef8]
mov rsi, qword [0x1400a1ef0]
mov al, byte [rsp + 0x60]
mov byte [0x1400a1ee8], 1
jmp 0x140047fd7
mov rdi, qword [0x1400a1ef8]
mov r14, r15
mov r12d, ebx
and r14, 0xfffffffffffffff0
test r13b, r13b
setne r12b
test al, al
je 0x140048036
test rsi, rsi
je 0x14004805c
mov rcx, rsi
call qword [fcn.140023ba0]
mov r8d, r12d
mov edx, r14d
mov rcx, rbp
call rsi
test eax, eax
jne 0x140048077
lea rdx, str.CryptProtectMemory_failed
lea rbx, [0x14009a888]
mov rcx, rbx
call fcn.14001ca6c
mov rcx, rbx
call fcn.14001cda4
mov edx, 2
mov rcx, rbx
call fcn.14001ca40
jmp 0x140048077
test rdi, rdi
je 0x14004805c
mov rcx, rdi
call qword [fcn.140023ba0]
mov r8d, r12d
mov edx, r14d
mov rcx, rbp
call rdi
test eax, eax
jne 0x140048077
lea rdx, str.CryptUnprotectMemory_failed
jmp 0x140048010
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
test r15, r15
je 0x140048077
add al, 0x4b
lea ecx, [rbx + rax]
xor byte [rbx + rbp], cl
inc rbx
cmp rbx, r15
jb 0x140048069
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x68]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
Function at 0x140049860
Capabilities:
Hash data using sha1

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r14
sub rsp, 0x70
mov rax, qword [0x14008a6c0]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov edi, dword [rcx + 0x18]
mov ebp, 0x38
mov r14, qword [rcx + 0x18]
and edi, 0x3f
shl r14, 3
mov rsi, rdx
mov rbx, rcx
mov byte [rdi + rcx + 0x20], 0x80
inc edi
cmp edi, ebp
je 0x1400498f2
jbe 0x1400498c5
lea edx, [rbp + 8]
cmp edi, edx
jae 0x1400498c3
sub edx, edi
mov eax, edi
add rcx, 0x20
mov r8d, edx
xor edx, edx
add rcx, rax
call fcn.14005c700
xor edi, edi
test edi, edi
jne 0x1400498dd
lea r8, [rbx + 0x20]
mov r9b, 1
lea rdx, [rsp + 0x20]
mov rcx, rbx
call fcn.140048678
mov eax, edi
lea rcx, [rbx + 0x20]
sub ebp, edi
add rcx, rax
mov r8d, ebp
xor edx, edx
call fcn.14005c700
mov rax, r14
lea r8, [rbx + 0x20]
shr rax, 0x20
lea rdx, [rsp + 0x20]
bswap eax
bswap r14d
mov r9b, 1
mov dword [rbx + 0x58], eax
mov rcx, rbx
mov dword [rbx + 0x5c], r14d
call fcn.140048678
mov rdx, rbx
mov ecx, 5
sub rdx, rsi
mov eax, dword [rdx + rsi]
mov dword [rsi], eax
lea rsi, [rsi + 4]
sub rcx, 1
jne 0x140049924
and qword [rbx + 0x18], rcx
mov dword [rbx], 0x67452301
mov dword [rbx + 4], 0xefcdab89
mov dword [rbx + 8], 0x98badcfe
mov dword [rbx + 0xc], 0x10325476
mov dword [rbx + 0x10], 0xc3d2e1f0
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.14005a610
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret

Function at 0x14004997c
Capabilities:
Hash data using sha1

Disassembly:
and qword [rcx + 0x18], 0
mov dword [rcx], 0x67452301
mov dword [rcx + 4], 0xefcdab89
mov dword [rcx + 8], 0x98badcfe
mov dword [rcx + 0xc], 0x10325476
mov dword [rcx + 0x10], 0xc3d2e1f0
ret
Function at 0x140049b70
Capabilities:
Hash data using sha256

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 r14
sub rsp, 0x20
mov ebx, dword [rcx + 0x20]
mov esi, 0x38
mov rbp, qword [rcx + 0x20]
and ebx, 0x3f
shl rbp, 3
mov r14, rdx
mov rdi, rcx
mov byte [rbx + rcx + 0x28], 0x80
inc ebx
cmp ebx, esi
je 0x140049bee
jbe 0x140049bcd
lea edx, [rsi + 8]
cmp ebx, edx
jae 0x140049bcb
sub edx, ebx
mov eax, ebx
add rcx, 0x28
mov r8d, edx
xor edx, edx
add rcx, rax
call fcn.14005c700
xor ebx, ebx
test ebx, ebx
jne 0x140049bd9
mov rcx, rdi
call fcn.140049d74
mov eax, ebx
lea rcx, [rdi + 0x28]
sub esi, ebx
add rcx, rax
mov r8d, esi
xor edx, edx
call fcn.14005c700
mov rax, rbp
mov rcx, rdi
shr rax, 0x20
bswap eax
bswap ebp
mov dword [rdi + 0x60], eax
mov dword [rdi + 0x64], ebp
call fcn.140049d74
mov eax, dword [rdi]
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
bswap eax
mov dword [r14], eax
mov eax, dword [rdi + 4]
bswap eax
mov dword [r14 + 4], eax
mov eax, dword [rdi + 8]
bswap eax
mov dword [r14 + 8], eax
mov eax, dword [rdi + 0xc]
bswap eax
mov dword [r14 + 0xc], eax
mov eax, dword [rdi + 0x10]
bswap eax
mov dword [r14 + 0x10], eax
mov eax, dword [rdi + 0x14]
bswap eax
mov dword [r14 + 0x14], eax
mov eax, dword [rdi + 0x18]
bswap eax
mov dword [r14 + 0x18], eax
mov eax, dword [rdi + 0x1c]
bswap eax
mov dword [r14 + 0x1c], eax
mov dword [rdi], 0x6a09e667
mov dword [rdi + 4], 0xbb67ae85
mov dword [rdi + 8], 0x3c6ef372
mov dword [rdi + 0xc], 0xa54ff53a
mov dword [rdi + 0x10], 0x510e527f
mov dword [rdi + 0x14], 0x9b05688c
mov dword [rdi + 0x18], 0x1f83d9ab
mov dword [rdi + 0x1c], 0x5be0cd19
and qword [rdi + 0x20], 0
mov rdi, qword [rsp + 0x48]
add rsp, 0x20
pop r14
ret

Function at 0x140049ca4
Capabilities:
Hash data using sha256

Disassembly:
and qword [rcx + 0x20], 0
mov dword [rcx], 0x6a09e667
mov dword [rcx + 4], 0xbb67ae85
mov dword [rcx + 8], 0x3c6ef372
mov dword [rcx + 0xc], 0xa54ff53a
mov dword [rcx + 0x10], 0x510e527f
mov dword [rcx + 0x14], 0x9b05688c
mov dword [rcx + 0x18], 0x1f83d9ab
mov dword [rcx + 0x1c], 0x5be0cd19
ret
Function at 0x140049d74
Capabilities:
Encode data using xor
Hash data using murmur3

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x68]
sub rsp, 0x140
mov rax, qword [0x14008a6c0]
xor rax, rsp
mov qword [rbp + 0x30], rax
mov r9, rcx
mov qword [rsp + 0x20], rcx
lea rcx, [rsp + 0x30]
mov r8d, 0x10
lea rdx, [r9 + 0x28]
mov eax, dword [rdx]
lea rdx, [rdx + 4]
bswap eax
mov dword [rcx], eax
lea rcx, [rcx + 4]
sub r8, 1
jne 0x140049dbc
lea r11, [rsp + 0x70]
lea r10, [rsp + 0x68]
lea ebx, [r8 + 0x30]
mov ecx, dword [r10 - 0x34]
mov r8d, ecx
mov edx, dword [r10]
mov eax, ecx
rol r8d, 0xe
lea r10, [r10 + 4]
shr ecx, 3
ror eax, 7
xor r8d, eax
mov eax, edx
xor r8d, ecx
rol eax, 0xd
mov ecx, edx
shr edx, 0xa
rol ecx, 0xf
xor ecx, eax
xor ecx, edx
add r8d, ecx
add r8d, dword [r10 - 0x3c]
add r8d, dword [r10 - 0x18]
mov dword [r11], r8d
lea r11, [r11 + 4]
sub rbx, 1
jne 0x140049dde
movups xmm0, xmmword [r9]
lea r12d, [rbx + 0x40]
movups xmm1, xmmword [r9 + 0x10]
movups xmmword [rsp], xmm0
mov edi, dword [rsp + 8]
mov esi, dword [rsp + 4]
mov r11d, dword [rsp]
mov r9d, dword [rsp + 0xc]
movups xmmword [rsp + 0x10], xmm1
mov r13d, dword [rsp + 0x1c]
mov r14d, dword [rsp + 0x18]
mov r15d, dword [rsp + 0x14]
mov r10d, dword [rsp + 0x10]
mov eax, r10d
mov r8d, r10d
rol eax, 7
mov ecx, r10d
ror r8d, 0xb
not ecx
xor r8d, eax
and ecx, r14d
mov eax, r10d
mov edx, r11d
ror eax, 6
xor r8d, eax
ror edx, 0xd
mov eax, r15d
and eax, r10d
xor ecx, eax
lea rax, [0x140076bd0]
add r8d, ecx
mov ecx, esi
add r8d, dword [rbx + rax]
xor ecx, edi
add r8d, dword [rsp + rbx + 0x30]
lea rbx, [rbx + 4]
add r8d, r13d
and ecx, r11d
mov eax, r11d
mov r13d, r14d
rol eax, 0xa
mov r14d, r15d
xor edx, eax
mov r15d, r10d
mov eax, r11d
lea r10d, [r9 + r8]
ror eax, 2
mov r9d, edi
xor edx, eax
mov eax, esi
and eax, edi
mov edi, esi
xor ecx, eax
mov esi, r11d
add edx, ecx
lea r11d, [rdx + r8]
sub r12, 1
jne 0x140049e62
mov dword [rsp + 0xc], r9d
lea rcx, [rsp]
mov r9, qword [rsp + 0x20]
lea edx, [r12 + 8]
sub rcx, r9
mov dword [rsp + 0x10], r10d
mov dword [rsp], r11d
mov dword [rsp + 8], edi
mov dword [rsp + 4], esi
mov dword [rsp + 0x18], r14d
mov dword [rsp + 0x14], r15d
mov dword [rsp + 0x1c], r13d
mov eax, dword [rcx + r9]
add dword [r9], eax
lea r9, [r9 + 4]
sub rdx, 1
jne 0x140049f23
mov rcx, qword [rbp + 0x30]
xor rcx, rsp
call fcn.14005a610
lea r11, [rsp + 0x140]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
Function at 0x14004b340
Capabilities:
Get token membership

Disassembly:
mov qword [rsp + 8], rbx
push rbp
mov rbp, rsp
sub rsp, 0x80
mov rax, qword [0x14008a6c0]
xor rax, rsp
mov qword [rbp - 8], rax
xor ebx, ebx
mov word [rbp - 0xc], 0x500
lea rax, [rbp - 0x18]
mov dword [rbp - 0x10], ebx
mov qword [rsp + 0x50], rax
lea rcx, [rbp - 0x10]
mov dword [rsp + 0x48], ebx
mov r9d, 0x220
mov dword [rsp + 0x40], ebx
lea r8d, [rbx + 0x20]
mov dword [rsp + 0x38], ebx
mov dl, 2
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], ebx
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov dword [rbp - 0x20], eax
test eax, eax
je 0x14004b3cd
mov rdx, qword [rbp - 0x18]
lea r8, [rbp - 0x20]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
neg eax
sbb ecx, ecx
and dword [rbp - 0x20], ecx
mov rcx, qword [rbp - 0x18]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [rbp - 0x20]
test eax, eax
setne al
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.14005a610
mov rbx, qword [rsp + 0x90]
add rsp, 0x80
pop rbp
ret

Function at 0x14004b3f0
Capabilities:
Get common file path

Disassembly:
push rbx
mov eax, 0x1030
call fcn.14005a5a0
sub rsp, rax
mov rax, qword [0x14008a6c0]
xor rax, rsp
mov qword [rsp + 0x1020], rax
mov rbx, rcx
mov edx, 0x800
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x14004b42c
xor eax, eax
jmp 0x14004b44f
mov r9d, 0x800
lea r8, [rsp + 0x20]
mov rdx, rbx
lea rcx, [rsp + 0x20]
call fcn.1400348bc
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rcx, qword [rsp + 0x1020]
xor rcx, rsp
call fcn.14005a610
add rsp, 0x1030
pop rbx
ret

Function at 0x14004b57c
Capabilities:
Shutdown system

Disassembly:
push rbx
sub rsp, 0x50
mov rax, qword [0x14008a6c0]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov ebx, ecx
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 0x14004b5f5
lea r8, [rsp + 0x3c]
xor ecx, ecx
lea rdx, str.SeShutdownPrivilege
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
and qword [rsp + 0x28], 0
lea r8, [rsp + 0x38]
and qword [rsp + 0x20], 0
xor r9d, r9d
mov rcx, qword [rsp + 0x30]
xor edx, edx
mov dword [rsp + 0x38], 1
mov dword [rsp + 0x44], 2
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
cmp ebx, 1
jne 0x14004b608
mov edx, 0x80000000
lea ecx, [rbx + 4]
call qword [sym.imp.USER32.dll_ExitWindowsEx]
cmp ebx, 3
jne 0x14004b619
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call sub.POWRPROF.dll_SetSuspendState
cmp ebx, 2
jne 0x14004b62a
xor r8d, r8d
xor edx, edx
mov cl, 1
call sub.POWRPROF.dll_SetSuspendState
cmp ebx, 4
jne 0x14004b63d
mov edx, 0x80000000
lea ecx, [rbx + 2]
call qword [sym.imp.USER32.dll_ExitWindowsEx]
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.14005a610
add rsp, 0x50
pop rbx
ret
Function at 0x14004b9bc
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x30
xor edi, edi
mov rbx, rcx
cmp dword [rcx], edi
jbe 0x14004ba5e
lea rax, [rsp + 0x40]
mov r9, rbx
mov qword [rsp + 0x28], rax
lea r8, [0x14004bb70]
and dword [rsp + 0x20], 0
mov edx, 0x10000
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rsi, rax
test rax, rax
jne 0x14004ba34
lea rdx, str.CreateThread_failed
lea rcx, [0x14009a888]
call fcn.14001ca6c
lea rcx, [0x14009a888]
call fcn.14001cda4
lea edx, [rsi + 2]
lea rcx, [0x14009a888]
call fcn.14001ca40
mov qword [rbx + rdi*8 + 8], rsi
inc dword [rbx + 0x208]
mov edx, dword [0x1400a5f20]
test edx, edx
je 0x14004ba54
mov rcx, qword [rbx + rdi*8 + 8]
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
inc edi
cmp edi, dword [rbx]
jb 0x14004b9d8
mov rbx, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret
Function at 0x1400625b8
Capabilities:
Parse pe header

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r14
push r15
sub rsp, 0x20
mov esi, r8d
mov ebx, edx
mov r14d, ecx
test r8d, r8d
jne 0x14006238c
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14006238c
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14006238c
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14006238c
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14006238c
cmp dword [rcx + 0x84], 0xe
jbe 0x14006238c
cmp dword [rcx + 0xf8], esi
je 0x14006238c
mov ecx, r14d
call fcn.1400624d4
mov ecx, 2
call fcn.140066938
nop
cmp byte [0x1400a6950], 0
jne 0x140062456
mov r15d, 1
mov eax, r15d
xchg dword [0x1400a6940], eax
test ebx, ebx
jne 0x1400623ff
mov rdi, qword [0x14008a6c0]
mov edx, edi
and edx, 0x3f
lea ecx, [rbx + 0x40]
sub ecx, edx
xor eax, eax
ror rax, cl
xor rax, rdi
mov rcx, qword [0x1400a6948]
cmp rcx, rax
je 0x1400623f6
xor rdi, rcx
mov ecx, edx
ror rdi, cl
mov rcx, rdi
call qword [fcn.140023ba0]
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call rdi
lea rcx, [0x1400a6ab8]
jmp 0x14006240b
cmp ebx, r15d
jne 0x140062411
lea rcx, [0x1400a6ad0]
call fcn.1400643b8
nop
test ebx, ebx
jne 0x140062428
lea rdx, [0x140070628]
lea rcx, [0x140070608]
call fcn.1400646b4
lea rdx, [0x140070638]
lea rcx, [0x140070630]
call fcn.1400646b4
movzx eax, byte [0x1400a6950]
test esi, esi
cmove eax, r15d
mov byte [0x1400a6950], al
jmp 0x140062456
mov ecx, 2
call fcn.140066998
test esi, esi
jne 0x14006246d
mov ecx, r14d
call fcn.140062488
int3
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x40]
mov r14, qword [rsp + 0x48]
add rsp, 0x20
pop r15
ret
xor r8d, r8d
xor edx, edx
jmp 0x14006231c
Function at 0x14000ae4c
Capabilities:
Create service
Modify service
Persist via windows service
Start service

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x2a0
mov rax, qword [0x140132008]
xor rax, rsp
mov qword [rsp + 0x290], rax
mov rdi, rcx
mov qword [rsp + 0x70], rdx
xor esi, esi
lea rcx, [rsp + 0x82]
xor edx, edx
mov word [rsp + 0x80], si
mov r8d, 0x206
call sub.msvcrt.dll_memset
mov r8d, 0x104
lea rdx, [rsp + 0x80]
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetModuleFileNameW]
test eax, eax
jne 0x14000aeeb
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
lea rcx, str.Service:_Cannot_install_service___u__n
mov edx, eax
call qword [sym.imp.msvcrt.dll_wprintf_s]
mov rcx, qword [rsp + 0x290]
xor rcx, rsp
call fcn.1400cb2a0
lea r11, [rsp + 0x2a0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenSCManagerW]
mov rbx, rax
test rax, rax
jne 0x14000af12
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
lea rcx, str.Service:_OpenSCManager_failed___u__n
jmp 0x14000aebe
mov qword [rsp + 0x60], rsi
lea rax, [rsp + 0x80]
mov qword [rsp + 0x58], rsi
lea rdx, str.SensorDataService
mov qword [rsp + 0x50], rsi
mov r9d, 0xf01ff
mov qword [rsp + 0x48], rsi
mov r8, rdi
mov qword [rsp + 0x40], rsi
mov rcx, rbx
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x10
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CreateServiceW]
mov rdi, rax
test rax, rax
jne 0x14000af99
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov edx, eax
lea rcx, str.Service:_CreateService_failed___u__n
call qword [sym.imp.msvcrt.dll_wprintf_s]
mov rcx, rbx
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
test eax, eax
jne 0x14000aec6
jmp 0x14000afe7
lea rcx, str.Service:_Installed_successfully_n
call qword [sym.imp.msvcrt.dll_wprintf_s]
lea r8, [rsp + 0x70]
mov edx, 1
mov rcx, rdi
call qword [sym.imp.api_ms_win_service_management_l2_1_0.dll_ChangeServiceConfig2W]
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_StartServiceW]
test eax, eax
jne 0x14000afd8
lea rcx, str.Service:_Failed_to_start_n
call qword [sym.imp.msvcrt.dll_wprintf_s]
mov rcx, rdi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
test eax, eax
jne 0x14000af86
jmp 0x14000b001
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.14000c574
int3
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.14000c574
int3
Function at 0x14000b024
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x70
mov rax, qword [0x140132008]
xor rax, rsp
mov qword [rsp + 0x60], rax
xor edx, edx
lea rcx, [rsp + 0x38]
lea r8d, [rdx + 0x24]
call sub.msvcrt.dll_memset
call qword [sym.imp.api_ms_win_core_sysinfo_l1_2_1.dll_GetTickCount64]
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
mov rsi, rax
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
jne 0x14000b0a7
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov edx, eax
lea rcx, str.Service:_OpenSCManager_failed___u__n
call qword [sym.imp.msvcrt.dll_wprintf_s]
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.1400cb2a0
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rsp, r11
pop rdi
ret
mov r8d, 0xf01ff
lea rdx, str.SensorDataService
mov rcx, rax
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x14000b0ec
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov edx, eax
lea rcx, str.Service:_OpenService_failed___u__n
call qword [sym.imp.msvcrt.dll_wprintf_s]
mov rcx, rdi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
test eax, eax
jne 0x14000b088
jmp 0x14000b195
lea r8, [rsp + 0x38]
mov edx, 1
mov rcx, rax
call qword [sym.imp.api_ms_win_service_winsvc_l1_2_0.dll_ControlService]
test eax, eax
je 0x14000b151
cmp dword [rsp + 0x3c], 1
je 0x14000b151
add rsi, 0x3a98
mov ecx, dword [rsp + 0x50]
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_Sleep]
call qword [sym.imp.api_ms_win_core_sysinfo_l1_2_1.dll_GetTickCount64]
cmp rax, rsi
ja 0x14000b151
lea rax, [rsp + 0x30]
mov r9d, 0x24
lea r8, [rsp + 0x38]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rbx
call qword [sym.imp.api_ms_win_service_management_l2_1_0.dll_QueryServiceStatusEx]
test eax, eax
je 0x14000b151
cmp dword [rsp + 0x3c], 1
jne 0x14000b111
mov rcx, rbx
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_DeleteService]
test eax, eax
jne 0x14000b175
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov edx, eax
lea rcx, str.Service:_DeleteService_failed___u__n
call qword [sym.imp.msvcrt.dll_wprintf_s]
jmp 0x14000b182
lea rcx, str.Service:_Uninstalled_successfully_n
call qword [sym.imp.msvcrt.dll_wprintf_s]
mov rcx, rbx
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
test eax, eax
jne 0x14000b0da
jmp 0x14000b1af
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.14000c574
int3
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.14000c574
int3