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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa64
mov eax, dword [0x43c0c0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, 0x208
lea eax, [ebp - 0x838]
push esi
mov ebx, ecx
push 0
push eax
mov dword [ebp - 0xa64], ebx
call fcn.00412a00
push esi
lea eax, [ebp - 0x220]
push 0
push eax
call fcn.00412a00
lea eax, [ebp - 0x838]
mov dword [ebp - 0xa44], 0x104
push str.SoftwareMicrosoftCTFSortOrderAssemblyItem_
push eax
call fcn.004182a0
add esp, 0x20
lea eax, [ebp - 0xa50]
push eax
lea eax, [ebp - 0x838]
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x40b29a
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
lea eax, [ebp - 0xa44]
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push eax
lea eax, [ebp - 0x220]
push eax
push ecx
push dword [ebp - 0xa50]
call edi
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0xa54]
push eax
push 0xf003f
push 0
lea eax, [ebp - 0x220]
push eax
push dword [ebp - 0xa50]
call esi
test eax, eax
jne 0x40b299
push 0x208
push eax
lea eax, [ebp - 0x220]
push eax
call fcn.00412a00
add esp, 0xc
mov dword [ebp - 0xa44], 0x104
xor ecx, ecx
lea eax, [ebp - 0xa44]
push ecx
push ecx
push ecx
push ecx
push eax
lea eax, [ebp - 0x220]
push eax
push ecx
push dword [ebp - 0xa54]
call edi
lea eax, [ebp - 0xa48]
push eax
push 0xf003f
push 0
lea eax, [ebp - 0x220]
push eax
push dword [ebp - 0xa54]
call esi
test eax, eax
jne 0x40b299
xor esi, esi
push 0x208
lea eax, [ebp - 0x220]
inc esi
push 0
push eax
call fcn.00412a00
add esp, 0xc
mov dword [ebp - 0xa44], 0x104
xor ecx, ecx
lea eax, [ebp - 0xa44]
push ecx
push ecx
push ecx
push ecx
push eax
lea eax, [ebp - 0x220]
push eax
push ecx
push dword [ebp - 0xa48]
call edi
test eax, eax
jne 0x40b0a2
lea eax, [ebp - 0x220]
push eax
push dword [ebp - 0xa48]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
cmp esi, 0x2710
jl 0x40b045
mov esi, 0x208
lea eax, [ebp - 0x630]
xor edi, edi
push esi
push edi
push eax
mov dword [ebp - 0xa5c], edi
call fcn.00412a00
push esi
lea eax, [ebp - 0xa40]
push edi
push eax
call fcn.00412a00
push esi
lea eax, [ebp - 0x428]
push edi
push eax
call fcn.00412a00
mov eax, dword [ebx + 0x24]
add esp, 0x24
mov esi, dword [eax]
jmp 0x40b290
mov eax, dword [esi]
push edi
mov dword [ebp - 0xa60], eax
lea eax, [ebp - 0xa40]
push str._.8d
push eax
call fcn.0040568b
add esp, 0xc
lea eax, [ebp - 0xa4c]
push eax
lea eax, [ebp - 0xa40]
push eax
push dword [ebp - 0xa48]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
lea eax, [ebp - 0x630]
push str.CLSID
push eax
call fcn.004182a0
lea eax, [ebp - 0x428]
push str.00000000_0000_0000_0000_000000000000
push eax
call fcn.004182a0
lea eax, [ebp - 0x428]
push eax
call fcn.004156a2
add esp, 0x14
add eax, eax
push eax
lea eax, [ebp - 0x428]
push eax
push 1
push 0
lea eax, [ebp - 0x630]
push eax
push dword [ebp - 0xa4c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [ebp - 0x630]
push str.KeyboardLayout
push eax
call fcn.004182a0
mov byte [ebp - 0x18], 0
lea edi, [ebp - 0x17]
xor eax, eax
stosd dword es:[edi], eax
push str.00000804
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [ebp - 0xa60]
push edi
call fcn.00418260
add esp, 0x10
test eax, eax
lea eax, [ebp - 0x18]
jne 0x40b1ba
push str.08040804
push eax
call fcn.00418d70
pop ecx
pop ecx
jmp 0x40b1c3
push eax
push edi
mov ecx, ebx
call fcn.0040bd80
lea eax, [ebp - 0x18]
push eax
call fcn.004156c0
mov edx, eax
xor edi, edi
mov dword [ebp - 0xa58], edi
pop ecx
test edx, edx
jle 0x40b20b
lea ebx, [ebp + edx - 0x19]
xor ecx, ecx
mov al, byte [ebx]
cmp al, 0x39
movsx eax, al
jle 0x40b1ef
sub eax, 0x37
jmp 0x40b1f2
sub eax, 0x30
shl eax, cl
add ecx, 4
add edi, eax
dec ebx
sub edx, 1
jne 0x40b1e1
mov ebx, dword [ebp - 0xa64]
mov dword [ebp - 0xa58], edi
push 4
lea eax, [ebp - 0xa58]
push eax
push 4
push 0
lea eax, [ebp - 0x630]
push eax
push dword [ebp - 0xa4c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [ebp - 0x630]
push str.Profile
push eax
call fcn.004182a0
lea eax, [ebp - 0x428]
push str.00000000_0000_0000_0000_000000000000
push eax
call fcn.004182a0
lea eax, [ebp - 0x428]
push eax
call fcn.004156a2
add esp, 0x14
add eax, eax
push eax
lea eax, [ebp - 0x428]
push eax
push 1
push 0
lea eax, [ebp - 0x630]
push eax
push dword [ebp - 0xa4c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, dword [ebp - 0xa5c]
mov eax, dword [ebx + 0x24]
inc edi
mov dword [ebp - 0xa5c], edi
add esi, 4
cmp esi, dword [eax + 4]
jne 0x40b0e6
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0040e0e7
mov esp, ebp
pop ebp
ret