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

Disassembly:
sub esp, 0x488
push ebx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
xor ebx, ebx
push edi
push 0xf003f
push ebx
push ebx
call esi
mov edi, eax
test edi, edi
jne 0x10001f40
push 1
push eax
push eax
call esi
mov edi, eax
test edi, edi
je 0x100026fc
push ebp
push 0xf01ff
push str.USBSafeManager
push edi
mov dword [esp + 0x1c], ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
mov eax, dword [sym.imp.SHLWAPI.dll_wnsprintfA]
test esi, esi
jne 0x1000259d
cmp dword [0x1000e47c], ebx
je 0x100026f2
push dword [0x1000e474]
lea ecx, [esp + 0x190]
push str.USBSafeManagerGrp
push str.svchost
push str.__SYSTEMROOT___system32_s.exe__k___s___svcr___s_
push 0x30b
push ecx
call eax
add esp, 0x18
mov dword [esp + 0x14], eax
lea eax, [esp + 0x18c]
push 0
push 0
push 0
push 0
push 0
push eax
push 0
push 2
push 0x20
push 0xf01ff
push str.USB_Safe_Manager
push str.USBSafeManager
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov esi, eax
test esi, esi
je 0x100026f2
lea eax, [esp + 0x6c]
mov dword [esp + 0x6c], 1
mov dword [esp + 0x68], eax
lea eax, [esp + 0x58]
push eax
push 2
push esi
mov dword [esp + 0x7c], 0x2710
mov dword [esp + 0x80], 1
mov dword [esp + 0x84], 0x2710
mov dword [esp + 0x88], 1
mov dword [esp + 0x8c], 0x2710
mov dword [esp + 0x64], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x70], 3
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
mov ebx, dword [sym.imp.SHLWAPI.dll_wnsprintfA]
lea eax, [esp + 0x84]
push 0x1000a388
push 0
push str.svchost
push str.SoftwareMicrosoftWindows_NTCurrentVersion
push str._s_s_c_s
push 0x104
push eax
call ebx
add esp, 0x1c
lea eax, [esp + 0x10]
push 0
push eax
push 0
push 0xf023f
push 0
push 0
push 0
lea eax, [esp + 0xa0]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x100020c3
push str.USBSafeManager
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push str.USBSafeManager
push 7
push 0
push str.USBSafeManagerGrp
push dword [esp + 0x24]
call ebp
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str.USBSafeManagerGrp
push 0x5c
push str.svchost
push str.SoftwareMicrosoftWindows_NTCurrentVersion
push str._s_s_c_s
lea eax, [esp + 0x98]
push 0x104
push eax
call ebx
add esp, 0x1c
lea eax, [esp + 0x10]
push 0
push eax
push 0
push 0xf023f
push 0
push 0
push 0
lea eax, [esp + 0xa0]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x10002251
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x24], eax
test ebx, ebx
je 0x10002208
lea eax, [esp + 0x50]
push eax
push 0
lea eax, [esp + 0x2c]
push eax
push 0
push 0
push 4
push 4
push ebx
call dword [sym.imp.ADVAPI32.dll_GetSecurityInfo]
test eax, eax
jne 0x10002204
push 0x44
push 8
mov dword [esp + 0x5c], 0x44
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esp + 0x18], eax
test eax, eax
je 0x10002204
lea ecx, [esp + 0x54]
push ecx
push eax
push 0
push 1
call dword [sym.imp.ADVAPI32.dll_CreateWellKnownSid]
test eax, eax
je 0x100021f1
mov eax, dword [esp + 0x18]
mov dword [esp + 0x48], eax
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x28]
lea eax, [esp + 0x34]
mov dword [esp + 0x38], 1
push eax
push 1
mov dword [esp + 0x3c], sym.MSIMG32.dll_Ordinal_47
mov dword [esp + 0x44], 3
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclA]
push 0
push dword [esp + 0x2c]
push 0
push 0
push 4
push 4
push ebx
call dword [sym.imp.ADVAPI32.dll_SetSecurityInfo]
push dword [esp + 0x18]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebx, dword [esp + 0x10]
push 4
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0x2000
push eax
push 4
push 0
push str.AuthenticationCapabilities
push ebx
call ebp
push 4
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 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]
mov ebx, dword [sym.imp.SHLWAPI.dll_wnsprintfA]
push str.Parameters
push str.USBSafeManager
push str.Services_
push str.SYSTEMCurrentControlSet_s_s_s
lea eax, [esp + 0x94]
push 0x104
push eax
call ebx
add esp, 0x18
lea eax, [esp + 0x10]
push 0
push eax
push 0
push 0xf023f
push 0
push 0
push 0
lea eax, [esp + 0xa0]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x10002418
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x18], eax
test ebx, ebx
je 0x10002394
lea eax, [esp + 0x50]
push eax
push 0
lea eax, [esp + 0x20]
push eax
push 0
push 0
push 4
push 4
push ebx
call dword [sym.imp.ADVAPI32.dll_GetSecurityInfo]
test eax, eax
jne 0x10002390
push 0x44
push 8
mov dword [esp + 0x28], 0x44
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esp + 0x24], eax
test eax, eax
je 0x10002390
lea ecx, [esp + 0x20]
push ecx
push eax
push 0
push 1
call dword [sym.imp.ADVAPI32.dll_CreateWellKnownSid]
test eax, eax
je 0x1000237d
mov eax, dword [esp + 0x24]
mov dword [esp + 0x48], eax
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x1c]
lea eax, [esp + 0x34]
mov dword [esp + 0x38], 1
push eax
push 1
mov dword [esp + 0x3c], sym.MSIMG32.dll_Ordinal_47
mov dword [esp + 0x44], 3
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclA]
push 0
push dword [esp + 0x20]
push 0
push 0
push 4
push 4
push ebx
call dword [sym.imp.ADVAPI32.dll_SetSecurityInfo]
push dword [esp + 0x24]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebx, dword [esp + 0x10]
mov eax, dword [0x1000e464]
inc eax
push eax
push dword [0x1000e45c]
push 2
push 0
push str.ServiceDLL
push ebx
call ebp
mov eax, dword [esp + 0x14]
inc eax
push eax
lea eax, [esp + 0x190]
push eax
push 2
push 0
push str.ImagePath
push dword [esp + 0x24]
call ebp
push 0x1000a4dc
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push 0x1000a4dc
push 1
push 0
push str.ServiceMain
push dword [esp + 0x24]
call ebp
push 4
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], 0
push eax
push 4
push 0
push str.ServiceDllUnloadOnStop
push dword [esp + 0x24]
call ebp
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, dword [sym.imp.SHLWAPI.dll_wnsprintfA]
push 0x1000a388
push str.USBSafeManager
push str.Services_
push str.SYSTEMCurrentControlSet_s_s_s
lea eax, [esp + 0x94]
push 0x104
push eax
call ebx
add esp, 0x18
lea eax, [esp + 0x10]
push 0
push eax
push 0
push 0xf023f
push 0
push 0
push 0
lea eax, [esp + 0xa0]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x10002583
mov eax, dword [esp + 0x10]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], 0
test eax, eax
je 0x10002559
lea ecx, [esp + 0x50]
push ecx
push 0
lea ecx, [esp + 0x20]
push ecx
push 0
push 0
push 4
push 4
push eax
call dword [sym.imp.ADVAPI32.dll_GetSecurityInfo]
test eax, eax
jne 0x10002559
push 0x44
push 8
mov dword [esp + 0x1c], 0x44
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x10002559
lea eax, [esp + 0x14]
push eax
push ebx
push 0
push 1
call dword [sym.imp.ADVAPI32.dll_CreateWellKnownSid]
test eax, eax
je 0x10002549
lea eax, [esp + 0x20]
mov dword [esp + 0x30], 1
push eax
push dword [esp + 0x1c]
lea eax, [esp + 0x34]
mov dword [esp + 0x34], sym.MSIMG32.dll_Ordinal_47
push eax
push 1
mov dword [esp + 0x44], 3
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x58], ebx
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclA]
push 0
push dword [esp + 0x24]
push 0
push 0
push 4
push 4
push dword [esp + 0x34]
call dword [sym.imp.ADVAPI32.dll_SetSecurityInfo]
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push 0x1000a4dc
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push 0x1000a4dc
push 1
push 0
push str.ServiceMain
push dword [esp + 0x24]
call ebp
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 2
lea eax, [esp + 0x18]
mov dword [esp + 0x18], esi
push eax
push 0
call fcn.10001240
mov eax, dword [sym.imp.SHLWAPI.dll_wnsprintfA]
add esp, 0xc
push str.Parameters
push str.USBSafeManager
push str.Services_
push str.SYSTEMCurrentControlSet_s_s_s
lea ecx, [esp + 0x94]
mov ebx, 1
push 0x104
push ecx
call eax
add esp, 0x18
lea eax, [esp + 0x10]
push 0
push eax
push 0
push 0xf023f
push 0
push 0
push 0
lea eax, [esp + 0xa0]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x1000267e
push 0x105
lea eax, [esp + 0x88]
push eax
call sub.NTDLL.dll_RtlZeroMemory
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0x105
push eax
lea eax, [esp + 0x88]
mov dword [esp + 0x24], 2
push eax
lea eax, [esp + 0x28]
push eax
push 0
push str.ServiceDLL
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x10002658
push dword [0x1000e45c]
lea eax, [esp + 0x88]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x10002674
mov eax, dword [0x1000e464]
inc eax
push eax
push dword [0x1000e45c]
push 2
push 0
push str.ServiceDLL
push dword [esp + 0x24]
call ebp
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x24
lea eax, [esp + 0x30]
push eax
call sub.NTDLL.dll_RtlZeroMemory
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0
push eax
push 0x24
lea eax, [esp + 0x34]
push eax
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x100026b2
cmp dword [esp + 0x30], 4
je 0x100026d9
cmp dword [0x1000e47c], 0
je 0x100026cc
push 1
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x1000a50c
push eax
jmp 0x100026d0
push 0
push 0
push esi
call fcn.10007100
add esp, 0xc
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
pop ebp
pop edi
pop esi
mov eax, ebx
pop ebx
add esp, 0x488
ret
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call esi
pop ebp
pop edi
pop esi
mov eax, ebx
pop ebx
add esp, 0x488
ret