Function at 0x140012f90
Capabilities:
Query service status

Disassembly:
mov rax, rsp
push rbp
lea rbp, [rsp - 0x80]
sub rsp, 0x180
mov qword [rbp + 0x40], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x140225e48]
xor rax, rsp
mov qword [rbp + 0x78], rax
mov rbx, rcx
mov qword [rsp + 0x38], rcx
lea rax, [rbp + 0x48]
mov qword [rsp + 0x20], rax
mov r9d, 0x24
lea r8, [rbp + 0x50]
xor edx, edx
mov rcx, qword [rcx + 8]
call qword [sym.imp.api_ms_win_service_management_l2_1_0.dll_QueryServiceStatusEx]
test eax, eax
jne 0x140013081
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
xor edx, edx
mov r8d, 0xf8
lea rcx, [rsp + 0x48]
call fcn.140114650
lea rcx, [rsp + 0x48]
call fcn.14000df10
nop
lea rdx, str.Cannot_query_service_state_0x
lea rcx, [rsp + 0x58]
call fcn.14000abf0
mov rcx, qword [rsp + 0x58]
movsxd rdx, dword [rcx + 4]
and dword [rsp + rdx + 0x70], 0xfffff9ff
or dword [rsp + rdx + 0x70], 0x800
mov edx, ebx
lea rcx, [rsp + 0x58]
call fcn.140016d60
mov rax, qword [rsp + 0x58]
movsxd rcx, dword [rax + 4]
and dword [rsp + rcx + 0x70], 0xfffff3ff
or dword [rsp + rcx + 0x70], 0x200
lea rcx, [rsp + 0x58]
call fcn.14000e410
nop
lea rcx, [rsp + 0x48]
call fcn.140026a40
mov eax, ebx
jmp 0x1400133f3
mov eax, dword [rbp + 0x54]
cmp eax, 1
jne 0x1400130d3
xor edx, edx
mov r8d, 0xf8
lea rcx, [rsp + 0x48]
call fcn.140114650
lea rcx, [rsp + 0x48]
call fcn.14000df10
nop
lea rdx, str.Service_is_already_stopped
lea rcx, [rsp + 0x58]
call fcn.14000abf0
lea rcx, [rsp + 0x58]
call fcn.14000e410
nop
lea rcx, [rsp + 0x48]
call fcn.140026a40
xor eax, eax
jmp 0x1400133f3
cmp eax, 3
jne 0x1400130e5
mov rcx, rbx
call fcn.140013d10
jmp 0x1400133f3
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov qword [rsp + 0x40], rcx
mov edx, 0x130
mov eax, dword [rdx + rcx]
mov r8d, 0x138
test al, 1
jne 0x14001312b
or eax, 1
mov dword [rdx + rcx], eax
mov eax, r8d
add rcx, rax
xor eax, eax
mov qword [rcx], rax
call sym.iaStorAfsService.exe_private:_void___cdecl_GlobalLogger::constructor_void____ptr64
lea rcx, [0x1401b3c50]
call fcn.1400ebd30
nop
cmp byte [sym.iaStorAfsService.exe_bool_GlobalLogger::_printOnDebug], 0
je 0x140013153
lea rdx, str.Stopping_dependent_services.
lea rcx, [0x14022d0e0]
call fcn.14000abf0
lea rcx, [0x14022d0e0]
call fcn.14000e410
xor esi, esi
mov qword [rsp + 0x30], rsi
lea rdx, [rsp + 0x30]
mov rcx, rbx
call fcn.140013fa0
mov edi, eax
test eax, eax
jne 0x1400133ae
mov rdi, qword [rsp + 0x30]
test rdi, rdi
je 0x140013225
mov rcx, rdi
call fcn.140012f90
mov rcx, qword [rdi]
test rcx, rcx
je 0x140013195
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x1400131a4
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
mov edx, 0x28
mov rcx, rdi
call fcn.1400ea8a4
mov eax, dword [rbx + 0x24]
cmp eax, dword [rbx + 0x20]
jb 0x1400131be
mov rdi, rsi
jmp 0x140013176
lea rcx, [rax + rax*2]
add rcx, rcx
mov rax, qword [rbx + 0x18]
mov rbx, qword [rax + rcx*8]
mov ecx, 0x28
call fcn.1400ea860
mov rdi, rax
mov qword [rsp + 0x30], rax
xor eax, eax
mov qword [rdi + 0x20], rax
mov qword [rdi], rsi
mov qword [rdi + 8], rsi
mov qword [rdi + 0x10], rsi
mov qword [rdi + 0x18], rsi
mov dword [rdi + 0x20], esi
mov dword [rdi + 0x24], 0xffffffff
mov rdx, rbx
mov rcx, rdi
call fcn.140013a40
test eax, eax
je 0x140013218
mov rcx, rdi
call fcn.140012450
mov rdi, rsi
mov rbx, qword [rsp + 0x38]
inc dword [rbx + 0x24]
jmp 0x140013176
lea r8, [rbp + 0x50]
mov edx, 1
mov rcx, qword [rbx + 8]
call qword [sym.imp.api_ms_win_service_winsvc_l1_1_0.dll_ControlService]
test eax, eax
jne 0x140013302
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edi, eax
lea rax, [rbp + 0x48]
mov qword [rsp + 0x20], rax
mov r9d, 0x24
lea r8, [rbp + 0x50]
xor edx, edx
mov rcx, qword [rbx + 8]
call qword [sym.imp.api_ms_win_service_management_l2_1_0.dll_QueryServiceStatusEx]
test eax, eax
je 0x140013302
mov ecx, dword [rbp + 0x54]
dec ecx
test ecx, 0xfffffffd
je 0x140013302
xor edx, edx
mov r8d, 0xf8
lea rcx, [rsp + 0x48]
call fcn.140114650
lea rcx, [rsp + 0x48]
call fcn.14000df10
nop
lea rcx, [rsp + 0x48]
call fcn.1400161c0
lea rbx, [rax + 0x10]
test rbx, rbx
jne 0x1400132b5
mov rax, rsi
jmp 0x1400132bf
mov rax, qword [rbx]
movsxd rax, dword [rax + 4]
add rax, rbx
and dword [rax + 0x18], 0xfffff9ff
or dword [rax + 0x18], 0x800
mov edx, edi
mov rcx, rbx
call fcn.140016d60
test rbx, rbx
je 0x1400132e6
mov rax, qword [rbx]
movsxd rsi, dword [rax + 4]
add rsi, rbx
and dword [rsi + 0x18], 0xfffff3ff
or dword [rsi + 0x18], 0x200
mov rcx, rbx
call fcn.14000e410
nop
jmp 0x1400133e7
mov rcx, rbx
call fcn.140013d10
test eax, eax
je 0x140013349
xor edx, edx
mov r8d, 0xf8
lea rcx, [rsp + 0x48]
call fcn.140114650
lea rcx, [rsp + 0x48]
call fcn.14000df10
nop
lea rcx, [rsp + 0x48]
call fcn.1400161f0
lea rcx, [rax + 0x10]
call fcn.14000e410
nop
lea rcx, [rsp + 0x48]
call fcn.140026a40
mov rdx, qword [rsp + 0x40]
mov r8d, 0x130
mov eax, dword [r8 + rdx]
test al, 1
jne 0x140013382
or eax, 1
mov dword [r8 + rdx], eax
mov ecx, 0x138
add rcx, rdx
xor eax, eax
mov qword [rcx], rax
call sym.iaStorAfsService.exe_private:_void___cdecl_GlobalLogger::constructor_void____ptr64
lea rcx, [0x1401b3c50]
call fcn.1400ebd30
nop
cmp byte [sym.iaStorAfsService.exe_bool_GlobalLogger::_printOnDebug], 0
je 0x1400133aa
lea rdx, str.Service_stopped_successfully
lea rcx, [0x14022d0e0]
call fcn.14000abf0
lea rcx, [0x14022d0e0]
call fcn.14000e410
xor eax, eax
jmp 0x1400133f3
xor edx, edx
mov r8d, 0xf8
lea rcx, [rsp + 0x48]
call fcn.140114650
lea rcx, [rsp + 0x48]
call fcn.14000df10
nop
lea rdx, str.Cannot_stop_all_dependent_services
lea rcx, [rsp + 0x58]
call fcn.14000abf0
lea rcx, [rsp + 0x58]
call fcn.14000e410
nop
lea rcx, [rsp + 0x48]
call fcn.140026a40
mov eax, edi
mov rcx, qword [rbp + 0x78]
xor rcx, rsp
call fcn.1400eb3e0
lea r11, [rsp + 0x180]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret