Function at 0x4047d0
Capabilities:
Copy file
Create service
Delete file
Delete service
Get common file path
Persist via windows service
Start service
Stop service

Disassembly:
sub esp, 0x27c
mov eax, dword [str.ROCKEYNT]
mov ecx, dword [0x416124]
mov dl, byte [0x416128]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x290]
test di, di
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
mov byte [esp + 0x1c], dl
jne 0x40481a
pop edi
pop esi
pop ebp
mov ax, 8
pop ebx
add esp, 0x27c
ret
mov eax, dword [0x41714c]
test eax, eax
jne 0x404abe
call dword [sym.imp.KERNEL32.dll_GetVersion]
push 0
push 0x80
push 3
push 0
cmp eax, 0x80000000
push 0
push 0xc0000000
jae 0x404a5b
push str..ROCKEYNT
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [0x41714c], eax
jne 0x404abe
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
jne 0x404887
pop edi
pop esi
pop ebp
or ax, 0xffff
pop ebx
add esp, 0x27c
ret
lea eax, [esp + 0x8c]
push 0x100
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, str.drivers_rockeynt.sys
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x8c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
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 + 0x90]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call sub.MSVCRT.dll__access
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add esp, 8
cmp eax, 0xffffffff
je 0x40491f
lea ecx, [esp + 0x14]
push 0xf01ff
push ecx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
je 0x4049a7
lea edx, [esp + 0x70]
push edx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push esi
call ebp
jmp 0x4049a7
lea eax, [esp + 0x18c]
push eax
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edi, str._rockeynt.sys
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
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
lea eax, [esp + 0x190]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call sub.MSVCRT.dll__access
add esp, 8
cmp eax, 0xffffffff
jne 0x40498f
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
pop ebp
mov ax, 2
pop ebx
add esp, 0x27c
ret
lea ecx, [esp + 0x8c]
push 0
lea edx, [esp + 0x190]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push 0
push 0
push 0
push 0
lea eax, [esp + 0x9c]
push 0
push eax
push 1
push 2
push 1
lea ecx, [esp + 0x38]
push 0xf01ff
lea edx, [esp + 0x3c]
push ecx
push edx
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
lea eax, [esp + 0x14]
push 0xf01ff
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x4049ff
mov dword [esp + 0x10], 0xffff
push esi
call ebp
push ebx
call ebp
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push str..ROCKEYNT
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [0x41714c], eax
jne 0x404a47
pop edi
pop esi
pop ebp
mov eax, 0xffff
pop ebx
add esp, 0x27c
ret
mov eax, dword [esp + 0x10]
test ax, ax
je 0x404ab7
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x27c
ret
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push str..ROCKEY9X
call esi
cmp eax, 0xffffffff
mov dword [0x41714c], eax
jne 0x404abe
push 0
push 0x4000000
push 1
push 0
push 0
push 0
push str.._rockey9x.vxd
call esi
cmp eax, 0xffffffff
mov dword [0x41714c], eax
jne 0x404abe
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x32
jne 0x404aa8
push str..ROCKEY9X
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
pop ebp
mov ax, 2
pop ebx
add esp, 0x27c
ret
mov edi, dword [esp + 0x290]
mov ecx, dword [esp + 0x294]
mov eax, dword [esp + 0x29c]
mov edx, dword [esp + 0x298]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x2a0]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x2a8]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x2ac]
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x2a4]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
lea eax, [esp + 0x48]
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x2b0]
lea ecx, [esp + 0x20]
and edi, 0xffff
push eax
push ecx
mov dword [esp + 0x28], edi
mov dword [esp + 0x48], edx
call fcn.00404580
add esp, 8
lea edx, [esp + 0x44]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x48]
push 0
push edx
mov edx, dword [0x41714c]
push 2
push eax
push 0x28
push ecx
push 0xa410e400
push edx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x404b6c
pop edi
pop esi
pop ebp
or ax, 0xffff
pop ebx
add esp, 0x27c
ret
mov ax, word [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x27c
ret