Function at 0x401a20
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x403ef0
mov eax, dword fs:[0]
push eax
sub esp, 0x2a8
mov eax, dword [0x407004]
xor eax, esp
mov dword [esp + 0x2a0], eax
push ebx
push esi
push edi
mov eax, dword [0x407004]
xor eax, esp
push eax
lea eax, [esp + 0x2b8]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push 0x104
lea ecx, [esp + 0xa8]
push ecx
xor edi, edi
push edi
mov dword [esp + 0x38], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [esp + 0xa4]
push edx
lea ecx, [esp + 0x54]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
mov dword [esp + 0x2c0], edi
mov eax, dword [sym.imp.MSVCP80.dll_unsigned_int_const_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::npos]
mov ecx, dword [eax]
push ecx
push 0x405338
lea ecx, [esp + 0x58]
call dword [sym.imp.MSVCP80.dll_public:_unsigned_int___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::find_last_of_wchar_t_const___unsigned_int_const]
push eax
push edi
lea edx, [esp + 0x90]
push edx
lea ecx, [esp + 0x5c]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::substr_unsigned_int__unsigned_int_]
push eax
lea ecx, [esp + 0x54]
mov byte [esp + 0x2c4], 1
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
lea ecx, [esp + 0x88]
mov byte [esp + 0x2c0], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x54]
call dword [sym.imp.MSVCP80.dll_public:_class_std::_String_iterator_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::begin_void_]
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x54]
mov esi, eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::_String_iterator_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::end_void_]
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x54]
mov ebx, eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::_String_iterator_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::begin_void_]
mov ecx, dword [esi + 4]
mov edx, dword [esi]
push ecx
mov ecx, dword [ebx + 4]
push edx
mov edx, dword [ebx]
push ecx
mov ecx, dword [eax + 4]
push edx
mov edx, dword [eax]
mov eax, dword [sym.imp.MSVCR80.dll_tolower]
push ecx
push edx
push eax
lea ecx, [esp + 0x38]
push ecx
call fcn.00402830
add esp, 0x20
push 0xf003f
push edi
push edi
mov dword [esp + 0x20], edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
cmp esi, edi
mov dword [esp + 0x24], esi
je 0x401e76
push 0xf01ff
push str.XT800Service
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
cmp ebx, edi
mov dword [esp + 0x1c], ebx
push 0x1000
je 0x401e1a
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
jne 0x401bbb
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call edi
push esi
call edi
lea ecx, [esp + 0x50]
mov dword [esp + 0x2c0], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
xor eax, eax
jmp 0x401ee7
lea edx, [esp + 0x30]
push edx
push 0x1000
push edi
push ebx
mov dword [esp + 0x40], 0
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x401e00
mov eax, dword [edi + 0xc]
push eax
lea ecx, [esp + 0x8c]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
mov byte [esp + 0x2c0], 2
mov ecx, dword [edi + 0xc]
push ecx
push 0x16b
push str.FindServiceBin:_s
call fcn.00401000
add esp, 8
push eax
mov ecx, 3
mov ebx, 0x4093b0
call fcn.00403090
mov edx, dword [sym.imp.MSVCP80.dll_unsigned_int_const_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::npos]
mov eax, dword [edx]
add esp, 8
push eax
push 0x405338
lea ecx, [esp + 0x90]
call dword [sym.imp.MSVCP80.dll_public:_unsigned_int___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::find_last_of_wchar_t_const___unsigned_int_const]
sub eax, 1
push eax
push 1
lea ecx, [esp + 0x74]
push ecx
lea ecx, [esp + 0x94]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::substr_unsigned_int__unsigned_int_]
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x70]
mov byte [esp + 0x2c4], 3
call dword [sym.imp.MSVCP80.dll_public:_class_std::_String_iterator_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::begin_void_]
mov esi, eax
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x70]
call dword [sym.imp.MSVCP80.dll_public:_class_std::_String_iterator_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::end_void_]
lea ecx, [esp + 0x40]
push ecx
lea ecx, [esp + 0x70]
mov ebx, eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::_String_iterator_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::begin_void_]
mov edx, dword [esi + 4]
mov ecx, dword [esi]
push edx
mov edx, dword [ebx + 4]
push ecx
mov ecx, dword [ebx]
push edx
mov edx, dword [eax + 4]
mov eax, dword [eax]
push ecx
mov ecx, dword [sym.imp.MSVCR80.dll_tolower]
push edx
push eax
push ecx
lea edx, [esp + 0x64]
push edx
call fcn.00402830
add esp, 0x20
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x70]
call dword [sym.imp.MSVCP80.dll_public:_int___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::compare_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__const]
test eax, eax
mov eax, dword [esp + 0x54]
jne 0x401d03
cmp dword [esp + 0x68], 8
jae 0x401cd6
lea eax, [esp + 0x54]
push eax
push 0x171
push str.Service_is_my_service:_s
call fcn.00401000
add esp, 8
push eax
mov ecx, 3
mov ebx, 0x4093b0
call fcn.00403090
mov dword [esp + 0x1c], 1
jmp 0x401d39
cmp dword [esp + 0x68], 8
jae 0x401d0e
lea eax, [esp + 0x54]
push eax
push 0x176
push str.Service_is_not_my_service:_s
call fcn.00401000
add esp, 8
push eax
mov ecx, 3
mov ebx, 0x4093b0
call fcn.00403090
mov dword [esp + 0x1c], 0
add esp, 8
lea ecx, [esp + 0x6c]
mov byte [esp + 0x2c0], 2
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [esp + 0x88]
mov byte [esp + 0x2c0], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
cmp dword [esp + 0x14], 0
je 0x401df8
mov edx, dword [esp + 0x1c]
xor eax, eax
lea ecx, [esp + 0x6c]
push ecx
push edx
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x401dcc
mov eax, dword [esp + 0x70]
cmp eax, 4
jne 0x401dbf
mov ecx, dword [esp + 0x2c]
mov dword [ecx], 1
push eax
push 0x186
push str.Service_Run:_d
jmp 0x401ddd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x18a
push str.QueryServiceStatus_Failed__Error:_d_
call fcn.00401000
add esp, 8
push eax
mov ecx, 3
mov ebx, 0x4093b0
call fcn.00403090
add esp, 8
mov esi, dword [esp + 0x24]
mov ebx, dword [esp + 0x1c]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x401ece
push edi
push str..KDT_.cpp_257_:_Windows_Version:_d._d._d
call sub.MSVCR80.dll_memset
add esp, 0xc
push str.OpenService_Failed__Error:_d_
push 0x193
push 0x40533c
push str._s__d_:__s
push 0x1000
push str..KDT_.cpp_257_:_Windows_Version:_d._d._d
call dword [sym.imp.MSVCR80.dll_swprintf_s]
add esp, 0x18
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str..KDT_.cpp_257_:_Windows_Version:_d._d._d
mov ecx, 3
mov ebx, 0x4093b0
call fcn.00403090
add esp, 8
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x401ece
push 0x1000
push edi
push str..KDT_.cpp_257_:_Windows_Version:_d._d._d
call sub.MSVCR80.dll_memset
add esp, 0xc
push str.OpenSCManager_Failed__Error:_d_
push 0x199
push 0x40533c
push str._s__d_:__s
push 0x1000
push str..KDT_.cpp_257_:_Windows_Version:_d._d._d
call dword [sym.imp.MSVCR80.dll_swprintf_s]
add esp, 0x18
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str..KDT_.cpp_257_:_Windows_Version:_d._d._d
mov ecx, 3
mov ebx, 0x4093b0
call fcn.00403090
add esp, 8
lea ecx, [esp + 0x50]
mov dword [esp + 0x2c0], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x2b8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2a0]
xor ecx, esp
call fcn.0040342c
mov esp, ebp
pop ebp
ret