Function at 0x140007c60
Capabilities:
Generate random numbers via winapi
Persist via windows service
Set registry value

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r13
push r14
lea rbp, [rsp - 0x240]
sub rsp, 0x340
mov rax, qword [0x1400fd010]
xor rax, rsp
mov qword [rbp + 0x230], rax
and qword [rsp + 0x50], 0
xor ebx, ebx
and qword [rsp + 0x58], rbx
xor sil, sil
and qword [rsp + 0x60], rbx
mov rdi, rcx
test rcx, rcx
je 0x14000804c
xorps xmm0, xmm0
lea rax, [rsp + 0x50]
movups xmmword [rcx], xmm0
lea r9d, [rbx + 2]
xor r8d, r8d
movups xmmword [rcx + 0x10], xmm0
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
lea rdx, str.SYSTEMCurrentControlSetServicesSophos_Endpoint_DefenseTamperProtectionConfig
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14000804c
xor r9d, r9d
lea r8, str.Microsoft_Primitive_Provider
lea rdx, [0x1400e43f0]
lea rcx, [rsp + 0x58]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
test eax, eax
js 0x140007fee
mov rcx, qword [rsp + 0x58]
lea r12d, [rbx + 0x10]
xorps xmm0, xmm0
lea rdx, [rsp + 0x78]
mov r8d, r12d
xor r9d, r9d
movups xmmword [rsp + 0x78], xmm0
call qword [sym.imp.bcrypt.dll_BCryptGenRandom]
test eax, eax
js 0x140007fee
mov rcx, qword [rsp + 0x58]
lea r8d, [rbx + 8]
and qword [rsp + 0x70], rbx
lea rdx, [rsp + 0x70]
xor r9d, r9d
call qword [sym.imp.bcrypt.dll_BCryptGenRandom]
test eax, eax
js 0x140007fee
lfence
mov rax, qword [rsp + 0x70]
lea r14d, [rbx + 0x20]
xor edx, edx
lea r9d, [rbx + 0xa]
movabs rcx, 0xe8d4a51000
mov r8d, r14d
div rcx
mov rcx, rdx
mov qword [rsp + 0x70], rdx
mov rdx, rdi
call fcn.140094820
mov edx, r14d
mov rcx, rdi
call fcn.1400933a4
lea r9d, [rbx + 8]
mov r14, rax
lea r8, str.Microsoft_Primitive_Provider
lea rdx, str.SHA512
lea rcx, [rsp + 0x60]
call qword [sym.imp.bcrypt.dll_BCryptOpenAlgorithmProvider]
test eax, eax
js 0x140007fee
lfence
xor edx, edx
lea rcx, [rbp + 0x30]
mov r8d, 0x200
call fcn.1400735b0
and dword [rsp + 0x40], ebx
lea rax, [rbp + 0x30]
mov rcx, qword [rsp + 0x60]
lea r13d, [rbx + 0x28]
mov dword [rsp + 0x38], r13d
lea r9, [rsp + 0x78]
mov qword [rsp + 0x30], rax
mov r8d, r14d
mov qword [rsp + 0x28], 0x2000
mov rdx, rdi
mov dword [rsp + 0x20], r12d
call qword [sym.imp.bcrypt.dll_BCryptDeriveKeyPBKDF2]
test eax, eax
js 0x140007fee
lea edi, [rbx + 0x50]
xor edx, edx
mov r8d, edi
lea rcx, [rbp - 0x20]
call fcn.1400735b0
lea r8, [rbp - 0x20]
mov edx, r13d
lea rcx, [rbp + 0x30]
call fcn.1400011b0
test al, al
je 0x140007fee
lfence
mov edx, edi
lea rcx, [rbp - 0x20]
call fcn.1400933a4
mov r8d, edi
lea rcx, [rbp - 0x70]
xor edx, edx
mov r14, rax
call fcn.1400735b0
lea r8, [rbp - 0x70]
mov edx, r12d
lea rcx, [rsp + 0x78]
call fcn.1400011b0
test al, al
je 0x140007fee
mov edx, edi
lea rcx, [rbp - 0x70]
call fcn.1400933a4
mov r12d, 0x104
mov rdi, rax
mov ecx, r12d
call fcn.1400948dc
mov rbx, rax
test rax, rax
je 0x140007fee
mov r8d, r12d
xor edx, edx
mov rcx, rax
call fcn.1400735b0
lea r9d, [r13 - 0x1f]
mov edx, r12d
lea r8, str.sed_tp1:
mov rcx, rbx
call fcn.140093ab0
test eax, eax
jne 0x140007fee
mov r9d, edi
lea r8, [rbp - 0x70]
mov edx, r12d
mov rcx, rbx
call fcn.1400938e0
test eax, eax
jne 0x140007fee
lea r13d, [rax + 1]
mov edx, r12d
mov r9d, r13d
lea r8, [0x1400e4404]
mov rcx, rbx
call fcn.1400938e0
test eax, eax
jne 0x140007fee
mov r9d, r14d
lea r8, [rbp - 0x20]
mov edx, r12d
mov rcx, rbx
call fcn.1400938e0
test eax, eax
jne 0x140007fee
lea edx, [r12 - 1]
mov rcx, rbx
call fcn.1400933a4
mov rcx, qword [rsp + 0x50]
lea rdx, str.SEDPassword
add eax, r13d
mov r9d, r13d
mov dword [rsp + 0x28], eax
xor r8d, r8d
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x140007fee
and dword [rsp + 0x68], eax
lea edi, [rax + 4]
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0x68]
mov dword [rsp + 0x28], edi
lea rdx, str.SAVEnabled
mov r9d, edi
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x140007fee
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0x68]
mov dword [rsp + 0x28], edi
lea rdx, str.IgnoreSAV
mov r9d, edi
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x68], r13d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x140007fee
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0x68]
mov dword [rsp + 0x28], edi
lea rdx, str.SEDEnabled
mov r9d, edi
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x68], r13d
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
movzx esi, sil
cmove esi, r13d
xor eax, eax
lea rdi, [rsp + 0x70]
lea ecx, [rax + 8]
rep stosb byte [rdi], al
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x140008012
xor edx, edx
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
and qword [rsp + 0x60], 0
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x14000802a
xor edx, edx
call qword [sym.imp.bcrypt.dll_BCryptCloseAlgorithmProvider]
and qword [rsp + 0x58], 0
test rbx, rbx
je 0x140008037
mov rcx, rbx
call fcn.1400924bc
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140008047
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, sil
jmp 0x14000804e
xor al, al
mov rcx, qword [rbp + 0x230]
xor rcx, rsp
call fcn.1400494a0
lea r11, [rsp + 0x340]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rbp
ret