Function at 0x140003760
Capabilities:
Create service
Delete registry key
Delete service
Query service status
Start service
Terminate process

Disassembly:
mov r11, rsp
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rsi
mov qword [r11 + 0x18], rdi
push r14
sub rsp, 0x4e0
mov rax, qword [0x1400fd010]
xor rax, rsp
mov qword [rsp + 0x4d0], rax
mov rbx, rcx
lea rax, [r11 - 0x418]
mov qword [r11 - 0x148], rax
xor esi, esi
mov qword [r11 - 0x418], rsi
mov qword [r11 - 0x408], rsi
lea r14d, [rsi + 7]
mov qword [r11 - 0x400], r14
lea rdx, str.ProgramFilesDrive
lea rcx, [r11 - 0x418]
call fcn.14000497c
nop
mov qword [rsp + 0xb0], rsi
mov qword [rsp + 0xc0], rsi
mov qword [rsp + 0xc8], r14
lea rdx, str.SYSTEMCurrentControlSetServicesSophos_Endpoint_DefensePaths
lea rcx, [rsp + 0xb0]
call fcn.14000497c
nop
lea r8, [rsp + 0xd0]
lea rdx, [rsp + 0xb0]
lea rcx, [rsp + 0x428]
call fcn.14001abdc
nop
movabs rax, 0x7ffffffffffffffe
sub rax, qword [rsp + 0x438]
cmp rax, 0x2f
jb 0x140003dba
lfence
lea r9, [rsp + 0x428]
cmp qword [rsp + 0x440], 8
cmovae r9, qword [rsp + 0x428]
mov qword [rsp + 0x30], 0x2f
mov rax, qword [rsp + 0x438]
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x3c0]
call fcn.14000611c
nop
lea rcx, [rsp + 0x428]
call fcn.140004904
nop
lea r9, [rsp + 0x3c0]
cmp qword [rsp + 0x3d8], 8
cmovae r9, qword [rsp + 0x3c0]
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x80], rsi
mov qword [rsp + 0x88], r14
mov word [rsp + 0x70], si
mov rdi, qword [rsp + 0x3d0]
lea rcx, [rsp + 0x70]
cmp rdi, r14
ja 0x1400038e3
mov qword [rsp + 0x80], rdi
add rdi, rdi
mov r8, rdi
mov rdx, r9
call fcn.140072f00
mov word [rsp + rdi + 0x70], si
jmp 0x1400038f4
lfence
mov rdx, qword [rsp + 0x3d0]
call fcn.140005880
nop
lea rcx, [rsp + 0x70]
cmp qword [rsp + 0x88], 8
cmovae rcx, qword [rsp + 0x70]
or r9d, 0xffffffff
mov r8d, 3
lea rdx, [rsp + 0x498]
call fcn.14004c580
mov edx, eax
test eax, eax
jne 0x140003963
mov ecx, dword [rsp + 0x4a8]
bt ecx, 0xa
jae 0x140003958
cmp dword [rsp + 0x4ac], 0xa000000c
jne 0x140003944
lea ecx, [rax + 4]
jmp 0x14000397e
cmp dword [rsp + 0x4ac], 0xa0000003
jne 0x140003958
mov ecx, 0xa
jmp 0x14000397e
and ecx, 0x10
or ecx, 0x20
shr ecx, 4
jmp 0x14000397e
sub eax, 2
je 0x140003979
sub eax, 1
je 0x140003979
sub eax, 0x32
je 0x140003979
cmp eax, 0x46
mov ecx, esi
jne 0x14000397e
mov ecx, 1
mov dword [rsp + 0xa0], edx
lea rax, [0x1400fdc40]
mov qword [rsp + 0xa8], rax
movaps xmm0, xmmword [rsp + 0xa0]
movdqa xmmword [rsp + 0x3e0], xmm0
test ecx, ecx
je 0x1400039c5
cmp ecx, 1
sete dil
lea rcx, [rsp + 0x70]
call fcn.140004904
test dil, dil
jne 0x140003dc0
jmp 0x1400039d2
mov dil, 1
test edx, edx
jne 0x140003de9
jmp 0x1400039b0
xorps xmm0, xmm0
movups xmmword [rsp + 0x460], xmm0
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 2]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
lea r14, vtable.utilities::StaticRaii_struct_SC_HANDLE______ptr64__void___cdecl_utilities::WindowsRaii::RaiiCloseServiceHandle_struct_SC_HANDLE______ptr64___0_.0
mov qword [rsp + 0x460], r14
mov qword [rsp + 0x470], rax
test rax, rax
je 0x140003dfc
lea rcx, [rsp + 0x478]
call fcn.140003184
nop
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x3f0], xmm0
movups xmmword [rsp + 0x400], xmm0
movups xmmword [rsp + 0x410], xmm0
mov qword [rsp + 0x420], rax
lea rdx, [rsp + 0x478]
lea rcx, [rsp + 0x3f0]
call fcn.140003424
nop
xorps xmm0, xmm0
movups xmmword [rsp + 0x448], xmm0
lea rax, [rsp + 0x3c0]
cmp qword [rsp + 0x3d8], 8
cmovae rax, qword [rsp + 0x3c0]
lea rdx, [rsp + 0x478]
cmp qword [rsp + 0x490], 8
cmovae rdx, qword [rsp + 0x478]
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 0x10
mov r9d, 0xf01ff
lea r8, str.Sophos_Endpoint_Defense_Recovery_Service
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rdi, rax
mov qword [rsp + 0x448], r14
mov qword [rsp + 0x458], rax
test rax, rax
je 0x140003e4f
mov qword [rsp + 0x3a0], rdi
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x3a8], xmm0
mov qword [rsp + 0x3b8], rsi
lfence
mov ecx, 8
call fcn.1400494c8
lfence
mov qword [rsp + 0x3a8], rax
lea rcx, [rax + 8]
mov qword [rsp + 0x3b8], rcx
mov qword [rax], rbx
mov qword [rsp + 0x3b0], rcx
mov qword [rsp + 0x90], rsi
lea rcx, [rsp + 0x90]
call fcn.140005dd4
nop
mov r8, qword [rsp + 0x3a8]
mov edx, 1
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x140003ea2
mov dword [rsp + 0x398], esi
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x370], xmm0
movups xmmword [rsp + 0x380], xmm0
mov dword [rsp + 0x390], eax
mov ebx, esi
mov rdi, qword [rsp + 0x458]
cmp ebx, 0xa
jge 0x140003bf6
lea rax, [rsp + 0x398]
mov qword [rsp + 0x20], rax
mov r9d, 0x24
lea r8, [rsp + 0x370]
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x140003ef5
cmp dword [rsp + 0x374], 1
je 0x140003c11
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
jmp 0x140003baa
cmp dword [rsp + 0x374], 1
je 0x140003c11
mov r8d, dword [rsp + 0x38c]
test r8d, r8d
jne 0x140003f48
mov edx, dword [rsp + 0x37c]
cmp edx, 0x42a
jne 0x140003c3e
mov edx, dword [rsp + 0x380]
cmp edx, 2
je 0x140003fb2
cmp edx, 3
jne 0x140004002
jmp 0x140003fda
test edx, edx
jne 0x14000404d
mov ecx, 1
call fcn.1400923e0
mov rcx, rax
lea rdx, str.SED_Tamper_Protection_is_disabled_by_SED_recovery_service_n
call fcn.14000138c
nop
mov rcx, qword [rsp + 0x3a8]
test rcx, rcx
je 0x140003cc2
mov rax, qword [rsp + 0x3b8]
sub rax, rcx
sar rax, 3
lea rdx, [rax*8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003ca9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140004098
call fcn.140049948
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x3a8], xmm0
mov qword [rsp + 0x3b8], rsi
mov rcx, qword [rsp + 0x3a0]
call qword [sym.imp.ADVAPI32.dll_DeleteService]
nop
test rdi, rdi
je 0x140003ce7
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
je 0x14000409e
mov rcx, qword [rsp + 0x420]
test rcx, rcx
je 0x140003d1c
lea rdx, [rsp + 0x3f0]
cmp qword [rsp + 0x408], 8
cmovae rdx, qword [rsp + 0x3f0]
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov rcx, qword [rsp + 0x420]
lea rax, vtable.utilities::StaticRaii_struct_HKEY______ptr64__void___cdecl_utilities::WindowsRaii::RaiiCloseKey_struct_HKEY______ptr64___0_.0
mov qword [rsp + 0x410], rax
test rcx, rcx
je 0x140003d46
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x1400040a4
mov qword [rsp + 0x420], rsi
lea rcx, [rsp + 0x3f0]
call fcn.140004904
nop
lea rcx, [rsp + 0x478]
call fcn.140004904
nop
mov rcx, qword [rsp + 0x470]
test rcx, rcx
je 0x140003d7d
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
je 0x1400040aa
lea rcx, [rsp + 0x3c0]
call fcn.140004904
mov al, 1
jmp 0x140003d90
mov rcx, qword [rsp + 0x4d0]
xor rcx, rsp
call fcn.1400494a0
lea r11, [rsp + 0x4e0]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop r14
ret
call fcn.140001be0
nop
lea rdx, str.SEDRecoveryService.exe_not_found
lea rcx, [rsp + 0x178]
call fcn.140001f84
lea rdx, [0x1400faca0]
lea rcx, [rsp + 0x178]
call fcn.140072cc8
nop
lea r8, [rsp + 0x70]
lea rdx, [rsp + 0x3e0]
call fcn.140002ce0
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rsp + 0x290]
call fcn.140001d04
nop
mov r8, rax
lea rdx, str.OpenSCManagerW_failed_with_error:
lea rcx, [rsp + 0x2b0]
call fcn.14000556c
nop
mov rdx, rax
lea rcx, [rsp + 0x190]
call fcn.140001f14
lea rdx, [0x1400faca0]
lea rcx, [rsp + 0x190]
call fcn.140072cc8
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rsp + 0x2d0]
call fcn.140001d04
nop
mov r8, rax
lea rdx, str.CreateServiceW_failed_with_error:
lea rcx, [rsp + 0x2f0]
call fcn.14000556c
nop
mov rdx, rax
lea rcx, [rsp + 0x1a8]
call fcn.140001f14
lea rdx, [0x1400faca0]
lea rcx, [rsp + 0x1a8]
call fcn.140072cc8
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rsp + 0x310]
call fcn.140001d04
nop
mov r8, rax
lea rdx, str.StartServiceW_failed_with_error:
lea rcx, [rsp + 0x330]
call fcn.14000556c
nop
mov rdx, rax
lea rcx, [rsp + 0x1c0]
call fcn.140001f14
lea rdx, [0x1400faca0]
lea rcx, [rsp + 0x1c0]
call fcn.140072cc8
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rsp + 0x350]
call fcn.140001d04
nop
mov r8, rax
lea rdx, str.QueryServiceStatusEx_failed_with_error:
lea rcx, [rsp + 0x1f0]
call fcn.14000556c
nop
mov rdx, rax
lea rcx, [rsp + 0x1d8]
call fcn.140001f14
lea rdx, [0x1400faca0]
lea rcx, [rsp + 0x1d8]
call fcn.140072cc8
nop
lea rcx, [rsp + 0x4b8]
call fcn.140003750
xor edx, edx
lea ecx, [rdx + 1]
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdx, rax
lea rcx, [rsp + 0x4b8]
call fcn.140004118
nop
lea rcx, [rsp + 0x4b8]
call fcn.1400040d8
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
lea rdx, str.Timeout_waiting_for_response_from_SED_recovery_service.
lea rcx, [rsp + 0x130]
call fcn.140001f84
lea rdx, [0x1400faca0]
lea rcx, [rsp + 0x130]
call fcn.140072cc8
nop
lea rdx, str.Incorrect_SED_Tamper_Protection_password_provided.
lea rcx, [rsp + 0x100]
call fcn.140001f84
lea rdx, [0x1400faca0]
lea rcx, [rsp + 0x100]
call fcn.140072cc8
lea rdx, str.Failed_to_write_to_the_registry.
lea rcx, [rsp + 0x118]
call fcn.140001f84
lea rdx, [0x1400faca0]
lea rcx, [rsp + 0x118]
call fcn.140072cc8
lea rcx, [rsp + 0x270]
call fcn.140001d04
nop
mov r8, rax
lea rdx, str.Service_specific_exit_code:
lea rcx, [rsp + 0x210]
call fcn.14000556c
nop
mov rdx, rax
lea rcx, [rsp + 0x148]
call fcn.140001f14
lea rdx, [0x1400faca0]
lea rcx, [rsp + 0x148]
call fcn.140072cc8
nop
lea rcx, [rsp + 0x230]
call fcn.140001d04
nop
mov r8, rax
lea rdx, str.Unexpected_exit_code:
lea rcx, [rsp + 0x250]
call fcn.14000556c
nop
mov rdx, rax
lea rcx, [rsp + 0x160]
call fcn.140001f14
lea rdx, [0x1400faca0]
lea rcx, [rsp + 0x160]
call fcn.140072cc8
nop
call fcn.1400929c8
nop
call fcn.140094948
nop
call fcn.140094948
nop
call fcn.140094948
int3