Function at 0x140041e90
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 [0x140173950]
xor rax, rsp
mov qword [rsp + 0xf0], rax
xor esi, esi
mov dword [rsp + 0x68], esi
lea r15, [0x14016d280]
mov rcx, qword [0x14016d280]
lea r12, [0x140120ad8]
cmp rcx, r15
je 0x140041ef3
test byte [rcx + 0x1c], 4
je 0x140041ef3
lea edx, [rsi + 0x37]
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044360
call fcn.1400fdab0
test al, al
jne 0x140041f2a
mov rcx, qword [0x14016d280]
cmp rcx, r15
je 0x140041f1f
test byte [rcx + 0x1c], 1
je 0x140041f1f
mov edx, 0x38
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044360
mov r14d, 0x80070032
jmp 0x1400429ac
mov qword [rsp + 0x50], rsi
lea rcx, [rsp + 0x50]
call fcn.1400fb890
mov r14d, eax
test eax, eax
jns 0x140041f53
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x1400429ac
jmp 0x1400429a6
mov ecx, 4
mov rax, qword gs:[0x58]
mov rax, qword [rax]
mov eax, dword [rcx + rax]
cmp dword [0x1401769d0], eax
jg 0x140042a03
lea rdx, str.WdFilter
lea rcx, [rsp + 0x50]
call fcn.140041d58
test al, al
jne 0x140041fb8
cmp byte [0x1401769d4], sil
je 0x14004209a
mov rcx, qword [0x14016d280]
cmp rcx, r15
je 0x140041fb8
test byte [rcx + 0x1c], 4
je 0x140041fb8
mov edx, 0x39
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044360
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 [0x1401769d4], sil
je 0x1400422aa
mov rdx, qword [rbx]
call fcn.1400059ec
test eax, eax
je 0x1400422aa
mov rdx, qword [rbx]
lea rcx, str.MsSecFlt
call fcn.1400059ec
test eax, eax
je 0x1400422aa
mov rcx, qword [0x14016d280]
cmp rcx, r15
je 0x14004266b
test byte [rcx + 0x1c], 4
je 0x14004266b
mov edx, 0x3c
mov r9, qword [rbx]
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044638
jmp 0x14004266b
lea rbx, str.WinDefend
mov rdx, rbx
lea rcx, [rsp + 0x50]
call fcn.140041d58
test al, al
je 0x1400420c7
lea rcx, [rsp + 0x50]
call fcn.140041ab4
mov r14d, eax
test eax, eax
js 0x140041f40
lea rcx, [rsp + 0x50]
call fcn.140043d9c
mov r14d, eax
test eax, eax
js 0x140041f40
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 0x14004215b
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 0x140042156
mov r9d, dword [rsp + 0x74]
mov eax, r9d
and al, 3
cmp al, 1
jne 0x14004216f
mov r14d, 0x8007139f
mov rcx, qword [0x14016d280]
cmp rcx, r15
je 0x140042156
test byte [rcx + 0x1c], al
je 0x140042156
mov edx, 0x3a
mov dword [rsp + 0x20], r14d
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.1400443b4
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140041f40
call qword [sym.imp.mpclient.dll_MpHandleClose]
jmp 0x140041f40
mov rcx, qword [rsp + 0x50]
call fcn.140042db0
mov r14d, eax
test eax, eax
js 0x140042156
lea rcx, [rsp + 0x50]
call fcn.140043d9c
mov r14d, eax
test eax, eax
js 0x140042156
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 0x1400421c1
test rcx, rcx
je 0x140042156
call qword [sym.imp.mpclient.dll_MpConfigClose]
jmp 0x140042156
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 0x14004220e
cmp dword [rsp + 0x40], 1
jbe 0x140042215
mov r14d, 0x8007065d
mov rcx, qword [rsp + 0x38]
jmp 0x1400421b4
cmp dword [rsp + 0x30], esi
mov eax, esi
je 0x140042221
mov eax, dword [rsp + 0x60]
mov dword [rsp + 0x58], eax
test eax, eax
je 0x140042256
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 0x14004220e
mov rcx, qword [0x14016d280]
cmp rcx, r15
je 0x14004227c
test byte [rcx + 0x1c], 4
je 0x14004227c
mov edx, 0x3b
mov r9, rdi
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044638
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x14004228c
call qword [sym.imp.mpclient.dll_MpConfigClose]
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x14004229c
call qword [sym.imp.mpclient.dll_MpHandleClose]
test r14d, r14d
jns 0x140041fbf
jmp 0x140041f40
mov rcx, qword [0x14016d280]
cmp rcx, r15
je 0x1400422d0
test byte [rcx + 0x1c], 4
je 0x1400422d0
mov edx, 0x3d
mov r9, qword [rbx]
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044638
mov qword [rsp + 0x38], rsi
mov r9d, 0x2f
mov r8, qword [rbx]
mov rdx, rdi
lea rcx, [rsp + 0x38]
call fcn.1400fb8f4
mov r14d, eax
test eax, eax
jns 0x14004233f
cmp eax, 0x80070424
jne 0x140042691
mov rcx, qword [0x14016d280]
cmp rcx, r15
je 0x140042323
test byte [rcx + 0x1c], 2
je 0x140042323
mov edx, 0x3e
mov r9, qword [rbx]
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044638
mov r14d, esi
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x14004266b
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14004266b
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.1400fbaa0
mov r14d, eax
test eax, eax
jns 0x1400423bc
mov eax, 0x80070002
cmp r14d, eax
jne 0x1400426aa
mov rcx, qword [0x14016d280]
cmp rcx, r15
je 0x1400423b4
test byte [rcx + 0x1c], 2
je 0x1400423b4
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.140044694
mov r14d, esi
jmp 0x140042658
mov eax, dword [rsp + 0x84]
cmp eax, 1
je 0x140042534
mov rcx, qword [0x14016d280]
cmp rcx, r15
je 0x140042403
test byte [rcx + 0x1c], 4
je 0x140042403
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.140044704
mov edx, esi
mov dword [rsp + 0x58], edx
test edx, edx
je 0x140042430
mov rcx, qword [0x14016d280]
cmp rcx, r15
je 0x140042430
test byte [rcx + 0x1c], 2
je 0x140042430
mov dword [rsp + 0x28], r14d
mov r9d, edx
mov rcx, qword [rcx + 0x10]
call fcn.140044474
mov rax, qword [rsp + 0x30]
mov r8, qword [rax]
mov rdx, rdi
mov rcx, rbx
call fcn.14004323c
mov r14d, eax
test eax, eax
js 0x1400426f9
test byte [rsp + 0x80], 0x30
je 0x140042490
mov rcx, qword [0x14016d280]
cmp rcx, r15
je 0x1400424bb
test byte [rcx + 0x1c], 4
je 0x1400424bb
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.140044694
jmp 0x1400424bb
mov rcx, qword [0x14016d280]
cmp rcx, r15
je 0x1400424bb
test byte [rcx + 0x1c], 4
je 0x1400424bb
mov edx, 0x43
mov rax, qword [rsp + 0x30]
mov r9, qword [rax]
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044638
mov edx, 0x927c0
mov rcx, rbx
call fcn.1400c5c24
mov r14d, eax
test eax, eax
jns 0x140042534
mov rcx, qword [0x14016d280]
cmp rcx, r15
je 0x140042501
test byte [rcx + 0x1c], 1
je 0x140042501
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.140044694
mov eax, r14d
cmp r14d, 0x8007041c
je 0x1400426b8
mov r14d, eax
cmp eax, 0x8007041b
jne 0x1400426f9
mov edx, dword [rsp + 0x58]
inc edx
mov dword [rsp + 0x58], edx
cmp edx, 3
jae 0x1400426f9
jmp 0x140042409
mov rcx, qword [0x14016d280]
cmp rcx, r15
je 0x14004255f
test byte [rcx + 0x1c], 4
je 0x14004255f
mov edx, 0x46
mov rax, qword [rsp + 0x30]
mov r9, qword [rax]
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044638
mov eax, dword [rsp + 0x80]
test al, 0x30
je 0x140042658
xor edx, edx
mov ecx, 0x60003
call fcn.1400fda18
test eax, eax
js 0x14004262d
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 0x1400425b5
mov r14d, esi
jmp 0x1400425c5
call fcn.1400fb4fc
mov r14d, eax
test eax, eax
js 0x1400426aa
cmp dword [rsp + 0x40], esi
je 0x140042614
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 0x1400425eb
mov r14d, esi
jmp 0x1400425fb
call fcn.1400fb4fc
mov r14d, eax
test eax, eax
js 0x1400426aa
mov rcx, qword [0x14016d280]
cmp rcx, r15
je 0x140042658
test byte [rcx + 0x1c], 4
je 0x140042658
mov edx, 0x47
jmp 0x140042644
mov rcx, qword [0x14016d280]
cmp rcx, r15
je 0x140042658
test byte [rcx + 0x1c], 4
je 0x140042658
mov edx, 0x48
jmp 0x140042644
mov rcx, qword [0x14016d280]
cmp rcx, r15
je 0x140042658
test byte [rcx + 0x1c], 4
je 0x140042658
mov edx, 0x49
mov rax, qword [rsp + 0x30]
mov r9, qword [rax]
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044638
test rbx, rbx
je 0x140042666
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 0x140042707
lea rcx, str.Sense
jmp 0x140042033
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x14004299e
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14004299e
test rbx, rbx
je 0x14004299e
mov rcx, rbx
jmp 0x14004269f
mov eax, dword [rsp + 0x80]
test al, 0xb
je 0x1400426f9
mov r14d, 0x80070bc9
mov rcx, qword [0x14016d280]
cmp rcx, r15
je 0x1400426f9
test byte [rcx + 0x1c], 1
je 0x1400426f9
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.140044694
test rbx, rbx
je 0x140042707
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test r14d, r14d
js 0x14004299e
cmp byte [0x1401769d4], sil
jne 0x14004290e
lea rcx, [rsp + 0x60]
call fcn.140042d0c
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.1400fb388
nop
mov rdx, qword [rax]
lea rcx, [rsp + 0x58]
call fcn.1400fa5dc
test eax, eax
js 0x140042a6d
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x14004276f
call fcn.140030ba0
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.1400e7778
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.140032a40
test rax, rax
je 0x1400427e8
mov r8, qword [rsp + 0x38]
lea rdx, str.__ls_
lea rcx, [rsp + 0x70]
call fcn.1400fb388
mov rcx, rax
mov r14d, 1
jmp 0x140042800
mov rdx, qword [rsp + 0x38]
lea rcx, [rsp + 0x40]
call fcn.1400f9ea0
mov rcx, rax
mov r14d, 2
mov rax, qword [rcx]
mov qword [rcx], rsi
mov qword [rsp + 0x68], rax
test r14b, 2
je 0x140042825
and r14d, 0xfffffffd
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x140042825
call fcn.140030ba0
nop
test r14b, 1
je 0x14004283a
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x14004283a
call fcn.140030ba0
lea rdx, [rsp + 0x68]
call fcn.140040f84
mov r14d, eax
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140042857
call fcn.140030ba0
nop
lea rcx, [rsp + 0x80]
call fcn.140041598
nop
mov rcx, qword [rsp + 0x48]
cmp rcx, 0xffffffffffffffff
je 0x140042877
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140042887
call fcn.140030ba0
nop
test rbx, rbx
je 0x140042895
mov rcx, rbx
call fcn.140030ba0
nop
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x1400428a6
call qword [sym.imp.mpclient.dll_MpFreeMemory]
nop
jmp 0x1400428c2
test r14d, r14d
jns 0x140042932
jmp 0x1400428e3
mov rcx, qword [0x14016d280]
cmp rcx, r15
je 0x140042909
test byte [rcx + 0x1c], 2
je 0x140042909
mov edx, 0x4a
mov r9d, r14d
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044380
mov r14d, esi
jmp 0x140042932
mov rcx, qword [0x14016d280]
cmp rcx, r15
je 0x140042932
test byte [rcx + 0x1c], 4
je 0x140042932
mov edx, 0x4b
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044360
nop
call fcn.140043500
nop
jmp 0x140042954
test r14d, r14d
js 0x140042975
jmp 0x14004299e
mov rcx, qword [0x14016d280]
cmp rcx, r15
je 0x14004299b
test byte [rcx + 0x1c], 2
je 0x14004299b
mov edx, 0x4c
mov r9d, r14d
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044380
mov r14d, esi
test rdi, rdi
je 0x1400429ac
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [0x14016d280]
cmp rcx, r15
je 0x1400429d2
test byte [rcx + 0x1c], 4
je 0x1400429d2
mov edx, 0x4d
mov r9d, r14d
mov r8, r12
mov rcx, qword [rcx + 0x10]
call fcn.140044380
mov eax, r14d
mov rcx, qword [rsp + 0xf0]
xor rcx, rsp
call fcn.140030b80
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, [0x1401769d0]
call fcn.140030e50
cmp dword [0x1401769d0], 0xffffffff
jne 0x140041f73
call qword [sym.imp.mpclient.dll_MpUtilsExportFunctions]
mov rax, qword [rax + 0x58]
call fcn.140107c30
nop
cmp byte [rax + 0x122], 1
je 0x140042a53
mov edx, 0x3801
call fcn.1400fda70
test eax, eax
js 0x140042a53
mov edx, 0x3a34
call fcn.1400fda70
test eax, eax
mov al, 1
js 0x140042a56
mov al, sil
mov byte [0x1401769d4], al
lea rcx, [0x1401769d0]
call fcn.140030df0
jmp 0x140041f73
mov ecx, eax
call fcn.1400f9fc4
int3