Function at 0x402da0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x234
mov eax, dword [0x469d0c]
mov edx, dword [0x45c3f0]
mov dword [esp + 0x14], ecx
mov ecx, dword [0x45c3ec]
mov dword [esp + 0x230], eax
mov eax, dword [str.Keyboard_LayoutPreload]
push ebx
mov dword [esp + 0x20], eax
mov eax, dword [0x45c3f4]
mov dword [esp + 0x24], ecx
mov ecx, dword [0x45c3f8]
push esi
mov dword [esp + 0x2c], edx
mov edx, dword [0x45c3fc]
push edi
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], ecx
xor eax, eax
mov dword [esp + 0x3c], edx
mov ecx, 0x3b
lea edi, [esp + 0x40]
push 0x104
rep stosd dword es:[edi], eax
call fcn.0044a132
push 0x104
mov ebx, eax
call fcn.0044a132
mov dword [esp + 0x20], eax
lea eax, [esp + 0x30]
add esp, 8
mov word [esp + 0x130], 0x31
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0x104
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402e44
sub eax, edx
mov dword [esp + 0x1c], eax
jne 0x402e57
xor esi, esi
jmp 0x402e90
lea eax, [esp + 0x1c]
push eax
push 0xf003f
push 0
lea ecx, [esp + 0x34]
push ecx
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push 0x80000001
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x1c]
xor edx, edx
test edi, edi
setne dl
dec edx
and edx, eax
mov esi, edx
mov eax, 0x104
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], eax
lea eax, [esp + 0xc]
push eax
push ebx
lea ecx, [esp + 0x18]
push ecx
xor edi, edi
push edi
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x144]
push eax
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
jne 0x402f24
test edi, edi
jne 0x402eda
mov edx, dword [esp + 0x18]
mov eax, ebx
sub edx, ebx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x402ed0
push str.00000804
push ebx
call fcn.0044c085
add esp, 8
test eax, eax
je 0x403176
lea ecx, [esp + 0xc]
push ecx
push ebx
mov eax, 0x104
lea edx, [esp + 0x18]
push edx
push 0
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x144]
push ecx
inc edi
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
je 0x402ec4
push 0xa
lea ecx, [esp + 0x134]
push ecx
inc edi
push edi
call fcn.0044f650
mov eax, dword [str.00000804]
mov esi, dword [esp + 0x2c]
mov edx, ebx
mov dword [edx], eax
mov ecx, dword [0x45c408]
mov dword [edx + 4], ecx
mov al, byte [0x45c40c]
add esp, 0xc
push ebx
mov byte [edx + 8], al
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
push ecx
push edx
push 0x45c400
lea eax, [esp + 0x38]
push eax
push 0x80000001
mov ecx, esi
call fcn.00402b00
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
push ecx
push edx
push eax
lea ecx, [esp + 0x13c]
push ecx
lea edx, [esp + 0x38]
push edx
mov ecx, esi
push 0x80000001
call fcn.00402b00
mov ecx, 7
mov esi, str.Keyboard_LayoutSubstitutes
lea edi, [esp + 0x28]
lea eax, [esp + 0x28]
rep movsd dword es:[edi], dword [esi]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402fb6
sub eax, edx
mov dword [esp + 0x1c], eax
je 0x40315e
lea eax, [esp + 0x1c]
push eax
push 0xf003f
push 0
lea ecx, [esp + 0x34]
push ecx
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x80000001
mov esi, eax
call edi
test esi, esi
jne 0x40315e
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40315e
mov ecx, 0x104
lea edx, [esp + 0xc]
push edx
push ebx
mov byte [esp + 0x138], 0
mov byte [ebx], 0
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], ecx
lea ecx, [esp + 0x18]
push ecx
push esi
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x144]
push ecx
push esi
push eax
mov dword [esp + 0x38], esi
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
jne 0x40315e
lea ecx, [ecx]
lea edx, [esp + 0x130]
push str.00000804
push edx
call fcn.0044c085
add esp, 8
test eax, eax
jne 0x40311a
mov byte [ebx + 8], al
mov ecx, dword [0x45c408]
mov eax, dword [str.00000804]
mov dl, byte [0x45c40c]
mov dword [esp + 0x134], ecx
mov dword [esp + 0x130], eax
mov byte [esp + 0x138], dl
mov ecx, ebx
mov dword [ecx], eax
mov edx, dword [0x45c408]
mov dword [ecx + 4], edx
mov al, byte [0x45c40c]
mov byte [ecx + 8], al
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x28]
mov dword [esp + 0xc], 8
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4030c0
sub eax, edx
mov dword [esp + 0x24], eax
je 0x40311a
lea ecx, [esp + 0x20]
push ecx
push 0xf003f
push 0
lea edx, [esp + 0x34]
push edx
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x403113
mov eax, dword [esp + 0x20]
test eax, eax
je 0x403113
push 8
push ebx
push esi
push 0
lea ecx, [esp + 0x140]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 0x20]
push edx
call edi
push 0x80000001
call edi
mov eax, dword [esp + 0x18]
mov ecx, 0x104
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], ecx
lea ecx, [esp + 0xc]
push ecx
push ebx
lea edx, [esp + 0x18]
push edx
push 0
lea ecx, [esp + 0x24]
push ecx
inc eax
lea edx, [esp + 0x144]
push edx
push eax
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
je 0x403050
mov ecx, dword [esp + 0x23c]
mov eax, 1
call fcn.0044b588
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 0x20]
push ebx
push 8
push edx
push 0x45c400
lea eax, [esp + 0x38]
push eax
push 0x80000001
mov ecx, esi
mov dword [esp + 0x24], 8
call fcn.00402b00
push 0xa
lea ecx, [esp + 0x134]
push ecx
inc edi
push edi
call fcn.0044f650
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
add esp, 0xc
push edx
push eax
push ecx
lea edx, [esp + 0x13c]
push edx
lea eax, [esp + 0x38]
push eax
jmp 0x402f93