Function at 0x415970
Capabilities:
Modify service

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0x80
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov ebp, edx
mov rdi, rcx
xor r12d, r12d
mov ebx, r12d
lea rcx, [rsp + 0x68]
call fcn.0040eb00
nop
mov rsi, r12
mov dword [rsp + 0xb0], r12d
test rdi, rdi
jne 0x4159c1
lea rcx, [rsp + 0x68]
call fcn.0040eb10
mov eax, 0x80004003
jmp 0x415ce2
mov r8d, 1
lea rdx, str.ServicesActive
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov rdx, rax
lea rcx, [rsp + 0xc8]
call fcn.0040d000
nop
lea rcx, [rsp + 0xc8]
call fcn.0040d010
test al, al
je 0x415a41
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x415a0d
movzx ebx, ax
or ebx, 0x80070000
mov r8d, ebx
lea rdx, str.Failed_in_calling_OpenSCManager._Error_code:_0x_x_r_n
mov ecx, 2
call fcn.00415890
nop
lea rcx, [rsp + 0xc8]
call fcn.0040d020
nop
lea rcx, [rsp + 0x68]
call fcn.0040eb10
mov eax, ebx
jmp 0x415ce2
lea rcx, [rsp + 0xc8]
call fcn.0040cfb0
mov rcx, rax
mov r8d, 3
mov rdx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdx, rax
lea rcx, [rsp + 0xc0]
call fcn.0040d000
nop
lea rcx, [rsp + 0xc0]
call fcn.0040d010
test al, al
je 0x415adc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x415a97
movzx ebx, ax
or ebx, 0x80070000
mov r9d, ebx
mov r8, rdi
lea rdx, str.Failed_in_calling_OpenServiceW_for_service__s._Error_code:_0x_x_r_n
mov ecx, 2
call fcn.00415890
nop
lea rcx, [rsp + 0xc0]
call fcn.0040d020
nop
lea rcx, [rsp + 0xc8]
call fcn.0040d020
nop
lea rcx, [rsp + 0x68]
call fcn.0040eb10
mov eax, ebx
jmp 0x415ce2
lea rcx, [rsp + 0xc0]
call fcn.0040cfb0
mov rcx, rax
lea r9, [rsp + 0xb0]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x415bba
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x415b1c
movzx ebx, ax
or ebx, 0x80070000
cmp ebx, 0x8007007a
je 0x415b69
mov r9d, ebx
mov r8, rdi
lea rdx, str.Failed_in_calling_QueryServiceConfigW_for_service__s._Error_code:_0x_x_r_n
mov ecx, 2
call fcn.00415890
nop
lea rcx, [rsp + 0xc0]
call fcn.0040d020
nop
lea rcx, [rsp + 0xc8]
call fcn.0040d020
nop
lea rcx, [rsp + 0x68]
call fcn.0040eb10
mov eax, ebx
jmp 0x415ce2
mov edx, dword [rsp + 0xb0]
lea rcx, [rsp + 0x68]
call fcn.0040eb40
mov ebx, eax
test eax, eax
jns 0x415bad
lea rcx, [rsp + 0xc0]
call fcn.0040d020
nop
lea rcx, [rsp + 0xc8]
call fcn.0040d020
nop
lea rcx, [rsp + 0x68]
call fcn.0040eb10
mov eax, ebx
jmp 0x415ce2
lea rcx, [rsp + 0x68]
call fcn.0040cfb0
mov rsi, rax
lea rcx, [rsp + 0xc0]
call fcn.0040cfb0
mov rcx, rax
lea r9, [rsp + 0xb0]
mov r8d, dword [rsp + 0xb0]
mov rdx, rsi
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x415c41
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x415bfc
movzx ebx, ax
or ebx, 0x80070000
mov r9d, ebx
mov r8, rdi
lea rdx, str.Failed_in_calling_QueryServiceConfigW_for_service__s._Error_code:_0x_x_r_n
mov ecx, 2
call fcn.00415890
nop
lea rcx, [rsp + 0xc0]
call fcn.0040d020
nop
lea rcx, [rsp + 0xc8]
call fcn.0040d020
nop
lea rcx, [rsp + 0x68]
call fcn.0040eb10
mov eax, ebx
jmp 0x415ce2
cmp dword [rsi + 4], ebp
je 0x415cba
lea rcx, [rsp + 0xc0]
call fcn.0040cfb0
mov rcx, rax
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
or r9d, 0xffffffff
mov r8d, ebp
or edx, r9d
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x415cba
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x415ca2
movzx ebx, ax
or ebx, 0x80070000
mov r9d, ebx
mov r8, rdi
lea rdx, str.Failed_in_calling_ChangeServiceConfigW_for_service__s._Error_code:_0x_x_r_n
mov ecx, 2
call fcn.00415890
nop
lea rcx, [rsp + 0xc0]
call fcn.0040d020
nop
lea rcx, [rsp + 0xc8]
call fcn.0040d020
nop
lea rcx, [rsp + 0x68]
call fcn.0040eb10
mov eax, ebx
add rsp, 0x80
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret