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

Disassembly:
push 0xa48
mov eax, 0x54e19a
call fcn.00532b0c
mov ebx, ecx
call fcn.0040de36
xor eax, eax
xor edi, edi
push 0x206
mov word [ebp - 0x628], ax
lea eax, [ebp - 0x626]
push edi
push eax
mov dword [ebp - 0xa3c], edi
call fcn.00531ed0
add esp, 0xc
call fcn.0041ab0f
push eax
lea ecx, [ebp - 0xa50]
call fcn.00404ccb
mov dword [ebp - 4], edi
call fcn.0041ab0f
push eax
lea ecx, [ebp - 0xa48]
call fcn.00404ccb
push str.Keyboard_LayoutPreload
lea eax, [ebp - 0x628]
push 0x560274
push eax
mov byte [ebp - 4], 1
call fcn.00532980
add esp, 0xc
lea eax, [ebp - 0xa3c]
push eax
lea eax, [ebp - 0x628]
push eax
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x40ec20
mov dword [ebp - 0xa54], 1
mov esi, edi
xor eax, eax
push 0x206
mov word [ebp - 0x830], ax
lea eax, [ebp - 0x82e]
push edi
push eax
inc esi
call fcn.00531ed0
xor eax, eax
push 0x206
mov word [ebp - 0xa38], ax
lea eax, [ebp - 0xa36]
push edi
push eax
mov dword [ebp - 0xa4c], 0x104
call fcn.00531ed0
add esp, 0x18
lea eax, [ebp - 0xa40]
push eax
lea eax, [ebp - 0xa38]
push eax
lea eax, [ebp - 0xa54]
push eax
push edi
lea eax, [ebp - 0xa4c]
push eax
lea eax, [ebp - 0x830]
push eax
push edi
push dword [ebp - 0xa3c]
mov dword [ebp - 0xa40], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x40eafb
lea eax, [ebp - 0x830]
push eax
push dword [ebp - 0xa3c]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
cmp esi, 0x2710
jl 0x40ea59
mov ecx, ebx
call fcn.0040ddc1
xor eax, eax
mov esi, 0x206
push esi
mov word [ebp - 0x420], ax
lea eax, [ebp - 0x41e]
push edi
push eax
call fcn.00531ed0
xor eax, eax
push esi
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push edi
push eax
call fcn.00531ed0
mov eax, dword [ebx + 0xc]
xor ecx, ecx
mov esi, dword [eax]
add esp, 0x18
inc ecx
jmp 0x40eba1
mov edi, dword [esi]
push ecx
lea eax, [ebp - 0x420]
push 0x56026c
push eax
call fcn.00532980
lea eax, [ebp - 0x218]
push edi
push eax
call fcn.005325d3
lea eax, [ebp - 0x218]
push eax
call fcn.005325f3
add esp, 0x18
add eax, eax
push eax
lea eax, [ebp - 0x218]
push eax
push 1
xor edi, edi
push edi
lea eax, [ebp - 0x420]
push eax
push dword [ebp - 0xa3c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ecx, dword [ebp - 0xa40]
mov eax, dword [ebx + 0xc]
inc ecx
add esi, 4
mov dword [ebp - 0xa40], ecx
cmp esi, dword [eax + 4]
jne 0x40eb42
push dword [ebp - 0xa3c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [ebx + 0x29], 0
je 0x40ec20
mov ecx, dword [ebx + 0xc]
mov eax, dword [ecx + 4]
sub eax, dword [ecx]
sar eax, 2
cmp eax, 1
jb 0x40ec20
mov dword [ebp - 0xa44], edi
mov esi, dword [ecx + 4]
cmp esi, dword [ecx]
je 0x40ebf5
add esi, 0xfffffffc
push 8
push dword [esi]
call dword [sym.imp.USER32.dll_LoadKeyboardLayoutW]
mov dword [ebp - 0xa44], eax
mov eax, dword [ebx + 0xc]
cmp esi, dword [eax]
jne 0x40ebdb
call fcn.004035b9
test eax, eax
jne 0x40ec12
push 2
lea eax, [ebp - 0xa44]
push eax
push edi
push 0x5a
call dword [sym.imp.USER32.dll_SystemParametersInfoW]
jmp 0x40ec20
mov eax, dword [ebx + 0xc]
mov ecx, ebx
mov eax, dword [eax]
push dword [eax]
call fcn.0040ef5e
mov ecx, dword [ebp - 0xa48]
lea ecx, [ecx - 0x10]
call fcn.004058df
mov ecx, dword [ebp - 0xa50]
lea ecx, [ecx - 0x10]
call fcn.004058df
call fcn.00532abb
ret