Function at 0x4091db
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2e8
mov eax, dword [0x467368]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, 0xaa
lea eax, [ebp - 0xb0]
push esi
xor ebx, ebx
push ebx
push eax
call sub.VCRUNTIME140.dll_memset
push esi
lea eax, [ebp - 0x15c]
push ebx
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x18
mov dword [ebp - 0x2d8], ebx
call fcn.00406877
push 0x55
pop edi
mov esi, eax
lea eax, [ebp - 0xb0]
push edi
push eax
call fcn.0040b154
lea eax, [ebp - 0x15c]
push edi
push eax
call fcn.0040b11f
add esp, 0x10
cmp esi, 1
jne 0x40925f
cmp byte [ebp + 8], bl
je 0x409258
push 0x4701d8
call fcn.0040800e
push 2
call fcn.0040a688
cmp esi, 3
je 0x40947d
call dword [sym.imp.KERNEL32.dll_GetACP]
mov esi, eax
lea eax, [ebp - 0x15c]
push eax
call fcn.004223b8
pop ecx
test al, al
je 0x4092ab
lea eax, [ebp - 0x15c]
push eax
call fcn.004223e6
pop ecx
test al, al
lea eax, [ebp - 0x15c]
push edi
push eax
je 0x4092a1
push str.zh_CN
jmp 0x4092a6
push str.zh_TW
call fcn.004052bd
lea eax, [ebp - 0xb0]
push eax
call fcn.004223b8
pop ecx
test al, al
je 0x4092e6
lea eax, [ebp - 0xb0]
push eax
call fcn.004223e6
pop ecx
test al, al
lea eax, [ebp - 0xb0]
push edi
push eax
je 0x4092dc
push str.zh_CN
jmp 0x4092e1
push str.zh_TW
call fcn.004052bd
push 1
push ebx
push 0x4701d8
call fcn.0040a9cf
push ebx
lea eax, [ebp - 0xb0]
push ebx
push eax
call fcn.0040a9cf
push ebx
lea eax, [ebp - 0x15c]
push ebx
push eax
call fcn.0040a9cf
add esp, 0x24
cmp esi, 0x4ea
jne 0x409329
push ebx
push ebx
push str.fr_FR
call fcn.0040a9cf
add esp, 0xc
push ebx
push ebx
mov ebx, dword [sym.imp.USER32.dll_GetKeyboardLayoutList]
lea esi, [ebp - 0x2d4]
call ebx
mov edi, eax
cmp edi, 8
jbe 0x409359
mov ecx, edi
shl ecx, 2
push 0
push ecx
call fcn.004308aa
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x4093f3
push esi
push edi
call ebx
xor ebx, ebx
test edi, edi
je 0x4093e2
movzx eax, word [esi + ebx*4]
lea ecx, [ebp - 0x2b4]
push 0
push 0x55
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_LCIDToLocaleName]
test eax, eax
je 0x4093dd
push 0
lea eax, [ebp - 0x2b4]
push 0
push eax
call fcn.0040a9cf
push 0x55
lea eax, [ebp - 0x208]
push eax
lea eax, [ebp - 0x2b4]
push eax
call fcn.004067ea
add esp, 0x18
test eax, eax
js 0x4093dd
cmp word [ebp - 0x208], 0
je 0x4093dd
lea eax, [ebp - 0x208]
push 0x451aa0
push eax
call fcn.0040bfe8
pop ecx
pop ecx
test eax, eax
je 0x4093dd
push 0
lea eax, [ebp - 0x208]
push 0
push eax
call fcn.0040a9cf
add esp, 0xc
inc ebx
cmp ebx, edi
jb 0x409363
lea eax, [ebp - 0x2d4]
cmp esi, eax
je 0x4093f3
push esi
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
pop ecx
lea eax, [ebp - 0x2e4]
push eax
call fcn.0040853a
mov eax, dword [ebp - 0x2e0]
xor ebx, ebx
mov ecx, dword [ebp - 0x2e4]
mov edi, ebx
sub eax, ecx
push 0x18
pop esi
cdq
idiv esi
mov dword [ebp - 0x2e8], esi
test eax, eax
je 0x409472
mov esi, ebx
lea eax, [esi + ecx]
cmp dword [eax + 0x14], 8
jb 0x40942e
mov eax, dword [eax]
push eax
call fcn.00408d92
test al, al
jne 0x409453
mov eax, dword [ebp - 0x2e4]
add eax, esi
cmp dword [eax + 0x14], 8
jb 0x409448
mov eax, dword [eax]
push ebx
push ebx
push eax
call fcn.0040a9cf
add esp, 0xc
mov ecx, dword [ebp - 0x2e4]
inc edi
push 0x18
pop eax
add esi, eax
mov eax, dword [ebp - 0x2e0]
sub eax, ecx
cdq
idiv dword [ebp - 0x2e8]
cmp edi, eax
jb 0x409423
lea ecx, [ebp - 0x2e4]
call fcn.0040a442
mov esi, 0x470548
push esi
call fcn.00408d92
test al, al
jne 0x409497
push ebx
push ebx
push esi
call fcn.0040a9cf
add esp, 0xc
mov dword [0x470640], ebx
mov esi, ebx
mov dword [0x47063c], ebx
mov dword [0x470638], ebx
call fcn.00405be2
test eax, eax
je 0x40952f
mov edi, ebx
mov eax, dword [0x4705f4]
lea ecx, [ebp - 0x2d8]
add eax, edi
mov dword [ebp - 0x2d8], ebx
push ecx
push eax
call fcn.0042abec
test eax, eax
js 0x40951f
cmp dword [0x470638], 0
jne 0x4094ed
push dword [ebp - 0x2d8]
call fcn.0040a619
mov dword [0x470638], eax
cmp dword [0x47063c], 0
jne 0x409506
push dword [ebp - 0x2d8]
call fcn.00405d0a
mov dword [0x47063c], eax
cmp dword [0x470640], 0
jne 0x40951f
push dword [ebp - 0x2d8]
call fcn.00405cdd
mov dword [0x470640], eax
inc esi
add edi, 0xac
call fcn.00405be2
cmp esi, eax
jb 0x4094b6
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0044c025
mov esp, ebp
pop ebp
ret 4