Function at 0x401320
Capabilities:
Set registry value

Disassembly:
sub esp, 0xd4
mov eax, dword [0x4250e0]
xor eax, esp
mov dword [esp + 0xd0], eax
push ebx
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x43ca0c], eax
test eax, eax
jns 0x401433
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [esp + 0x14]
push eax
push 0x20019
push 0
push str.keyboard_layoutpreload
push 0x80000001
call esi
test eax, eax
jne 0x4015a4
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
push 2
lea ecx, [esp + 0x1c]
push 0x41c590
push ecx
call edi
mov ecx, dword [esp + 0x20]
add esp, 0xc
lea edx, [esp + 0x10]
push edx
push 0xf003f
push 0
lea eax, [esp + 0x24]
push eax
push ecx
call esi
mov ebp, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x4013c8
push 0x43c3c0
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [esp + 0x10]
push eax
push 0x43c3c0
push 1
push 0
push 0
push edx
call ebp
mov eax, dword [esp + 0x10]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
call ebx
push 1
lea ecx, [esp + 0x1c]
push 0x41c590
push ecx
call edi
mov ecx, dword [esp + 0x20]
add esp, 0xc
lea edx, [esp + 0x10]
push edx
push 0xf003f
push 0
lea eax, [esp + 0x24]
push eax
push ecx
call esi
test eax, eax
jne 0x401420
push 0x43c3ca
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [esp + 0x10]
push eax
push 0x43c3ca
push 1
push 0
push 0
push edx
call ebp
mov eax, dword [esp + 0x10]
push eax
call ebx
mov ecx, dword [esp + 0x14]
push ecx
call ebx
jmp 0x4015a4
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea edx, [esp + 0x14]
push edx
push 0x20019
push 0
push str.keyboard_layout
push 0x80000001
call ebp
test eax, eax
jne 0x4015a4
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push eax
push 0xf003f
push 0
push str.preload
push ecx
call ebp
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jne 0x4014e3
push 1
lea edx, [esp + 0x1c]
push 0x41c590
push edx
call esi
add esp, 0xc
push 0x43c3ca
call ebx
mov ecx, dword [esp + 0x10]
push eax
push 0x43c3ca
push 1
push 0
lea eax, [esp + 0x28]
push eax
push ecx
call edi
push 2
lea edx, [esp + 0x1c]
push 0x41c590
push edx
call esi
add esp, 0xc
push 0x43c3c0
call ebx
mov ecx, dword [esp + 0x10]
push eax
push 0x43c3c0
push 1
push 0
lea eax, [esp + 0x28]
push eax
push ecx
call 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..DEFAULTkeyboard_layout
push 0x80000003
call ebp
test eax, eax
jne 0x4015a4
lea edx, [esp + 0x10]
push edx
push 0xf003f
push eax
mov eax, dword [esp + 0x20]
push str.preload
push eax
call ebp
test eax, eax
jne 0x401590
push 1
lea ecx, [esp + 0x1c]
push 0x41c590
push ecx
call esi
add esp, 0xc
push 0x43c3ca
call ebx
push eax
mov eax, dword [esp + 0x14]
push 0x43c3ca
push 1
push 0
lea edx, [esp + 0x28]
push edx
push eax
call edi
push 2
lea ecx, [esp + 0x1c]
push 0x41c590
push ecx
call esi
add esp, 0xc
push 0x43c3c0
call ebx
push eax
mov eax, dword [esp + 0x14]
push 0x43c3c0
push 1
push 0
lea edx, [esp + 0x28]
push edx
push eax
call edi
mov ecx, dword [esp + 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call esi
mov edx, dword [esp + 0x14]
push edx
call esi
mov ecx, dword [esp + 0xe0]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040a10d
add esp, 0xd4
ret