Function at 0x10003690
Capabilities:
Delete registry value
Query or enumerate registry value
Set registry value
Start service
Stop service

Disassembly:
sub esp, 0x1c0
push ebx
push ebp
push esi
push edi
mov edi, 0x10012434
or ecx, 0xffffffff
xor eax, eax
xor ebx, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x150]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x150]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
mov dword [esp + 0x18], ebx
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x1d4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x10], ebx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x154]
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x10003965
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [esp + 0x24]
lea eax, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x24]
push eax
push ecx
push ebx
mov edi, 4
push 0x100123b0
push edx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x3c], edi
call esi
mov ebp, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x10003782
cmp dword [esp + 0x20], edi
jne 0x10003782
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
or ah, 1
push edi
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
push eax
push edi
push ebx
push 0x100123b0
push ecx
call ebp
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
push 0x10012428
push eax
mov dword [esp + 0x20], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x100037b7
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1c0
ret
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x4c]
lea edx, [esp + 0x24]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x4c]
push edx
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x24]
push eax
push ecx
push ebx
push 0x1001241c
push edx
mov dword [esp + 0x3c], 0x104
call esi
lea eax, [esp + 0x4c]
push 0x5c
push eax
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 8
cmp eax, ebx
je 0x10003834
inc eax
push 0x100126c4
push eax
call dword [sym.imp.MSVCRT.dll__strcmpi]
add esp, 8
test eax, eax
jne 0x10003834
mov ecx, dword [esp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call esi
mov edx, dword [esp + 0x10]
push edx
call esi
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x1c0
ret
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ecx, dword [esp + 0x1d4]
push 0xf003f
push ecx
push eax
mov dword [esp + 0x38], eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebx, eax
test ebx, ebx
je 0x1000386d
lea edx, [esp + 0x30]
push edx
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov edi, 0x10012404
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x4c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x4c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x100126c4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x4c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x4c]
push ecx
mov ecx, dword [esp + 0x18]
push eax
push 2
push 0
push 0x1001241c
push ecx
call ebp
mov edx, dword [esp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
push str.ServiceMain
push edx
call esi
mov eax, dword [esp + 0x14]
push 0x100123e0
push eax
call esi
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x28]
push 4
push ecx
push 4
push 0
push 0x10012398
push edx
mov dword [esp + 0x40], 2
call ebp
mov eax, dword [esp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
call esi
mov ecx, dword [esp + 0x10]
push ecx
call esi
test ebx, ebx
je 0x10003955
mov edx, dword [esp + 0x1d4]
lea eax, [esp + 0x18]
push eax
push 1
push ebx
mov dword [esp + 0x24], edx
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
mov dword [esp + 0x18], eax
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call esi
mov ecx, dword [esp + 0x2c]
push ecx
call esi
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c0
ret