Function at 0x10012602
Capabilities:
Modify service
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0xc
mov esi, dword [ebp + 8]
mov eax, dword [0x1002d1d0]
lea ecx, [eax + 1]
imul ecx, eax
test cl, 1
sete cl
cmp dword [0x1002d1d4], 0xa
setl al
or al, cl
push eax
mov edi, esp
sub esp, 0x1c
mov ebx, esp
test al, al
je 0x1001262b
xor eax, eax
test esi, esi
je 0x1001297b
mov dword [edi], eax
push edi
push eax
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
mov edx, dword [0x1002d1d0]
mov ecx, dword [0x1002d1d4]
cmp ecx, 0xa
mov dword [ebp - 0x18], ebx
jl 0x100126c9
lea esi, [edx + 1]
imul esi, edx
and esi, 1
mov esi, dword [ebp + 8]
je 0x100126c9
xor ebx, ebx
push edi
push ebx
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
push edi
push ebx
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
cmp dword [0x1002d1d4], 0xa
jl 0x1001269e
mov eax, dword [0x1002d1d0]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
jne 0x10012671
push edi
xor eax, eax
push eax
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
mov edx, dword [0x1002d1d0]
mov ecx, dword [0x1002d1d4]
cmp ecx, 0xa
jl 0x100126c9
lea esi, [edx + 1]
imul esi, edx
and esi, 1
mov esi, dword [ebp + 8]
jne 0x10012671
test eax, eax
je 0x10012827
mov ebx, dword [edi]
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ebx
push 8
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x10012832
push edi
push ebx
mov dword [ebp - 0x10], eax
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
cmp dword [0x1002d1d4], 0xa
jl 0x1001274d
mov ecx, dword [0x1002d1d0]
lea edx, [ecx + 1]
imul edx, ecx
and edx, 1
je 0x1001274d
push edi
push ebx
push dword [ebp - 0x10]
mov eax, dword [ebp + 8]
push eax
mov esi, dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
call esi
mov eax, esi
push edi
mov esi, ebx
push ebx
push dword [ebp - 0x10]
push dword [ebp + 8]
call eax
cmp dword [0x1002d1d4], 0xa
jl 0x1001274d
mov ecx, dword [0x1002d1d0]
lea edx, [ecx + 1]
imul edx, ecx
and edx, 1
mov ebx, esi
jne 0x10012712
test eax, eax
je 0x1001275e
mov eax, dword [ebp - 0x10]
cmp dword [eax + 4], 2
jne 0x10012863
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [ebp - 0x14], eax
cmp dword [0x1002d1d4], 0xa
jl 0x100127c1
mov eax, dword [0x1002d1d0]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
je 0x100127c1
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
call esi
call esi
cmp dword [0x1002d1d4], 0xa
jl 0x100127a3
mov eax, dword [0x1002d1d0]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
jne 0x10012786
call esi
mov dword [ebp - 0x14], eax
cmp dword [0x1002d1d4], 0xa
jl 0x100127c1
mov eax, dword [0x1002d1d0]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
jne 0x10012786
push dword [ebp - 0x10]
push 0
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [0x1002d1d0]
mov ecx, dword [0x1002d1d4]
lea eax, [edx + 1]
imul eax, edx
and eax, 1
cmp ecx, 0xa
jl 0x10012847
test eax, eax
je 0x10012847
mov esi, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
xor eax, eax
push eax
push ebx
call edi
push esi
xor eax, eax
push eax
push ebx
call edi
mov edx, dword [0x1002d1d0]
mov ecx, dword [0x1002d1d4]
lea eax, [edx + 1]
imul eax, edx
and eax, 1
cmp ecx, 0xa
jl 0x10012847
test eax, eax
jne 0x100127f9
jmp 0x10012847
lea eax, [edx + 1]
imul eax, edx
and eax, 1
jmp 0x10012847
mov ecx, dword [0x1002d1d0]
lea eax, [ecx + 1]
imul eax, ecx
and eax, 1
mov ecx, dword [0x1002d1d4]
cmp ecx, 0xa
mov esi, dword [ebp + 8]
mov edi, dword [ebp - 0x18]
jl 0x100128e6
test eax, eax
jne 0x10012908
jmp 0x100128e6
xor esi, esi
xorps xmm0, xmm0
movaps xmm1, xmmword [0x10024320]
mov edi, dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
mov ebx, dword [ebp + 8]
sub esp, 0x2c
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], esi
movups xmmword [esp + 0x14], xmm0
movups xmmword [esp + 4], xmm1
mov dword [esp], ebx
call edi
cmp dword [0x1002d1d4], 0xa
jl 0x1001275e
mov eax, dword [0x1002d1d0]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
je 0x1001275e
sub esp, 0x2c
mov dword [esp + 0x28], esi
mov dword [esp + 0x24], esi
xorps xmm0, xmm0
movups xmmword [esp + 0x14], xmm0
movaps xmm0, xmmword [0x10024320]
movups xmmword [esp + 4], xmm0
mov ebx, dword [ebp + 8]
mov dword [esp], ebx
call edi
movaps xmm1, xmmword [0x10024320]
xorps xmm0, xmm0
jmp 0x10012878
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [0x1002d1d4], 0xa
jl 0x10012912
mov ecx, dword [0x1002d1d0]
lea edx, [ecx + 1]
imul edx, ecx
and edx, 1
je 0x10012912
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
jmp 0x100128e6
cmp dword [edi + 4], 4
jne 0x1001291c
test eax, eax
jne 0x10012978
push dword [ebp + 0xc]
push dword [ebp + 0x10]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
cmp dword [0x1002d1d4], 0xa
jl 0x10012978
mov eax, dword [0x1002d1d0]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
je 0x10012978
mov esi, dword [sym.imp.ADVAPI32.dll_StartServiceW]
mov eax, dword [ebp + 0xc]
push eax
mov ebx, dword [ebp + 0x10]
push ebx
mov edi, dword [ebp + 8]
push edi
call esi
push dword [ebp + 0xc]
push ebx
push edi
call esi
cmp dword [0x1002d1d4], 0xa
jl 0x10012978
mov eax, dword [0x1002d1d0]
lea ecx, [eax + 1]
imul ecx, eax
and ecx, 1
jne 0x1001294a
xor eax, eax
inc eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret