Function at 0x402904
Capabilities:
Continue service
Modify service
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push esi
xor esi, esi
cmp dword [ebp + 0x10], esi
je 0x402937
cmp dword [ebp + 0x10], 2
je 0x402937
cmp dword [ebp + 0x10], 3
je 0x402937
lea ecx, [ebp + 8]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp + 0xc]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
xor eax, eax
jmp 0x402aa7
push ebx
push 0xf003f
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
mov dword [ebp - 4], ebx
cmp ebx, esi
jne 0x402967
lea ecx, [ebp + 8]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp + 0xc]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
xor eax, eax
jmp 0x402aa6
push edi
push 0xf01ff
push dword [ebp + 8]
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
cmp edi, esi
jne 0x402989
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x402a91
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x402a8a
xor ebx, ebx
inc ebx
cmp dword [ebp + 0x10], 3
jne 0x4029f4
cmp dword [ebp - 0x1c], ebx
je 0x4029b6
lea eax, [ebp - 0x20]
push eax
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push 0xffffffffffffffff
push 4
push 0xffffffffffffffff
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
jne 0x4029f0
push dword [ebp - 4]
push edi
call fcn.00402aac
lea ecx, [ebp + 8]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp + 0xc]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov eax, esi
jmp 0x402aa5
mov esi, ebx
jmp 0x4029d7
cmp dword [ebp - 0x1c], ebx
jne 0x402a68
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push 0xffffffffffffffff
push 3
push 0xffffffffffffffff
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
je 0x4029ce
cmp dword [ebp + 0x10], esi
jne 0x402a42
push esi
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x4029ce
push dword [ebp - 4]
push edi
call fcn.00402aac
lea ecx, [ebp + 8]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp + 0xc]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov eax, ebx
jmp 0x402aa5
cmp dword [ebp - 0x1c], ebx
je 0x402a5b
lea eax, [ebp - 0x20]
push eax
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x4029ce
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x402a16
cmp dword [ebp - 0x1c], 7
jne 0x402a83
lea eax, [ebp - 0x20]
push eax
push 3
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x4029ce
mov esi, ebx
jmp 0x4029ce
push ebx
push edi
call fcn.00402aac
lea ecx, [ebp + 8]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp + 0xc]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
xor eax, eax
pop edi
pop ebx
pop esi
leave
ret 0xc