Function at 0x10021c40
Capabilities:
Create service
Modify service
Start service

Disassembly:
push 0xffffffffffffffff
push 0x1008c9ab
mov eax, dword fs:[0]
push eax
sub esp, 0x220
mov eax, dword [0x100d4254]
xor eax, esp
mov dword [esp + 0x21c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x100d4254]
xor eax, esp
push eax
lea eax, [esp + 0x234]
mov dword fs:[0], eax
mov eax, dword [esp + 0x24c]
mov ebp, dword [esp + 0x244]
mov edi, dword [esp + 0x248]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x250]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x254]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x258]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x25c]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x28]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
jne 0x10021cfe
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetModuleFileName_failed_w_err_0x_08lx_n
call dword [sym.imp.MSVCR120.dll_wprintf]
mov ebx, dword [esp + 0x20]
add esp, 8
mov edi, dword [esp + 0x14]
jmp 0x10021e32
mov esi, dword [sym.imp.MSVCR120.dll_wcscat_s]
lea eax, [esp + 0x28]
push str.__s
push 0x104
push eax
call esi
push ebp
lea eax, [esp + 0x38]
push 0x104
push eax
call esi
add esp, 0x18
push 3
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
test ebx, ebx
jne 0x10021d55
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenSCManager_failed_w_err_0x_08lx_n
call dword [sym.imp.MSVCR120.dll_wprintf]
mov edi, dword [esp + 0x1c]
add esp, 8
jmp 0x10021e39
push dword [esp + 0x14]
lea eax, [esp + 0x2c]
push dword [esp + 0x24]
push dword [esp + 0x24]
push 0
push 0
push eax
push 1
push dword [esp + 0x40]
push 0x10
push 0xf01ff
push edi
push ebp
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, eax
test edi, edi
je 0x10021e2c
mov eax, dword [esp + 0x18]
test eax, eax
je 0x10021da4
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
push 0x10
push ebp
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [esp + 0x18], eax
test eax, eax
je 0x10021e2c
push 3
lea ecx, [esp + 0x18]
call fcn.100214b0
push 0
lea ecx, [esp + 0x18]
mov dword [esp + 0x240], 0
call fcn.10021900
lea ecx, [esp + 0x28]
push 1
mov dword [eax], ecx
lea ecx, [esp + 0x18]
call fcn.10021900
push 2
lea ecx, [esp + 0x18]
mov dword [eax], str.__s
call fcn.10021900
lea ecx, [esp + 0x14]
mov dword [eax], ebp
mov eax, dword [esp + 0x14]
mov esi, dword [eax + 4]
call fcn.1001c2e0
push eax
push esi
mov esi, dword [esp + 0x20]
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
lea ecx, [esp + 0x14]
call fcn.10024dc0
jmp 0x10021e32
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test ebx, ebx
je 0x10021e39
push ebx
call esi
test edi, edi
je 0x10021e44
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [esp + 0x234]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x21c]
xor ecx, esp
call fcn.10086f4e
add esp, 0x22c
ret