Function at 0x140270a40
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
push rbp
push r13
push r15
lea rbp, [rax - 0x1e8]
sub rsp, 0x2d0
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1403f04b0]
xor rax, rsp
mov qword [rbp + 0x1c0], rax
mov rsi, rdx
lea r13, str.WinDefend
mov rdx, r13
lea rcx, [rsp + 0x50]
call fcn.140048750
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x50]
call fcn.1402715d8
mov ebx, eax
lea rcx, [rsp + 0x50]
call fcn.1400492c0
cmp ebx, 0x80070424
jne 0x140270b08
call fcn.140048a14
mov rcx, qword [rax + 8]
mov ebx, 4
cmp dword [rcx], ebx
jbe 0x140270dfe
lea rax, str.Defender_not_installed_on_this_machine___not_enabling_Sense_mode
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x68], 0x82
lea rax, [rsp + 0x70]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x140353fa3]
call fcn.140001078
jmp 0x140270dfe
xor edi, edi
test ebx, ebx
jns 0x140270b3a
lea rax, str.Failed_to_get_Defender_run_state
lea edx, [rdi + 0x3b]
lea r8, str.amcorewcd_sourcecommon_srcdefendersettings.cpp
mov r9d, ebx
mov qword [rsp + 0x20], rax
mov rcx, qword [rbp + 0x1e8]
call fcn.14006982c
mov eax, ebx
jmp 0x140270e00
call fcn.140048a14
mov r10, qword [rax + 8]
mov ebx, 4
cmp dword [r10], ebx
jbe 0x140270bc0
lea rax, str.Enabling_Sense_for_Windows_Defender
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x68], VarR8FromUI1
mov rax, rsi
cmp qword [rsi + 0x18], 8
jb 0x140270b6d
mov rax, qword [rsi]
lea rdx, [0x1402cb810]
mov rcx, rdi
test rax, rax
je 0x140270b8c
mov rdx, rax
or rcx, 0xffffffffffffffff
inc rcx
cmp word [rax + rcx*2], di
jne 0x140270b83
mov qword [rbp - 0x60], rdx
lea eax, [rcx*2 + 2]
mov dword [rbp - 0x58], eax
mov dword [rbp - 0x54], edi
lea rax, [rsp + 0x70]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x140354016]
mov rcx, r10
call fcn.140001078
lea r15, str.SOFTWAREMicrosoftWindows_DefenderFeatures
mov rdx, r15
lea rcx, [rsp + 0x70]
call fcn.140048750
nop
lea rdx, str.SenseOrgId
lea rcx, [rsp + 0x50]
call fcn.140048750
xor r9d, r9d
lea r8, [rsp + 0x70]
mov rdx, rsi
lea rcx, [rsp + 0x50]
call fcn.1401b6818
mov esi, eax
lea rcx, [rsp + 0x50]
call fcn.1400492c0
nop
lea rcx, [rsp + 0x70]
call fcn.1400492c0
test esi, esi
jns 0x140270c49
lea rax, str.Failed_setting_SenseOrgId_under_Defender_registry__ws
mov edx, 0x44
mov qword [rsp + 0x28], r15
lea r8, str.amcorewcd_sourcecommon_srcdefendersettings.cpp
mov r9d, esi
mov qword [rsp + 0x20], rax
mov rcx, qword [rbp + 0x1e8]
call fcn.14006982c
mov eax, esi
jmp 0x140270e00
mov rdx, r15
lea rcx, [rsp + 0x50]
call fcn.140048750
nop
lea rdx, str.SenseEnabled
lea rcx, [rsp + 0x70]
call fcn.140048750
lea r8, [rsp + 0x50]
mov edx, 1
lea rcx, [rsp + 0x70]
call fcn.1401b5ad4
mov esi, eax
lea rcx, [rsp + 0x70]
call fcn.1400492c0
nop
lea rcx, [rsp + 0x50]
call fcn.1400492c0
test esi, esi
jns 0x140270ca8
lea rax, str.Failed_setting_SenseEnabled_under_Defender_registry__ws
mov edx, 0x48
jmp 0x140270c22
call fcn.140048a14
mov rcx, qword [rax + 8]
cmp dword [rcx], ebx
jbe 0x140270cf9
lea rax, str.Defender_run_state
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x68], 0x26
lea rax, [rsp + 0x40]
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x58], 4
lea rax, [rsp + 0x70]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x1403540af]
call fcn.140001078
cmp dword [rsp + 0x40], 1
jne 0x140270dfe
call fcn.140048a14
mov rcx, qword [rax + 8]
cmp dword [rcx], ebx
jbe 0x140270d50
lea rax, str.Defender_service_is_stopped._Starting_it.
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x68], 0x54
mov qword [rbp - 0x60], r13
mov qword [rbp - 0x58], reloc.OLEAUT32.dll_SafeArrayLock
lea rax, [rsp + 0x70]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x140354041]
call fcn.140001078
mov r8d, 0x104
lea rdx, [rbp - 0x50]
lea rcx, str._SystemRoot_System32DriversWdBoot.sys
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_ExpandEnvironmentStringsW]
dec eax
cmp eax, 0x103
ja 0x140270de2
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
lea edx, [r9 + 1]
mov r8d, edx
lea rcx, [rbp - 0x50]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
mov rbx, rax
test rax, rax
jne 0x140270da6
lea edx, [rax + 0x63]
jmp 0x140270dbc
cmp rbx, 0xffffffffffffffff
je 0x140270dcf
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_sysinfo_l1_2_1.dll_InstallELAMCertificateInfo]
test eax, eax
jne 0x140270dcf
lea edx, [rax + 0x67]
lea r8, str.amcorewcd_sourcecommon_srcdefendersettings.cpp
mov rcx, qword [rbp + 0x1e8]
call fcn.14021a2c4
lea rax, [rbx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140270de2
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
call fcn.140270984
mov ebx, eax
test eax, eax
jns 0x140270dfe
lea rax, str.Failed_to_start_Defender_service
mov edx, 0x6d
jmp 0x140270b18
xor eax, eax
mov rcx, qword [rbp + 0x1c0]
xor rcx, rsp
call fcn.14027a710
lea r11, [rsp + 0x2d0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r13
pop rbp
ret