Function at 0x140041f50
Capabilities:
Modify service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push r12
push r14
push r15
sub rsp, 0x100
mov rax, qword [0x140168900]
xor rax, rsp
mov qword [rsp + 0xf0], rax
xor esi, esi
mov dword [rsp + 0x68], esi
lea r15, [0x140162280]
mov rcx, qword [0x140162280]
lea r12, [0x1401178d8]
cmp rcx, r15
je 0x140041fb3
test byte [rcx + 0x1c], 4
je 0x140041fb3
lea edx, [rsi + 0x37]
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044430
call fcn.1400f4bcc
test al, al
jne 0x140041fea
mov rcx, qword [0x140162280]
cmp rcx, r15
je 0x140041fdf
test byte [rcx + 0x1c], 1
je 0x140041fdf
mov edx, 0x38
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044430
mov r14d, 0x80070032
jmp 0x140042a6a
mov qword [rsp + 0x50], rsi
lea rcx, [rsp + 0x50]
call fcn.1400f2930
mov r14d, eax
test eax, eax
jns 0x140042013
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140042a6a
jmp 0x140042a64
mov edx, 4
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov eax, dword [rdx + rcx]
cmp dword [0x14016b920], eax
jg 0x140042ac1
lea rdx, str.WdFilter
lea rcx, [rsp + 0x50]
call fcn.140041e18
test al, al
jne 0x140042078
cmp byte [0x14016b924], sil
je 0x14004215a
mov rcx, qword [0x140162280]
cmp rcx, r15
je 0x140042078
test byte [rcx + 0x1c], 4
je 0x140042078
mov edx, 0x39
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044430
lea rbx, str.WinDefend
lea rax, str.WdNisDrv
mov qword [rsp + 0xa8], rax
lea rax, str.WdNisSvc
mov qword [rsp + 0xb0], rax
mov qword [rsp + 0xb8], rbx
lea rax, str.WdFilter
mov qword [rsp + 0xc0], rax
lea rax, str.WdBoot
mov qword [rsp + 0xc8], rax
lea rcx, str.Sense
mov qword [rsp + 0xd0], rcx
lea rax, str.MsSecFlt
mov qword [rsp + 0xd8], rax
lea rbx, [rsp + 0xa8]
mov qword [rsp + 0x30], rbx
mov rdi, qword [rsp + 0x50]
cmp byte [0x14016b924], sil
je 0x140042368
mov rdx, qword [rbx]
call fcn.140005abc
test eax, eax
je 0x140042368
mov rdx, qword [rbx]
lea rcx, str.MsSecFlt
call fcn.140005abc
test eax, eax
je 0x140042368
mov rcx, qword [0x140162280]
cmp rcx, r15
je 0x140042729
test byte [rcx + 0x1c], 4
je 0x140042729
mov edx, 0x3c
mov r9, qword [rbx]
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044708
jmp 0x140042729
lea rbx, str.WinDefend
mov rdx, rbx
lea rcx, [rsp + 0x50]
call fcn.140041e18
test al, al
je 0x140042187
lea rcx, [rsp + 0x50]
call fcn.140041b74
mov r14d, eax
test eax, eax
js 0x140042000
lea rcx, [rsp + 0x50]
call fcn.140043e70
mov r14d, eax
test eax, eax
js 0x140042000
mov qword [rsp + 0x48], rsi
lea rdx, [rsp + 0x48]
xor ecx, ecx
call qword [sym.imp.mpclient.dll_MpManagerOpen]
mov r14d, eax
mov rcx, qword [rsp + 0x48]
test eax, eax
js 0x14004221b
mov dword [rsp + 0x70], 1
xor eax, eax
mov qword [rsp + 0x74], rax
lea rdx, [rsp + 0x70]
call qword [sym.imp.mpclient.dll_MpGetTPStateInfo]
mov r14d, eax
test eax, eax
js 0x140042216
mov r9d, dword [rsp + 0x74]
mov eax, r9d
and al, 3
cmp al, 1
jne 0x14004222f
mov r14d, 0x8007139f
mov rcx, qword [0x140162280]
cmp rcx, r15
je 0x140042216
test byte [rcx + 0x1c], al
je 0x140042216
mov edx, 0x3a
mov dword [rsp + 0x20], r14d
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044484
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140042000
call qword [sym.imp.mpclient.dll_MpHandleClose]
jmp 0x140042000
mov rcx, qword [rsp + 0x50]
call fcn.140042e6c
mov r14d, eax
test eax, eax
js 0x140042216
lea rcx, [rsp + 0x50]
call fcn.140043e70
mov r14d, eax
test eax, eax
js 0x140042216
mov qword [rsp + 0x38], rsi
lea rdx, [rsp + 0x38]
lea rcx, str.Real_Time_Protection
call qword [sym.imp.mpclient.dll_MpConfigOpen]
mov r14d, eax
mov rcx, qword [rsp + 0x38]
test eax, eax
jns 0x140042281
test rcx, rcx
je 0x140042216
call qword [sym.imp.mpclient.dll_MpConfigClose]
jmp 0x140042216
mov dword [rsp + 0x40], esi
mov dword [rsp + 0x60], esi
mov dword [rsp + 0x30], 4
mov qword [rsp + 0x28], rsi
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x30]
lea r8, [rsp + 0x40]
lea rdi, str.DisableDriverUnload
mov rdx, rdi
call qword [sym.imp.mpclient.dll_MpConfigGetValue]
mov r14d, eax
test eax, eax
js 0x1400422ce
cmp dword [rsp + 0x40], 1
jbe 0x1400422d5
mov r14d, 0x8007065d
mov rcx, qword [rsp + 0x38]
jmp 0x140042274
mov eax, dword [rsp + 0x30]
neg eax
sbb ecx, ecx
and ecx, dword [rsp + 0x60]
mov dword [rsp + 0x58], ecx
je 0x140042314
mov dword [rsp + 0x58], esi
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8d, [r9 - 3]
mov rdx, rdi
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.mpclient.dll_MpConfigSetValue]
mov r14d, eax
test eax, eax
js 0x1400422ce
mov rcx, qword [0x140162280]
cmp rcx, r15
je 0x14004233a
test byte [rcx + 0x1c], 4
je 0x14004233a
mov edx, 0x3b
mov r9, rdi
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044708
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x14004234a
call qword [sym.imp.mpclient.dll_MpConfigClose]
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x14004235a
call qword [sym.imp.mpclient.dll_MpHandleClose]
test r14d, r14d
jns 0x14004207f
jmp 0x140042000
mov rcx, qword [0x140162280]
cmp rcx, r15
je 0x14004238e
test byte [rcx + 0x1c], 4
je 0x14004238e
mov edx, 0x3d
mov r9, qword [rbx]
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044708
mov qword [rsp + 0x38], rsi
mov r9d, 0x2f
mov r8, qword [rbx]
mov rdx, rdi
lea rcx, [rsp + 0x38]
call fcn.1400f2994
mov r14d, eax
test eax, eax
jns 0x1400423fd
cmp eax, 0x80070424
jne 0x14004274f
mov rcx, qword [0x140162280]
cmp rcx, r15
je 0x1400423e1
test byte [rcx + 0x1c], 2
je 0x1400423e1
mov edx, 0x3e
mov r9, qword [rbx]
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044708
mov r14d, esi
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140042729
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140042729
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x80], xmm0
movups xmmword [rsp + 0x90], xmm0
mov dword [rsp + 0xa0], eax
mov rbx, qword [rsp + 0x38]
mov rdx, rbx
lea rcx, [rsp + 0x80]
call fcn.1400f2b40
mov r14d, eax
test eax, eax
jns 0x14004247a
mov eax, 0x80070002
cmp r14d, eax
jne 0x140042768
mov rcx, qword [0x140162280]
cmp rcx, r15
je 0x140042472
test byte [rcx + 0x1c], 2
je 0x140042472
mov edx, 0x3f
mov dword [rsp + 0x20], eax
mov r9, qword [rsp + 0x30]
mov r9, qword [r9]
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044764
mov r14d, esi
jmp 0x140042716
mov eax, dword [rsp + 0x84]
cmp eax, 1
je 0x1400425f2
mov rcx, qword [0x140162280]
cmp rcx, r15
je 0x1400424c1
test byte [rcx + 0x1c], 4
je 0x1400424c1
mov edx, 0x40
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], eax
mov r9, qword [rsp + 0x30]
mov r9, qword [r9]
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.1400447d4
mov edx, esi
mov dword [rsp + 0x58], edx
test edx, edx
je 0x1400424ee
mov rcx, qword [0x140162280]
cmp rcx, r15
je 0x1400424ee
test byte [rcx + 0x1c], 2
je 0x1400424ee
mov dword [rsp + 0x28], r14d
mov r9d, edx
mov rcx, qword [rcx + 0x10]
call fcn.140044544
mov rax, qword [rsp + 0x30]
mov r8, qword [rax]
mov rdx, rdi
mov rcx, rbx
call fcn.1400432f8
mov r14d, eax
test eax, eax
js 0x1400427b7
test byte [rsp + 0x80], 0x30
je 0x14004254e
mov rcx, qword [0x140162280]
cmp rcx, r15
je 0x140042579
test byte [rcx + 0x1c], 4
je 0x140042579
mov edx, 0x42
mov eax, dword [rsp + 0x9c]
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x30]
mov r9, qword [rax]
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044764
jmp 0x140042579
mov rcx, qword [0x140162280]
cmp rcx, r15
je 0x140042579
test byte [rcx + 0x1c], 4
je 0x140042579
mov edx, 0x43
mov rax, qword [rsp + 0x30]
mov r9, qword [rax]
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044708
mov edx, 0x927c0
mov rcx, rbx
call fcn.1400bfdd4
mov r14d, eax
test eax, eax
jns 0x1400425f2
mov rcx, qword [0x140162280]
cmp rcx, r15
je 0x1400425bf
test byte [rcx + 0x1c], 1
je 0x1400425bf
mov edx, 0x44
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x30]
mov r9, qword [rax]
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044764
mov eax, r14d
cmp r14d, 0x8007041c
je 0x140042776
mov r14d, eax
cmp eax, 0x8007041b
jne 0x1400427b7
mov edx, dword [rsp + 0x58]
inc edx
mov dword [rsp + 0x58], edx
cmp edx, 3
jae 0x1400427b7
jmp 0x1400424c7
mov rcx, qword [0x140162280]
cmp rcx, r15
je 0x14004261d
test byte [rcx + 0x1c], 4
je 0x14004261d
mov edx, 0x46
mov rax, qword [rsp + 0x30]
mov r9, qword [rax]
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044708
mov eax, dword [rsp + 0x80]
test al, 0x30
je 0x140042716
xor edx, edx
mov ecx, 0x60003
call fcn.1400f4b34
test eax, eax
js 0x1400426eb
mov dword [rsp + 0x58], esi
mov dword [rsp + 0x40], esi
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8, [rsp + 0x40]
lea edx, [r9 + 8]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfig2W]
test eax, eax
je 0x140042673
mov r14d, esi
jmp 0x140042683
call fcn.1400f259c
mov r14d, eax
test eax, eax
js 0x140042768
cmp dword [rsp + 0x40], esi
je 0x1400426d2
mov dword [rsp + 0x40], esi
lea r8, [rsp + 0x40]
mov edx, 0xc
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
je 0x1400426a9
mov r14d, esi
jmp 0x1400426b9
call fcn.1400f259c
mov r14d, eax
test eax, eax
js 0x140042768
mov rcx, qword [0x140162280]
cmp rcx, r15
je 0x140042716
test byte [rcx + 0x1c], 4
je 0x140042716
mov edx, 0x47
jmp 0x140042702
mov rcx, qword [0x140162280]
cmp rcx, r15
je 0x140042716
test byte [rcx + 0x1c], 4
je 0x140042716
mov edx, 0x48
jmp 0x140042702
mov rcx, qword [0x140162280]
cmp rcx, r15
je 0x140042716
test byte [rcx + 0x1c], 4
je 0x140042716
mov edx, 0x49
mov rax, qword [rsp + 0x30]
mov r9, qword [rax]
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044708
test rbx, rbx
je 0x140042724
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rbx, qword [rsp + 0x30]
add rbx, 8
mov qword [rsp + 0x30], rbx
lea rax, [rsp + 0xe0]
cmp rbx, rax
je 0x1400427c5
lea rcx, str.Sense
jmp 0x1400420f3
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140042a5c
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140042a5c
test rbx, rbx
je 0x140042a5c
mov rcx, rbx
jmp 0x14004275d
mov eax, dword [rsp + 0x80]
test al, 0xb
je 0x1400427b7
mov r14d, 0x80070bc9
mov rcx, qword [0x140162280]
cmp rcx, r15
je 0x1400427b7
test byte [rcx + 0x1c], 1
je 0x1400427b7
mov edx, 0x45
mov dword [rsp + 0x20], r14d
mov rax, qword [rsp + 0x30]
mov r9, qword [rax]
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044764
test rbx, rbx
je 0x1400427c5
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test r14d, r14d
js 0x140042a5c
cmp byte [0x14016b924], sil
jne 0x1400429cc
lea rcx, [rsp + 0x60]
call fcn.140042dc8
nop
mov qword [rsp + 0x58], rsi
lea r9, str.mpengine_etw.dll
mov r8, qword [rsp + 0x60]
lea rdx, str._lsStableEngineEtwLocation_ls
lea rcx, [rsp + 0x30]
call fcn.1400f2428
nop
mov rdx, qword [rax]
lea rcx, [rsp + 0x58]
call fcn.1400f16b0
test eax, eax
js 0x140042b2b
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x14004282d
call fcn.140030c60
mov qword [rsp + 0x38], rsi
or qword [rsp + 0x48], 0xffffffffffffffff
lea r8, [rsp + 0x38]
lea rdx, [rsp + 0x48]
mov rbx, qword [rsp + 0x58]
mov rcx, rbx
call fcn.1400de8b8
mov byte [rsp + 0x80], sil
lea rax, [rsp + 0x48]
mov qword [rsp + 0x88], rax
lea rax, [rsp + 0x38]
mov qword [rsp + 0x90], rax
mov edx, 0x20
mov rcx, qword [rsp + 0x38]
call fcn.140032b00
test rax, rax
je 0x1400428a6
mov r8, qword [rsp + 0x38]
lea rdx, str.__ls_
lea rcx, [rsp + 0x70]
call fcn.1400f2428
mov rcx, rax
mov r14d, 1
jmp 0x1400428be
mov rdx, qword [rsp + 0x38]
lea rcx, [rsp + 0x40]
call fcn.1400f0fa0
mov rcx, rax
mov r14d, 2
mov rax, qword [rcx]
mov qword [rcx], rsi
mov qword [rsp + 0x68], rax
test r14b, 2
je 0x1400428e3
and r14d, 0xfffffffd
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x1400428e3
call fcn.140030c60
nop
test r14b, 1
je 0x1400428f8
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x1400428f8
call fcn.140030c60
lea rdx, [rsp + 0x68]
call fcn.140041044
mov r14d, eax
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140042915
call fcn.140030c60
nop
lea rcx, [rsp + 0x80]
call fcn.140041658
nop
mov rcx, qword [rsp + 0x48]
cmp rcx, 0xffffffffffffffff
je 0x140042935
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140042945
call fcn.140030c60
nop
test rbx, rbx
je 0x140042953
mov rcx, rbx
call fcn.140030c60
nop
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x140042964
call qword [sym.imp.mpclient.dll_MpFreeMemory]
nop
jmp 0x140042980
test r14d, r14d
jns 0x1400429f0
jmp 0x1400429a1
mov rcx, qword [0x140162280]
cmp rcx, r15
je 0x1400429c7
test byte [rcx + 0x1c], 2
je 0x1400429c7
mov edx, 0x4a
mov r9d, r14d
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044450
mov r14d, esi
jmp 0x1400429f0
mov rcx, qword [0x140162280]
cmp rcx, r15
je 0x1400429f0
test byte [rcx + 0x1c], 4
je 0x1400429f0
mov edx, 0x4b
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044430
nop
call fcn.1400435d4
nop
jmp 0x140042a12
test r14d, r14d
js 0x140042a33
jmp 0x140042a5c
mov rcx, qword [0x140162280]
cmp rcx, r15
je 0x140042a59
test byte [rcx + 0x1c], 2
je 0x140042a59
mov edx, 0x4c
mov r9d, r14d
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044450
mov r14d, esi
test rdi, rdi
je 0x140042a6a
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [0x140162280]
cmp rcx, r15
je 0x140042a90
test byte [rcx + 0x1c], 4
je 0x140042a90
mov edx, 0x4d
mov r9d, r14d
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044450
mov eax, r14d
mov rcx, qword [rsp + 0xf0]
xor rcx, rsp
call fcn.140030c40
lea r11, [rsp + 0x100]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop r12
ret
lea rcx, [0x14016b920]
call fcn.140030f10
cmp dword [0x14016b920], 0xffffffff
jne 0x140042033
call qword [sym.imp.mpclient.dll_MpUtilsExportFunctions]
mov rax, qword [rax + 0x58]
call fcn.1400fece0
nop
cmp byte [rax + 0x122], 1
je 0x140042b11
mov edx, 0x3801
call fcn.1400f4b8c
test eax, eax
js 0x140042b11
mov edx, 0x3a34
call fcn.1400f4b8c
test eax, eax
mov al, 1
js 0x140042b14
mov al, sil
mov byte [0x14016b924], al
lea rcx, [0x14016b920]
call fcn.140030eb0
jmp 0x140042033
mov ecx, eax
call fcn.1400f10c4
int3