Function at 0x412ae0
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56f2ae
mov eax, dword fs:[0]
push eax
sub esp, 0x48c
mov eax, dword [0x5d2fec]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push str.IMM32
lea ecx, [ebp - 0x43c]
mov dword [ebp - 0x43c], 0
call fcn.00406840
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x430]
push str.SYSTEMCurrentControlSetControlKeyboard_Layouts
mov dword [ebp - 0x430], 0
call fcn.00406840
lea eax, [ebp - 0x450]
mov byte [ebp - 4], 1
push eax
push 0x20019
push 0
push dword [ebp - 0x430]
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
or edi, 0xffffffff
test eax, eax
jne 0x413058
push 0x20a
xor ebx, ebx
lea eax, [ebp - 0x428]
push ebx
push eax
call fcn.00551910
add esp, 0xc
mov dword [ebp - 0x438], 0x20a
call fcn.00417ce3
mov ecx, eax
test ecx, ecx
jne 0x412bad
push 0x80004005
call fcn.00407010
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x42c], esi
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x438]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x428]
push eax
push 0
push dword [ebp - 0x450]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x413031
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x428]
inc ebx
push eax
lea eax, [ebp - 0x42c]
mov dword [ebp - 0x46c], ebx
push 0x5af300
push eax
call fcn.00406ff0
push 0x20a
lea eax, [ebp - 0x428]
push 0
push eax
call fcn.00551910
push 0x5af8ec
lea eax, [ebp - 0x430]
mov dword [ebp - 0x438], 0x20a
push eax
lea eax, [ebp - 0x458]
mov dword [ebp - 0x434], 0
push eax
call fcn.00406a20
lea ecx, [ebp - 0x42c]
mov byte [ebp - 4], 3
push ecx
push eax
lea eax, [ebp - 0x434]
push eax
call fcn.00405ab0
add esp, 0x30
mov byte [ebp - 4], 5
mov eax, edi
mov edx, dword [ebp - 0x458]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x412c8b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x44c]
push eax
push 0x20019
push 0
push dword [ebp - 0x434]
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x412fdf
push 0x20a
push eax
lea eax, [ebp - 0x21c]
push eax
call fcn.00551910
add esp, 0xc
mov dword [ebp - 0x444], 0x20a
lea eax, [ebp - 0x444]
mov dword [ebp - 0x440], 1
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x440]
push eax
push 0
push str.Ime_File
push dword [ebp - 0x44c]
call esi
test eax, eax
jne 0x412fd3
lea ecx, [ebp - 0x498]
call fcn.0040c890
lea eax, [ebp - 0x21c]
mov byte [ebp - 4], 6
push eax
lea eax, [ebp - 0x494]
push 0x5af300
push eax
call fcn.00406ff0
mov ebx, dword [ebp - 0x494]
add esp, 0xc
mov esi, dword [ebp - 0x47c]
add esi, 0xfffffff0
lea ecx, [ebx - 0x10]
cmp ecx, esi
je 0x412d9e
cmp dword [esi + 0xc], 0
jl 0x412d89
mov eax, dword [ecx]
cmp eax, dword [esi]
jne 0x412d89
push ecx
call fcn.00406c80
add esp, 4
mov dword [ebp - 0x454], eax
mov ecx, edi
lea edx, [esi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x412d7e
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x454]
add eax, 0x10
mov dword [ebp - 0x47c], eax
jmp 0x412d9e
push dword [ebx - 0xc]
lea ecx, [ebp - 0x47c]
push ebx
call fcn.00406bd0
mov ebx, dword [ebp - 0x494]
push ecx
mov ecx, esp
lea eax, [ebp - 0x494]
push eax
mov dword [ebp - 0x454], ecx
call fcn.004069a0
lea ecx, [ebp - 0x45c]
call fcn.004031f0
add esp, 4
mov byte [ebp - 4], 7
lea esi, [ebx - 0x10]
mov ecx, dword [eax]
lea edx, [ecx - 0x10]
cmp edx, esi
je 0x412e22
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x412e13
mov eax, dword [edx]
cmp eax, dword [esi]
jne 0x412e13
push edx
call fcn.00406c80
add esp, 4
mov dword [ebp - 0x454], eax
mov ecx, edi
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x412e08
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x454]
add eax, 0x10
mov dword [ebp - 0x494], eax
jmp 0x412e22
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x494]
call fcn.00406bd0
mov byte [ebp - 4], 6
mov eax, edi
mov edx, dword [ebp - 0x45c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x412e43
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x20a
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.00551910
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x448]
add esp, 0xc
mov dword [ebp - 0x448], 0x20a
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x440]
push eax
push 0
push str.Layout_Text
push dword [ebp - 0x44c]
call esi
test eax, eax
jne 0x412fb4
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x474]
push 0x5af300
push eax
call fcn.00406ff0
add esp, 0xc
lea eax, [ebp - 0x42c]
lea ecx, [ebp - 0x498]
push eax
call fcn.00406cf0
lea ecx, [ebp - 0x498]
call fcn.004136a0
lea eax, [ebp - 0x43c]
push eax
lea ecx, [ebp - 0x484]
call fcn.00406cf0
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x468]
push str.HKEY_LOCAL_MACHINE_
push eax
call fcn.00406490
push 0x5af8ec
push eax
lea eax, [ebp - 0x464]
mov byte [ebp - 4], 8
push eax
call fcn.00406a20
lea ecx, [ebp - 0x42c]
mov byte [ebp - 4], 9
push ecx
push eax
lea eax, [ebp - 0x460]
push eax
call fcn.00405ab0
add esp, 0x24
push eax
lea ecx, [ebp - 0x478]
mov byte [ebp - 4], 0xa
call fcn.00406cf0
mov byte [ebp - 4], 9
mov eax, edi
mov edx, dword [ebp - 0x460]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x412f59
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 8
mov eax, edi
mov edx, dword [ebp - 0x464]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x412f7a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 6
mov eax, edi
mov edx, dword [ebp - 0x468]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x412f9b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
sub esp, 0x2c
lea eax, [ebp - 0x498]
mov ecx, esp
push eax
call fcn.0040d1a0
call fcn.0040f000
add esp, 0x2c
push dword [ebp - 0x44c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x498]
call fcn.0040ca30
mov ebx, dword [ebp - 0x46c]
jmp 0x412fdf
push dword [ebp - 0x44c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 4], 2
mov eax, edi
mov edx, dword [ebp - 0x434]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x413000
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x438]
push eax
lea eax, [ebp - 0x428]
push eax
push ebx
push dword [ebp - 0x450]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
je 0x412bf1
mov esi, dword [ebp - 0x42c]
push dword [ebp - 0x450]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 4], 1
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x413058
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, edi
mov edx, dword [ebp - 0x430]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x413079
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x43c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x41309b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0054e73a
mov esp, ebp
pop ebp
ret