Function at 0x140349f20
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
push rbp
push rdi
push r13
push r14
push r15
lea rbp, [rax - 0x1f8]
sub rsp, 0x2d0
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [0x1405420e0]
xor rax, rsp
mov qword [rbp + 0x1c0], rax
mov rsi, r8
mov rdi, rdx
movdqa xmm0, xmmword [0x140420310]
movdqu xmmword [rsp + 0x60], xmm0
xor r14d, r14d
mov word [rsp + 0x50], r14w
lea r13, str.WinDefend
mov rdx, r13
lea rcx, [rsp + 0x50]
call fcn.140055574
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x50]
call fcn.14028de20
mov ebx, eax
lea rcx, [rsp + 0x50]
call fcn.140055f70
cmp ebx, 0x80070424
jne 0x14034a024
call fcn.1400550c0
mov rcx, qword [rax + 8]
lea ebx, [r14 + 4]
cmp dword [rcx], ebx
jbe 0x140349ff7
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, [0x1404842c0]
call fcn.140001208
xor eax, eax
mov rcx, qword [rbp + 0x1c0]
xor rcx, rsp
call fcn.140356560
lea r11, [rsp + 0x2d0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop rdi
pop rbp
ret
test ebx, ebx
jns 0x14034a053
lea rax, str.Failed_to_get_Defender_run_state
mov edx, 0x3e
lea r8, str.amcorewcd_sourcecommon_srcdefendersettings.cpp
mov r9d, ebx
mov qword [rsp + 0x20], rax
mov rcx, qword [rbp + 0x1f8]
call fcn.14018588c
mov eax, ebx
jmp 0x140349ff9
call fcn.1400550c0
mov r10, qword [rax + 8]
mov ebx, 4
cmp dword [r10], ebx
jbe 0x14034a0db
lea rax, str.Enabling_Sense_for_Windows_Defender
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x68], VarR8FromUI1
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x14034a086
mov rcx, qword [rdi]
lea rdx, [0x1403cb630]
mov rax, r14
test rcx, rcx
je 0x14034a0a6
mov rdx, rcx
or rax, 0xffffffffffffffff
inc rax
cmp word [rcx + rax*2], r14w
jne 0x14034a09c
mov qword [rbp - 0x60], rdx
lea eax, [rax*2 + 2]
mov dword [rbp - 0x58], eax
mov dword [rbp - 0x54], r14d
lea rax, [rsp + 0x70]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x14048db2f]
mov rcx, r10
call fcn.140001208
movdqa xmm0, xmmword [0x140420310]
movdqu xmmword [rbp - 0x80], xmm0
mov word [rsp + 0x70], r14w
lea r15, str.SOFTWAREMicrosoftWindows_DefenderFeatures
mov rdx, r15
lea rcx, [rsp + 0x70]
call fcn.140055574
nop
movdqa xmm0, xmmword [0x140420310]
movdqu xmmword [rsp + 0x60], xmm0
mov word [rsp + 0x50], r14w
lea rdx, str.SenseOrgId
lea rcx, [rsp + 0x50]
call fcn.140055574
mov byte [rsp + 0x20], 1
xor r9d, r9d
lea r8, [rsp + 0x70]
mov rdx, rdi
lea rcx, [rsp + 0x50]
call fcn.140205340
mov edi, eax
lea rcx, [rsp + 0x50]
call fcn.140055f70
nop
lea rcx, [rsp + 0x70]
call fcn.140055f70
test edi, edi
jns 0x14034a190
lea rax, str.Failed_setting_SenseOrgId_under_Defender_registry__ws
mov edx, 0x47
mov qword [rsp + 0x28], r15
mov rcx, qword [rbp + 0x1f8]
mov qword [rsp + 0x20], rax
mov r9d, edi
lea r8, str.amcorewcd_sourcecommon_srcdefendersettings.cpp
call fcn.14018588c
mov eax, edi
jmp 0x140349ff9
movdqa xmm0, xmmword [0x140420310]
movdqu xmmword [rsp + 0x60], xmm0
mov word [rsp + 0x50], r14w
mov rdx, r15
lea rcx, [rsp + 0x50]
call fcn.140055574
nop
movdqa xmm0, xmmword [0x140420310]
movdqu xmmword [rbp - 0x80], xmm0
mov word [rsp + 0x70], r14w
lea rdx, str.SenseEnabled
lea rcx, [rsp + 0x70]
call fcn.140055574
lea r8, [rsp + 0x50]
mov edx, 1
lea rcx, [rsp + 0x70]
call fcn.140191cfc
mov edi, eax
lea rcx, [rsp + 0x70]
call fcn.140055f70
nop
lea rcx, [rsp + 0x50]
call fcn.140055f70
test edi, edi
jns 0x14034a216
lea rax, str.Failed_setting_SenseEnabled_under_Defender_registry__ws
mov edx, VarR8FromUI1
jmp 0x14034a169
movdqa xmm0, xmmword [0x140420310]
movdqu xmmword [rsp + 0x60], xmm0
mov word [rsp + 0x50], r14w
mov rdx, r15
lea rcx, [rsp + 0x50]
call fcn.140055574
nop
movdqa xmm0, xmmword [0x140420310]
movdqu xmmword [rbp - 0x80], xmm0
mov word [rsp + 0x70], r14w
lea rdx, str.GeoPreferenceId
lea rcx, [rsp + 0x70]
call fcn.140055574
mov byte [rsp + 0x20], 1
xor r9d, r9d
lea r8, [rsp + 0x50]
mov rdx, rsi
lea rcx, [rsp + 0x70]
call fcn.140205340
mov edi, eax
lea rcx, [rsp + 0x70]
call fcn.140055f70
nop
lea rcx, [rsp + 0x50]
call fcn.140055f70
test edi, edi
jns 0x14034a2a2
lea rax, str.Failed_setting_GeoPreferenceId_under_Defender_registry__ws
mov edx, 0x4f
jmp 0x14034a169
call fcn.1400550c0
mov rcx, qword [rax + 8]
cmp dword [rcx], ebx
jbe 0x14034a2f3
lea rax, str.Defender_run_state
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x68], MsiGetActiveDatabase
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, [0x14048db9b]
call fcn.140001208
cmp dword [rsp + 0x40], 1
jne 0x140349ff7
call fcn.1400550c0
mov rcx, qword [rax + 8]
cmp dword [rcx], ebx
jbe 0x14034a34a
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, [0x14048db02]
call fcn.140001208
mov r8d, 0x104
lea rdx, [rbp - 0x50]
lea rcx, str._SystemRoot_System32DriversWdBoot.sys
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
nop dword [rax + rax]
dec eax
cmp eax, 0x103
ja 0x14034a3f8
mov qword [rsp + 0x30], r14
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.KERNEL32.dll_CreateFileW]
nop dword [rax + rax]
mov rbx, rax
test rax, rax
jne 0x14034a3b0
lea edx, [rax + 0x6a]
jmp 0x14034a3cc
cmp rbx, 0xffffffffffffffff
je 0x14034a3df
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_InstallELAMCertificateInfo]
nop dword [rax + rax]
test eax, eax
jne 0x14034a3df
lea edx, [rax + 0x6e]
lea r8, str.amcorewcd_sourcecommon_srcdefendersettings.cpp
mov rcx, qword [rbp + 0x1f8]
call fcn.14028f5b0
lea rax, [rbx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14034a3f8
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
call fcn.140349e48
mov ebx, eax
test eax, eax
jns 0x140349ff7
lea rax, str.Failed_to_start_Defender_service
mov edx, reloc.WS2_32.dll_WSACleanup
jmp 0x14034a034