Function at 0x401240
Capabilities:
Delete registry value
Query or enumerate registry value
Set registry value

Disassembly:
mov eax, 0x1214
call fcn.00401720
push ebx
push esi
push edi
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x220]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x20]
mov ebx, 1
push str.SYSTEMCurrentControlSetControlUsbFlags
push eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x1c], 0x1000
mov dword [esp + 0x20], 0
mov byte [esp + 0x1b], bl
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 8
lea ecx, [esp + 0x1c]
lea edx, [esp + 0xc]
lea eax, [esp + 0x20]
push ecx
push edx
push 0
push 0xf003f
push ebx
push 0x406600
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x40131d
mov eax, dword [esp + 0x1224]
test eax, eax
je 0x40130b
mov edx, dword [0x4065fc]
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0x13]
push ebx
push ecx
push 3
push 0
push edx
push eax
call esi
mov edx, dword [0x4065f8]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
mov ecx, dword [esp + 0x10]
push edx
push ebx
push eax
push str.usbmpid
push ecx
call esi
jmp 0x40131d
mov edx, dword [0x4065fc]
mov eax, dword [esp + 0xc]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [esp + 0xc]
push edx
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetControlClass36FC9E60_C465_11CF_8056_444553540000
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40143e
lea eax, [esp + 0x14]
lea ecx, [esp + 0x220]
push eax
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x1c]
push ecx
push edx
push 0
push str.LowerFilters
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x401378
xor edx, edx
jmp 0x401385
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
cmp eax, ebx
jne 0x401389
inc edx
mov dword [esp + 0x14], edx
mov ecx, 0x1001
xor eax, eax
sub ecx, edx
lea edi, [esp + edx + 0x21f]
mov ebx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x1224]
test eax, eax
je 0x4013e7
push 0
push edx
lea ecx, [esp + 0x228]
push 0x405138
push ecx
call fcn.004014e0
add esp, 0x10
lea edx, [esp + 0x220]
mov dword [esp + 0x14], eax
push eax
mov eax, dword [esp + 0x10]
push edx
push 7
push 0
push str.LowerFilters
push eax
jmp 0x401431
push 1
push edx
lea ecx, [esp + 0x228]
push 0x405138
push ecx
call fcn.004014e0
add esp, 0x10
cmp eax, 4
mov dword [esp + 0x14], eax
jae 0x40141a
mov edx, dword [esp + 0xc]
push str.LowerFilters
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
jmp 0x401433
mov ecx, dword [esp + 0xc]
push eax
lea eax, [esp + 0x224]
push eax
push 7
push 0
push str.LowerFilters
push ecx
call esi
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esp + 0x1c]
lea ecx, [esp + 0xc]
push eax
push ecx
push 0
push 0xf003f
push 1
push 0x406600
lea edx, [esp + 0x38]
push 0
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
pop edi
pop esi
pop ebx
add esp, 0x1214
ret