Function at 0x4047b0
Capabilities:
Delete registry value
Get common file path
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x49c
push ebp
push esi
mov ebp, ecx
push edi
mov ecx, 6
mov esi, str.Keyboard_LayoutPreload
lea edi, [esp + 0x23c]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x13
lea edi, [esp + 0x254]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x10]
lea ecx, [esp + 0x23c]
push eax
push 0xf003f
push 0
mov esi, 0x14
push ecx
push 0x80000001
mov dword [esp + 0x20], esi
mov dword [esp + 0x28], 0xffffffff
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x404823
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x49c
ret 0x14
mov edx, dword [esp + 0x4ac]
push ebx
cmp byte [edx], 0
je 0x4048cd
mov edx, dword [esp + 0x14]
xor ebx, ebx
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
push ebx
push ebx
push ebx
lea eax, [esp + 0x1c]
push ebx
lea ecx, [esp + 0x30]
push eax
push ecx
push ebx
push edx
mov dword [esp + 0x30], esi
call edi
test eax, eax
jne 0x4048d3
lea eax, [esp + 0x10]
lea ecx, [esp + 0x13c]
push eax
lea edx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x1c]
push edx
lea eax, [esp + 0x2c]
push 0
push eax
push ecx
mov dword [esp + 0x28], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4048a2
mov edx, dword [esp + 0x4b0]
lea eax, [esp + 0x13c]
push edx
push eax
call fcn.0040e200
add esp, 8
test eax, eax
je 0x4048c7
mov eax, dword [esp + 0x14]
push 0
push 0
push 0
lea ecx, [esp + 0x1c]
push 0
lea edx, [esp + 0x30]
inc ebx
push ecx
push edx
push ebx
push eax
mov dword [esp + 0x30], esi
call edi
test eax, eax
je 0x40485a
jmp 0x4048d3
mov dword [esp + 0x18], ebx
jmp 0x4048d3
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
mov eax, dword [esp + 0x4b8]
cmp eax, 0x53
jne 0x4049c3
mov ebx, dword [esp + 0x4b4]
mov ebp, dword [esp + 0x18]
cmp ebp, ebx
jne 0x404c17
cmp ebp, 0xffffffff
je 0x404c17
inc ebp
cmp ebx, ebp
jge 0x404c17
jmp 0x404915
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
mov esi, 0x14
mov eax, dword [esp + 0x14]
push 0
push 0
push 0
lea ecx, [esp + 0x1c]
push 0
lea edx, [esp + 0x30]
push ecx
push edx
push ebx
push eax
call edi
test eax, eax
jne 0x404c17
lea ecx, [esp + 0x10]
lea edx, [esp + 0x3a8]
push ecx
lea eax, [esp + 0x20]
push edx
mov edx, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x2c]
push 0
push ecx
push edx
mov dword [esp + 0x28], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [esp + 0x13c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [esp + 0x13c]
push eax
mov eax, dword [esp + 0x18]
push ecx
push 1
lea edx, [esp + 0x2c]
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea edi, [esp + 0x3a8]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x13c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
inc ebx
cmp ebx, ebp
rep movsb byte es:[edi], byte [esi]
jl 0x40490a
jmp 0x404c17
cmp eax, 0x44
jne 0x404c17
lea ecx, [esp + 0x38]
push 0xc8
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov ebx, dword [esp + 0x4bc]
lea esi, [esp + eax + 0x38]
push ebx
push str._s.dat
push esi
call fcn.00405450
add esp, 0xc
lea edx, [esp + 0x38]
mov ecx, ebp
push 0
push edx
call fcn.00404770
push ebx
push str._s.ime
push esi
call fcn.00405450
mov ecx, dword [0x411630]
add esp, 0xc
call fcn.00404f60
test eax, eax
je 0x404abb
mov esi, dword [esp + 0x4c0]
test esi, esi
je 0x404a57
push ebx
push esi
lea eax, [esp + 0x2ac]
push str._s_s64.ime
push eax
call fcn.00405450
add esp, 0x10
lea ecx, [esp + 0x2a4]
lea edx, [esp + 0x38]
push ecx
push edx
jmp 0x404a5e
lea eax, [esp + 0x38]
push 0
push eax
mov ecx, ebp
call fcn.00404770
lea ecx, [esp + 0x38]
push 0xc8
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [esp + eax + 0x38]
push ebx
push str.SysWOW64_s.ime
push eax
call fcn.00405450
add esp, 0xc
test esi, esi
je 0x404ab2
push ebx
push esi
lea edx, [esp + 0x2ac]
push str._s_s.ime
push edx
call fcn.00405450
add esp, 0x10
lea eax, [esp + 0x2a4]
lea ecx, [esp + 0x38]
push eax
push ecx
jmp 0x404af3
lea edx, [esp + 0x38]
push 0
push edx
jmp 0x404af3
mov eax, dword [esp + 0x4c0]
test eax, eax
je 0x404aec
push ebx
push eax
lea eax, [esp + 0x2ac]
push str._s_s.ime
push eax
call fcn.00405450
add esp, 0x10
lea ecx, [esp + 0x2a4]
lea edx, [esp + 0x38]
push ecx
push edx
jmp 0x404af3
lea eax, [esp + 0x38]
push 0
push eax
mov ecx, ebp
call fcn.00404770
mov esi, dword [esp + 0x18]
cmp esi, 0xffffffff
je 0x404c17
mov ecx, dword [esp + 0x4b0]
lea edx, [esp + 0x18]
push ecx
push edx
mov ecx, ebp
call fcn.00404c40
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.USER32.dll_UnloadKeyboardLayout]
mov eax, dword [esp + 0x14]
push 0
push 0
push 0
lea ecx, [esp + 0x1c]
push 0
lea edx, [esp + 0x30]
push ecx
push edx
push esi
push eax
call edi
test eax, eax
jne 0x404bea
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov eax, dword [esp + 0x14]
push 0
push 0
push 0
lea ecx, [esp + 0x1c]
push 0
lea edx, [esp + 0x3b8]
inc esi
push ecx
push edx
push esi
push eax
call edi
test eax, eax
jne 0x404bea
lea ecx, [esp + 0x10]
lea edx, [esp + 0x13c]
push ecx
lea eax, [esp + 0x20]
push edx
mov edx, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x3b4]
push 0
push ecx
push edx
mov dword [esp + 0x28], 0x14
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [esp + 0x13c]
push eax
call ebp
lea ecx, [esp + 0x13c]
push eax
mov eax, dword [esp + 0x18]
push ecx
push 1
lea edx, [esp + 0x2c]
push 0
push edx
push eax
call ebx
mov eax, dword [esp + 0x14]
push 0
push 0
push 0
lea ecx, [esp + 0x1c]
push 0
lea edx, [esp + 0x30]
push ecx
push edx
push esi
push eax
call edi
test eax, eax
je 0x404b54
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x20]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
lea eax, [esp + 0x34]
push eax
push 0xbb8
push 3
push 0
push 0
push 0x1a
push 0xffff
call dword [sym.imp.USER32.dll_SendMessageTimeoutA]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebx
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x49c
ret 0x14