joyce8/EMBER2024-capa huggingface dataset:
Function at 0x14002aa10
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov ebx, ecx
mov rbp, rdx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
movzx edx, bx
mov r8d, 0xa
mov rcx, rax
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rdx, rax
mov rcx, rsi
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov rdx, rdi
mov rcx, rsi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov r8d, eax
mov rdx, rbx
mov rcx, rbp
mov rbx, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
jmp 0x14002ab70
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov rbx, rcx
mov rdi, r8
mov rcx, qword [rcx]
mov rsi, rdx
test rcx, rcx
je 0x14002ab9e
call fcn.1400e1934
xor eax, eax
mov qword [rbx], rax
mov qword [rbx + 8], rax
mov rcx, qword [rbx]
test rcx, rcx
je 0x14002abb0
mov rdx, rdi
call fcn.1400e1944
jmp 0x14002abb8
mov rcx, rdi
call fcn.1400e193c
mov rcx, rax
mov qword [rbx], rax
add rcx, qword [rbx + 8]
mov r8, rdi
mov rdx, rsi
call fcn.1400ac270
mov rsi, qword [rsp + 0x38]
mov qword [rbx + 8], rdi
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
Function at 0x14002ac50
Capabilities:
Enumerate files on windows

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rax - 0xc8]
sub rsp, 0x1b0
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov rdi, r8
mov rbx, rdx
mov qword [rsp + 0x38], reloc.WS2_32.dll_ntohs
xor r14d, r14d
mov qword [rsp + 0x30], r14
mov byte [rsp + 0x20], r14b
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rcx
lea rcx, [rsp + 0x20]
call fcn.1400075c0
nop
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rbx
lea rcx, [rsp + 0x20]
call fcn.140007fa0
lea rcx, [rsp + 0x20]
cmp qword [rsp + 0x38], 0x10
cmovae rcx, qword [rsp + 0x20]
lea rdx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x14002ae04
movabs r15, 0x555555555555554
nop dword [rax]
nop word [rax + rax]
mov qword [rsp + 0x58], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x50], r14
mov byte [rsp + 0x40], 0
cmp byte [rbp - 0x64], 0
jne 0x14002ad1e
mov r8, r14
jmp 0x14002ad30
lea rax, [rbp - 0x64]
or r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], 0
jne 0x14002ad26
lea rdx, [rbp - 0x64]
lea rcx, [rsp + 0x40]
call fcn.1400080d0
nop
mov rbx, qword [rdi]
lea r9, [rsp + 0x40]
mov r8, qword [rbx + 8]
mov rdx, rbx
mov rcx, rdi
call fcn.14000b0e0
mov rdx, qword [rdi + 8]
mov rcx, r15
sub rcx, rdx
cmp rcx, 1
jb 0x14002adf7
lea rcx, [rdx + 1]
mov qword [rdi + 8], rcx
mov qword [rbx + 8], rax
mov rcx, qword [rax + 8]
mov qword [rcx], rax
mov rax, qword [rsp + 0x58]
cmp rax, 0x10
jb 0x14002adbd
inc rax
mov rcx, qword [rsp + 0x40]
cmp rax, 0x1000
jb 0x14002adb8
test cl, 0x1f
jne 0x14002ade6
mov rax, qword [rcx - 8]
cmp rax, rcx
jae 0x14002ade0
sub rcx, rax
cmp rcx, 8
jb 0x14002adda
cmp rcx, 0x27
ja 0x14002add4
mov rcx, rax
call fcn.14007b800
lea rdx, [rsp + 0x70]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x14002adec
jmp 0x14002ad00
call fcn.1400e462c
int3
call fcn.1400e462c
int3
call fcn.1400e462c
int3
call fcn.1400e462c
int3
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x14002ae04
lea rcx, str.list_T__too_long
call fcn.14007e074
nop
mov rax, qword [rsp + 0x38]
cmp rax, 0x10
jb 0x14002ae5c
inc rax
mov rcx, qword [rsp + 0x20]
cmp rax, 0x1000
jb 0x14002ae57
test cl, 0x1f
je 0x14002ae2a
call fcn.1400e462c
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x14002ae39
call fcn.1400e462c
int3
sub rcx, rax
cmp rcx, 8
jae 0x14002ae48
call fcn.1400e462c
int3
cmp rcx, 0x27
jbe 0x14002ae54
call fcn.1400e462c
int3
mov rcx, rax
call fcn.14007b800
lea r11, [rsp + 0x1b0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
Function at 0x14002d2e0
Capabilities:
Create thread
Terminate thread

Disassembly:
sub rsp, 0x38
mov eax, dword [0x14017cd88]
cmp dword [0x14017cd8c], eax
je 0x14002d307
mov dword [0x14017cd8c], eax
mov dword [0x14017cd90], 0
add rsp, 0x38
ret
mov eax, dword [0x14017cd90]
inc eax
mov dword [0x14017cd90], eax
cmp eax, 0x258
jl 0x14002d36e
mov rcx, qword [0x14017cd40]
xor edx, edx
mov dword [rsp + 0x40], 0
call qword [sym.imp.KERNEL32.dll_TerminateThread]
test eax, eax
je 0x14002d364
lea rax, [rsp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea r8, section..code1
xor edx, edx
mov dword [rsp + 0x20], 0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x14017cd40], rax
mov dword [0x14017cd90], 0
add rsp, 0x38
ret
Function at 0x14002d9e0
Capabilities:
Check if file exists
Create process on windows
Get common file path

Disassembly:
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x210
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov qword [rsp + 0x228], rbx
movzx ebx, dl
mov rdi, rcx
mov rcx, qword [rcx]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x14002da19
or ebx, 0xffffffff
jmp 0x14002dbdb
mov edx, 0x104
lea rcx, [rsp + 0x100]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edx, Ordinal_46
lea rcx, [rsp + 0x70]
call fcn.140024260
cmp qword [rax + 0x18], 0x10
jb 0x14002da45
mov rax, qword [rax]
mov rdx, rax
lea rcx, [rsp + 0x100]
call qword [sym.imp.SHLWAPI.dll_PathAppendA]
mov rax, qword [rsp + 0x88]
cmp rax, 0x10
jb 0x14002dab1
inc rax
mov rcx, qword [rsp + 0x70]
cmp rax, 0x1000
jb 0x14002daac
test cl, 0x1f
je 0x14002da7f
call fcn.1400e462c
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x14002da8e
call fcn.1400e462c
int3
sub rcx, rax
cmp rcx, 8
jae 0x14002da9d
call fcn.1400e462c
int3
cmp rcx, 0x27
jbe 0x14002daa9
call fcn.1400e462c
int3
mov rcx, rax
call fcn.14007b800
call fcn.14000bcc0
mov rcx, rax
test rax, rax
jne 0x14002dac9
mov ecx, 0x80004005
call fcn.14000b790
int3
mov rax, qword [rax]
call qword [rax + Ordinal_26]
add rax, 0x18
mov qword [rsp + 0x230], rax
lea rax, [0x14012fdb4]
lea r9, [0x14012d6a0]
test bl, bl
cmovne r9, rax
mov rax, qword [rdi]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x100]
lea rdx, str._s__s_s___s_
lea rcx, [rsp + 0x230]
call fcn.14000bb10
mov dword [rsp + 0x90], WSASetLastError
xor edx, edx
lea r8d, [rdx + 0x60]
lea rcx, [rsp + 0x98]
call fcn.1400ad020
mov rbx, qword [rsp + 0x230]
cmp dword [rbx - 8], 1
jle 0x14002db57
mov edx, dword [rbx - 0x10]
lea rcx, [rsp + 0x230]
call fcn.14000b9b0
mov rbx, qword [rsp + 0x230]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x90]
mov qword [rsp + 0x40], rax
xor eax, eax
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], eax
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x14002dbbe
mov edx, reloc.WLDAP32.dll_Ordinal_60
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rdx, [rbx - 0x18]
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14002dbdb
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
mov rdx, qword [rdi]
sub rdx, 0x18
lock xadd dword [rdx + 0x10], ebx
sub ebx, 1
jg 0x14002dbf5
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov rbx, qword [rsp + 0x228]
add rsp, 0x210
pop rdi
ret
Function at 0x140030d50
Capabilities:
Get file version info

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], r8
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov qword [rax - 0x40], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov r14, r8
mov rdi, rdx
xor esi, esi
mov dword [rsp + 0x30], esi
mov qword [rax - 0x50], rsi
mov dword [rax + 0x20], esi
cmp qword [r8 + 0x18], 0x10
jb 0x140030d91
mov rcx, qword [r8]
jmp 0x140030d94
mov rcx, r14
xor edx, edx
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov ebp, eax
test eax, eax
jne 0x140030dc4
mov qword [rdi + 0x18], reloc.WS2_32.dll_ntohs
mov qword [rdi + 0x10], rsi
cmp qword [rdi + 0x18], 0x10
jb 0x140030db9
mov rax, qword [rdi]
jmp 0x140030dbc
mov rax, rdi
mov byte [rax], 0
jmp 0x140030ee4
mov rcx, rbp
call fcn.14007b84c
mov rbx, rax
cmp qword [r14 + 0x18], 0x10
jb 0x140030ddb
mov rcx, qword [r14]
jmp 0x140030dde
mov rcx, r14
mov r9, rbx
mov r8d, ebp
xor edx, edx
call sub.VERSION.dll_GetFileVersionInfoA
mov rcx, rbx
test eax, eax
jne 0x140030df9
call fcn.14007b854
jmp 0x140030da1
lea r9, [rsp + 0xa8]
lea r8, [rsp + 0x38]
lea rdx, reloc.SHELL32.dll_PathGetShortPath
call sub.VERSION.dll_VerQueryValueW
mov rcx, rbx
test eax, eax
jne 0x140030e20
call fcn.14007b854
jmp 0x140030da1
mov rax, qword [rsp + 0x38]
movzx ebp, word [rax + 0xa]
movzx r15d, word [rax + 8]
movzx r12d, word [rax + 0xe]
movzx r13d, word [rax + 0xc]
call fcn.14007b854
call fcn.14000bcc0
mov rcx, rax
test rax, rax
jne 0x140030e55
mov ecx, 0x80004005
call fcn.14000b790
int3
mov rax, qword [rax]
call qword [rax + Ordinal_26]
add rax, 0x18
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], r12d
mov r9d, r15d
mov r8d, ebp
lea rdx, str._d._d._d._d
lea rcx, [rsp + 0x40]
call fcn.14000bb10
mov qword [rdi + 0x18], reloc.WS2_32.dll_ntohs
mov qword [rdi + 0x10], rsi
cmp qword [rdi + 0x18], 0x10
jb 0x140030e9d
mov rax, qword [rdi]
jmp 0x140030ea0
mov rax, rdi
mov byte [rax], 0
or rbp, 0xffffffffffffffff
mov rbx, qword [rsp + 0x40]
cmp byte [rbx], 0
je 0x140030ebd
mov rsi, rbp
inc rsi
cmp byte [rbx + rsi], 0
jne 0x140030eb4
mov r8, rsi
mov rdx, rbx
mov rcx, rdi
call fcn.1400080d0
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], ebp
sub ebp, 1
jg 0x140030ee4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
mov rcx, r14
call fcn.140007010
mov rax, rdi
mov rbx, qword [rsp + 0x90]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
Function at 0x1400312a0
Capabilities:
Get file size
Read file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rdx
push rsi
push rdi
push r14
sub rsp, 0x50
mov qword [rax - 0x28], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov r14, r8
mov rdi, rdx
xor bl, bl
cmp qword [rdx + 0x18], 0x10
jb 0x1400312d3
mov rcx, qword [rdx]
jmp 0x1400312d6
mov rcx, rdi
xor ebp, ebp
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], ebp
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [rbp + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x140031349
mov dword [rsp + 0x88], ebp
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov edx, eax
mov rcx, r14
call fcn.14000d0a0
mov qword [rsp + 0x20], rbp
lea r9, [rsp + 0x88]
mov r8d, ebx
mov rdx, qword [r14]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, 1
mov rcx, rdi
call fcn.140007010
movzx eax, bl
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x80]
add rsp, 0x50
pop r14
pop rdi
pop rsi
ret

Function at 0x140032b90
Capabilities:
Check if file exists
Read file on windows

Disassembly:
mov rax, rsp
push rdi
sub rsp, 0x80
lea rcx, [rax + 0x10]
mov qword [rax + 0x18], rbx
mov edi, 0xfffffffe
call fcn.1400329a0
mov rcx, qword [rsp + 0x98]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
or ebx, 0xffffffff
test eax, eax
jne 0x140032bc9
mov edi, ebx
jmp 0x140032c7c
mov rcx, qword [rsp + 0x98]
xor r9d, r9d
mov qword [rsp + 0x30], 0
mov edx, 0x80000000
mov dword [rsp + 0x28], 0x80
mov qword [rsp + 0xa8], rsi
lea r8d, [r9 + 1]
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x140032c74
xor eax, eax
lea r9, [rsp + 0x90]
mov r8d, 0x104
mov qword [rsp + 0x40], rax
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x48], rax
mov rcx, rsi
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rax
mov dword [rsp + 0x90], eax
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
lea rcx, [rsp + 0x40]
call fcn.1400e6e78
mov rcx, rsi
mov edi, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rsi, qword [rsp + 0xa8]
mov rdx, qword [rsp + 0x98]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], ebx
sub ebx, 1
mov rbx, qword [rsp + 0xa0]
jg 0x140032ca4
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.WS2_32.dll_htonl + 8]
mov eax, edi
add rsp, 0x80
pop rdi
ret
Function at 0x140032cc0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x50
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rsp + 0x70], rbx
mov ebx, ecx
lea rcx, [rsp + 0x88]
call fcn.1400329a0
nop
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
or edi, 0xffffffff
cmp rax, 0xffffffffffffffff
je 0x140032e15
call fcn.14000bcc0
mov rcx, rax
test rax, rax
jne 0x140032d40
mov ecx, 0x80004005
call fcn.14000b790
int3
mov rax, qword [rax]
call qword [rax + Ordinal_26]
add rax, 0x18
mov qword [rsp + 0x80], rax
mov r8d, ebx
lea rdx, [0x14012fe48]
lea rcx, [rsp + 0x80]
call fcn.14000bb10
mov rbx, qword [rsp + 0x80]
mov ebp, dword [rbx - 0x10]
mov dword [rsp + 0x78], 0
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, 0x104
or eax, ecx
jge 0x140032daa
mov edx, 0x104
lea rcx, [rsp + 0x80]
call fcn.14000bfd0
mov rbx, qword [rsp + 0x80]
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x78]
mov r8d, ebp
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
call fcn.1400e520c
test eax, eax
js 0x140032e0a
cmp eax, dword [rbx - 0xc]
jg 0x140032e0a
mov dword [rbx - 0x10], eax
cdqe
mov byte [rax + rbx], 0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rdx, [rbx - 0x18]
mov eax, edi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140032e15
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
jmp 0x140032e15
mov ecx, 0x80070057
call fcn.14000b790
nop
mov rdx, qword [rsp + 0x88]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], edi
sub edi, 1
jg 0x140032e34
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov rbx, qword [rsp + 0x70]
add rsp, 0x50
pop rdi
pop rsi
pop rbp
ret
Function at 0x140033c10
Capabilities:
Query service configuration

Disassembly:
push rbp
push rdi
sub rsp, 0x28
mov rdi, rcx
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdx, qword [rdi]
mov rbp, rax
test rax, rax
jne 0x140033c58
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140033c4f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
xor al, al
add rsp, 0x28
pop rdi
pop rbp
ret
mov r8d, reloc.WS2_32.dll_setsockopt
mov qword [rsp + 0x20], r14
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov r14, rax
test rax, rax
jne 0x140033ca8
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdx, qword [rdi]
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140033c9a
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
xor al, al
mov r14, qword [rsp + 0x20]
add rsp, 0x28
pop rdi
pop rbp
ret
mov qword [rsp + 0x40], rbx
mov edx, 0x1000
mov ecx, 0x40
mov qword [rsp + 0x50], rsi
xor bl, bl
mov dword [rsp + 0x48], 0
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x140033d07
lea r9, [rsp + 0x48]
mov r8d, 0x1000
mov rdx, rax
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
je 0x140033cfe
cmp dword [rsi + 4], 2
mov eax, 1
movzx ebx, bl
cmove ebx, eax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdx, qword [rdi]
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
mov rsi, qword [rsp + 0x50]
sub eax, 1
jg 0x140033d3c
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.WS2_32.dll_htonl + 8]
mov r14, qword [rsp + 0x20]
movzx eax, bl
mov rbx, qword [rsp + 0x40]
add rsp, 0x28
pop rdi
pop rbp
ret
Function at 0x140033d60
Capabilities:
Modify service

Disassembly:
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x60
mov rdi, rcx
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdx, qword [rdi]
mov rsi, rax
test rax, rax
jne 0x140033db2
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140033da2
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
xor al, al
mov rsi, qword [rsp + 0x80]
add rsp, 0x60
pop rdi
ret
mov r8d, 2
mov qword [rsp + 0x78], rbp
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbp, rax
test rax, rax
jne 0x140033e09
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdx, qword [rdi]
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140033df4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
xor al, al
mov rbp, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x80]
add rsp, 0x60
pop rdi
ret
xor eax, eax
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x50], rax
or r9d, 0xffffffff
mov qword [rsp + 0x48], rax
or edx, r9d
mov qword [rsp + 0x40], rax
mov rcx, rbp
mov qword [rsp + 0x38], rax
lea r8d, [rax + 2]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
mov rcx, rbp
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdx, qword [rdi]
cmp ebx, 1
sete bl
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140033e7f
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.WS2_32.dll_htonl + 8]
mov rbp, qword [rsp + 0x78]
movzx eax, bl
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x80]
add rsp, 0x60
pop rdi
ret
Function at 0x1400342d0
Capabilities:
Acquire debug privileges

Disassembly:
sub rsp, 0x48
mov qword [rsp + 0x50], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x50]
mov edx, reloc.WLDAP32.dll_Ordinal_32
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140034361
lea r8, [rsp + 0x58]
xor ecx, ecx
lea rdx, str.SeDebugPrivilege
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x140034356
mov rax, qword [rsp + 0x58]
lea r8, [rsp + 0x30]
mov rcx, qword [rsp + 0x50]
mov r9d, reloc.WS2_32.dll_recv
mov qword [rsp + 0x28], 0
xor edx, edx
mov qword [rsp + 0x34], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x3c], 2
mov qword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rsp, 0x48
ret

Function at 0x1400359f0
Capabilities:
Query service status

Disassembly:
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x60
xor edx, edx
mov rdi, rcx
xor ecx, ecx
lea r8d, [rdx + 4]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdx, qword [rdi]
mov rsi, rax
test rax, rax
jne 0x140035a40
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140035a30
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
xor eax, eax
mov rsi, qword [rsp + 0x88]
add rsp, 0x60
pop rdi
ret
mov r8d, 4
mov qword [rsp + 0x80], rbp
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov rbp, rax
test rax, rax
jne 0x140035a89
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdx, qword [rdi]
sub rdx, 0x18
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140035a85
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
xor eax, eax
jmp 0x140035b06
lea rax, [rsp + 0x78]
mov qword [rsp + 0x70], rbx
mov r9d, Ordinal_41
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x30]
xor edx, edx
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
mov rcx, rbp
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdx, qword [rdi]
or eax, 0xffffffff
sub rdx, 0x18
test ebx, ebx
jne 0x140035ae7
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140035ae3
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
xor eax, eax
jmp 0x140035b01
mov ebx, dword [rsp + 0x34]
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140035aff
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.WS2_32.dll_htonl + 8]
mov eax, ebx
mov rbx, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x80]
mov rsi, qword [rsp + 0x88]
add rsp, 0x60
pop rdi
ret
Function at 0x1400360e0
Capabilities:
Connect to wmi namespace via wbemlocator

Disassembly:
mov rax, rsp
push rsi
push rdi
push r14
sub rsp, 0x80
mov qword [rax - 0x48], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov rbx, rcx
xor ebp, ebp
mov r14d, 0x80000000
nop dword [rax]
cmp qword [rbx], 0
je 0x140036121
cmp qword [rbx + 8], 0
jne 0x1400362c7
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitializeEx]
test eax, eax
js 0x1400362cb
cmp byte [rbx + 0x10], 0
jne 0x14003617c
mov qword [rsp + 0x40], rbp
mov dword [rsp + 0x38], ebp
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], ebp
xor r9d, r9d
xor r8d, r8d
or edx, 0xffffffff
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitializeSecurity]
lea ecx, [rax + r14]
test r14d, ecx
jne 0x140036178
cmp eax, 0x80010119
jne 0x1400362bb
mov byte [rbx + 0x10], 1
mov qword [rsp + 0x20], rbx
lea r9, [0x140146950]
xor edx, edx
lea r8d, [rdx + 1]
lea rcx, [0x1401468f0]
call qword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jns 0x1400361ba
call qword [sym.imp.ole32.dll_CoUninitialize]
mov rcx, rbx
call fcn.140036340
test al, al
je 0x1400362cb
jmp 0x140036110
mov edx, 0xc3
lea rcx, [rsp + 0x58]
call fcn.1400244d0
nop
cmp qword [rax + 0x18], 8
jb 0x1400361d4
mov rax, qword [rax]
mov rdx, rax
lea rcx, [rsp + 0xa0]
call fcn.140036950
nop
mov rcx, qword [rax]
test rcx, rcx
je 0x1400361f2
mov rdx, qword [rcx]
jmp 0x1400361f5
mov rdx, rbp
mov rcx, qword [rbx]
lea rdi, [rbx + 8]
mov rax, qword [rcx]
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x38], rbp
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], ebp
mov qword [rsp + 0x20], rbp
xor r9d, r9d
xor r8d, r8d
call qword [rax + Ordinal_26]
mov esi, eax
mov rcx, qword [rsp + 0xa0]
test rcx, rcx
je 0x14003623c
call fcn.140036a80
mov qword [rsp + 0xa0], rbp
mov r8, qword [rsp + 0x70]
cmp r8, 8
jb 0x140036259
inc r8
mov rdx, qword [rsp + 0x58]
lea rcx, [rsp + 0x58]
call fcn.1400146a0
test esi, esi
jns 0x14003626e
mov rcx, qword [rbx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_recv]
mov qword [rbx], rbp
jmp 0x14003619f
mov dword [rsp + 0x38], ebp
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0xa]
mov rcx, qword [rdi]
call qword [sym.imp.ole32.dll_CoSetProxyBlanket]
test eax, eax
jns 0x1400362c3
mov rcx, qword [rdi]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_recv]
mov qword [rdi], rbp
mov rcx, qword [rbx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_recv]
mov qword [rbx], rbp
jmp 0x14003619f
call qword [sym.imp.ole32.dll_CoUninitialize]
jmp 0x1400362cb
mov byte [rbx + 0x11], 1
mov al, 1
jmp 0x1400362cd
xor al, al
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret