Function at 0x404540
Capabilities:
Query service status
Stop service

Disassembly:
push 0xffffffffffffffff
push 0x406e39
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x40d02c]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov ebx, ecx
lea ecx, [esp + 0x20]
call dword [sym.imp.NCRRetailFoundation.dll_public:_void___thiscall_NCRRetailCommon::NCRString::constructor_void_]
push str.StopService
push 0x409dc6
xor eax, eax
push 0x408ec8
mov dword [esp + 0x44], eax
mov edi, dword [sym.imp.NCRRetailFoundation.dll_public:_void___cdecl_NCRRetailCommon::NCRSystemTrace::Trace_unsigned_int__unsigned_int__char_const___char_const___char_const__]
push 7
mov dword [esp + 0x2c], eax
mov eax, dword [ebx + 0x68]
push 0xffffffffffffffff
push eax
call edi
add esp, 0x18
call fcn.00405000
test eax, eax
jne 0x4045f2
mov ebx, dword [ebx + 0x68]
push str._StopService
push 0x409dc6
push 0x408ec8
push 0x200
push 0xffffffffffffffff
push ebx
call edi
add esp, 0x18
lea ecx, [esp + 0x20]
mov dword [esp + 0x38], 0xffffffff
call dword [sym.imp.NCRRetailFoundation.dll_public_virtual:_void___thiscall_NCRRetailCommon::NCRString::destructor_void_]
mov eax, 1
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
mov ebp, dword [sym.imp.NCRRetailFoundation.dll_public:_void___cdecl_NCRRetailCommon::NCRString::Format_char_const__]
lea esi, [ebx + 0x58]
push str.StopService:_OpenSCManager_SC_MANAGER_ALL_ACCESS
push esi
call ebp
add esp, 8
mov ecx, esi
call dword [sym.imp.NCRRetailFoundation.dll_public:_char_const____thiscall_NCRRetailCommon::NCRString::operator_char_const__void_const]
mov ecx, dword [ebx + 0x68]
push eax
push 0x409dc6
push 0x408ec8
push 0x200
push 0xffffffffffffffff
push ecx
call edi
add esp, 0x18
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [esp + 0x18], eax
test eax, eax
jne 0x4046a3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x24]
push str.Stop_Failed:_Couldnt_open_the_Microsoft_Service_Control_Manager__GetLastError_____d
push eax
call ebp
add esp, 0xc
lea ecx, [esp + 0x20]
call dword [sym.imp.NCRRetailFoundation.dll_public:_char_const____thiscall_NCRRetailCommon::NCRString::operator_char_const__void_const]
mov ebx, dword [ebx + 0x68]
push eax
push 0x409dc6
push 0x408ec8
push 0x200
push 0xffffffffffffffff
push ebx
call edi
add esp, 0x18
lea ecx, [esp + 0x20]
mov dword [esp + 0x38], 0xffffffff
call dword [sym.imp.NCRRetailFoundation.dll_public_virtual:_void___thiscall_NCRRetailCommon::NCRString::destructor_void_]
xor eax, eax
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
push 0x408ec8
push str...StopService:_Attempting_SCM_Open_with_ServiceData::SERVICE_NAME_s
push esi
call ebp
add esp, 0xc
mov ecx, esi
call dword [sym.imp.NCRRetailFoundation.dll_public:_char_const____thiscall_NCRRetailCommon::NCRString::operator_char_const__void_const]
mov ecx, dword [ebx + 0x68]
push eax
push 0x409dc6
push 0x408ec8
push 0x200
push 0xffffffffffffffff
push ecx
call edi
mov ecx, dword [esp + 0x30]
add esp, 0x18
push 0x24
push 0x408ec8
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x404757
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x24]
push str.Stop_Failed:_Couldnt_Open_service__GetLastError_____d
push eax
call ebp
add esp, 0xc
lea ecx, [esp + 0x20]
call dword [sym.imp.NCRRetailFoundation.dll_public:_char_const____thiscall_NCRRetailCommon::NCRString::operator_char_const__void_const]
mov ecx, dword [ebx + 0x68]
push eax
push 0x409dc6
push 0x408ec8
push 0x200
push 0xffffffffffffffff
push ecx
call edi
mov ebx, dword [ebx + 0x68]
push str._StopService
push 0x409dc6
push 0x408ec8
push 0x200
push 0xffffffffffffffff
push ebx
call edi
add esp, 0x30
jmp 0x40467b
push str.StopService:_ControlService___SERVICE_CONTROL_STOP__m_ServiceStatus
push esi
call ebp
add esp, 8
mov ecx, esi
call dword [sym.imp.NCRRetailFoundation.dll_public:_char_const____thiscall_NCRRetailCommon::NCRString::operator_char_const__void_const]
mov ecx, dword [ebx + 0x68]
push eax
push 0x409dc6
push 0x408ec8
push 0x200
push 0xffffffffffffffff
push ecx
call edi
mov ecx, dword [esp + 0x2c]
add esp, 0x18
lea eax, [ebx + 8]
push eax
push 1
push ecx
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x40482b
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ebp, dword [esp + 0x14]
lea esi, [ebx + 8]
push esi
push ebp
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x4047dd
lea esp, [esp]
cmp dword [ebx + 0xc], 3
jne 0x4047dd
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
push ebp
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x4047c0
mov eax, 1
lea ecx, [esp + 0x20]
cmp dword [ebx + 0xc], eax
jne 0x4047f6
mov dword [esp + 0x1c], eax
push str.Service_stopped.
jmp 0x4047fb
push str.Service_failed_to_stop.
call dword [sym.imp.NCRRetailFoundation.dll_public:_class_NCRRetailCommon::NCRString____thiscall_NCRRetailCommon::NCRString::operator_char_const__]
lea ecx, [esp + 0x20]
call dword [sym.imp.NCRRetailFoundation.dll_public:_char_const____thiscall_NCRRetailCommon::NCRString::operator_char_const__void_const]
mov ecx, dword [ebx + 0x68]
push eax
push 0x409dc6
push 0x408ec8
push 0x200
push 0xffffffffffffffff
push ecx
call edi
add esp, 0x18
jmp 0x40499e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x426
je 0x404992
push eax
lea edx, [esp + 0x24]
push str.Stop_Failed:_StopService_returned_failure__GetLastError_____d
push edx
call ebp
add esp, 0xc
lea ecx, [esp + 0x20]
call dword [sym.imp.NCRRetailFoundation.dll_public:_char_const____thiscall_NCRRetailCommon::NCRString::operator_char_const__void_const]
mov ecx, dword [ebx + 0x68]
push eax
push 0x409dc6
push 0x408ec8
push 0x200
push 0xffffffffffffffff
push ecx
call edi
mov eax, dword [ebx + 0x68]
push str.Control_Status_of_NCRLoader:
push 0x409dc6
push 0x408ec8
push 0x200
push 0xffffffffffffffff
push eax
call edi
mov eax, dword [ebx + 8]
push eax
push str.__Service_Type:_0x_x_n
push esi
call ebp
add esp, 0x3c
mov ecx, esi
call dword [sym.imp.NCRRetailFoundation.dll_public:_char_const____thiscall_NCRRetailCommon::NCRString::operator_char_const__void_const]
mov ecx, dword [ebx + 0x68]
push eax
push 0x409dc6
push 0x408ec8
push 0x200
push 0xffffffffffffffff
push ecx
call edi
mov ecx, dword [ebx + 0xc]
push ecx
push str.__Current_State:_0x_x_n
push esi
call ebp
add esp, 0x24
mov ecx, esi
call dword [sym.imp.NCRRetailFoundation.dll_public:_char_const____thiscall_NCRRetailCommon::NCRString::operator_char_const__void_const]
mov ecx, dword [ebx + 0x68]
push eax
push 0x409dc6
push 0x408ec8
push 0x200
push 0xffffffffffffffff
push ecx
call edi
mov edx, dword [ebx + 0x10]
push edx
push str.__Controls_Accepted:_0x_x_n
push esi
call ebp
mov eax, dword [ebx + 0x14]
push eax
push str.__Exit_Code:__d_n
push esi
call ebp
add esp, 0x30
mov ecx, esi
call dword [sym.imp.NCRRetailFoundation.dll_public:_char_const____thiscall_NCRRetailCommon::NCRString::operator_char_const__void_const]
mov ecx, dword [ebx + 0x68]
push eax
push 0x409dc6
push 0x408ec8
push 0x200
push 0xffffffffffffffff
push ecx
call edi
mov ecx, dword [ebx + 0x18]
push ecx
push str.__Service_Specific_Exit_Code:__d_n
push esi
call ebp
mov edx, dword [ebx + 0x1c]
push edx
push str.__Check_Point:__d_n
push esi
call ebp
add esp, 0x30
mov ecx, esi
call dword [sym.imp.NCRRetailFoundation.dll_public:_char_const____thiscall_NCRRetailCommon::NCRString::operator_char_const__void_const]
mov ecx, dword [ebx + 0x68]
push eax
push 0x409dc6
push 0x408ec8
push 0x200
push 0xffffffffffffffff
push ecx
call edi
mov eax, dword [ebx + 0x20]
push eax
push str.__Wait_Hint:__d_n
push esi
call ebp
add esp, 0x24
mov ecx, esi
call dword [sym.imp.NCRRetailFoundation.dll_public:_char_const____thiscall_NCRRetailCommon::NCRString::operator_char_const__void_const]
mov ecx, dword [ebx + 0x68]
push eax
push 0x409dc6
push 0x408ec8
push 0x200
push 0xffffffffffffffff
push ecx
call edi
add esp, 0x18
jmp 0x40499a
mov dword [esp + 0x1c], 1
mov ebp, dword [esp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebp
call esi
mov ecx, dword [esp + 0x18]
push ecx
call esi
mov ebx, dword [ebx + 0x68]
push str.StopService
push 0x409dc6
push 0x408ec8
push 8
push 0xffffffffffffffff
push ebx
call edi
add esp, 0x18
lea ecx, [esp + 0x20]
mov dword [esp + 0x38], 0xffffffff
call dword [sym.imp.NCRRetailFoundation.dll_public_virtual:_void___thiscall_NCRRetailCommon::NCRString::destructor_void_]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret