Function at 0x40b3c0
Capabilities:
Query service status
Start service
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x418df8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1ac
push ebx
push esi
push edi
push 0
mov esi, ecx
push 0x10
call fcn.0040aab0
lea ebx, [esi + 0x2c8]
push ebx
push 0x46
push esi
call fcn.0040bff0
mov eax, dword [esi]
add esp, 0xc
mov ecx, esi
push 0
push 0
push str.Restart_client
push 0xcf
push 1
call dword [eax + 4]
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
test eax, eax
mov dword [ebp - 0x14], eax
jne 0x40b455
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager
push 0x38
push esi
call fcn.0040bff0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push 0x34
push str.Client32
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
jne 0x40b49d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenService
push 0x38
push esi
call fcn.0040bff0
mov ecx, dword [ebp - 0x14]
add esp, 0x10
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push ebx
push 0x39
push esi
call fcn.0040bff0
mov ebx, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
add esp, 0xc
lea edx, [ebp - 0x38]
push edx
push edi
call ebx
mov eax, dword [ebp - 0x34]
push eax
lea eax, [esi + 0x2c8]
push eax
push 0x47
push esi
call fcn.0040bff0
mov edx, dword [esi]
add esp, 0x10
mov ecx, esi
push 0
push 0
push str.see_if_client_running
push 0xcf
push 1
call dword [edx + 4]
mov eax, dword [ebp - 0x34]
lea ecx, [ebp - 0x138]
push eax
push str.service_status__d
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov edx, dword [esi]
add esp, 0xc
lea eax, [ebp - 0x138]
mov ecx, esi
push 0
push 0
push eax
push 0xcf
push 1
call dword [edx + 4]
mov eax, dword [ebp - 0x34]
cmp eax, 4
je 0x40b526
cmp eax, 2
jne 0x40b679
lea eax, [esi + 0x2c8]
push eax
push 0x48
push esi
call fcn.0040bff0
mov edx, dword [esi]
add esp, 0xc
mov ecx, esi
push 0
push 0
push str.stop_client
push 0xcf
push 1
call dword [edx + 4]
lea eax, [esi + 0x2c8]
push eax
push 0x49
push esi
call fcn.0040bff0
add esp, 0xc
lea ecx, [ebp - 0x1c]
push str.NSMWClass
call section..text
push 0
push 0
push 0x496
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], 0
call fcn.004011a0
lea eax, [ebp - 0x38]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x40b610
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea ecx, [ebp - 0xb8]
push ebx
push str.Error_calling_ControlService__d
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov edx, dword [esi]
add esp, 0xc
lea eax, [ebp - 0xb8]
mov ecx, esi
push 0
push 0
push eax
push 0xcf
push 1
call dword [edx + 4]
push ebx
push str.ControlService
push 0x38
push esi
call fcn.0040bff0
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 0x10
push edi
call esi
mov ecx, dword [ebp - 0x14]
push ecx
call esi
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], 0xffffffff
call fcn.00401140
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push 0x4a
push esi
call fcn.0040bff0
add esp, 8
lea edx, [ebp - 0x38]
push edx
push edi
call ebx
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x10], 0
cmp eax, 1
je 0x40b658
cmp dword [ebp - 0x10], 0x1e
jge 0x40b658
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x38]
push eax
push edi
call ebx
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x34]
inc ecx
cmp eax, 1
mov dword [ebp - 0x10], ecx
jne 0x40b631
lea eax, [esi + 0x2c8]
push eax
push 0x4b
push esi
call fcn.0040bff0
add esp, 0xc
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], 0xffffffff
call fcn.00401140
mov edx, dword [esi]
push 0
push 0
push str.start_client
push 0xcf
push 1
mov ecx, esi
call dword [edx + 4]
lea eax, [esi + 0x2c8]
push eax
push 0x4c
push esi
call fcn.0040bff0
add esp, 0xc
push 0
push 0
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x40b71b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea eax, [ebp - 0xb8]
push ebx
push str.Error_calling_StartService__d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov edx, dword [esi]
add esp, 0xc
lea eax, [ebp - 0xb8]
mov ecx, esi
push 0
push 0
push eax
push 0xcf
push 1
call dword [edx + 4]
push ebx
push str.StartService
push 0x38
push esi
call fcn.0040bff0
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 0x10
push edi
call esi
mov ecx, dword [ebp - 0x14]
push ecx
call esi
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x38]
push edx
push edi
call ebx
push 0x4d
push esi
mov dword [ebp - 0x10], 0
call fcn.0040bff0
mov eax, dword [ebp - 0x34]
add esp, 8
cmp eax, 4
je 0x40b763
cmp dword [ebp - 0x10], 0x1e
jge 0x40b763
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x38]
push eax
push edi
call ebx
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x34]
inc ecx
cmp eax, 4
mov dword [ebp - 0x10], ecx
jne 0x40b73c
mov edx, dword [esi]
push 0
push 0
push str.client_started_or_timed_out
push 0xcf
push 1
mov ecx, esi
call dword [edx + 4]
lea eax, [ebp - 0x38]
push eax
push edi
call ebx
cmp dword [ebp - 0x34], 4
je 0x40b919
lea eax, [esi + 0x2c8]
push eax
push 0x4e
push esi
call fcn.0040bff0
mov edx, dword [esi]
add esp, 0xc
mov ecx, esi
push 0
push 0
push str.error_restarting_client
push 0xcf
push 1
call dword [edx + 4]
push 0
push str.NSMWClass
call dword [sym.imp.USER32.dll_FindWindowA]
mov ecx, esi
mov dword [ebp - 0x10], eax
call fcn.00409df0
push 0
lea ecx, [ebp - 0x1b8]
push 0
mov dword [ebp - 0x18], eax
mov eax, dword [esi]
push ecx
push 0xcf
push 1
mov ecx, esi
call dword [eax + 4]
mov eax, dword [ebp - 0x10]
test eax, eax
jne 0x40b90b
lea eax, [esi + 0x2c8]
push eax
push 0x50
push esi
call fcn.0040bff0
mov eax, dword [ebp - 0x18]
add esp, 0xc
test eax, eax
je 0x40b81b
push esi
push 0x40b2f0
push 0
call dword [sym.imp.USER32.dll_EnumChildWindows]
jmp 0x40b87a
push 0x81
push 0
push 0
push str.Winlogon
call dword [sym.imp.USER32.dll_OpenDesktopA]
mov edx, dword [esi]
push 0
test eax, eax
mov dword [ebp - 0x10], eax
push 0
je 0x40b869
push str.Opened_winlogon_desktop
push 0xcf
push 1
mov ecx, esi
call dword [edx + 4]
mov eax, dword [ebp - 0x10]
push esi
push 0x40b2f0
push eax
call dword [sym.imp.USER32.dll_EnumDesktopWindows]
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.USER32.dll_CloseDesktop]
jmp 0x40b87a
push str.Error_opening_winlogon_desktop
push 0xcf
push 1
mov ecx, esi
call dword [edx + 4]
mov eax, dword [esi]
push 0
push 0
push str.Wait_for_client_to_stop
push 0xcf
push 1
mov ecx, esi
call dword [eax + 4]
lea ecx, [ebp - 0x38]
push ecx
push edi
call ebx
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x10], 0
cmp eax, 1
je 0x40b8ce
cmp dword [ebp - 0x10], 0x1e
jge 0x40b8ce
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [ebp - 0x38]
push edx
push edi
call ebx
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x34]
inc ecx
cmp eax, 1
mov dword [ebp - 0x10], ecx
jne 0x40b8a7
lea eax, [ebp - 0x38]
push eax
push edi
call ebx
cmp dword [ebp - 0x34], 1
je 0x40b8f4
mov edx, dword [esi]
push 0
push 0
push str.Service_not_stopped
push 0xcf
push 1
mov ecx, esi
call dword [edx + 4]
jmp 0x40b90b
mov eax, dword [esi]
push 0
push 0
push str.Service_stopped
push 0xcf
push 1
mov ecx, esi
call dword [eax + 4]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40b919
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x38]
push ecx
push edi
call ebx
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
mov edx, dword [ebp - 0x14]
push edx
call edi
mov eax, dword [esi]
push 0
push 0
push str.finished_startclient
push 0xcf
push 1
mov ecx, esi
call dword [eax + 4]
mov eax, dword [ebp - 0x34]
mov edi, 4
cmp eax, edi
jne 0x40b97d
lea eax, [esi + 0x2c8]
push eax
push 0x4f
push esi
call fcn.0040bff0
mov edx, dword [esi]
add esp, 0xc
mov ecx, esi
push 0
push 0
push str.client_running
push 0xcf
push 1
call dword [edx + 4]
jmp 0x40b994
mov eax, dword [esi]
push 0
push 0
push str.client_NOT_running
push 0xcf
push 1
mov ecx, esi
call dword [eax + 4]
mov ecx, dword [ebp - 0x34]
xor eax, eax
cmp ecx, edi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
sete al
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret