Function at 0x5264b0
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x6a0
push ebx
push ebp
push esi
push edi
push 0x56cabc
lea ecx, [esp + 0x4c]
call fcn.00527310
lea eax, [esp + 0x48]
push eax
call fcn.0052bc50
add esp, 4
push eax
mov ecx, 0x595578
call fcn.00527470
lea ecx, [esp + 0x48]
call fcn.00527430
call fcn.0052bc80
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
push 0
push 0x595574
push 0x5595dc
push eax
call edx
mov eax, dword [0x595574]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x2c]
push 0x5593ac
push eax
call edx
mov eax, dword [0x595574]
mov edx, dword [esp + 0x6b4]
mov edx, dword [edx]
mov ecx, dword [eax]
push 6
push edx
push eax
mov eax, dword [ecx + 0x34]
call eax
mov eax, dword [0x595574]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x1c]
push eax
call edx
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov dword [esp + 0x20], eax
mov ecx, 0x100
mov eax, 0x64
lea edi, [esp + 0x2b0]
xor ebp, ebp
rep stosd dword es:[edi], eax
mov dword [esp + 0x10], ebp
nop
mov esi, dword [0x5955cc]
mov eax, dword [0x5955d0]
lea ebx, [esi + 1]
cmp eax, ebx
mov dword [esp + 0x18], esi
mov dword [esp + 0x24], ebx
jae 0x5265f2
mov ebp, eax
shr ebp, 1
add ebp, eax
cmp ebp, ebx
cmovb ebp, ebx
mov ebx, dword [0x5955c8]
mov eax, ebp
imul eax, eax, 0xa4
push eax
mov edi, esi
call fcn.00526ee0
push edi
mov esi, eax
push ebx
push esi
mov dword [esp + 0x24], esi
call fcn.00526400
add esp, 0x10
test edi, edi
jbe 0x5265d1
lea esi, [ebx + 4]
lea ecx, [esi + 0x50]
call fcn.00527430
mov ecx, esi
call fcn.00527430
add esi, 0xa4
sub edi, 1
jne 0x5265b3
mov esi, dword [esp + 0x14]
push ebx
call fcn.00526f00
mov ebx, dword [esp + 0x28]
mov dword [0x5955c8], esi
mov esi, dword [esp + 0x1c]
mov dword [0x5955d0], ebp
mov ebp, dword [esp + 0x14]
add esp, 4
imul esi, esi, 0xa4
add esi, dword [0x5955c8]
mov byte [esp + 0x1c], 0
mov ecx, dword [esp + 0x1c]
push ecx
push esi
push 0xa4
call fcn.00528540
mov edi, eax
add esp, 0xc
test edi, edi
je 0x52662c
lea ecx, [edi + 4]
call fcn.00526f20
lea ecx, [edi + 0x54]
call fcn.00526f20
mov edx, dword [ebp + 0x55804c]
mov dword [0x5955cc], ebx
mov dword [esi], edx
mov eax, dword [ebp + 0x558050]
test eax, eax
je 0x526664
push eax
lea ecx, [esp + 0x4c]
call fcn.00527310
lea eax, [esp + 0x48]
push eax
lea ecx, [esi + 4]
call fcn.00527470
lea ecx, [esp + 0x48]
call fcn.00527430
mov ecx, dword [ebp + 0x55804c]
mov edx, dword [ebp + 0x558048]
add ebp, 0xc
cmp ebp, 0x4b0
mov dword [esp + ecx*4 + 0x2b0], edx
mov dword [esp + 0x10], ebp
jb 0x526560
mov eax, dword [0x558630]
mov ecx, dword [0x558634]
mov edx, dword [0x558638]
xor esi, esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x10], esi
lea ecx, [ecx]
mov edi, dword [esp + esi*4 + 0x2b0]
cmp edi, 0x64
setne bl
test bl, bl
je 0x5266df
mov eax, edi
imul eax, eax, 0xa4
add eax, dword [0x5955c8]
lea ecx, [eax + 4]
call fcn.00526f50
test al, al
je 0x52677f
mov eax, dword [0x595574]
lea edx, [esp + 0x34]
push edx
mov dword [esp + 0x38], 0x14
mov dword [esp + 0x3c], 0x10
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], 1
mov ecx, dword [eax]
push 0x17
push eax
mov eax, dword [ecx + 0x14]
call eax
test eax, eax
jl 0x52677f
mov ebp, dword [esp + 0x20]
mov ecx, dword [esp + 0x44]
push ebp
push 3
push ecx
call dword [sym.imp.USER32.dll_MapVirtualKeyExW]
mov ecx, dword [esp + 0x44]
push ebp
push 0
push 1
lea edx, [esp + 0x3c]
push edx
push 0x558530
push ecx
push eax
call dword [sym.imp.USER32.dll_ToUnicodeEx]
test eax, eax
je 0x52677f
test bl, bl
je 0x526833
lea edx, [esp + 0x28]
push edx
lea ecx, [esp + 0x4c]
call fcn.00527310
mov edx, dword [0x5955c8]
mov ecx, edi
imul ecx, ecx, 0xa4
lea eax, [esp + 0x48]
push eax
lea ecx, [ecx + edx + 4]
call fcn.00527470
lea ecx, [esp + 0x48]
call fcn.00527430
test bl, bl
je 0x5267f6
mov eax, dword [0x595574]
lea ecx, [esp + 0x98]
push ecx
mov dword [esp + 0x9c], 0x218
mov dword [esp + 0xa0], 0x10
mov dword [esp + 0xa4], esi
mov dword [esp + 0xa8], 1
mov edx, dword [eax]
mov edx, dword [edx + 0x14]
push 0x14
push eax
call edx
lea eax, [esp + 0xa8]
push eax
lea ecx, [esp + 0x4c]
call fcn.00527310
imul edi, edi, 0xa4
mov edx, dword [0x5955c8]
lea ecx, [esp + 0x48]
push ecx
lea ecx, [edi + edx + 0x54]
call fcn.00527470
lea ecx, [esp + 0x48]
call fcn.00527430
add esi, 1
cmp esi, 0x100
mov dword [esp + 0x10], esi
jl 0x5266b0
push 4
call fcn.00525dd0
add esp, 4
test eax, eax
pop edi
pop esi
pop ebp
pop ebx
je 0x5268f3
mov dword [eax], vtable.BXIKeyboard.0
mov dword [0x595570], eax
mov al, 1
add esp, 0x6a0
ret
mov edi, dword [0x5955cc]
mov eax, dword [0x5955d0]
lea ebx, [edi + 1]
cmp eax, ebx
mov ebp, edi
mov dword [esp + 0x18], ebx
jae 0x5268a1
mov esi, eax
shr esi, 1
add esi, eax
mov eax, dword [0x5955c8]
cmp esi, ebx
cmovb esi, ebx
mov ecx, esi
imul ecx, ecx, 0xa4
push ecx
mov ebx, edi
mov dword [esp + 0x18], eax
call fcn.00526ee0
mov edx, dword [esp + 0x18]
push ebx
push edx
push eax
mov dword [esp + 0x2c], eax
call fcn.00526400
mov eax, dword [esp + 0x24]
push ebx
push eax
call fcn.00526470
mov ecx, dword [esp + 0x34]
mov ebx, dword [esp + 0x30]
add esp, 0x18
mov dword [0x5955c8], ecx
mov dword [0x5955d0], esi
imul ebp, ebp, 0xa4
add ebp, dword [0x5955c8]
push 1
mov esi, ebp
push esi
call fcn.00526380
mov edx, dword [esp + 0x18]
add esp, 8
lea eax, [esp + 0x28]
mov dword [0x5955cc], ebx
push eax
lea ecx, [esp + 0x4c]
mov dword [esi], edx
call fcn.00527310
lea ecx, [esp + 0x48]
push ecx
lea ecx, [esi + 4]
call fcn.00527470
lea ecx, [esp + 0x48]
call fcn.00527430
mov esi, dword [esp + 0x10]
jmp 0x526783
mov dword [0x595570], 0
mov al, 1
add esp, 0x6a0
ret