joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14000c070
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 dbg.__acrt_iob_func
mov r8d, 0x1b
mov edx, 1
lea rcx, str.Mingw_w64_runtime_failure:_n
mov r9, rax
call sym.fwrite
mov rsi, qword [rsp + 0x28]
mov ecx, 2
call dbg.__acrt_iob_func
mov rdx, rbx
mov rcx, rax
mov r8, rsi
call sym.vfprintf
call sym.abort
nop
nop dword [rax]

Function at 0x14000c0e0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x50
movsxd rsi, dword [0x140018244]
mov rbx, rcx
test esi, esi
jle 0x14000c210
mov rax, qword [0x140018248]
xor r9d, r9d
add rax, 0x18
nop word [rax + rax]
mov r8, qword [rax]
cmp rbx, r8
jb 0x14000c12b
mov rdx, qword [rax + 8]
mov edx, dword [rdx + 8]
add r8, rdx
cmp rbx, r8
jb 0x14000c1b5
add r9d, 1
add rax, 0x28
cmp r9d, esi
jne 0x14000c110
mov rcx, rbx
call dbg.__mingw_GetSectionForAddress
mov rdi, rax
test rax, rax
je 0x14000c232
mov rax, qword [0x140018248]
lea rbx, [rsi + rsi*4]
shl rbx, 3
add rax, rbx
mov qword [rax + 0x20], rdi
mov dword [rax], 0
call dbg._GetPEImageBase
mov edx, dword [rdi + 0xc]
mov r8d, 0x30
lea rcx, [rax + rdx]
mov rax, qword [0x140018248]
lea rdx, [rsp + 0x20]
mov qword [rax + rbx + 0x18], rcx
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
test rax, rax
je 0x14000c217
mov eax, dword [rsp + 0x44]
lea edx, [rax - 4]
and edx, 0xfffffffb
je 0x14000c1ae
lea edx, [rax - 0x40]
and edx, 0xffffffbf
jne 0x14000c1c0
add dword [0x140018244], 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 [0x140018248]
mov qword [rbx + 8], rcx
mov r9, rbx
mov qword [rbx + 0x10], rdx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14000c1ae
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.__VirtualProtect_failed_with_code_0x_x
mov edx, eax
call dbg.__report_error
nop dword [rax]
xor esi, esi
jmp 0x14000c138
mov rax, qword [0x140018248]
mov edx, dword [rdi + 8]
lea rcx, str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov r8, qword [rax + rbx + 0x18]
call dbg.__report_error
mov rdx, rbx
lea rcx, str.Address__p_has_no_image_section
call dbg.__report_error
nop
nop word cs:[rax + rax]
nop dword [rax]

Function at 0x14000c7c0
Capabilities:
Get thread local storage value

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x20
lea r12, [0x1400182a0]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x140018280]
test rbx, rbx
je 0x14000c81c
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 rsi, rsi
je 0x14000c813
test eax, eax
jne 0x14000c813
mov rax, qword [rbx + 8]
mov rcx, rsi
call rax
mov rbx, qword [rbx + 0x10]
test rbx, rbx
jne 0x14000c7f8
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 0x14000ca30
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [rcx], 0x5a4d
jne 0x14000ca48
movsxd rdx, dword [rcx + 0x3c]
add rcx, rdx
cmp dword [rcx], 0x4550
je 0x14000ca50
ret
xor eax, eax
cmp word [rcx + 0x18], 0x20b
sete al
ret

Function at 0x14000ca60
Capabilities:
Enumerate pe sections

Disassembly:
movsxd rax, dword [rcx + 0x3c]
add rcx, rax
movzx eax, word [rcx + 0x14]
movzx r8d, word [rcx + 6]
lea rax, [rcx + rax + 0x18]
test r8w, r8w
je 0x14000caad
lea ecx, [r8 - 1]
lea rcx, [rcx + rcx*4]
lea r9, [rax + rcx*8 + 0x28]
nop dword [rax + rax]
mov r8d, dword [rax + 0xc]
mov rcx, r8
cmp rdx, r8
jb 0x14000caa4
add ecx, dword [rax + 8]
cmp rdx, rcx
jb 0x14000caaf
add rax, 0x28
cmp rax, r9
jne 0x14000ca90
xor eax, eax
ret

Function at 0x14000cab0
Capabilities:
Parse pe header

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x20
mov rsi, rcx
call sym.strlen
cmp rax, 8
ja 0x14000cb40
mov rdx, qword [0x1400155f0]
xor ebx, ebx
cmp word [rdx], 0x5a4d
jne 0x14000cb2e
movsxd rax, dword [rdx + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
jne 0x14000cb2e
cmp word [rax + 0x18], 0x20b
jne 0x14000cb2e
movzx edx, word [rax + 0x14]
lea rbx, [rax + rdx + 0x18]
movzx edx, word [rax + 6]
test dx, dx
je 0x14000cb40
lea eax, [rdx - 1]
lea rax, [rax + rax*4]
lea rdi, [rbx + rax*8 + 0x28]
jmp 0x14000cb19
add rbx, 0x28
cmp rbx, rdi
je 0x14000cb40
mov r8d, 8
mov rdx, rsi
mov rcx, rbx
call sym.strncmp
test eax, eax
jne 0x14000cb10
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret
xor ebx, ebx
mov rax, rbx
add rsp, 0x20
pop rbx
pop rsi
pop rdi
ret

Function at 0x14000cb50
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1400155f0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x14000cb70
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x14000cb78
ret
cmp word [r8 + 0x18], 0x20b
jne 0x14000cb70
movzx eax, word [r8 + 0x14]
sub rcx, rdx
lea rax, [r8 + rax + 0x18]
movzx r8d, word [r8 + 6]
test r8w, r8w
je 0x14000cbcd
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 0x14000cbc4
add edx, dword [rax + 8]
cmp rcx, rdx
jb 0x14000cb70
add rax, 0x28
cmp rax, r9
jne 0x14000cbb0
xor eax, eax
ret

Function at 0x14000cbd0
Capabilities:
Parse pe header

Disassembly:
mov rax, qword [0x1400155f0]
xor ecx, ecx
cmp word [rax], 0x5a4d
jne 0x14000cbef
movsxd rdx, dword [rax + 0x3c]
add rax, rdx
cmp dword [rax], 0x4550
je 0x14000cbf8
mov eax, ecx
ret
cmp word [rax + 0x18], 0x20b
jne 0x14000cbef
movzx ecx, word [rax + 6]
mov eax, ecx
ret
Function at 0x14000cc10
Capabilities:
Parse pe header

Disassembly:
mov r8, qword [0x1400155f0]
xor eax, eax
cmp word [r8], 0x5a4d
jne 0x14000cc30
movsxd rdx, dword [r8 + 0x3c]
add rdx, r8
cmp dword [rdx], 0x4550
je 0x14000cc38
ret
cmp word [rdx + 0x18], 0x20b
jne 0x14000cc30
movzx eax, word [rdx + 0x14]
movzx r8d, word [rdx + 6]
lea rax, [rdx + rax + 0x18]
test r8w, r8w
je 0x14000cc80
lea edx, [r8 - 1]
lea rdx, [rdx + rdx*4]
lea rdx, [rax + rdx*8 + 0x28]
nop dword [rax]
test byte [rax + 0x27], 0x20
je 0x14000cc77
test rcx, rcx
je 0x14000cc30
sub rcx, 1
add rax, 0x28
cmp rdx, rax
jne 0x14000cc68
xor eax, eax
ret

Function at 0x14000cc90
Capabilities:
Parse pe header

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

Function at 0x14000ccd0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov rdx, qword [0x1400155f0]
xor eax, eax
cmp word [rdx], 0x5a4d
jne 0x14000ccf0
movsxd r8, dword [rdx + 0x3c]
add r8, rdx
cmp dword [r8], 0x4550
je 0x14000ccf8
ret
cmp word [r8 + 0x18], 0x20b
jne 0x14000ccf0
sub rcx, rdx
movzx r9d, word [r8 + 6]
movzx edx, word [r8 + 0x14]
lea rdx, [r8 + rdx + 0x18]
test r9w, r9w
je 0x14000ccf0
lea eax, [r9 - 1]
lea rax, [rax + rax*4]
lea r9, [rdx + rax*8 + 0x28]
nop word cs:[rax + rax]
mov r8d, dword [rdx + 0xc]
mov rax, r8
cmp rcx, r8
jb 0x14000cd44
add eax, dword [rdx + 8]
cmp rcx, rax
jb 0x14000cd50
add rdx, 0x28
cmp rdx, r9
jne 0x14000cd30
xor eax, eax
ret
mov eax, dword [rdx + 0x24]
not eax
shr eax, 0x1f
ret

Function at 0x14000cd60
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov r11, qword [0x1400155f0]
xor r9d, r9d
cmp word [r11], 0x5a4d
jne 0x14000cd82
movsxd r8, dword [r11 + 0x3c]
add r8, r11
cmp dword [r8], 0x4550
je 0x14000cd90
mov rax, r9
ret
cmp word [r8 + 0x18], 0x20b
jne 0x14000cd82
mov eax, dword [r8 + 0x90]
test eax, eax
je 0x14000cd82
movzx edx, word [r8 + 0x14]
movzx r10d, word [r8 + 6]
lea rdx, [r8 + rdx + 0x18]
test r10w, r10w
je 0x14000cd82
lea r8d, [r10 - 1]
lea r8, [r8 + r8*4]
lea r10, [rdx + r8*8 + 0x28]
nop word cs:[rax + rax]
mov r9d, dword [rdx + 0xc]
mov r8, r9
cmp rax, r9
jb 0x14000cde5
add r8d, dword [rdx + 8]
cmp rax, r8
jb 0x14000cdf8
add rdx, 0x28
cmp r10, rdx
jne 0x14000cdd0
xor r9d, r9d
mov rax, r9
ret
add rax, r11
jmp 0x14000ce07
sub ecx, 1
add rax, 0x14
mov r8d, dword [rax + 4]
test r8d, r8d
jne 0x14000ce17
mov edx, dword [rax + 0xc]
test edx, edx
je 0x14000cdee
test ecx, ecx
jg 0x14000ce00
mov r9d, dword [rax + 0xc]
add r9, r11
mov rax, r9
ret
Function at 0x140001bd0
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x40
mov rax, qword [0x140006008]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rbx, r8
mov rdi, rcx
mov ecx, send
call fcn.140002310
mov r9, rax
mov rax, qword [rbx]
mov qword [r9], rax
lea rax, [0x1400011e0]
mov qword [r9 + 8], rax
mov qword [rsp + 0x30], r9
lea rbx, [rdi + 8]
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], 0
lea r8, [0x140002010]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov qword [rdi], rax
test rax, rax
je 0x140001c57
mov rax, rdi
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.1400022f0
mov rbx, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
mov dword [rbx], 0
mov ecx, 6
call qword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
int3

Function at 0x140002c84
Capabilities:
Parse pe header

Disassembly:
sub rsp, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140002cce
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x140002cce
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x140002cce
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x140002cce
cmp dword [rcx + 0x84], 0xe
jbe 0x140002cce
cmp dword [rcx + 0xf8], 0
setne al
jmp 0x140002cd0
xor al, al
add rsp, 0x28
ret
Function at 0x140001000
Capabilities:
Print debug messages

Disassembly:
mov qword [rsp + 8], rcx
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
push rsi
push rdi
sub rsp, 0x848
mov rax, qword [0x1400160d0]
xor rax, rsp
mov qword [rsp + 0x830], rax
mov rdi, rcx
lea rcx, [rsp + 0x32]
xor esi, esi
xor edx, edx
mov r8d, 0x7fe
mov word [rsp + 0x30], si
call fcn.140006c10
test rdi, rdi
je 0x140001127
mov qword [rsp + 0x840], rbx
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebx, 0x400
lea r9, str.SISVC
lea r8, str._s__X_:
lea rcx, [rsp + 0x30]
mov rdx, rbx
mov dword [rsp + 0x20], eax
call fcn.140003df4
mov r8, qword [rsp + 0x860]
mov rdx, rbx
movsxd rdi, eax
lea r9, [rsp + 0x868]
lea rcx, [rsp + rdi*2 + 0x30]
sub rdx, rdi
call fcn.140003fc4
lea r8, [0x1400121e4]
lea rcx, [rsp + 0x30]
add eax, edi
cdqe
sub rbx, rax
mov rdx, rbx
call fcn.140003fdc
mov rbx, qword [rsp + 0x840]
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rsp + 0x30]
repne scasw ax, word [rdi]
not rcx
dec rcx
cmp rcx, 2
je 0x14000111c
lea rdx, [rsp + 0x30]
lea r8d, [rsi + 0x20]
nop
cmp word [rdx], 0xa
jne 0x1400010fa
mov word [rdx], r8w
or rcx, 0xffffffffffffffff
xor eax, eax
inc esi
lea rdi, [rsp + 0x30]
add rdx, 2
repne scasw ax, word [rdi]
mov eax, esi
not rcx
sub rcx, 3
cmp rax, rcx
jb 0x1400010f0
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rcx, qword [rsp + 0x830]
xor rcx, rsp
call fcn.140003d10
add rsp, 0x848
pop rdi
pop rsi
ret
Function at 0x1400016d0
Capabilities:
Modify service

Disassembly:
mov qword [rsp + 0x10], rbx
push rsi
sub rsp, 0x50
mov rsi, rcx
xor edx, edx
mov r8d, 0xf003f
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbx, rax
test rax, rax
je 0x1400017f9
lea rdx, [rsi + 0x20]
mov r8d, 0xf01ff
mov rcx, rax
mov qword [rsp + 0x60], rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
je 0x1400017d8
xor eax, eax
lea rcx, [rsi + 8]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x30], rax
mov dword [rcx], 1
mov rax, qword [rsp + 0x40]
lea rcx, str.Configuring_service
mov dword [rax + 4], 0x3e8
mov rax, qword [rsp + 0x40]
mov dword [rax + 8], 1
mov rax, qword [rsp + 0x40]
mov dword [rax + 0xc], 0x3e8
mov rax, qword [rsp + 0x40]
mov dword [rax + 0x10], 1
mov rax, qword [rsp + 0x40]
mov dword [rax + 0x14], 0x3e8
mov dword [rsp + 0x38], 3
call section..text
lea r8, [rsp + 0x20]
mov edx, 2
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x1400017b4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdi, qword [rsp + 0x60]
xor al, al
mov rbx, qword [rsp + 0x68]
add rsp, 0x50
pop rsi
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdi, qword [rsp + 0x60]
xor al, al
mov rbx, qword [rsp + 0x68]
add rsp, 0x50
pop rsi
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rbx, qword [rsp + 0x68]
xor al, al
add rsp, 0x50
pop rsi
ret

Function at 0x140001c50
Capabilities:
Print debug messages

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
xor esi, esi
mov rbx, rcx
mov dword [rcx + 0x620], 0x30
mov dword [rcx + 0x624], 2
mov dword [rcx + 0x628], 1
mov dword [rcx + 0x62c], esi
mov dword [rcx + 0x630], esi
mov dword [rcx + 0x634], esi
mov dword [rcx + 0x638], esi
lea rdx, [0x140001e60]
add rcx, 0x20
call qword [sym.imp.ADVAPI32.dll_RegisterServiceCtrlHandlerW]
mov qword [rbx + 0x640], rax
test rax, rax
jne 0x140001ccd
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rbx + 0x620]
mov rcx, rax
mov dword [rbx + 0x62c], esi
mov dword [rbx + 0x624], 2
mov dword [rbx + 0x634], esi
mov dword [rbx + 0x638], esi
call qword [sym.imp.ADVAPI32.dll_SetServiceStatus]
test eax, eax
jne 0x140001d03
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rbx
call fcn.140001d40
mov rcx, qword [rbx + 0x650]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, str.exiting_ServiceMain
mov qword [rbx + 0x650], rsi
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp section..text
Function at 0x140001e70
Capabilities:
Print debug messages

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rdi, rcx
lea rcx, str.ServiceCtrlHandler_enter
mov ebx, edx
call section..text
sub ebx, 1
je 0x140001eec
sub ebx, 1
je 0x140001ecb
sub ebx, 1
je 0x140001eaa
cmp ebx, 1
jne 0x140001ef4
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x38]
jmp 0x140001ef4
lea rcx, str.Default_HandleContinue_handler
call section..text
mov rax, qword [rdi]
mov rcx, rdi
mov dword [rdi + 0x624], 4
call qword [rax + 0x20]
jmp 0x140001ef4
lea rcx, str.Default_HandlePause_handler
call section..text
mov rax, qword [rdi]
mov rcx, rdi
mov dword [rdi + 0x624], 7
call qword [rax + 0x18]
jmp 0x140001ef4
mov rcx, rdi
call fcn.140001f10
lea rcx, str.ServiceCtrlHandler_exit
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
jmp section..text

Function at 0x140002040
Capabilities:
Create service
Persist via windows service

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x290
mov rax, qword [0x1400160d0]
xor rax, rsp
mov qword [rsp + 0x280], rax
mov rbx, rcx
xor edx, edx
mov r8d, 0xf003f
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
je 0x140002127
lea rdx, [rsp + 0x70]
mov r8d, 0x104
xor ecx, ecx
mov qword [rsp + 0x2a8], rsi
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
lea r8, [rbx + 0x220]
lea rdx, [rbx + 0x20]
mov r9d, 0xf01ff
mov rcx, rdi
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x110
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rsi, rax
test rax, rax
je 0x14000210e
mov rdx, rax
mov rcx, rbx
call fcn.140002290
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140002114
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rsi, qword [rsp + 0x2a8]
jmp 0x14000212d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rbx
call fcn.1400016d0
mov al, 1
mov rcx, qword [rsp + 0x280]
xor rcx, rsp
call fcn.140003d10
mov rbx, qword [rsp + 0x2b0]
add rsp, 0x290
pop rdi
ret
Function at 0x140002160
Capabilities:
Delete service

Disassembly:
push rbx
push rbp
push rsi
sub rsp, 0x50
mov rsi, rcx
xor edx, edx
mov r8d, 0xf003f
xor ecx, ecx
xor bl, bl
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbp, rax
test rax, rax
je 0x14000227c
lea rdx, [rsi + 0x20]
mov r8d, 0xf01ff
mov rcx, rax
mov qword [rsp + 0x70], rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
je 0x14000225e
lea r8, [rsp + 0x78]
lea rdx, [rsp + 0x20]
mov rcx, rsi
mov qword [rsp + 0x80], r12
call fcn.1400025b0
movzx r12d, al
cmp al, 1
jne 0x1400021df
mov eax, dword [rsp + 0x24]
cmp eax, 4
je 0x1400021f4
cmp eax, 3
jne 0x1400021ff
jmp 0x1400021f4
mov edx, dword [rsp + 0x78]
lea rcx, str.get_status_failed.__error___d
call section..text
test r12b, r12b
je 0x1400021ff
mov rdx, rdi
mov rcx, rsi
call fcn.1400023b0
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_DeleteService]
mov r12, qword [rsp + 0x80]
test eax, eax
je 0x140002237
mov rcx, rdi
mov bl, 1
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdi, qword [rsp + 0x70]
mov al, bl
add rsp, 0x50
pop rsi
pop rbp
pop rbx
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdi, qword [rsp + 0x70]
mov al, bl
add rsp, 0x50
pop rsi
pop rbp
pop rbx
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdi, qword [rsp + 0x70]
mov al, bl
add rsp, 0x50
pop rsi
pop rbp
pop rbx
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov al, bl
add rsp, 0x50
pop rsi
pop rbp
pop rbx
ret
Function at 0x140002290
Capabilities:
Query service status
Start service

Disassembly:
push rbx
sub rsp, 0x60
mov rbx, rdx
test rdx, rdx
je 0x14000239f
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
cmp eax, 1
jne 0x140002399
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x80], rdi
call qword [sym.imp.KERNEL32.dll_GetTickCount]
xor esi, esi
lea edi, [rax + 0x1388]
lea rax, [rsp + 0x78]
lea r8, [rsp + 0x30]
lea r9d, [rsi + 0x24]
xor edx, edx
mov rcx, rbx
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x78], esi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x140002300
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [rsp + 0x34], 4
je 0x140002350
call qword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, edi
jae 0x140002371
mov ecx, dword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rax, [rsp + 0x78]
lea r8, [rsp + 0x30]
mov r9d, 0x24
xor edx, edx
mov rcx, rbx
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x78], esi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x140002349
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [rsp + 0x34], 4
jne 0x140002307
lea rcx, str.Service_is_running.
call section..text
mov rsi, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x80]
mov al, 1
add rsp, 0x60
pop rbx
ret
cmp dword [rsp + 0x34], 4
je 0x140002350
lea rcx, str.Service_did_not_enter_the_running_state
call section..text
mov rsi, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x80]
xor al, al
add rsp, 0x60
pop rbx
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor al, al
add rsp, 0x60
pop rbx
ret

Function at 0x1400023b0
Capabilities:
Query service status
Stop service

Disassembly:
push rdi
sub rsp, 0x60
mov rdi, rdx
test rdx, rdx
je 0x140002498
lea r8, [rsp + 0x30]
mov edx, 1
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x140002492
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x80], rsi
call qword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [rsp + 0x34], 1
lea ebx, [rax + 0x1388]
je 0x140002449
xor esi, esi
nop
call qword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, ebx
jae 0x14000246a
mov ecx, dword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rax, [rsp + 0x78]
lea r8, [rsp + 0x30]
mov r9d, 0x24
xor edx, edx
mov rcx, rdi
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x78], esi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x140002442
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [rsp + 0x34], 1
jne 0x140002400
lea rcx, str.Service_stopped_successfully
call section..text
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x80]
mov al, 1
add rsp, 0x60
pop rdi
ret
cmp dword [rsp + 0x34], 1
je 0x140002449
lea rcx, str.Service_did_not_stop
call section..text
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x80]
xor al, al
add rsp, 0x60
pop rdi
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor al, al
add rsp, 0x60
pop rdi
ret
Function at 0x1400024a0
Capabilities:
Query service status

Disassembly:
mov rax, rsp
push rdi
sub rsp, 0x90
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov rbx, r9
mov rsi, r8
mov rdi, rdx
mov rbp, rcx
xor r8d, r8d
lea rdx, [0x140012cec]
mov rcx, rsi
call fcn.140002ad0
test rdi, rdi
je 0x14000256f
mov dword [rsp + 0xa8], 0
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x20], rax
mov r9d, 0x24
lea r8, [rsp + 0x38]
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x14000255c
lea r8, [rsp + 0x38]
lea rdx, [rsp + 0x60]
mov rcx, rbp
call fcn.140001920
nop
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rax
mov rcx, rsi
call fcn.1400028b0
nop
cmp qword [rsp + 0x80], 8
jb 0x140002558
mov rcx, qword [rsp + 0x68]
call fcn.140004194
mov al, 1
jmp 0x140002592
mov al, 1
jmp 0x140002592
call qword [sym.imp.KERNEL32.dll_GetLastError]
test rbx, rbx
je 0x14000256f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx], eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov edx, eax
lea rcx, str.get_status___failed___error___u
call section..text
test rbx, rbx
je 0x140002590
mov dword [rbx], edi
xor al, al
jmp 0x140002592
xor al, al
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rsp, r11
pop rdi
ret

Function at 0x1400025b0
Capabilities:
Query service status

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
push rsi
push rdi
push r12
sub rsp, 0x30
xor eax, eax
mov rbp, r8
mov rdi, rdx
mov dword [rdx], eax
mov dword [rdx + 4], eax
mov dword [rdx + 8], eax
mov dword [rdx + 0xc], eax
mov dword [rdx + 0x10], eax
mov dword [rdx + 0x14], eax
mov dword [rdx + 0x18], eax
mov dword [rdx + 0x1c], eax
mov rsi, rcx
mov dword [rdx + 0x20], eax
xor ecx, ecx
mov r8d, 0xf003f
xor edx, edx
xor bl, bl
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r12, rax
test rax, rax
je 0x14000269f
lea rdx, [rsi + 0x20]
mov r8d, 0xf01ff
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rsi, rax
test rax, rax
je 0x14000268e
lea rax, [rsp + 0x68]
mov r9d, 0x24
mov r8, rdi
xor edx, edx
mov rcx, rsi
mov dword [rsp + 0x68], 0
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140002652
mov edi, dword [rsp + 0x68]
mov bl, 1
jmp 0x140002660
call qword [sym.imp.KERNEL32.dll_GetLastError]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test bl, bl
jne 0x14000267a
lea rcx, str.get_status_failed.__error___d
mov edx, edi
call section..text
test rbp, rbp
je 0x14000267a
mov dword [rbp], edi
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1400026a5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1400026a5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rbp, qword [rsp + 0x58]
mov al, bl
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop r12
pop rdi
pop rsi
ret