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

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x24
lea ecx, [esp + 0x10]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
push edi
push eax
push str._08x
push ecx
call esi
add esp, 0xc
call fcn.004116f0
test eax, eax
je 0x4028be
mov eax, dword [esp + 0x38]
lea edx, [esp + 0x10]
push edx
push 0xf003f
push 0
push str.Keyboard_LayoutPreload
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push 0
push 0
mov edx, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x24]
push 0
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov eax, dword [esp + 0x18]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
xor edi, edi
test eax, eax
jbe 0x4027d1
lea ebx, [edi + 1]
push ebx
push 0x42a110
push 0x4314f0
call esi
mov ecx, dword [esp + 0x1c]
add esp, 0xc
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0x104
push eax
push 0x4313ec
push 0
push 0
push 0x4314f0
push ecx
call ebp
lea edx, [esp + 0x20]
push edx
push 0x4313ec
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x4027d1
mov eax, dword [esp + 0x18]
mov edi, ebx
cmp edi, eax
jb 0x40277e
mov eax, dword [esp + 0x18]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
cmp eax, edi
jne 0x402818
lea eax, [edi + 1]
push eax
push 0x42a110
push 0x4314f0
call esi
add esp, 0xc
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
lea edx, [esp + 0x20]
push eax
mov eax, dword [esp + 0x14]
push edx
push 1
push 0
push 0x4314f0
push eax
call ebx
inc dword [esp + 0x18]
mov eax, dword [esp + 0x40]
test eax, eax
je 0x4028ae
test edi, edi
jle 0x40288c
push edi
push 0x42a110
push 0x4314f0
call esi
mov edx, dword [esp + 0x1c]
add esp, 0xc
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], 0x104
push ecx
push 0x4313ec
push 0
push 0
push 0x4314f0
push edx
call ebp
lea eax, [edi + 1]
push eax
push 0x42a110
push 0x4314f0
call esi
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x1c]
add esp, 0xc
push ecx
push 0x4313ec
push 1
push 0
push 0x4314f0
push edx
call ebx
dec edi
test edi, edi
jg 0x402828
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [esp + 0x10]
inc eax
lea ecx, [esp + 0x20]
push eax
push ecx
push 1
push 0
push 0x42a22c
push edx
call ebx
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x402b10
mov edx, dword [esp + 0x38]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea ecx, [esp + 0x10]
push ecx
push 0xf003f
push 0
push str.Keyboard_LayoutPreload
push edx
call ebx
push 0
push 0
mov ecx, dword [esp + 0x18]
push 0
push 0
push 0
push 0
lea eax, [esp + 0x30]
push 0
push eax
push 0
push 0
push 0
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov eax, dword [esp + 0x18]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edi, edi
test eax, eax
jbe 0x40298c
lea eax, [edi + 1]
push eax
push 0x42a110
push 0x4314f0
mov dword [esp + 0x44], eax
call esi
mov eax, dword [esp + 0x1c]
add esp, 0xc
lea edx, [esp + 0x14]
push edx
push 0xf003f
push 0
push 0x4314f0
push eax
call ebx
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x1c]
push ecx
push 0x4313ec
push 0
push 0
push 0x4313e8
push edx
mov dword [esp + 0x34], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [esp + 0x20]
push eax
push 0x4313ec
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40298c
mov ecx, dword [esp + 0x14]
push ecx
call ebp
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x18]
cmp edi, eax
jb 0x402910
cmp dword [esp + 0x18], edi
jne 0x4029fa
lea edx, [edi + 1]
push edx
push 0x42a110
push 0x4314f0
call esi
add esp, 0xc
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push 0
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push 0x4314f0
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
lea edx, [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 0x14]
inc eax
push eax
lea eax, [esp + 0x24]
push eax
push 1
push 0
push 0x4313e8
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 0x14]
push edx
call ebp
inc dword [esp + 0x18]
mov eax, dword [esp + 0x40]
test eax, eax
je 0x402b09
test edi, edi
jle 0x402ac4
push edi
push 0x42a110
push 0x4314f0
call esi
mov ecx, dword [esp + 0x1c]
add esp, 0xc
lea eax, [esp + 0x14]
push eax
push 0xf003f
push 0
push 0x4314f0
push ecx
call ebx
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x1c]
push edx
push 0x4313ec
push 0
push 0
push 0x4313e8
push eax
mov dword [esp + 0x34], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [esp + 0x14]
push ecx
call ebp
lea edx, [edi + 1]
push edx
push 0x42a110
push 0x4314f0
call esi
mov ecx, dword [esp + 0x1c]
add esp, 0xc
lea eax, [esp + 0x14]
push eax
push 0xf003f
push 0
push 0x4314f0
push ecx
call ebx
mov edx, dword [esp + 0x14]
push 0x104
push 0x4313ec
push 1
push 0
push 0x4313e8
push edx
mov dword [esp + 0x34], 0x104
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 0x14]
push eax
call ebp
dec edi
test edi, edi
jg 0x402a0e
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
push 0xf003f
push 0
push 0x42a22c
push edx
call ebx
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [esp + 0x14]
inc eax
lea ecx, [esp + 0x20]
push eax
push ecx
push 1
push 0
push 0x4313e8
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 0x14]
push eax
call ebp
mov ecx, dword [esp + 0x10]
push ecx
call ebp
lea edx, [esp + 0x20]
push 1
push edx
call dword [sym.imp.USER32.dll_LoadKeyboardLayoutA]
mov eax, dword [esp + 0x40]
pop edi
pop esi
pop ebp
test eax, eax
pop ebx
je 0x402b3a
lea eax, [esp + 0x2c]
push 2
push eax
push 0
push 0x5a
call dword [sym.imp.USER32.dll_SystemParametersInfoA]
add esp, 0x24
ret