joyce8/EMBER2024-capa huggingface dataset:
Function at 0x140001487
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov rax, qword [0x14005e0c0]
mov dword [rax], 1
mov rax, qword [0x14005e0d0]
mov dword [rax], 1
mov rax, qword [0x14005e0e0]
mov dword [rax], 1
mov rax, qword [0x14005e050]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x1400014d8
mov eax, 0
jmp 0x140001585
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x140001504
mov eax, 0
jmp 0x140001585
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
movzx eax, ax
cmp eax, 0x10b
je 0x14000152a
cmp eax, 0x20b
je 0x140001551
jmp 0x140001580
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x5c]
cmp eax, 0xe
ja 0x14000153d
mov eax, 0
jmp 0x140001585
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0xd0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001585
mov rax, qword [rbp - 0x18]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x6c]
cmp eax, 0xe
ja 0x14000156c
mov eax, 0
jmp 0x140001585
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0xe0]
test eax, eax
setne al
movzx eax, al
jmp 0x140001585
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x140038000
Capabilities:
Encode data using xor
Extract resource via kernel32 functions
Hash data with crc32

Disassembly:
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x20
cmp byte [0x1400674a8], 0
mov r12, rcx
mov r13, rdx
mov rdi, r8
je 0x140038088
lea rdx, [0x14005c35a]
mov rcx, rdi
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x140038190
mov rsi, qword [0x1400674a0]
jmp 0x140038045
lea rsi, [rdx + rax + 4]
mov rdx, rsi
mov rcx, rdi
call sub.msvcrt.dll_strcmp
mov rcx, rsi
mov ebx, eax
call sub.msvcrt.dll_strlen
lea rdx, [rsi + rax + 1]
mov eax, dword [rdx]
test ebx, ebx
jne 0x140038040
movzx r9d, word [rdx + 4]
lea r8, [rdx + 6]
mov rcx, r12
mov rdx, r13
add rsp, 0x20
pop rbx
pop rsi
pop rdi
pop r12
pop r13
jmp fcn.1400367a0
mov r8d, 0xa
mov edx, 3
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_FindResourceA]
xor ecx, ecx
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rdx, rax
mov r9d, dword [rax]
mov eax, dword [rax + 4]
lea rcx, [rdx + 8]
mov qword [0x1400674a0], rcx
test eax, eax
je 0x140038178
sub eax, 1
lea r8, [rdx + rax + 9]
mov eax, 0xffffffff
nop dword [rax + rax]
movzx edx, byte [rcx]
xor edx, eax
mov eax, edx
and edx, 1
neg edx
shr eax, 1
and edx, 0xedb88320
xor eax, edx
mov edx, eax
and eax, 1
neg eax
shr edx, 1
and eax, 0xedb88320
xor edx, eax
mov eax, edx
and edx, 1
neg edx
shr eax, 1
and edx, 0xedb88320
xor eax, edx
mov edx, eax
and eax, 1
neg eax
shr edx, 1
and eax, 0xedb88320
xor edx, eax
mov eax, edx
and edx, 1
neg edx
shr eax, 1
and edx, 0xedb88320
xor eax, edx
mov edx, eax
and eax, 1
neg eax
shr edx, 1
and eax, 0xedb88320
xor edx, eax
mov eax, edx
shr eax, 1
and edx, 1
add rcx, 1
neg edx
and edx, 0xedb88320
xor eax, edx
mov edx, eax
and eax, 1
neg eax
shr edx, 1
and eax, 0xedb88320
xor eax, edx
cmp r8, rcx
jne 0x1400380e0
not eax
cmp r9d, eax
jne 0x1400381f8
mov byte [0x1400674a8], 1
jmp 0x14003801d
cmp byte [0x140067498], 0
jne 0x140038034
mov rbx, qword [sym.imp.python311.dll_PyDict_New]
call rbx
mov qword [0x1400674f0], rax
call rbx
mov qword [0x1400674e8], rax
call rbx
mov qword [0x1400674e0], rax
call rbx
mov qword [0x140067520], rax
call rbx
mov qword [0x140067518], rax
call rbx
mov qword [0x140067510], rax
call rbx
mov qword [0x140067500], rax
call rbx
mov byte [0x140067498], 1
mov qword [0x1400674f8], rax
jmp 0x140038034
lea rcx, str.Error__corrupted_constants_object
call sub.msvcrt.dll_puts
call sub.msvcrt.dll_abort
nop
nop word [rax + rax]
Function at 0x140042bb0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0x38
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov qword [rbp + 0x30], r8
mov qword [rbp + 0x38], r9
lea rax, [rbp + 0x28]
mov qword [rbp - 8], rax
mov ecx, 2
call fcn.1400540c0
mov r9, rax
mov r8d, 0x1b
mov edx, 1
lea rax, str.Mingw_w64_runtime_failure:_n
mov rcx, rax
call sub.msvcrt.dll_fwrite
mov rbx, qword [rbp - 8]
mov ecx, 2
call fcn.1400540c0
mov r8, rbx
mov rdx, qword [rbp + 0x20]
mov rcx, rax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop

Function at 0x140043862
Capabilities:
Get thread local storage value

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x30
mov eax, dword [0x140067628]
test eax, eax
je 0x1400438fa
lea rax, [0x140067600]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call rax
mov rax, qword [0x140067630]
mov qword [rbp - 8], rax
jmp 0x1400438de
mov rax, qword [rbp - 8]
mov eax, dword [rax]
mov ecx, eax
mov rax, qword [sym.imp.KERNEL32.dll_TlsGetValue]
call rax
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.KERNEL32.dll_GetLastError]
call rax
test eax, eax
jne 0x1400438d2
cmp qword [rbp - 0x10], 0
je 0x1400438d2
mov rax, qword [rbp - 8]
mov rdx, qword [rax + 8]
mov rax, qword [rbp - 0x10]
mov rcx, rax
call rdx
mov rax, qword [rbp - 8]
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x140043898
lea rax, [0x140067600]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call rax
jmp 0x1400438fb
nop
add rsp, 0x30
pop rbp
ret

Function at 0x140043a00
Capabilities:
Parse pe header

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov rax, qword [rbp + 0x10]
mov qword [rbp - 8], rax
mov rax, qword [rbp - 8]
movzx eax, word [rax]
cmp ax, 0x5a4d
je 0x140043a28
mov eax, 0
jmp 0x140043a76
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp - 8]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov eax, dword [rax]
cmp eax, 0x4550
je 0x140043a51
mov eax, 0
jmp 0x140043a76
mov rax, qword [rbp - 0x10]
add rax, 0x18
mov qword [rbp - 0x18], rax
mov rax, qword [rbp - 0x18]
movzx eax, word [rax]
cmp ax, 0x20b
je 0x140043a71
mov eax, 0
jmp 0x140043a76
mov eax, 1
add rsp, 0x20
pop rbp
ret
Function at 0x140043a7c
Capabilities:
Enumerate pe sections

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x20
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x10]
add rax, rdx
mov qword [rbp - 0x18], rax
mov dword [rbp - 0xc], 0
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp - 0x18]
add rax, rdx
add rax, 0x18
mov qword [rbp - 8], rax
jmp 0x140043afa
mov rax, qword [rbp - 8]
mov eax, dword [rax + 0xc]
mov eax, eax
cmp qword [rbp + 0x18], rax
jb 0x140043af1
mov rax, qword [rbp - 8]
mov edx, dword [rax + 0xc]
mov rax, qword [rbp - 8]
mov eax, dword [rax + 8]
add eax, edx
mov eax, eax
cmp qword [rbp + 0x18], rax
jae 0x140043af1
mov rax, qword [rbp - 8]
jmp 0x140043b0f
add dword [rbp - 0xc], 1
add qword [rbp - 8], 0x28
mov rax, qword [rbp - 0x18]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp - 0xc], eax
jb 0x140043ac4
mov eax, 0
add rsp, 0x20
pop rbp
ret
Function at 0x1400020f0
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
push r14
push r15
mov eax, dword [rcx + 0x48]
lea rbx, [rcx + 0x28]
mov rsi, qword [rcx]
lea r11, [rcx + 0x28]
add rbx, rax
mov rdi, rcx
movabs rbp, 0x9e3779b185ebca87
movabs r15, 0x27d4eb2f165667c5
movabs r14, 0xc2b2ae3d27d4eb4f
movabs r12, 0x7a1435883d4d519d
cmp rsi, 0x20
jb 0x1400021eb
mov rcx, qword [rcx + 8]
mov r8, qword [rdi + 0x18]
mov r9, qword [rdi + 0x20]
mov rax, r8
mov rdx, qword [rdi + 0x10]
mov r10, r9
rol r10, 0x12
rol rax, 0xc
add r10, rax
mov rax, rdx
rol rax, 7
add r10, rax
mov rax, rcx
rol rax, 1
add r10, rax
movabs rax, 0x85ebca77c2b2ae63
imul rcx, r14
imul rdx, r14
imul r8, r14
imul r9, r14
rol rcx, 0x1f
imul rcx, rbp
rol rdx, 0x1f
xor r10, rcx
rol r8, 0x1f
imul r10, rbp
imul rdx, rbp
imul r8, rbp
sub r10, r12
rol r9, 0x1f
xor r10, rdx
imul r10, rbp
imul r9, rbp
sub r10, r12
xor r10, r8
imul r10, rbp
sub r10, r12
xor r10, r9
imul r10, rbp
add rax, r10
add rax, rsi
jmp 0x1400021f3
lea rax, [rsi + r15]
add rax, qword [rcx + 0x18]
lea rdx, [rdi + 0x30]
cmp rdx, rbx
ja 0x14000222a
nop dword [rax]
mov rcx, qword [r11]
add rdx, 8
imul rcx, r14
add r11, 8
rol rcx, 0x1f
imul rcx, rbp
xor rax, rcx
rol rax, 0x1b
imul rax, rbp
sub rax, r12
cmp rdx, rbx
jbe 0x140002200
lea rdx, [r11 + 4]
movabs r8, 0x165667b19e3779f9
cmp rdx, rbx
ja 0x140002255
mov ecx, dword [r11]
mov r11, rdx
imul rcx, rbp
xor rax, rcx
rol rax, 0x17
imul rax, r14
add rax, r8
cmp r11, rbx
jae 0x14000227b
nop word [rax + rax]
movzx ecx, byte [r11]
inc r11
imul rcx, r15
xor rax, rcx
rol rax, 0xb
imul rax, rbp
cmp r11, rbx
jb 0x140002260
mov rbx, qword [rsp + 0x20]
mov rcx, rax
mov rbp, qword [rsp + 0x28]
mov rsi, qword [rsp + 0x30]
mov rdi, qword [rsp + 0x38]
shr rcx, 0x21
xor rcx, rax
imul rcx, r14
mov rdx, rcx
shr rdx, 0x1d
xor rdx, rcx
imul rdx, r8
mov rax, rdx
shr rax, 0x20
xor rax, rdx
pop r15
pop r14
pop r12
ret

Function at 0x14000a3f0
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x250
mov rax, qword [0x140029008]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov rdi, r8
lea rax, [rsp + 0x30]
mov rbx, rcx
mov qword [rsp + 0x20], rax
xor r8d, r8d
xor ecx, ecx
xor r9d, r9d
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x14000a435
xor al, al
jmp 0x14000a482
cmp word [rbx], 0
je 0x14000a44d
nop dword [rax + rax]
add rbx, 2
dec rdi
cmp word [rbx], 0
jne 0x14000a440
cmp word [rsp + 0x30], 0
je 0x14000a47b
lea rcx, [rsp + 0x30]
sub rcx, rbx
nop dword [rax]
cmp rdi, 1
jb 0x14000a4a3
movzx eax, word [rcx + rbx]
dec rdi
mov word [rbx], ax
add rbx, 2
cmp word [rcx + rbx], 0
jne 0x14000a460
xor eax, eax
mov word [rbx], ax
mov al, 1
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.14000b730
mov rbx, qword [rsp + 0x270]
add rsp, 0x250
pop rdi
ret
call fcn.14000d9c0
int3
Function at 0x14000ada0
Capabilities:
Create directory

Disassembly:
mov qword [rsp + 0x18], rsi
push rdi
mov eax, 0x2030
call fcn.14001c200
sub rsp, rax
mov rax, qword [0x140029008]
xor rax, rsp
mov qword [rsp + 0x2020], rax
mov r11d, dword [0x14002ad10]
lea rsi, [0x140035d40]
mov rdi, rcx
test r11d, r11d
jne 0x14000ae19
mov r8d, 0x1000
lea rdx, str._HOME_
lea rcx, [rsp + 0x20]
call fcn.14000a4b0
test al, al
je 0x14000aeff
lea rcx, [rsp + 0x20]
call fcn.1400112ec
movsxd r11, dword [0x14002ad10]
mov qword [rsi + r11*8], rax
inc r11d
mov dword [0x14002ad10], r11d
xor r9d, r9d
test r11d, r11d
jle 0x14000ae54
mov r10, rsi
mov r8, qword [r10]
mov rax, rdi
sub r8, rdi
nop dword [rax]
movzx edx, word [rax]
movzx ecx, word [rax + r8]
sub edx, ecx
jne 0x14000ae44
add rax, 2
test ecx, ecx
jne 0x14000ae30
test edx, edx
je 0x14000ae77
inc r9d
add r10, 8
cmp r9d, r11d
jl 0x14000ae24
mov rax, 0xffffffffffffffff
nop dword [rax + rax]
inc rax
cmp word [rdi + rax*2], 0
jne 0x14000ae60
cmp rax, 2
jne 0x14000ae7b
cmp word [rdi + 2], 0x3a
jne 0x14000ae7b
mov al, 1
jmp 0x14000aede
xor edx, edx
mov qword [rsp + 0x2048], rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
setne bl
test eax, eax
jne 0x14000aea8
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x14000aea8
mov bl, 1
jmp 0x14000aeac
test bl, bl
je 0x14000aed3
cmp dword [0x14002ad10], 0x400
jge 0x14000aed3
mov rcx, rdi
call fcn.1400112ec
movsxd rdx, dword [0x14002ad10]
mov qword [rsi + rdx*8], rax
inc edx
mov dword [0x14002ad10], edx
movzx eax, bl
mov rbx, qword [rsp + 0x2048]
mov rcx, qword [rsp + 0x2020]
xor rcx, rsp
call fcn.14000b730
mov rsi, qword [rsp + 0x2050]
add rsp, 0x2030
pop rdi
ret
lea rcx, str._HOME_
call fcn.14000abf0
int3
Function at 0x14000b020
Capabilities:
Check if file exists
Delete file
Get file attributes
Terminate process

Disassembly:
sub rsp, 0x68
mov rcx, qword [0x14002ad18]
test rcx, rcx
je 0x14000b05b
mov edx, 0x1388
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x14000b04e
mov rcx, qword [0x14002ad18]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov rcx, qword [0x14002ad18]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [0x140039d70], 0
je 0x14000b14e
mov qword [rsp + 0x70], rbx
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x78], rbp
lea rbp, [0x140025a20]
mov qword [rsp + 0x80], rsi
lea rsi, [0x140033540]
mov qword [rsp + 0x88], rdi
xor edi, edi
mov qword [rsp + 0x60], r14
mov r14d, 0x414
mov word [rsp + 0x40], r14w
mov qword [rsp + 0x20], rdi
mov dword [rsp + 0x28], 3
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x38], rbp
mov dword [rsp + 0x44], edi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], rbp
call qword [sym.imp.SHELL32.dll_SHFileOperationW]
mov ebx, edi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14000b12f
test al, 0x10
je 0x14000b12f
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x20], rdi
mov dword [rsp + 0x28], 3
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x38], rbp
mov word [rsp + 0x40], r14w
mov dword [rsp + 0x44], edi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], rbp
call qword [sym.imp.SHELL32.dll_SHFileOperationW]
inc ebx
cmp ebx, 0x14
jl 0x14000b0d5
mov rdi, qword [rsp + 0x88]
mov rsi, qword [rsp + 0x80]
mov rbp, qword [rsp + 0x78]
mov rbx, qword [rsp + 0x70]
mov r14, qword [rsp + 0x60]
add rsp, 0x68
ret
Function at 0x14000c038
Capabilities:
Parse pe header

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

Function at 0x14000d9b4
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 8], rbx
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
push rbp
mov rbp, rsp
sub rsp, 0x50
mov ebx, ecx
test r8d, r8d
jne 0x14000d847
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14000d847
mov ecx, 0x5a4d
cmp word [rax], cx
jne 0x14000d847
movsxd rcx, dword [rax + 0x3c]
add rcx, rax
cmp dword [rcx], 0x4550
jne 0x14000d847
mov eax, 0x20b
cmp word [rcx + 0x18], ax
jne 0x14000d847
cmp dword [rcx + 0x84], 0xe
jbe 0x14000d847
cmp dword [rcx + 0xf8], 0
je 0x14000d847
mov ecx, ebx
call fcn.14000d8e8
lea rax, [rbp + 0x18]
mov byte [rbp + 0x28], 0
mov qword [rbp - 0x20], rax
lea r9, [rbp - 0x2c]
lea rax, [rbp + 0x20]
mov qword [rbp - 0x18], rax
lea r8, [rbp - 0x20]
lea rax, [rbp + 0x28]
mov qword [rbp - 0x10], rax
lea rdx, [rbp - 0x28]
mov eax, 2
lea rcx, [rbp - 0x30]
mov dword [rbp - 0x2c], eax
mov dword [rbp - 0x28], eax
call fcn.14000d6d8
cmp dword [rbp + 0x20], 0
je 0x14000d894
mov rbx, qword [rsp + 0x60]
add rsp, 0x50
pop rbp
ret
mov ecx, ebx
call fcn.14000d89c
int3
xor r8d, r8d
xor edx, edx
jmp 0x14000d7e0
Function at 0x14001c140
Capabilities:
Parse pe header

Disassembly:
mov eax, 0x5a4d
cmp word [rcx], ax
jne 0x14001c168
movsxd rdx, dword [rcx + 0x3c]
add rdx, rcx
cmp dword [rdx], 0x4550
jne 0x14001c168
xor eax, eax
mov ecx, 0x20b
cmp word [rdx + 0x18], cx
sete al
ret
xor eax, eax
ret
Function at 0x14000b7e0
Capabilities:
Enumerate services
Query service status
Stop service

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rbx, rcx
mov rax, qword gs:[0x58]
mov rdx, qword [rax]
mov ecx, 0x14
mov eax, dword [rcx + rdx]
mov r8d, 0x10
test al, 1
jne 0x14000b81b
or eax, 1
mov dword [rcx + rdx], eax
lea rcx, [rdx + r8]
call fcn.14000afb0
nop
cmp byte [rdx + r8 + 1], 0
je 0x14000b861
lea rdx, str.unsigned_long___cdecl_MinifilterStopCommand::Execute_int_wchar_t____
lea rdi, [0x1402e2d20]
mov rcx, rdi
call fcn.140011f70
mov rax, qword [0x1402e2d20]
movsxd rcx, dword [rax + 4]
add rcx, rdi
mov dl, 0xa
call fcn.140013b60
movzx edx, al
mov rcx, rdi
call fcn.1400139a0
mov rcx, rdi
call fcn.140010e30
mov rcx, qword [rbx + 8]
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
jmp fcn.140019220
Function at 0x140018b80
Capabilities:
Create service
Modify service

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0xa0]
sub rsp, 0x1a0
mov rax, qword [0x1402d7d18]
xor rax, rsp
mov qword [rbp + 0x98], rax
mov r12, r9
mov r14, r8
mov rdi, rdx
mov rsi, rcx
mov r15, qword [rbp + 0x100]
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov qword [rsi], rax
test rax, rax
jne 0x140018c24
lea edx, [rax + 1]
lea rcx, [rsp + 0x70]
call fcn.140005bf0
xor ebx, ebx
mov qword [rbp + 0x78], rbx
mov qword [rbp + 0x80], 7
mov word [rbp + 0x68], bx
lea rdx, str.Cannot_open_service_manager._Please_run_with_administrative_rights.
lea rcx, [rbp - 0x80]
call fcn.140008650
lea rcx, [rbp - 0x80]
call fcn.14000c0d0
nop
lea rcx, [rsp + 0x70]
call fcn.14000b0b0
lea eax, [rbx + 0x6e]
jmp 0x140018dc6
xor ebx, ebx
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x38], r15
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 0x10
mov r9d, 0xf01ff
mov r8, r14
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov qword [rsi + 8], rax
test rax, rax
jne 0x140018d2c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea edx, [rbx + 1]
lea rcx, [rsp + 0x70]
cmp eax, 0x431
jne 0x140018cdb
call fcn.140005bf0
mov qword [rbp + 0x78], rbx
mov qword [rbp + 0x80], 7
mov word [rbp + 0x68], bx
lea rdx, str.Cannot_open_service._Please_run_with_administrative_rights._ERROR_SERVICE_EXISTS.
lea rcx, [rbp - 0x80]
call fcn.140008650
lea rcx, [rbp - 0x80]
call fcn.14000c0d0
nop
lea rcx, [rsp + 0x70]
call fcn.14000b0b0
mov eax, 0x65f
jmp 0x140018dc6
call fcn.140005bf0
mov qword [rbp + 0x78], rbx
mov qword [rbp + 0x80], 7
mov word [rbp + 0x68], bx
lea rdx, str.Cannot_open_service._Please_run_with_administrative_rights._Error
lea rcx, [rbp - 0x80]
call fcn.140008650
mov edx, edi
lea rcx, [rbp - 0x80]
call fcn.14001ba90
lea rcx, [rbp - 0x80]
call fcn.14000c0d0
nop
lea rcx, [rsp + 0x70]
call fcn.14000b0b0
mov eax, 0x65f
jmp 0x140018dc6
mov qword [rbp + 0x90], r12
lea r8, [rbp + 0x90]
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
mov rax, qword gs:[0x58]
mov rdx, qword [rax]
mov ecx, 0x14
mov eax, dword [rcx + rdx]
mov r8d, 0x10
test al, 1
jne 0x140018d76
or eax, 1
mov dword [rcx + rdx], eax
lea rcx, [rdx + r8]
call fcn.14000afb0
nop
cmp byte [rdx + r8 + 1], 0
je 0x140018dbc
lea rdx, str.Service_installed_successfully
lea rbx, [0x1402e2d20]
mov rcx, rbx
call fcn.140011f70
mov rax, qword [0x1402e2d20]
movsxd rcx, dword [rax + 4]
add rcx, rbx
mov dl, 0xa
call fcn.140013b60
movzx edx, al
mov rcx, rbx
call fcn.1400139a0
mov rcx, rbx
call fcn.140010e30
mov rdx, rdi
call fcn.140018df0
xor eax, eax
mov rcx, qword [rbp + 0x98]
xor rcx, rsp
call fcn.140154660
add rsp, 0x1a0
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
Function at 0x140018df0
Capabilities:
Modify service

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x18], rsi
push rdi
sub rsp, 0x90
mov rax, qword [0x1402d7d18]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov rbx, rdx
mov qword [r11 - 0x30], 1
xor ecx, ecx
mov qword [r11 - 0x28], 1
mov qword [r11 - 0x20], rcx
mov dword [rsp + 0x20], 0xffffffff
mov qword [r11 - 0x68], rcx
mov qword [r11 - 0x70], rcx
mov dword [rsp + 0x38], 3
lea rax, [r11 - 0x30]
mov qword [r11 - 0x58], rax
mov qword [r11 - 0x40], rcx
mov qword [r11 - 0x38], 7
mov word [rsp + 0x48], cx
xor edx, edx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
je 0x140018fc2
mov r8d, 0xf003f
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
je 0x140018f3e
lea r8, [rsp + 0x20]
mov edx, 2
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jg 0x140018f27
mov rcx, qword gs:[0x58]
mov rdx, qword [rcx]
mov eax, 0x14
mov r9d, eax
mov eax, dword [rax + rdx]
mov ecx, 0x10
mov r8d, ecx
test al, 1
jne 0x140018ee1
or eax, 1
mov dword [r9 + rdx], eax
add rcx, rdx
call fcn.14000afb0
nop
cmp byte [rdx + r8 + 1], 0
je 0x140018f27
lea rdx, str.Cannot_set_recovery_bahaviour_
lea rbx, [0x1402e2d20]
mov rcx, rbx
call fcn.140011f70
mov rax, qword [0x1402e2d20]
movsxd rcx, dword [rax + 4]
add rcx, rbx
mov dl, 0xa
call fcn.140013b60
movzx edx, al
mov rcx, rbx
call fcn.1400139a0
mov rcx, rbx
call fcn.140010e30
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14001903c
mov rax, qword gs:[0x58]
mov rdx, qword [rax]
mov eax, 0x14
mov r9d, eax
mov eax, dword [rax + rdx]
mov ecx, 0x10
mov r8d, ecx
test al, 1
jne 0x140018f71
or eax, 1
mov dword [r9 + rdx], eax
add rcx, rdx
call fcn.14000afb0
nop
cmp byte [rdx + r8 + 1], 0
je 0x140018fb7
lea rdx, str.Cannot_open_service_
lea rbx, [0x1402e2d20]
mov rcx, rbx
call fcn.140011f70
mov rax, qword [0x1402e2d20]
movsxd rcx, dword [rax + 4]
add rcx, rbx
mov dl, 0xa
call fcn.140013b60
movzx edx, al
mov rcx, rbx
call fcn.1400139a0
mov rcx, rbx
call fcn.140010e30
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14001903c
mov rax, qword gs:[0x58]
mov rdx, qword [rax]
mov eax, 0x14
mov r9d, eax
mov eax, dword [rax + rdx]
mov ecx, 0x10
mov r8d, ecx
test al, 1
jne 0x140018ff5
or eax, 1
mov dword [r9 + rdx], eax
add rcx, rdx
call fcn.14000afb0
nop
cmp byte [rdx + r8 + 1], 0
je 0x14001903c
lea rdx, str.Cannot_connect_to_the_service_control_manager_
lea rbx, [0x1402e2d20]
mov rcx, rbx
call fcn.140011f70
mov rax, qword [0x1402e2d20]
movsxd rcx, dword [rax + 4]
add rcx, rbx
mov dl, 0xa
call fcn.140013b60
movzx edx, al
mov rcx, rbx
call fcn.1400139a0
mov rcx, rbx
call fcn.140010e30
nop
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.140154660
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret