Function at 0x401d40
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xd8
mov eax, dword [0x4250e0]
xor eax, esp
mov dword [esp + 0xd4], eax
push ebx
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x43ca0c], eax
test eax, eax
jns 0x401e2b
lea eax, [esp + 0x14]
push eax
push 0x20019
push 0
push str.keyboard_layoutpreload
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x401d92
xor eax, eax
jmp 0x401f7c
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, 1
mov esi, 0x43c3c0
jmp 0x401db0
push edi
lea ecx, [esp + 0x20]
push 0x41c590
push ecx
call ebx
mov ecx, dword [esp + 0x20]
add esp, 0xc
lea edx, [esp + 0x10]
push edx
push 0xf003f
push 0
lea eax, [esp + 0x28]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401e14
lea edx, [esp + 0x18]
push edx
push esi
push eax
push eax
push eax
mov eax, dword [esp + 0x24]
push eax
mov dword [esp + 0x30], 0xa
call ebp
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esi, 0xa
inc edi
cmp esi, 0x43c5aa
jl 0x401db0
jmp 0x401ed4
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
dec edi
mov dword [0x43c848], edi
jmp 0x401ed4
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea ecx, [esp + 0x14]
push ecx
push 0x20019
push 0
push str.keyboard_layout
push 0x80000001
call esi
test eax, eax
jne 0x401d8b
lea edx, [esp + 0x10]
push edx
push 0xf003f
push eax
mov eax, dword [esp + 0x20]
push str.preload
push eax
call esi
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x401ed4
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
mov edi, 1
mov esi, 0x43c3c0
push edi
lea ecx, [esp + 0x20]
push 0x41c590
push ecx
call ebx
mov ecx, dword [esp + 0x1c]
add esp, 0xc
lea edx, [esp + 0x18]
push edx
push esi
push 0
push 0
lea eax, [esp + 0x2c]
push eax
push ecx
mov dword [esp + 0x30], 0xa
call ebp
test eax, eax
jne 0x401ec2
add esi, 0xa
inc edi
cmp esi, 0x43c5aa
jl 0x401e82
jmp 0x401ec9
dec edi
mov dword [0x43c848], edi
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x14]
push ecx
push 0x20019
push 0
push str.SystemCurrentControlSetControlKeyboard_Layouts
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401d8b
xor ebx, ebx
cmp dword [0x43c848], ebx
jle 0x401f6c
mov esi, 0x429d60
mov edi, 0x43c3c0
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x10]
push edx
push 0xf003f
push 0
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401f5a
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push ecx
push esi
push eax
push eax
push str.layout_text
push edx
mov dword [esp + 0x30], 0xc8
call ebp
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc ebx
add edi, 0xa
add esi, 0xc8
cmp ebx, dword [0x43c848]
jl 0x401f17
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [0x43c848]
mov ecx, dword [esp + 0xe4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040a10d
add esp, 0xd8
ret