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

Disassembly:
sub esp, 0x6b4
mov eax, dword [0x4677a0]
xor eax, esp
mov dword [esp + 0x6b0], eax
mov eax, dword [esp + 0x6b8]
push ebx
push eax
push str._s.ime
mov ecx, 0x2d
lea ebx, [esp + 0x258]
call fcn.00402d10
mov eax, ebx
push eax
call fcn.0040aa30
add esp, 0xc
mov dword [esp + 0x1c], eax
test eax, eax
je 0x40b431
push esi
push edi
push eax
push str._08X
mov ecx, 0x14
lea ebx, [esp + 0x30]
call fcn.00402d10
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
add esp, 8
lea ecx, [esp + 0xc]
push ecx
push 0xf003f
push 0
push str.Keyboard_LayoutPreload
push SysReAllocString
call ebx
test eax, eax
jne 0x40b15a
mov dword [esp + 0x14], 1
xor edi, edi
mov eax, 0x104
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], eax
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x18]
push 0
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x2c8]
push eax
push edi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
lea edx, [esp + 0x28]
mov esi, eax
push edx
lea eax, [esp + 0x54]
push eax
call fcn.0044cbe1
add esp, 8
test eax, eax
jne 0x40b14a
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0x2b4]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov esi, 1
inc edi
test esi, esi
je 0x40b0e3
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebp
lea ecx, [esp + 0x10]
push ecx
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetControlKeyboard_Layouts
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
mov ebp, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
jne 0x40b1e3
mov dword [esp + 0x18], 1
xor esi, esi
jmp 0x40b190
mov eax, dword [esp + 0x10]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
push 0x14
lea edx, [esp + 0x58]
push edx
push esi
push eax
mov dword [esp + 0x24], 0x14
call ebx
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x58]
push edx
mov edi, eax
call fcn.0044cbe1
add esp, 8
test eax, eax
jne 0x40b1d1
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x54]
push eax
push ecx
call ebp
inc esi
test edi, edi
je 0x40b190
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40b1e9
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
lea eax, [esp + 0x10]
push eax
push 0xf003f
push 0
push str.SYSTEMControlSet001ControlKeyboard_Layouts
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40b25e
mov dword [esp + 0x18], 1
xor esi, esi
mov edx, dword [esp + 0x10]
push 0x14
lea ecx, [esp + 0x58]
push ecx
push esi
push edx
mov dword [esp + 0x24], 0x14
call ebx
mov edi, eax
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x58]
push ecx
call fcn.0044cbe1
add esp, 8
test eax, eax
jne 0x40b24e
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x54]
push edx
push eax
call ebp
inc esi
test edi, edi
je 0x40b213
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [esp + 0x10]
push edx
push 0xf003f
push 0
push 0x456818
push SysStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40b389
mov dword [esp + 0x18], 1
xor ebp, ebp
jmp 0x40b296
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
mov ecx, dword [esp + 0x10]
push 0x80
lea eax, [esp + 0x58]
push eax
push ebp
push ecx
mov dword [esp + 0x24], 0x80
call ebx
lea edx, [esp + 0x54]
push edx
push str._sKeyboard_LayoutPreload
mov ecx, 0x100
lea ebx, [esp + 0x4c8]
mov dword [esp + 0x2c], eax
call fcn.00402d10
mov edx, dword [esp + 0x18]
add esp, 8
lea eax, [esp + 0x1c]
push eax
push 0xf003f
push 0
mov ecx, ebx
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40b372
xor esi, esi
jmp 0x40b300
mov eax, 0x104
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x20]
push edx
mov edx, dword [esp + 0x28]
push 0
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x2cc]
push ecx
push esi
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov edi, eax
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x58]
push ecx
call fcn.0044cbe1
add esp, 8
test eax, eax
jne 0x40b362
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x2b8]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
inc esi
test edi, edi
je 0x40b300
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc ebp
cmp dword [esp + 0x24], 0
je 0x40b290
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x28]
mov esi, dword [sym.imp.USER32.dll_UnloadKeyboardLayout]
push eax
call esi
cmp dword [esp + 0x6cc], 0
pop ebp
je 0x40b414
mov ecx, dword [esp + 0x24]
push ecx
xor edi, edi
call esi
mov esi, dword [sym.imp.USER32.dll_SendMessageTimeoutW]
lea edx, [esp + 0x20]
push edx
push 0x64
push 8
push str.HKEY_CURRENT_USERKeyboard_LayoutPreload
push edi
push 0x1a
push 0xffff
call esi
test eax, eax
jne 0x40b3f5
lea esp, [esp]
mov eax, edi
inc edi
cmp eax, 4
jg 0x40b3f5
lea ecx, [esp + 0x20]
push ecx
push 0x64
push 8
push str.HKEY_CURRENT_USERKeyboard_LayoutPreload
push 0
push 0x1a
push 0xffff
call esi
test eax, eax
je 0x40b3d0
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
push str.HKEY_CURRENT_USERKeyboard_LayoutPreload
push 0
push 0x1a
push 0xffff
call dword [sym.imp.USER32.dll_PostMessageW]
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x6b0]
xor ecx, esp
call fcn.00435010
add esp, 0x6b4
ret
mov ecx, dword [esp + 0x6b4]
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00435010
add esp, 0x6b4
ret