Function at 0x404540
Capabilities:
Query or enumerate registry key

Disassembly:
push 0xffffffffffffffff
push 0x4473f2
mov eax, dword fs:[0]
push eax
sub esp, 0x44c
mov eax, dword [0x45636c]
xor eax, esp
mov dword [esp + 0x448], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x45636c]
xor eax, esp
push eax
lea eax, [esp + 0x460]
mov dword fs:[0], eax
mov eax, dword [0x45a1a0]
xor ebp, ebp
cmp eax, ebp
je 0x404930
cmp dword [eax + 0x18], ebp
je 0x404930
mov eax, dword [0x458f04]
mov edx, dword [eax + 0xc]
mov ecx, 0x458f04
call edx
add eax, 0x10
mov dword [esp + 0x38], eax
mov dword [esp + 0x468], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], ebp
lea eax, [esp + 0x24]
push eax
push 0x20019
push ebp
push str.SYSTEMCurrentControlSetControlKeyboard_Layouts_
mov byte [esp + 0x478], 1
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x38], ebp
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebp
jne 0x4045ef
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], ebp
mov dword [esp + 0x24], ebp
mov esi, 0x104
lea edx, [esp + 0x44]
push edx
mov edx, dword [esp + 0x28]
push ebp
push ebp
push ebp
lea eax, [esp + 0x38]
push eax
mov eax, dword [esp + 0x44]
lea ecx, [esp + 0x60]
push ecx
push edx
push eax
mov dword [esp + 0x48], esi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
cmp eax, 0x103
je 0x404881
cmp eax, ebp
jne 0x404802
xor ebx, ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebp
lea ecx, [esp + 0x2c]
push ecx
mov ecx, str.SYSTEMCurrentControlSetControlKeyboard_Layouts_
mov byte [esp + 0x46c], 2
call fcn.004058d0
lea eax, [esp + 0x4c]
mov byte [esp + 0x468], 3
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x404661
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x34]
push eax
call fcn.00406200
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x3c]
push ecx
push 0x20019
push ebp
push edx
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x50], ebp
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebp
jne 0x4046af
mov ebx, dword [esp + 0x3c]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebp
push 0x206
lea ecx, [esp + 0x25a]
xor eax, eax
push ebp
push ecx
mov word [esp + 0x260], ax
call fcn.0042f230
add esp, 0xc
push str.Ime_File
lea edx, [esp + 0x20]
mov dword [esp + 0x2c], esi
push edx
lea edi, [esp + 0x30]
lea esi, [esp + 0x25c]
call fcn.004012d0
cmp ebx, ebp
je 0x4046fe
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebx, ebx
mov dword [esp + 0x1c], ebx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x258]
mov dword [esp + 0x24], ebp
call fcn.004058d0
mov byte [esp + 0x468], 4
mov edx, dword [esp + 0x18]
mov esi, dword [edx - 0xc]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, esi
or eax, ecx
jge 0x404742
mov ecx, esi
lea eax, [esp + 0x18]
call fcn.00405ec0
mov edx, dword [esp + 0x18]
lea ecx, [esi + 1]
push ecx
push edx
call fcn.0042b673
add esp, 8
cmp esi, ebp
jl 0x404877
mov eax, dword [esp + 0x18]
cmp esi, dword [eax - 8]
jg 0x404877
mov dword [eax - 0xc], esi
mov eax, dword [esp + 0x18]
xor edx, edx
mov word [eax + esi*2], dx
mov ecx, dword [esp + 0x18]
cmp dword [ecx - 0xc], ebp
jl 0x404796
push str.nmim
push ecx
call fcn.0042b7f7
mov ecx, dword [esp + 0x20]
add esp, 8
cmp eax, ebp
je 0x404796
sub eax, ecx
sar eax, 1
jns 0x40480b
lea eax, [ecx - 0x10]
mov byte [esp + 0x468], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4047ba
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x468], 2
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4047e2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x468], 1
cmp ebx, ebp
je 0x4047f9
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
mov esi, 0x104
inc dword [esp + 0x24]
jmp 0x4045f8
lea edx, [esp + 0x4c]
lea edi, [esp + 0x38]
call fcn.00405a30
mov byte [esp + 0x468], 3
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404840
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x468], 2
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404868
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp ebx, ebp
je 0x404881
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call ebx
jmp 0x404887
push 0x80070057
call fcn.00401090
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x30]
cmp eax, ebp
je 0x404896
push eax
call ebx
mov dword [esp + 0x30], ebp
mov esi, dword [esp + 0x38]
cmp dword [esi - 0xc], ebp
je 0x404902
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
mov eax, 0x2001f
mov ecx, str.Keyboard_LayoutPreload
mov edx, SysReAllocStringLen
lea esi, [esp + 0x1c]
call fcn.00401280
mov ecx, esi
push 0x44c7b8
push ecx
lea edi, [esp + 0x30]
lea esi, [esp + 0x54]
call fcn.004012d0
mov edx, esi
mov esi, dword [esp + 0x38]
push edx
push esi
call fcn.0042ad09
add esp, 8
cmp eax, ebp
je 0x4048f7
push 0x44c7b8
lea eax, [esp + 0x20]
push eax
call fcn.00401350
mov eax, dword [esp + 0x1c]
cmp eax, ebp
je 0x404902
push eax
call ebx
mov eax, dword [esp + 0x30]
cmp eax, ebp
je 0x40490d
push eax
call ebx
lea eax, [esi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [esp + 0x468], edx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404930
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x460]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x448]
xor ecx, esp
call fcn.0042a9a5
add esp, 0x458
ret