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

Disassembly:
push ebp
lea ebp, [esp - 0x78]
mov eax, 0x21c0
call fcn.0041a870
mov eax, dword [0x43fda4]
xor eax, ebp
mov dword [ebp + 0x74], eax
push ebx
push esi
call fcn.004099a6
mov esi, eax
xor ebx, ebx
cmp esi, ebx
mov dword [ebp - 0x213c], esi
je 0x40a808
push esi
lea eax, [ebp - 0x12c]
push str.SYSTEMCurrentControlSetControlKeyboard_Layouts_x
push eax
call fcn.0041a34e
add esp, 0xc
lea eax, [ebp - 0x12c]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
push esi
lea eax, [ebp - 0x12c]
push str._08x
push eax
call fcn.0041a34e
xor eax, eax
inc eax
push eax
mov dword [ebp - 0x2130], eax
mov esi, 0x432f34
lea eax, [ebp - 0x2c]
push esi
push eax
mov dword [ebp - 0x2148], ebx
call fcn.0041a34e
add esp, 0x18
lea eax, [ebp - 0x2134]
push eax
push 3
push ebx
push str.Keyboard_LayoutPreload
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40a808
push edi
push 0x50
pop edi
push edi
call fcn.0040f26a
pop ecx
push dword [ebp - 0x213c]
mov dword [ebp - 0x2138], eax
mov dword [ebp - 0x2140], 1
mov dword [ebp - 0x2144], edi
call dword [sym.imp.USER32.dll_UnloadKeyboardLayout]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
jmp 0x40a609
lea eax, [ebp - 0x12c]
push eax
push dword [ebp - 0x2138]
call fcn.00418daf
pop ecx
test eax, eax
pop ecx
lea eax, [ebp - 0x2c]
je 0x40a630
inc dword [ebp - 0x2130]
push dword [ebp - 0x2130]
push esi
push eax
call fcn.0041a34e
add esp, 0xc
lea eax, [ebp - 0x2144]
push eax
push dword [ebp - 0x2138]
lea eax, [ebp - 0x2140]
push eax
push ebx
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x2134]
call edi
test eax, eax
je 0x40a5d8
jmp 0x40a65d
push eax
push dword [ebp - 0x2134]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
lea eax, [ebp - 0x213c]
push eax
push 0x5dc
push ebx
push str.HKEY_CURRENT_USERKeyboard_LayoutPreload
push ebx
push 0x1a
push 0xffff
call dword [sym.imp.USER32.dll_SendMessageTimeoutW]
lea eax, [ebp - 0x212c]
mov dword [ebp - 0x2130], 1
mov dword [ebp - 0x213c], eax
push dword [ebp - 0x2130]
lea eax, [ebp - 0x2c]
push esi
push eax
call fcn.0041a34e
add esp, 0xc
lea eax, [ebp - 0x2144]
push eax
push dword [ebp - 0x2138]
lea eax, [ebp - 0x2140]
push eax
push ebx
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x2134]
call edi
test eax, eax
jne 0x40a6ce
push dword [ebp - 0x2138]
push dword [ebp - 0x213c]
call fcn.0041a59a
inc dword [ebp - 0x2148]
add dword [ebp - 0x213c], 0x100
pop ecx
pop ecx
inc dword [ebp - 0x2130]
cmp dword [ebp - 0x2130], 0x20
jl 0x40a673
mov dword [ebp - 0x2130], 1
push dword [ebp - 0x2130]
lea eax, [ebp - 0x2c]
push esi
push eax
call fcn.0041a34e
add esp, 0xc
lea eax, [ebp - 0x2144]
push eax
push dword [ebp - 0x2138]
lea eax, [ebp - 0x2140]
push eax
push ebx
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x2134]
call edi
test eax, eax
jne 0x40a72f
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x2134]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
inc dword [ebp - 0x2130]
cmp dword [ebp - 0x2130], 0x20
jl 0x40a6e7
push dword [ebp - 0x2134]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x2134]
push eax
push 0xf003f
push ebx
push str.Keyboard_LayoutPreload
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40a7fb
cmp dword [ebp - 0x2148], ebx
jle 0x40a7cf
lea ecx, [ebp - 0x212c]
mov dword [ebp - 0x2130], ecx
lea edi, [eax + 1]
push edi
lea eax, [ebp - 0x2c]
push esi
push eax
call fcn.0041a34e
push dword [ebp - 0x2130]
call fcn.004194ab
add esp, 0x10
add eax, eax
push eax
push dword [ebp - 0x2130]
lea eax, [ebp - 0x2c]
push 1
push ebx
push eax
push dword [ebp - 0x2134]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
add dword [ebp - 0x2130], 0x100
mov eax, edi
cmp eax, dword [ebp - 0x2148]
jl 0x40a783
push dword [ebp - 0x2134]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x213c]
push eax
push 0x5dc
push ebx
push str.HKEY_CURRENT_USERKeyboard_LayoutPreload
push ebx
push 0x1a
push 0xffff
call dword [sym.imp.USER32.dll_SendMessageTimeoutW]
push dword [ebp - 0x2138]
call fcn.0040f26f
pop ecx
pop edi
mov ecx, dword [ebp + 0x74]
pop esi
xor ecx, ebp
pop ebx
call fcn.00419911
add ebp, 0x78
leave
ret