Function at 0x140001db0
Capabilities:
Execute command
Persist via windows service
Set registry value

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r14
push rbp
lea rbp, [rsp - 0x57]
sub rsp, 0xd0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x47], rax
lea rcx, str.schtasks__delete__tn__clearone___f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
lea rcx, str.schtasks__delete__tn__clearsecond___f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
lea rcx, str.schtasks__delete__tn__clearthird___f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
lea rcx, str.schtasks__delete__tn__cleardelay___f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
lea rcx, str.powershell.exe_Clear_TPM
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
lea rcx, str.powershell.exe_Clear_TPM
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
lea rcx, str.powershell.exe_Clear_TPM
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
lea rcx, str.powershell.exe_disable_TpmAutoProvisioning
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
lea rdx, str.SYSTEMCurrentControlSetServicesTPMWMIEndorsement
lea rcx, [rbp - 0x29]
call fcn.1400023a0
nop
xor r14d, r14d
mov qword [rbp + 0x1f], r14
lea rdx, [rbp - 0x29]
cmp qword [rbp - 0x11], 7
cmova rdx, qword [rbp - 0x29]
mov qword [rsp + 0x40], r14
lea rax, [rbp + 0x1f]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x2011f
mov dword [rsp + 0x20], r14d
xor r9d, r9d
xor r8d, r8d
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x1400022ae
mov rbx, qword [rbp + 0x1f]
mov qword [rbp + 0x3f], rbx
mov rdx, qword [rbp - 0x11]
cmp rdx, 7
jbe 0x140001ef3
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x29]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001eee
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001eee
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140002974
movdqa xmm0, xmmword [0x140004960]
movdqu xmmword [rbp - 0x19], xmm0
mov word [rbp - 0x29], r14w
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x27], xmm1
mov qword [rbp + 0x37], r14
mov ecx, 1
call fcn.140002930
mov qword [rbp + 0x27], rax
lea rcx, [rax + 1]
mov qword [rbp + 0x37], rcx
mov byte [rax], 0
mov qword [rbp + 0x2f], rcx
lea rdx, str.EKPub
lea rcx, [rbp - 0x29]
call fcn.1400023a0
mov rcx, qword [rbp + 0x2f]
mov rax, qword [rbp + 0x27]
sub rcx, rax
lea rdx, [rbp - 0x29]
cmp qword [rbp - 0x11], 7
cmova rdx, qword [rbp - 0x29]
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rax
mov r9d, 3
xor r8d, r8d
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
mov rdx, qword [rbp - 0x11]
cmp rdx, 7
jbe 0x140001fb7
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x29]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001fb2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001fb2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140002974
test edi, edi
je 0x140001fc7
lea rcx, str.____Failed_to_remove_EKPub_from_registry__n
call fcn.140001010
mov qword [rbp + 0x1f], r14
lea rdx, str.EkRetryLast
lea rcx, [rbp - 0x29]
call fcn.1400023a0
lea rdx, [rbp - 0x29]
cmp qword [rbp - 0x11], 7
cmova rdx, qword [rbp - 0x29]
mov dword [rsp + 0x28], 8
lea rax, [rbp + 0x1f]
mov qword [rsp + 0x20], rax
mov r9d, 0xb
xor r8d, r8d
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
mov rdx, qword [rbp - 0x11]
cmp rdx, 7
jbe 0x140002051
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x29]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000204c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000204c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140002974
test edi, edi
je 0x140002061
lea rcx, str.____Failed_to_remove_EkRetryLast_from_registry__n
call fcn.140001010
lea rdx, str.EkTries
lea rcx, [rbp - 0x29]
call fcn.1400023a0
mov dword [rbp + 0x1f], r14d
lea rdx, [rbp - 0x29]
cmp qword [rbp - 0x11], 7
cmova rdx, qword [rbp - 0x29]
mov dword [rsp + 0x28], 4
lea rax, [rbp + 0x1f]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
mov rdx, qword [rbp - 0x11]
cmp rdx, 7
jbe 0x1400020eb
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x29]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400020e6
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400020e6
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140002974
test edi, edi
je 0x1400020fb
lea rcx, str.____Failed_to_remove_EkTries_from_registry__n
call fcn.140001010
lea rdx, str.EkNoFetch
lea rcx, [rbp - 0x29]
call fcn.1400023a0
mov dword [rbp + 0x1f], r14d
lea rdx, [rbp - 0x29]
cmp qword [rbp - 0x11], 7
cmova rdx, qword [rbp - 0x29]
mov dword [rsp + 0x28], 4
lea rax, [rbp + 0x1f]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
mov rdx, qword [rbp - 0x11]
cmp rdx, 7
jbe 0x140002185
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x29]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002180
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002180
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140002974
test edi, edi
je 0x140002195
lea rcx, str.____Failed_to_remove_EkNoFetch_from_registry__n
call fcn.140001010
lea rcx, [rbp - 0x29]
call fcn.140001a70
mov rdi, qword [rax]
mov rsi, qword [rax + 8]
mov rcx, qword [rbp - 0x29]
test rcx, rcx
je 0x1400021e2
mov rdx, qword [rbp - 0x19]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400021dd
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400021dd
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140002974
lea rax, str.___Failed_to_retrieve_Ekey__good_to_go_n
lea rcx, str.____Ekey_still_retrievable_______did_NOT_work____n
cmp rdi, rsi
cmove rcx, rax
call fcn.140001010
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getchar]
nop
mov rcx, qword [rbp + 0x27]
test rcx, rcx
je 0x14000224c
mov rdx, qword [rbp + 0x37]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000223b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000223b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140002974
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x27], xmm0
mov qword [rbp + 0x37], r14
test rbx, rbx
je 0x140002283
mov eax, 0x80000000
add rax, rbx
cmp rax, 5
jbe 0x140002283
cmp rbx, 0xffffffff80000007
je 0x140002283
cmp rbx, 0xffffffff80000060
je 0x140002283
cmp rbx, 0xffffffff80000050
je 0x140002283
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov rcx, qword [rbp + 0x47]
xor rcx, rsp
call fcn.140002910
lea r11, [rsp + 0xd0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r14, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
mov edx, eax
lea rcx, [rbp - 9]
call fcn.1400019a0
lea rdx, [0x140005958]
lea rcx, [rbp - 9]
call sub.VCRUNTIME140.dll__CxxThrowException
int3