Function at 0x140039120
Capabilities:
Check for time delay via gettickcount
Enumerate services
Query service status
Stop service

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x188
mov rax, qword [0x140322b20]
xor rax, rsp
mov qword [rsp + 0x178], rax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rsp + 0x48], eax
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x154]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x150]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8, qword [rsp + 0x38]
mov edx, 1
mov rcx, qword [rsp + 0x1a8]
call qword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
test eax, eax
je 0x14003919b
jmp 0x140039513
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x1400391af
xor eax, eax
jmp 0x140039518
mov eax, dword [rsp + 0x150]
mov qword [rsp + 0x50], rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, qword [rsp + 0x50]
mov r8, rcx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x38], rax
cmp qword [rsp + 0x38], 0
jne 0x1400391eb
xor eax, eax
jmp 0x140039518
lea rax, [rsp + 0x154]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x150]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x150]
mov r8, qword [rsp + 0x38]
mov edx, 1
mov rcx, qword [rsp + 0x1a8]
call qword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
test eax, eax
je 0x1400394fd
mov dword [rsp + 0x30], 0
jmp 0x140039241
mov eax, dword [rsp + 0x30]
inc eax
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x154]
cmp dword [rsp + 0x30], eax
jae 0x1400394fd
mov eax, dword [rsp + 0x30]
imul rax, rax, 0x30
lea rcx, [rsp + 0xd0]
mov rdx, qword [rsp + 0x38]
mov rdi, rcx
lea rsi, [rdx + rax]
mov ecx, gethostbyname
rep movsb byte [rdi], byte [rsi]
mov r8d, 0x24
mov rdx, qword [rsp + 0xd0]
mov rcx, qword [rsp + 0x1a0]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
je 0x14003948b
mov r8d, dword [rsp + 0x1b0]
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x1a0]
call fcn.140039120
nop
lea r8, [rsp + 0x158]
mov edx, 1
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x14003940a
lea r9, [0x140258dd0]
xor r8d, r8d
mov edx, 1
lea rcx, [rsp + 0x130]
call fcn.140038d20
lea rcx, [rsp + 0x90]
mov rdi, rcx
mov rsi, rax
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
lea rax, [rsp + 0xa0]
lea rcx, [rsp + 0x90]
mov rdi, rax
mov rsi, rcx
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
mov r8, qword [rsp + 0xd0]
lea rdx, str._tDependencies_Service__ws_ControlService_SERVICE_CONTROL_STOP_success._n
lea rcx, [rsp + 0xa0]
call fcn.14003b980
cmp dword [rsp + 0x15c], 1
je 0x140039408
mov ecx, dword [rsp + 0x170]
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rsp + 0x158]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x14003937e
jmp 0x140039408
cmp dword [rsp + 0x15c], 1
jne 0x1400393ee
lea r9, [0x140259030]
xor r8d, r8d
mov edx, 1
lea rcx, [rsp + 0x120]
call fcn.140038d20
lea rcx, [rsp + 0x100]
mov rdi, rcx
mov rsi, rax
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
lea rax, [rsp + 0x60]
lea rcx, [rsp + 0x100]
mov rdi, rax
mov rsi, rcx
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
mov r8, qword [rsp + 0xd0]
lea rdx, str._tDependencies_Service__ws_ControlService_SERVICE_CONTROL_STOP_success_and_SERVICE_STOPPED._n
lea rcx, [rsp + 0x60]
call fcn.14003b980
jmp 0x140039408
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [rsp + 0x48]
cmp eax, dword [rsp + 0x1b0]
jbe 0x140039403
jmp 0x140039408
jmp 0x140039347
jmp 0x14003947e
lea r9, [0x140259140]
xor r8d, r8d
mov edx, 3
lea rcx, [rsp + 0x140]
call fcn.140038d20
lea rcx, [rsp + 0xc0]
mov rdi, rcx
mov rsi, rax
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [rsp + 0x80]
lea rdx, [rsp + 0xc0]
mov rdi, rcx
mov rsi, rdx
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
mov r9d, eax
mov r8, qword [rsp + 0xd0]
lea rdx, str._tDependencies_Service__ws_ControlService_SERVICE_CONTROL_STOP_failed_err:_lu_n
lea rcx, [rsp + 0x80]
call fcn.14003b980
nop
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1400394f8
lea r9, [0x140259250]
xor r8d, r8d
mov edx, 3
lea rcx, [rsp + 0x110]
call fcn.140038d20
lea rcx, [rsp + 0x70]
mov rdi, rcx
mov rsi, rax
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [rsp + 0xb0]
lea rdx, [rsp + 0x70]
mov rdi, rcx
mov rsi, rdx
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
mov r9d, eax
mov r8, qword [rsp + 0xd0]
lea rdx, str._tDependencies_Service__ws_OpenService_failed_err:_lu_n
lea rcx, [rsp + 0xb0]
call fcn.14003b980
jmp 0x140039237
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x38]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, 1
mov rcx, qword [rsp + 0x178]
xor rcx, rsp
call fcn.1401fe250
add rsp, 0x188
pop rdi
pop rsi
ret