Function at 0x401c30
Capabilities:
Delete service
Get common file path
Persist via windows service
Set registry value
Stop service

Disassembly:
sub esp, 0x32c
push ebx
push esi
push edi
push 0x100
push 0x41dab0
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x100
push 0x41d9b0
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edi, 0x41dab0
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x238]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x33c]
and ecx, 3
cmp eax, 2
rep movsb byte es:[edi], byte [esi]
je 0x401c99
cmp eax, 3
jne 0x401f8c
push ebp
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
push 0xf01ff
push str.rgga
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
cmp edi, ebx
je 0x401ce9
lea ecx, [esp + 0x120]
push ecx
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push edi
call ebp
push 0x42
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
call ebp
or ecx, 0xffffffff
mov edi, 0x41dab0
xor eax, eax
lea edx, [esp + 0x23c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
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, str.drivers
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x41dab0
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
lea edx, [esp + 0x13c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.rgga.sys
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x13c]
push ecx
push str.133
call fcn.004020f0
lea edi, [esp + 0x244]
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea eax, [esp + 0x18]
mov edx, ecx
mov esi, edi
mov edi, 0x41dab0
push eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0xf003f
and ecx, 3
push ebx
push str.SystemCurrentControlSetServices
push 0x80000002
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x10]
push ecx
push edx
push ebx
push 0xf003f
mov eax, dword [esp + 0x28]
push ebx
push ebx
push ebx
push str.rgga
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov edi, str.Parallel_arbitrator
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x20]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebp, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, dword [esp + 0x10]
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]
lea edi, [esp + 0x20]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x20]
mov byte [esp + ecx + 0x21], bl
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
lea ecx, [esp + 0x24]
push ecx
push 7
push ebx
push str.DependOnGroup
push edx
call ebp
mov edi, str.Parport
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x20]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, dword [esp + 0x10]
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]
lea edi, [esp + 0x20]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x20]
mov esi, 2
mov byte [esp + ecx + 0x21], bl
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, esi
push ecx
lea ecx, [esp + 0x24]
push ecx
push 7
push ebx
push str.DependOnService
push edx
call ebp
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push 4
push eax
push 4
push ebx
push str.Type
push ecx
mov dword [esp + 0x2c], 1
call ebp
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x14]
push 4
push edx
push 4
push ebx
push str.Start
push eax
mov dword [esp + 0x2c], esi
call ebp
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push 4
push ecx
push 4
push ebx
push 0x41c288
push edx
mov dword [esp + 0x2c], esi
call ebp
mov edi, str.Extended_base
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x20]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, dword [esp + 0x10]
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]
lea edi, [esp + 0x20]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push ecx
lea ecx, [esp + 0x24]
push ecx
push 1
push ebx
push str.Group
push edx
call ebp
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push 4
push eax
push 4
push ebx
push str.ErrorControl
push ecx
mov dword [esp + 0x2c], 1
call ebp
mov edx, dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edx
call esi
mov eax, dword [esp + 0x18]
push eax
call esi
cmp eax, ebx
pop ebp
je 0x401f7a
mov ebx, 0xbbc
jmp 0x401f85
push ebx
call fcn.004027e0
add esp, 4
mov ebx, eax
mov eax, dword [esp + 0x33c]
mov ecx, dword [esp + 0x340]
cmp ecx, 1
je 0x401fa1
cmp ecx, 2
jne 0x4020e0
cmp eax, 1
je 0x401faf
cmp eax, 3
jne 0x4020e0
call fcn.00404240
or ecx, 0xffffffff
lea edi, [esp + 0x238]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, 0x41dab0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.drivers
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x41dab0
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
lea edx, [esp + 0x138]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.rcugawdm.sys
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x138]
push ecx
push str.132
call fcn.004020f0
add esp, 8
test eax, eax
jne 0x40204b
mov ebx, 0xbbb
or ecx, 0xffffffff
mov edi, 0x41d9b0
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, 0x41dab0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.inf
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, 0x41dab0
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
lea edx, [esp + 0x138]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.rcugawdm.inf
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x138]
push ecx
push str.131
call fcn.004020f0
add esp, 8
test eax, eax
mov eax, 0xbbb
je 0x4020e2
mov eax, ebx
pop edi
pop esi
pop ebx
add esp, 0x32c
ret