Function at 0x405340
Capabilities:
Delete registry key
Install driver
Persist via windows service
Set registry value
Unload driver

Disassembly:
sub esp, 0x12c
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x31]
mov byte [esp + 0x30], 0
rep stosd dword es:[edi], eax
mov ecx, dword [0x40a04c]
mov edx, dword [0x40a050]
stosw word es:[edi], ax
mov esi, dword [sym.imp.MSVCRT.dll_sprintf]
mov dword [esp + 0x14], ecx
stosb byte es:[edi], al
mov eax, dword [str.CleanDrvSupport]
lea ecx, [esp + 0x10]
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], eax
mov eax, dword [0x40a054]
push ecx
lea edx, [esp + 0x34]
push str.SystemCurrentControlSetServices_s
push edx
mov dword [esp + 0x28], eax
call esi
add esp, 0xc
lea eax, [esp + 8]
lea ecx, [esp + 0x30]
push eax
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x4053c4
pop edi
mov eax, 0xc0000001
pop esi
add esp, 0x12c
ret
mov eax, dword [esp + 8]
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea edx, [esp + 0x10]
push 4
push edx
push 4
push 0
push str.Type
push eax
mov dword [esp + 0x28], 1
call ebx
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0x10]
push 4
push ecx
push 4
push 0
push str.ErrorControl
push edx
call ebx
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push 4
push eax
push 4
push 0
push str.Start
push ecx
call ebx
mov edx, dword [esp + 0x13c]
lea eax, [esp + 0x34]
push edx
push str.___s
push eax
call esi
lea edi, [esp + 0x40]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
mov edx, dword [esp + 0xc]
dec ecx
push ecx
lea ecx, [esp + 0x38]
push ecx
push 2
push eax
push str.ImagePath
push edx
call ebx
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x34]
push ecx
push str.RegistryMachineSystemCurrentControlSetServices_s
push edx
call esi
add esp, 0xc
lea eax, [esp + 0x34]
lea ecx, [esp + 0x2c]
push eax
push ecx
call dword [sym.imp.ntdll.dll_RtlInitAnsiString]
lea edx, [esp + 0x2c]
push 1
lea eax, [esp + 0x28]
push edx
push eax
call dword [sym.imp.ntdll.dll_RtlAnsiStringToUnicodeString]
mov eax, dword [esp + 0x140]
test eax, eax
je 0x4054ab
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.ntdll.dll_ZwLoadDriver]
jmp 0x4054b6
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.ntdll.dll_ZwUnloadDriver]
mov ebx, eax
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
lea ecx, [esp + 0x2c]
push ecx
call dword [sym.imp.ntdll.dll_RtlFreeAnsiString]
lea edx, [esp + 0x14]
lea eax, [esp + 0x34]
push edx
push str.SystemCurrentControlSetServices_sEnum
push eax
call esi
mov edi, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
add esp, 0xc
lea ecx, [esp + 0x34]
push ecx
push 0x80000002
call edi
lea edx, [esp + 0x14]
lea eax, [esp + 0x34]
push edx
push str.SystemCurrentControlSetServices_sSecurity
push eax
call esi
add esp, 0xc
lea ecx, [esp + 0x34]
push ecx
push 0x80000002
call edi
lea edx, [esp + 0x14]
lea eax, [esp + 0x34]
push edx
push str.SystemCurrentControlSetServices_s
push eax
call esi
add esp, 0xc
lea ecx, [esp + 0x34]
push ecx
push 0x80000002
call edi
mov eax, ebx
pop ebx
pop edi
pop esi
add esp, 0x12c
ret