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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x120
mov ecx, 2
movsxd rdi, r8d
mov rbp, rdx
call fcn.140176a68
mov rcx, rdi
lea r15, [0x140000000]
sar rcx, 0x10
mov rbx, rax
movzx r14d, cl
lea rax, [rsp + 0x20]
mov ecx, edi
mov rsi, rdi
and ecx, 0xf
cmp dword [r15 + r14*4 + 0x273320], ecx
jge 0x140029763
test edi, 0x300
je 0x14002987c
cmp dword [0x140273720], 0
je 0x14002978b
call fcn.140029c90
mov rdx, rax
lea rcx, [rsp + 0x20]
call fcn.14016e2e0
movzx ecx, word [0x14019bb7c]
mov word [rax], cx
inc rax
lea rdx, [r14 + r14*2]
mov rcx, rax
mov rdx, qword [r15 + rdx*8 + 0x25bac8]
call fcn.14016e2e0
movzx ecx, word [0x14019bb7c]
and esi, 0xf
mov word [rax], cx
lea rcx, [rax + 1]
mov rdx, qword [r15 + rsi*8 + 0x25a890]
call fcn.14016e2e0
movzx ecx, word [0x14019aeb8]
lea r8, [rsp + 0x11f]
mov rdx, rbp
mov word [rax], cx
lea rsi, [rax + 2]
movzx ecx, byte [0x14019aeba]
sub r8d, esi
mov byte [rax + 2], cl
mov rcx, rsi
call fcn.14016e040
lea rcx, [rsp + 0x11f]
mov r9, rbx
cmp rax, rcx
mov r8d, 1
lea rcx, [rsp + 0x20]
jae 0x14002981c
mov byte [rax], 0xa
sub rax, rcx
lea rcx, [rsp + 0x20]
lea rdx, [rax + 1]
call fcn.140181848
jmp 0x140029846
lea rax, [rsp + 0x20]
sub rsi, rax
mov rdx, rsi
call fcn.140181848
mov rdx, rbx
mov rcx, rbp
call fcn.14018150c
mov rdx, rbx
lea rcx, [0x14019ae74]
call fcn.14018150c
mov eax, dword [0x14025b0ec]
cmp eax, 0xffffffff
jne 0x140029866
mov rcx, rbx
call fcn.1401713f0
mov ecx, eax
call fcn.140171a30
mov dword [0x14025b0ec], eax
test eax, eax
mov ecx, 0x2000
cmovne edi, ecx
test ecx, edi
je 0x14002987c
mov rcx, rbx
call fcn.14018141c
lea r11, [rsp + 0x120]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rdi
ret

Function at 0x14002a620
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
cmp dword [rcx], 0
mov ebp, r8d
mov edi, edx
mov rsi, rcx
mov rbx, rcx
je 0x14002a65f
cmp dword [rbx + 4], edi
jne 0x14002a656
mov edx, dword [rbx]
mov r8d, ebp
mov rcx, rsi
call fcn.14002a620
add rbx, 0x30
cmp dword [rbx], 0
jne 0x14002a644
mov edx, ebp
mov ecx, edi
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
jmp fcn.140173a70
Function at 0x14002a860
Capabilities:
Enumerate processes

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
push rdi
sub rsp, 0x260
xor edi, edi
mov rbp, rcx
mov qword [rax + 0x10], rdi
call fcn.140171a20
xor edx, edx
lea ecx, [rdi + 2]
mov ebx, eax
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov rcx, rax
call fcn.140172370
mov qword [rsp + 0x278], rax
mov rsi, rax
test rax, rax
je 0x14002a947
xor edx, edx
lea rcx, [rsp + 0x20]
mov r8d, 0x238
call fcn.140175020
lea rdx, [rsp + 0x20]
mov dword [rsp + 0x20], 0x238
mov rcx, rsi
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
je 0x14002a91f
lea rsi, [rsp + 0x268]
lea rdx, [rsp + 0x4c]
lea rcx, [rsi - 8]
call fcn.1400254b0
mov rcx, rbp
mov rdx, qword [rax]
call fcn.1401724a0
test eax, eax
jne 0x14002a905
mov eax, dword [rsp + 0x28]
cmp eax, ebx
jne 0x14002a91d
mov rcx, qword [rsp + 0x278]
lea rdx, [rsp + 0x20]
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x14002a8e0
jmp 0x14002a91f
mov edi, eax
lea rcx, [rsp + 0x278]
call fcn.14003e7b0
lea r11, [rsp + 0x260]
mov eax, edi
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret
lea rdx, str.CreateToolhelp32Snapshot_failed
mov ecx, 0x400000
call fcn.140029170
int3
Function at 0x14002b180
Capabilities:
Acquire debug privileges
Enumerate threads
Resume thread
Suspend thread

Disassembly:
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x440]
sub rsp, 0x540
mov rdi, rcx
mov qword [rsp + 0x30], 0
mov rcx, qword [rcx]
mov r14d, r8d
mov qword [rbp + 0x460], 0
mov esi, edx
test rcx, rcx
je 0x14002b1c8
call fcn.14017668c
mov qword [rdi], 0
lea rdx, [rsp + 0x58]
lea rcx, str.SeDebugPrivilege
call fcn.140056010
test eax, eax
jne 0x14002b32c
test esi, esi
jne 0x14002b1ec
call fcn.140171a20
mov esi, eax
mov ecx, esi
call fcn.14002c810
test eax, eax
jne 0x14002b318
xor edx, edx
lea ecx, [rax + 4]
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov qword [rsp + 0x30], rax
test rax, rax
je 0x14002b32c
lea rdx, [rsp + 0x38]
mov dword [rsp + 0x38], 0x1c
mov rcx, rax
call sub.KERNEL32.dll_Thread32First
test eax, eax
je 0x14002b318
mov qword [rsp + 0x568], rbx
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [rsp + 0x40], eax
jne 0x14002b254
call fcn.140171a20
cmp esi, eax
jne 0x14002b254
mov ebx, 1
jmp 0x14002b256
xor ebx, ebx
cmp dword [rsp + 0x44], esi
jne 0x14002b2eb
mov r8d, dword [rsp + 0x40]
lea rdx, str.Thread__ld:_n
mov rcx, rdi
call fcn.140025d00
mov r8d, dword [rsp + 0x40]
xor edx, edx
mov ecx, 0xfffff
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rcx, rax
call fcn.140172370
mov qword [rbp + 0x460], rax
test rax, rax
jne 0x14002b2ab
lea rdx, str.Failed_opening_the_thread:__m_n
mov rcx, rdi
call fcn.140025d00
jmp 0x14002b2eb
test ebx, ebx
je 0x14002b343
lea rcx, [rsp + 0x70]
call qword [0x14026e368]
mov r9, qword [rbp + 0x460]
lea rdx, [rsp + 0x70]
mov r8d, esi
mov dword [rsp + 0x20], r14d
mov rcx, rdi
call fcn.14002b530
test ebx, ebx
jne 0x14002b2eb
mov rcx, qword [rbp + 0x460]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, qword [rsp + 0x30]
lea rdx, [rsp + 0x38]
call sub.KERNEL32.dll_Thread32Next
lea rcx, [rbp + 0x460]
mov ebx, eax
call fcn.14003e7b0
test ebx, ebx
jne 0x14002b238
mov rbx, qword [rsp + 0x568]
lea rcx, [rsp + 0x58]
call fcn.140056070
lea rcx, [rsp + 0x30]
call fcn.14003e7b0
mov rax, rdi
mov rsi, qword [rsp + 0x570]
add rsp, 0x540
pop r14
pop rdi
pop rbp
ret
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SuspendThread]
mov ecx, eax
call fcn.140172320
cmp rax, 0xffffffffffffffff
jne 0x14002b36a
lea rdx, str.Failed_to_suspend_the_thread:__m_n
mov rcx, rdi
call fcn.140025d00
jmp 0x14002b2eb
mov rcx, qword [rbp + 0x460]
lea rdx, [rsp + 0x70]
mov dword [rbp - 0x60], 0x10001f
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
movsxd rcx, eax
call fcn.140172320
test rax, rax
jne 0x14002b2be
lea rdx, str.Failed_getting_thread_context:__m_n
mov rcx, rdi
call fcn.140025d00
jmp 0x14002b2de
Function at 0x14002bfe0
Capabilities:
Enumerate process modules

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x460
mov ebx, ecx
xor edi, edi
lea rcx, [rsp + 0x20]
xor edx, edx
mov r8d, 0x438
mov r13d, edi
call fcn.140175020
mov edx, ebx
mov dword [rsp + 0x20], 0x438
lea ecx, [rdi + 8]
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
cmp rax, 0xffffffffffffffff
mov qword [rsp + 0x4b0], rax
mov rcx, rax
cmove rax, rdi
test rax, rax
je 0x14002c20a
lea rdx, [rsp + 0x20]
call sub.KERNEL32.dll_Module32FirstW
test eax, eax
je 0x14002c20a
lea rbx, [rsp + 0x498]
movabs rdi, 0x5851f42d4c957f2d
add rbx, 0xfffffffffffffff8
mov qword [rsp + 0x4b8], rbx
nop
lea rdx, [rsp + 0x250]
mov rcx, rbx
call fcn.1400254b0
lea rdx, [rsp + 0x50]
mov rcx, rbx
mov r15, qword [rax]
call fcn.1400254b0
mov rbp, qword [rsp + 0x38]
mov edx, 1
mov r12, qword [rax]
mov eax, dword [rsp + 0x40]
lea ecx, [rdx + 0x17]
mov dword [rsp + 0x4a8], eax
call fcn.140176684
mov rsi, qword [0x14026e3c8]
mov r14, rax
mov rax, rdi
mov rcx, r15
mul rbp
mov rbx, rdx
mov rdi, rax
call fcn.140052220
movsxd rcx, dword [rsi + 4]
sub rdi, rbx
mov r9, rax
mov rax, qword [rsi + 8]
xor r9, rdi
and rcx, r9
mov rbx, qword [rax + rcx*8]
test rbx, rbx
je 0x14002c134
nop dword [rax + rax]
cmp r9, qword [rbx]
jne 0x14002c12b
cmp rbp, qword [rbx + 0x20]
jne 0x14002c12b
mov r8, qword [rbx + 0x38]
mov rax, r15
sub r8, r15
nop word [rax + rax]
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x14002c123
inc rax
test ecx, ecx
jne 0x14002c110
test edx, edx
je 0x14002c1d0
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x14002c0f0
mov edx, 1
lea ecx, [rdx + 0x57]
call fcn.140176684
mov rbx, rax
xor edi, edi
mov rdx, r12
mov qword [rax + 0x20], rbp
mov eax, dword [rsp + 0x4a8]
lea rcx, [rbx + 0x30]
mov dword [rbx + 0x28], eax
mov dword [rbx + 0x44], edi
call fcn.140026000
lea rcx, [rbx + 0x38]
mov rdx, r15
call fcn.140026000
mov rcx, qword [reloc.WS2_32.dll_accept]
xor edx, edx
mov qword [rbx + 0x18], rcx
lea rax, [rcx + 4]
mov rcx, rbx
mov qword [reloc.WS2_32.dll_accept], rax
call fcn.14002c250
mov rcx, qword [0x14026e3c8]
mov rdx, rbx
call fcn.14002bc50
mov rax, qword [0x14026e3c8]
cmp dword [rax + 0x10], 0x3e8
jge 0x14002c235
mov qword [r14 + 0x10], rbx
test r13, r13
je 0x14002c1d4
mov rax, qword [r13 + 8]
mov qword [r14 + 8], rax
mov qword [r13 + 8], r14
mov rax, qword [r14 + 8]
mov qword [rax], r14
jmp 0x14002c1db
xor edi, edi
jmp 0x14002c1b2
mov qword [r14 + 8], r14
mov r13, r14
mov qword [r14], rdi
lea rdx, [rsp + 0x20]
mov rcx, qword [rsp + 0x4b0]
call sub.KERNEL32.dll_Module32NextW
mov rbx, qword [rsp + 0x4b8]
movabs rdi, 0x5851f42d4c957f2d
test eax, eax
jne 0x14002c070
lea rcx, [rsp + 0x4b0]
call fcn.14003e7b0
mov rbx, qword [rsp + 0x4a0]
mov rax, r13
add rsp, 0x460
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea rdx, str.using_more_than_1000_module_entries
mov ecx, 0x40
call fcn.14003ebc0
int3
Function at 0x14002e250
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
sub rsp, 0x58
lea rcx, [rsp + 0x58]
sub rcx, 8
lea r8, [0x14002de60]
lea rdx, [rsp + 0x30]
call fcn.140025060
mov rdx, qword [rsp + 0x60]
lea r8, [rsp + 0x68]
mov rcx, rax
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x20], 0xffffffff
mov qword [rsp + 0x28], 0
call fcn.1400260e0
cmp dword [0x140273474], 6
jl 0x14002e2cc
mov r8, qword [rsp + 0x30]
lea rdx, str.sys_exec__s_
mov ecx, 0x550006
mov r8, qword [r8]
call fcn.140028ca0
mov rcx, qword [rsp + 0x30]
mov rcx, qword [rcx]
call fcn.14002e460
test eax, eax
jns 0x14002e308
cmp dword [0x140273474], 6
jl 0x14002e3bb
mov r8, qword [rsp + 0x30]
lea rdx, str.failed_sys_exec_bg__s_
mov ecx, 0x550006
mov r8, qword [r8]
call fcn.140028ca0
jmp 0x14002e3bb
cdqe
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x48], rdi
call fcn.140041140
mov rbx, rax
mov edi, 0xffffffff
mov ecx, dword [0x14026e3e8]
test ecx, ecx
je 0x14002e347
imul ecx, ecx, 0x3e8
movsxd rdx, ecx
sub rdx, rax
xor eax, eax
add rdx, rbx
cmovne rax, rdx
jmp 0x14002e34a
mov rax, rdi
mov rcx, qword [rsp + 0x28]
mov r8d, 1
mov edx, eax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
cmp eax, 0xc0
jne 0x14002e36b
call fcn.140041140
jmp 0x14002e326
mov rdi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x28]
test eax, eax
je 0x14002e393
mov edx, reloc.WS2_32.dll_shutdown
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [rsp + 0x20], 0xfffffff7
jmp 0x14002e3b1
lea rdx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov eax, dword [rsp + 0x20]
mov ecx, 0xffffffea
cmp eax, 3
cmove eax, ecx
mov dword [rsp + 0x20], eax
lea rcx, [rsp + 0x28]
call fcn.14003e7b0
mov rax, qword gs:[0x58]
mov edx, 0x15a0
mov rcx, qword [rax]
mov eax, dword [rsp + 0x20]
mov dword [rdx + rcx], eax
add rsp, 0x58
ret

Function at 0x14002ea00
Capabilities:
Terminate thread

Disassembly:
sub rsp, 0x28
mov rcx, qword [rcx]
mov edx, 1
call qword [sym.imp.KERNEL32.dll_TerminateThread]
xor ecx, ecx
test eax, eax
sete cl
mov eax, ecx
add rsp, 0x28
ret

Function at 0x14002eac0
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r14
sub rsp, 0x30
mov rdi, rdx
mov rbx, rcx
mov edx, 1
mov rsi, r8
lea ecx, [rdx + 0x1f]
call fcn.140176684
mov qword [rbx], rax
lea r8, [0x14002eca0]
mov r14, rax
xor edx, edx
mov r9, r14
xor ecx, ecx
mov qword [rax + 8], rdi
mov qword [rax + 0x10], rsi
mov dword [rax + 0x1c], 2
xor eax, eax
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], eax
call fcn.140184400
mov qword [r14], rax
test rax, rax
je 0x14002eb3e
mov rbx, qword [rsp + 0x40]
xor eax, eax
mov rsi, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x50]
add rsp, 0x30
pop r14
ret
lea rdx, str.failed_create_thread:__m
mov ecx, 0x570000
call fcn.140029170
int3
Function at 0x140036f90
Capabilities:
Delete service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
or ebx, 0xffffffff
mov rsi, rcx
cmp qword [0x14026e570], 0
jne 0x140036fb3
xor eax, eax
jmp 0x140036fe2
lea rcx, [rsp + 0x28]
mov rdx, rsi
sub rcx, 8
call fcn.140025620
mov rcx, qword [0x14026e570]
mov r8d, 0x10000
mov rdx, qword [rax]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rcx, rax
call fcn.140172370
mov rcx, rax
call fcn.140172370
mov rdi, rax
test rax, rax
jne 0x14003702f
mov rax, qword gs:[0x58]
mov edx, 0x2fe0
mov rcx, qword [rax]
mov rdx, qword [rdx + rcx]
test rdx, rdx
jne 0x140037014
call fcn.140176664
mov rdx, rax
mov eax, dword [rdx]
sub eax, 0x424
neg eax
sbb eax, eax
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
ret
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_DeleteService]
movsxd rcx, eax
call fcn.140172320
test rax, rax
jne 0x14003705b
mov r8, rsi
lea rdx, str.Failed_deleting_service__s:__m
mov ecx, 0x670003
call fcn.140028ca0
jmp 0x14003705d
xor ebx, ebx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
movsxd rcx, eax
call fcn.140172320
test rax, rax
jne 0x140037084
lea rdx, str.Failed_close_service_handle:__m
mov ecx, 0x670003
call fcn.140028ca0
mov rsi, qword [rsp + 0x38]
mov eax, ebx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret

Function at 0x1400370a0
Capabilities:
Query service status

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x60
or ebx, 0xffffffff
mov rdi, rcx
cmp qword [0x14026e570], 0
je 0x14003716a
lea rcx, [rsp + 0x68]
mov rdx, rdi
sub rcx, 8
call fcn.140025620
mov rcx, qword [0x14026e570]
mov r8d, 0xf01ff
mov rdx, qword [rax]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rcx, rax
call fcn.140172370
mov rsi, rax
test rax, rax
je 0x14003716a
lea rax, [rsp + 0x78]
xor edx, edx
lea r9d, [rbx + 0x25]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x30]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
movsxd rcx, eax
call fcn.140172320
test rax, rax
jne 0x14003713d
mov r8, rdi
lea rdx, str.failed_query_service_status__s:__m
mov ecx, 0x670003
call fcn.140028ca0
test eax, eax
jne 0x140037141
mov ebx, dword [rsp + 0x34]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
movsxd rcx, eax
call fcn.140172320
test rax, rax
jne 0x14003717e
lea rdx, str.Failed_close_service_handle:__m
mov ecx, 0x670003
call fcn.140028ca0
jmp 0x14003717e
mov r8, rdi
lea rdx, str.service__s_doesnt_exist
mov ecx, 0x670005
call fcn.140028ca0
mov rsi, qword [rsp + 0x80]
mov eax, ebx
mov rbx, qword [rsp + 0x70]
add rsp, 0x60
pop rdi
ret
Function at 0x140037240
Capabilities:
Modify service

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x60
mov eax, dword [0x14025b390]
or r14d, 0xffffffff
mov r13, r9
mov rbx, rdx
mov rdi, rcx
cmp eax, r14d
jne 0x140037275
call fcn.140037ca0
mov r15d, dword [rsp + 0xc0]
cmp eax, 2
mov esi, 0x110
mov qword [rsp + 0xa0], r12
mov ecx, reloc.WS2_32.dll_recv
mov eax, r15d
cmovg esi, ecx
neg eax
sbb ebp, ebp
cmp qword [0x14026e570], 0
je 0x1400373a8
lea rcx, [rsp + 0x98]
mov rdx, rdi
add rcx, 0xfffffffffffffff8
call fcn.140025620
mov rcx, qword [0x14026e570]
mov r8d, 0xf01ff
mov rdx, qword [rax]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rcx, rax
call fcn.140172370
mov r12, rax
test rax, rax
je 0x1400373a8
lea rcx, [rsp + 0x98]
mov rdx, rbx
add rcx, 0xfffffffffffffff8
call fcn.140025620
lea rcx, [rsp + 0x98]
mov rdx, r13
add rcx, 0xfffffffffffffff8
mov rbx, qword [rax]
call fcn.140025620
mov qword [rsp + 0x50], rbx
lea r8d, [rbp + 3]
xor ebx, ebx
mov edx, esi
mov qword [rsp + 0x48], rbx
mov rcx, r12
mov rax, qword [rax]
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x38], rbx
lea r9d, [rbx + 1]
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
movsxd rcx, eax
call fcn.140172320
test rax, rax
jne 0x140037371
mov r8, rdi
lea rdx, str.Failed_changing_service_config__s:__m
mov ecx, 0x670003
call fcn.140028ca0
jmp 0x140037374
mov r14d, ebx
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
movsxd rcx, eax
call fcn.140172320
test rax, rax
jne 0x14003739b
lea rdx, str.Failed_close_service_handle:__m
mov ecx, 0x670003
call fcn.140028ca0
test r14d, r14d
je 0x1400373d2
mov rbx, qword [rsp + 0xa8]
mov dword [rsp + 0x28], r15d
mov r9d, 1
mov r8, r13
mov dword [rsp + 0x20], 0xbb8
mov rdx, rbx
mov rcx, rdi
call fcn.140036ca0
test eax, eax
je 0x1400373d2
or eax, 0xffffffff
jmp 0x1400373f1
mov r8d, dword [rsp + 0xc8]
mov rcx, rdi
mov rdx, qword [rsp + 0xb0]
call fcn.140037410
neg eax
sbb eax, eax
and eax, 0xfffffffe
mov r12, qword [rsp + 0xa0]
add rsp, 0x60
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret
Function at 0x140037410
Capabilities:
Modify service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
push rsi
push rdi
push r14
sub rsp, 0x90
xor r14d, r14d
mov rbp, rdx
cmp qword [0x14026e570], r14
mov esi, r8d
mov rdx, rcx
jne 0x14003743f
mov ebx, r14d
jmp 0x140037471
lea rcx, [rsp + 0xa8]
sub rcx, 8
call fcn.140025620
mov rcx, qword [0x14026e570]
mov r8d, 0xf01ff
mov rdx, qword [rax]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rcx, rax
call fcn.140172370
mov rbx, rax
lea rcx, [rsp + 0xa8]
mov rdx, rbp
sub rcx, 8
or edi, 0xffffffff
call fcn.140025620
lea r8, [rsp + 0xc8]
lea edx, [rdi + 2]
mov rcx, qword [rax]
mov qword [rsp + 0xc8], rcx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
movsxd rcx, eax
call fcn.140172320
test rax, rax
jne 0x1400374cd
lea rdx, str.Failed_changing_service_description:__m
mov ecx, 0x670003
call fcn.140028ca0
test eax, eax
jne 0x1400375ae
mov qword [rsp + 0x20], r14
xorps xmm0, xmm0
mov qword [rsp + 0x28], r14
lea rax, [rsp + 0x20]
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x38], 0xffffffff
mov dword [rsp + 0x50], 1
movdqu xmmword [rsp + 0x40], xmm0
test esi, esi
je 0x140037533
mov dword [rsp + 0x20], 1
mov dword [rsp + 0x24], 0xea60
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x2c], 0x1d4c0
mov dword [rsp + 0x38], 0x2a300
mov dword [rsp + 0x50], 3
lea r8, [rsp + 0x38]
mov edx, 2
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
movsxd rcx, eax
call fcn.140172320
test rax, rax
jne 0x140037568
lea rdx, str.Failed_changing_service_failure_action:__m
mov ecx, 0x670003
call fcn.140028ca0
test eax, eax
jne 0x1400375ae
mov edx, 1
lea rcx, [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
lea r8, [rsp + 0x60]
mov edx, 4
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_SetServiceObjectSecurity]
movsxd rcx, eax
call fcn.140172320
test rax, rax
jne 0x1400375ab
lea rdx, str.failed_SetServiceObjectSecurity____m
mov ecx, 0x670003
call fcn.140028ca0
jmp 0x1400375ae
mov edi, r14d
test rbx, rbx
je 0x1400375da
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
movsxd rcx, eax
call fcn.140172320
test rax, rax
jne 0x1400375da
lea rdx, str.Failed_close_service_handle:__m
mov ecx, 0x670003
call fcn.140028ca0
lea r11, [rsp + 0x90]
mov eax, edi
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
Function at 0x140037930
Capabilities:
Create service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x70
mov rbx, rdx
lea rdi, [rsp + 0x88]
mov rdx, qword [rsp + 0xb8]
mov rsi, rcx
add rdi, 0xfffffffffffffff8
mov r14d, r9d
mov rcx, rdi
mov r15d, r8d
call fcn.140025620
mov rdx, rbx
mov rcx, rdi
mov rbp, qword [rax]
call fcn.140025620
mov rdx, rsi
mov rcx, rdi
mov rbx, qword [rax]
call fcn.140025620
xor ecx, ecx
mov r9d, r15d
mov qword [rsp + 0x60], rcx
mov r8, rbx
mov qword [rsp + 0x58], rcx
mov rdx, qword [rax]
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x40], rcx
mov ecx, dword [rsp + 0xb0]
mov qword [rsp + 0x38], rbp
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], ecx
mov rcx, qword [0x14026e570]
mov dword [rsp + 0x20], r14d
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rcx, rax
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rdi
jmp fcn.140172370

Function at 0x140037a70
Capabilities:
Get token membership

Disassembly:
push rbx
sub rsp, 0x60
xor ebx, ebx
mov dword [rsp + 0x78], 0
lea rax, [rsp + 0x80]
mov word [rsp + 0x7c], 0x500
mov qword [rsp + 0x50], rax
lea rcx, [rsp + 0x78]
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]
movsxd rcx, eax
call fcn.140172320
test rax, rax
jne 0x140037ad6
add rsp, 0x60
pop rbx
ret
mov rdx, qword [rsp + 0x80]
lea r8, [rsp + 0x70]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
movsxd rcx, eax
call fcn.140172320
test rax, rax
jne 0x140037b0d
lea rdx, str.failed_CheckTokenMembership__:__m
mov ecx, 0x610003
call fcn.140028ca0
mov dword [rsp + 0x70], ebx
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [rsp + 0x70]
add rsp, 0x60
pop rbx
ret
Function at 0x140037b90
Capabilities:
Get hostname

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
mov dword [rsp + 0x30], 0
lea rcx, [rsp + 0x28]
sub rcx, 8
lea r8, [fcn.140026b90]
lea rdx, [rsp + 0x38]
call fcn.140025060
mov rcx, qword [rbx]
mov qword [rsp + 0x38], rax
test rcx, rcx
je 0x140037bd4
call fcn.14017668c
mov qword [rbx], 0
xor edx, edx
lea r8, [rsp + 0x30]
lea ecx, [rdx + 1]
call qword [sym.imp.KERNEL32.dll_GetComputerNameExW]
movsxd rcx, eax
call fcn.140172320
mov edx, dword [rsp + 0x30]
test edx, edx
je 0x140037c5c
mov rax, qword gs:[0x58]
mov r8d, 0x2fe0
mov rcx, qword [rax]
mov rax, qword [r8 + rcx]
test rax, rax
jne 0x140037c18
call fcn.140176664
mov edx, dword [rsp + 0x30]
cmp dword [rax], 0xea
jne 0x140037c5c
mov rcx, qword [rsp + 0x38]
call fcn.140026d30
mov rdx, qword [rsp + 0x38]
lea r8, [rsp + 0x30]
mov ecx, 1
mov rdx, qword [rdx]
call qword [sym.imp.KERNEL32.dll_GetComputerNameExW]
test eax, eax
je 0x140037c5c
mov rdx, qword [rsp + 0x38]
mov rcx, rbx
mov rdx, qword [rdx]
call fcn.1400261e0
add rsp, 0x20
pop rbx
ret
lea rdx, str.failed_GetComputerName:__m
mov ecx, 0x610003
call fcn.140028ca0
mov rax, rbx
add rsp, 0x20
pop rbx
ret

Function at 0x140037ca0
Capabilities:
Check os version

Disassembly:
sub rsp, 0x28
mov ecx, dword [0x14025b390]
cmp ecx, 0xffffffff
jne 0x140037dab
mov qword [rsp + 0x20], rbx
xor ebx, ebx
cmp dword [0x14025b394], ecx
jne 0x140037da6
cmp dword [0x14026e580], ebx
jne 0x140037cf6
lea rcx, [0x14026e580]
mov dword [0x14026e580], 0x11c
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
movsxd rcx, eax
call fcn.140172320
test rax, rax
je 0x140037db2
mov edx, dword [0x14026e584]
movzx r8d, word [0x14026e694]
mov eax, dword [0x14026e588]
cmp edx, 0xa
jg 0x140037d6e
jne 0x140037d1c
test eax, eax
jns 0x140037d6e
mov ebx, 6
jmp 0x140037d73
cmp edx, 6
jg 0x140037d15
jne 0x140037d4b
cmp eax, 3
jge 0x140037d15
cmp eax, 2
jge 0x140037d44
cmp eax, 1
jge 0x140037d3d
test eax, eax
js 0x140037d67
mov ebx, 3
jmp 0x140037d73
mov ebx, 4
jmp 0x140037d73
mov ebx, 5
jmp 0x140037d73
cmp edx, 5
jg 0x140037d67
jne 0x140037d73
cmp eax, 2
jge 0x140037d67
cmp eax, 1
jge 0x140037d67
test eax, eax
js 0x140037d73
mov ebx, 1
jmp 0x140037d73
mov ebx, 2
jmp 0x140037d73
mov ebx, 7
mov dword [0x14025b398], eax
mov ecx, ebx
mov eax, dword [0x14026e58c]
mov dword [0x14025b39c], eax
mov eax, dword [0x14026e590]
mov dword [0x14025b3a0], eax
mov dword [0x14025b390], ebx
mov dword [0x14025b394], edx
mov dword [0x14025b3a4], r8d
mov rbx, qword [rsp + 0x20]
mov eax, ecx
add rsp, 0x28
ret
lea rdx, str.GetVersionEx_failed__m
mov ecx, 0x61
call fcn.14003ebc0
int3