Function at 0x450220
Capabilities:
Query service status
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4b741e
mov eax, dword fs:[0]
push eax
sub esp, 0x128
mov eax, dword [0x4ff1a0]
xor eax, esp
mov dword [esp + 0x120], eax
push ebx
push esi
push edi
mov eax, dword [0x4ff1a0]
xor eax, esp
push eax
lea eax, [esp + 0x138]
mov dword fs:[0], eax
xor eax, eax
lea ebx, [eax + 1]
mov esi, ecx
mov byte [esp + 0x13], al
mov dword [esp + 0x114], eax
mov dword [esp + 0x118], eax
mov dword [esp + 0x11c], eax
mov dword [esp + 0x120], eax
mov dword [esp + 0x124], eax
mov dword [esp + 0x128], eax
mov dword [esp + 0x12c], eax
call fcn.0047f0b0
mov edi, eax
xor ebx, ebx
mov dword [esp + 0x20], edi
cmp edi, ebx
jne 0x45044d
push 1
push 2
lea ecx, [esp + 0x2c]
call fcn.00413cc0
mov dword [esp + 0x140], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
lea eax, [esp + 0x2c]
push str.OpenSCManager_FAILED._GetLastError:
push eax
call fcn.00416b90
add esp, 0xc
push eax
call fcn.004135f0
push 0x11
mov esi, 0xf
push str.CSvcInst::SvcStop
lea ecx, [esp + 0xc8]
mov dword [esp + 0xdc], esi
mov dword [esp + 0xd8], ebx
mov byte [esp + 0xc8], bl
call fcn.0040ebe0
mov byte [esp + 0x140], 1
push 0xb
push str.SvcInst.cpp
lea ecx, [esp + 0xe4]
mov dword [esp + 0xf8], esi
mov dword [esp + 0xf4], ebx
mov byte [esp + 0xe4], bl
call fcn.0040ebe0
mov byte [esp + 0x140], 2
lea ecx, [esp + 0xf8]
push ecx
lea ecx, [esp + 0x28]
call fcn.00413de0
mov byte [esp + 0x140], 3
push eax
lea edx, [esp + 0xc4]
push edx
push 0xbf
lea eax, [esp + 0xe8]
push eax
push ebx
call fcn.004144e0
mov ecx, eax
call fcn.0042e360
mov byte [esp + 0x140], 2
cmp dword [esp + 0x10c], 8
jb 0x4503a8
mov ecx, dword [esp + 0xf8]
push ecx
call fcn.00490458
add esp, 4
xor edx, edx
mov dword [esp + 0x10c], 7
mov dword [esp + 0x108], ebx
mov word [esp + 0xf8], dx
mov byte [esp + 0x140], 1
mov edi, 0x10
cmp dword [esp + 0xf0], edi
jb 0x4503ea
mov eax, dword [esp + 0xdc]
push eax
call fcn.00490458
add esp, 4
mov dword [esp + 0xf0], esi
mov dword [esp + 0xec], ebx
mov byte [esp + 0xdc], bl
mov byte [esp + 0x140], bl
cmp dword [esp + 0xd4], edi
jb 0x45041f
mov ecx, dword [esp + 0xc0]
push ecx
call fcn.00490458
add esp, 4
mov dword [esp + 0xd4], esi
mov dword [esp + 0xd0], ebx
mov byte [esp + 0xc0], bl
mov dword [esp + 0x140], 0xffffffff
lea ecx, [esp + 0x24]
call fcn.00412cc0
jmp 0x450d3a
mov ecx, esi
call fcn.0040f1e0
push eax
mov ecx, 0x10024
mov ebx, edi
call fcn.0047f180
xor ebx, ebx
add esp, 4
mov dword [esp + 0x1c], eax
cmp eax, ebx
jne 0x450610
push 1
push 2
lea ecx, [esp + 0x2c]
call fcn.00413cc0
mov dword [esp + 0x140], 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
lea edx, [esp + 0x2c]
push str.OpenService_FAILED._GetLastError:
push edx
call fcn.00416b90
add esp, 0xc
push eax
call fcn.004135f0
push 0x11
mov esi, 0xf
push str.CSvcInst::SvcStop
lea ecx, [esp + 0xe4]
mov dword [esp + 0xf8], esi
mov dword [esp + 0xf4], ebx
mov byte [esp + 0xe4], bl
call fcn.0040ebe0
mov byte [esp + 0x140], 5
push 0xb
push str.SvcInst.cpp
lea ecx, [esp + 0xc8]
mov dword [esp + 0xdc], esi
mov dword [esp + 0xd8], ebx
mov byte [esp + 0xc8], bl
call fcn.0040ebe0
mov byte [esp + 0x140], 6
lea eax, [esp + 0xf8]
push eax
lea ecx, [esp + 0x28]
call fcn.00413de0
mov byte [esp + 0x140], 7
push eax
lea ecx, [esp + 0xe0]
push ecx
push 0xc6
lea edx, [esp + 0xcc]
push edx
push ebx
call fcn.004144e0
mov ecx, eax
call fcn.0042e360
mov byte [esp + 0x140], 6
cmp dword [esp + 0x10c], 8
jb 0x45056d
mov eax, dword [esp + 0xf8]
push eax
call fcn.00490458
add esp, 4
xor ecx, ecx
mov dword [esp + 0x10c], 7
mov dword [esp + 0x108], ebx
mov word [esp + 0xf8], cx
mov byte [esp + 0x140], 5
cmp dword [esp + 0xd4], 0x10
jb 0x4505ab
mov edx, dword [esp + 0xc0]
push edx
call fcn.00490458
add esp, 4
mov dword [esp + 0xd4], esi
mov dword [esp + 0xd0], ebx
mov byte [esp + 0xc0], bl
mov byte [esp + 0x140], 4
cmp dword [esp + 0xf0], 0x10
jb 0x4505e2
mov eax, dword [esp + 0xdc]
push eax
call fcn.00490458
add esp, 4
mov dword [esp + 0xf0], esi
mov dword [esp + 0xec], ebx
mov byte [esp + 0xdc], bl
mov dword [esp + 0x140], 0xffffffff
lea ecx, [esp + 0x24]
call fcn.00412cc0
jmp 0x450d26
lea ecx, [esp + 0x114]
push ecx
mov ebx, eax
call fcn.0047f320
add esp, 4
mov esi, 0xf
test eax, eax
jne 0x45088e
push 1
push 2
lea ecx, [esp + 0x2c]
call fcn.00413cc0
mov edi, 8
mov dword [esp + 0x140], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
lea edx, [esp + 0x2c]
push str.ControlService_FAILED._GetLastError:
push edx
call fcn.00416b90
add esp, 0xc
push eax
call fcn.004135f0
push 0x11
xor ebx, ebx
push str.CSvcInst::SvcStop
lea ecx, [esp + 0xe4]
mov dword [esp + 0xf8], esi
mov dword [esp + 0xf4], ebx
mov byte [esp + 0xe4], bl
call fcn.0040ebe0
mov byte [esp + 0x140], 9
push 0xb
push str.SvcInst.cpp
lea ecx, [esp + 0xc8]
mov dword [esp + 0xdc], esi
mov dword [esp + 0xd8], ebx
mov byte [esp + 0xc8], bl
call fcn.0040ebe0
mov byte [esp + 0x140], 0xa
lea eax, [esp + 0xf8]
push eax
lea ecx, [esp + 0x28]
call fcn.00413de0
mov byte [esp + 0x140], 0xb
push eax
lea ecx, [esp + 0xe0]
push ecx
push 0xcc
lea edx, [esp + 0xcc]
push edx
push ebx
call fcn.004144e0
mov ecx, eax
call fcn.0042e360
mov byte [esp + 0x140], 0xa
cmp dword [esp + 0x10c], edi
jb 0x450727
mov eax, dword [esp + 0xf8]
push eax
call fcn.00490458
add esp, 4
xor ecx, ecx
mov dword [esp + 0x10c], 7
mov dword [esp + 0x108], ebx
mov word [esp + 0xf8], cx
mov byte [esp + 0x140], 9
mov edi, 0x10
cmp dword [esp + 0xd4], edi
jb 0x450769
mov edx, dword [esp + 0xc0]
push edx
call fcn.00490458
add esp, 4
mov dword [esp + 0xd4], esi
mov dword [esp + 0xd0], ebx
mov byte [esp + 0xc0], bl
mov byte [esp + 0x140], 8
cmp dword [esp + 0xf0], edi
jb 0x45079f
mov eax, dword [esp + 0xdc]
push eax
call fcn.00490458
add esp, 4
or edi, 0xffffffff
mov dword [esp + 0xf0], esi
mov dword [esp + 0xec], ebx
mov byte [esp + 0xdc], bl
mov dword [esp + 0x140], edi
mov edx, dword [esp + 0x24]
mov eax, dword [edx + 4]
lea ecx, [esp + 0x74]
mov dword [esp + 0x18], ecx
mov dword [esp + eax + 0x24], vtable.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov dword [esp + 0x140], 0xc
lea ecx, [esp + 0x28]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x28], vtable.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov byte [esp + 0x140], 0xe
test byte [esp + 0x68], 1
je 0x45080e
mov edx, dword [esp + 0x38]
mov eax, dword [edx]
push eax
call fcn.00490458
add esp, 4
mov eax, dword [esp + 0x38]
mov dword [eax], ebx
mov ecx, dword [esp + 0x48]
mov dword [ecx], ebx
mov edx, dword [esp + 0x58]
mov dword [edx], ebx
mov eax, dword [esp + 0x3c]
mov dword [eax], ebx
mov ecx, dword [esp + 0x4c]
mov dword [ecx], ebx
mov edx, dword [esp + 0x5c]
mov dword [edx], ebx
and dword [esp + 0x68], 0xfffffffe
mov dword [esp + 0x64], ebx
mov byte [esp + 0x140], 0xc
lea ecx, [esp + 0x28]
call fcn.00413890
mov dword [esp + 0x140], edi
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + 4]
lea edx, [esp + 0x74]
mov dword [esp + ecx + 0x24], vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov dword [esp + 0x14], edx
mov dword [esp + 0x74], vtable.std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__.0
mov dword [esp + 0x140], edi
mov eax, edx
push eax
mov dword [esp + 0x78], vtable.std::ios_base.0
call fcn.0048fc10
add esp, 4
jmp 0x450890
xor ebx, ebx
mov edx, dword [esp + 0x1c]
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea ecx, [esp + 0x114]
push ecx
push edx
mov dword [esp + 0x20], 0xa
mov dword [esp + 0x11c], ebx
mov dword [esp + 0x120], ebx
mov dword [esp + 0x124], ebx
mov dword [esp + 0x128], ebx
mov dword [esp + 0x12c], ebx
mov dword [esp + 0x130], ebx
mov dword [esp + 0x134], ebx
call edi
test eax, eax
je 0x450950
cmp dword [esp + 0x118], 1
je 0x450b2f
mov eax, dword [esp + 0x18]
dec eax
mov dword [esp + 0x18], eax
cmp eax, ebx
jle 0x450d1b
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x114]
push eax
push ecx
mov dword [esp + 0x11c], ebx
mov dword [esp + 0x120], ebx
mov dword [esp + 0x124], ebx
mov dword [esp + 0x128], ebx
mov dword [esp + 0x12c], ebx
mov dword [esp + 0x130], ebx
mov dword [esp + 0x134], ebx
call edi
test eax, eax
jne 0x4508e2
push 1
push 2
lea ecx, [esp + 0x2c]
call fcn.00413cc0
mov edi, 0x10
mov dword [esp + 0x140], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
lea edx, [esp + 0x2c]
push str.QueryServiceStatus_FAILED._GetLastError:
push edx
call fcn.00416b90
add esp, 0xc
push eax
call fcn.004135f0
push 0x11
push str.CSvcInst::SvcStop
lea ecx, [esp + 0xe4]
mov dword [esp + 0xf8], esi
mov dword [esp + 0xf4], ebx
mov byte [esp + 0xe4], bl
call fcn.0040ebe0
mov byte [esp + 0x140], 0x11
push 0xb
push str.SvcInst.cpp
lea ecx, [esp + 0xc8]
mov dword [esp + 0xdc], esi
mov dword [esp + 0xd8], ebx
mov byte [esp + 0xc8], bl
call fcn.0040ebe0
mov byte [esp + 0x140], 0x12
lea eax, [esp + 0xf8]
push eax
lea ecx, [esp + 0x28]
call fcn.00413de0
mov byte [esp + 0x140], 0x13
push eax
lea ecx, [esp + 0xe0]
push ecx
push 0xd5
lea edx, [esp + 0xcc]
push edx
push ebx
call fcn.004144e0
mov ecx, eax
call fcn.0042e360
mov byte [esp + 0x140], 0x12
cmp dword [esp + 0x10c], 8
jb 0x450a47
mov eax, dword [esp + 0xf8]
push eax
call fcn.00490458
add esp, 4
xor ecx, ecx
mov dword [esp + 0x10c], 7
mov dword [esp + 0x108], ebx
mov word [esp + 0xf8], cx
mov byte [esp + 0x140], 0x11
cmp dword [esp + 0xd4], edi
jb 0x450a84
mov edx, dword [esp + 0xc0]
push edx
call fcn.00490458
add esp, 4
mov dword [esp + 0xd4], esi
mov dword [esp + 0xd0], ebx
mov byte [esp + 0xc0], bl
mov byte [esp + 0x140], 0x10
cmp dword [esp + 0xf0], edi
jb 0x450aba
mov eax, dword [esp + 0xdc]
push eax
call fcn.00490458
add esp, 4
mov dword [esp + 0xf0], esi
or esi, 0xffffffff
mov dword [esp + 0xec], ebx
mov byte [esp + 0xdc], bl
mov dword [esp + 0x140], esi
mov edx, dword [esp + 0x24]
mov eax, dword [edx + 4]
lea ecx, [esp + 0x74]
mov dword [esp + 0x14], ecx
mov dword [esp + eax + 0x24], vtable.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov dword [esp + 0x140], 0x14
lea ecx, [esp + 0x28]
call fcn.00413e40
mov dword [esp + 0x140], esi
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + 4]
lea eax, [esp + 0x74]
mov dword [esp + edx + 0x24], vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov dword [esp + 0x14], eax
mov dword [esp + 0x74], vtable.std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__.0
jmp 0x450cff
push 1
push 2
lea ecx, [esp + 0x2c]
call fcn.00413cc0
mov dword [esp + 0x140], 0x17
lea edx, [esp + 0x24]
push str.QueryServiceStatus_FAILED._CurrentState__SERVICE_STOPPED
push edx
call fcn.00416b90
add esp, 8
push 0x11
push str.CSvcInst::SvcStop
lea ecx, [esp + 0xe4]
mov dword [esp + 0xf8], esi
mov dword [esp + 0xf4], ebx
mov byte [esp + 0xe4], bl
call fcn.0040ebe0
mov byte [esp + 0x140], 0x18
push 0xb
push str.SvcInst.cpp
lea ecx, [esp + 0xc8]
mov dword [esp + 0xdc], esi
mov dword [esp + 0xd8], ebx
mov byte [esp + 0xc8], bl
call fcn.0040ebe0
mov byte [esp + 0x140], 0x19
lea eax, [esp + 0xf8]
push eax
lea ecx, [esp + 0x28]
call fcn.00413de0
mov byte [esp + 0x140], 0x1a
push eax
lea ecx, [esp + 0xe0]
push ecx
push 0xdb
lea edx, [esp + 0xcc]
push edx
push ebx
call fcn.004144e0
mov ecx, eax
call fcn.0042e360
mov byte [esp + 0x140], 0x19
cmp dword [esp + 0x10c], 8
jb 0x450c17
mov eax, dword [esp + 0xf8]
push eax
call fcn.00490458
add esp, 4
xor ecx, ecx
mov dword [esp + 0x10c], 7
mov dword [esp + 0x108], ebx
mov word [esp + 0xf8], cx
mov byte [esp + 0x140], 0x18
mov edi, 0x10
cmp dword [esp + 0xd4], edi
jb 0x450c59
mov edx, dword [esp + 0xc0]
push edx
call fcn.00490458
add esp, 4
mov dword [esp + 0xd4], esi
mov dword [esp + 0xd0], ebx
mov byte [esp + 0xc0], bl
mov byte [esp + 0x140], 0x17
cmp dword [esp + 0xf0], edi
jb 0x450c8f
mov eax, dword [esp + 0xdc]
push eax
call fcn.00490458
add esp, 4
mov dword [esp + 0xf0], esi
or esi, 0xffffffff
mov dword [esp + 0xec], ebx
mov byte [esp + 0xdc], bl
mov dword [esp + 0x140], esi
mov edx, dword [esp + 0x24]
mov eax, dword [edx + 4]
lea ecx, [esp + 0x74]
mov dword [esp + 0x14], ecx
mov dword [esp + eax + 0x24], vtable.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov dword [esp + 0x140], 0x1b
lea ecx, [esp + 0x28]
call fcn.00413e40
mov dword [esp + 0x140], esi
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + 4]
lea eax, [esp + 0x74]
mov dword [esp + edx + 0x24], vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov dword [esp + 0x14], eax
mov dword [esp + 0x74], vtable.std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__.0
mov dword [esp + 0x140], esi
lea ecx, [esp + 0x74]
push ecx
mov dword [esp + 0x78], vtable.std::ios_base.0
call fcn.0048fc10
add esp, 4
mov edi, dword [esp + 0x20]
mov byte [esp + 0x13], 1
xor ebx, ebx
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x450d3a
push eax
call esi
mov al, byte [esp + 0x13]
mov ecx, dword [esp + 0x138]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x120]
xor ecx, esp
call fcn.004911d1
mov esp, ebp
pop ebp
ret