Function at 0x4f0090a2
Capabilities:
Get keyboard layout

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
mov eax, ecx
mov dword [ebp - 4], edx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x14], eax
inc ecx
xor edi, edi
push ecx
push eax
mov dword [ebp - 0x18], edi
mov ebx, edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x24], ecx
call dword [sym.imp.win32u.dll_NtUserQueryInputContext]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp esi, eax
jne 0x4f00950d
push esi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
call sym.IMM32.dll_ImmLockImeDpi
mov dword [ebp - 0x28], eax
test eax, eax
je 0x4f00950d
mov esi, dword [ebp + 0xc]
mov edx, edi
mov eax, dword [eax + 0x10]
mov ecx, dword [ebp + 0x10]
and eax, 0x80000
mov dword [ebp - 0x20], edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x3c], esi
mov esi, dword [ebp + 0x14]
mov dword [ebp - 8], edx
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x40], esi
cmp dword [ebp + 0x18], edx
je 0x4f0091b4
test eax, eax
je 0x4f0091bc
mov esi, dword [ebp - 4]
mov dword [ebp - 0x2c], 1
cmp esi, 9
je 0x4f009278
cmp esi, 0x12
je 0x4f00921b
cmp esi, 0x24
je 0x4f0091c7
cmp esi, 0x10000
je 0x4f009169
cmp esi, 0x20000
jne 0x4f0093c7
test edi, edi
je 0x4f009193
mov edx, dword [ebp + 0xc]
lea eax, [ebp - 0xc]
push ecx
push dword [ebp + 0x18]
mov ecx, edi
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.4f00a7f5
mov dword [ebp - 0x20], eax
test eax, eax
je 0x4f0093c7
mov ecx, dword [ebp + 0x10]
mov edx, ebx
test ecx, ecx
je 0x4f0092c7
mov edx, dword [ebp + 0x14]
lea eax, [ebp - 0x10]
push ecx
push dword [ebp + 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.4f00a7f5
jmp 0x4f0092ba
test eax, eax
je 0x4f009134
and dword [ebp - 0x2c], edx
mov esi, dword [ebp - 4]
jmp 0x4f0092eb
test edi, edi
je 0x4f0091f6
push ecx
push dword [ebp + 0x18]
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x18]
mov edx, edi
push eax
push 8
push dword [ebp + 0xc]
call fcn.4f00a6ca
mov dword [ebp - 0x20], eax
test eax, eax
je 0x4f0093c7
mov ecx, dword [ebp + 0x10]
mov edx, ebx
test ecx, ecx
je 0x4f0092ca
push ecx
push dword [ebp + 0x18]
lea eax, [ebp - 0x10]
mov edx, ecx
mov ecx, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
push eax
push 1
push dword [ebp + 0x14]
call fcn.4f00a6ca
jmp 0x4f009269
test edi, edi
je 0x4f00924a
push ecx
push dword [ebp + 0x18]
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x18]
mov edx, edi
push eax
push 8
push dword [ebp + 0xc]
call fcn.4f00a532
mov dword [ebp - 0x20], eax
test eax, eax
je 0x4f0093c7
mov ecx, dword [ebp + 0x10]
mov edx, ebx
test ecx, ecx
je 0x4f0092ca
push ecx
push dword [ebp + 0x18]
lea eax, [ebp - 0x10]
mov edx, ecx
mov ecx, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
push eax
push 1
push dword [ebp + 0x14]
call fcn.4f00a532
mov edx, eax
mov dword [ebp - 8], edx
test edx, edx
je 0x4f0093c7
jmp 0x4f0092ca
test edi, edi
je 0x4f0092a2
mov edx, dword [ebp + 0xc]
lea eax, [ebp - 0xc]
push ecx
push dword [ebp + 0x18]
mov ecx, edi
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.4f00a89a
mov dword [ebp - 0x20], eax
test eax, eax
je 0x4f0093c7
mov ecx, dword [ebp + 0x10]
mov edx, ebx
test ecx, ecx
je 0x4f0092c7
mov edx, dword [ebp + 0x14]
lea eax, [ebp - 0x10]
push ecx
push dword [ebp + 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.4f00a89a
mov edx, eax
mov dword [ebp - 8], edx
test edx, edx
je 0x4f0093c7
and dword [ebp - 0x24], ebx
cmp dword [ebp - 0x20], ebx
je 0x4f0092db
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0xc]
mov dword [ebp + 8], edi
mov dword [ebp + 0xc], eax
test edx, edx
je 0x4f0092eb
mov eax, dword [ebp - 0x1c]
mov dword [ebp + 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp + 0x14], eax
push dword [ebp - 0x24]
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x24]
push eax
lea edx, [ebp - 0x38]
call fcn.4f00807e
test eax, eax
jle 0x4f0093bd
cmp esi, 9
je 0x4f009461
cmp esi, 0x12
je 0x4f009410
cmp esi, 0x24
je 0x4f00933a
cmp esi, 0x10000
je 0x4f00932c
cmp esi, 0x20000
jne 0x4f00937a
mov ebx, dword [ebp - 0x28]
mov ebx, dword [ebx + 0x20]
shr ebx, 2
and ebx, 1
jmp 0x4f00937a
mov esi, dword [ebp - 0x24]
test edi, edi
je 0x4f009358
push dword [esi + 0x24]
mov eax, dword [esi + 0x28]
mov ecx, edi
mov edx, dword [ebp + 0xc]
add eax, esi
push eax
call fcn.4f008004
test eax, eax
je 0x4f009377
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4f009374
push dword [esi + 0xc]
mov eax, dword [esi + 0x10]
mov edx, dword [ebp + 0x14]
add eax, esi
push eax
call fcn.4f008004
test eax, eax
je 0x4f009377
xor ebx, ebx
inc ebx
mov esi, dword [ebp - 4]
mov eax, dword [ebp - 0x38]
mov eax, dword [eax + 0x118]
test eax, eax
je 0x4f00938e
push eax
call dword [sym.imp.KERNEL32.dll_LocalUnlock]
push dword [ebp - 0x14]
call sym.IMM32.dll_ImmUnlockIMC
test ebx, ebx
je 0x4f0093bd
push dword [ebp + 0x14]
mov eax, dword [ebp - 0x28]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
push esi
mov esi, dword [eax + 0x8c]
mov ecx, esi
push dword [ebp - 0x14]
call dword [0x4f01b2cc]
call esi
mov ebx, eax
cmp dword [ebp - 0x2c], 0
je 0x4f0094d5
xor edi, edi
xor esi, esi
cmp dword [ebp - 4], 0x20000
jne 0x4f0094d5
cmp dword [ebp - 0x30], esi
je 0x4f00947a
mov edx, dword [ebp + 0xc]
xor eax, eax
cmp dword [ebp + 0x18], eax
push ecx
mov ecx, dword [ebp + 8]
sete al
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.4f00a7f5
mov edi, eax
test edi, edi
je 0x4f00947a
mov eax, dword [ebp - 0x3c]
cmp eax, dword [ebp - 0xc]
jae 0x4f009469
xor ebx, ebx
jmp 0x4f00947a
mov esi, dword [ebp - 0x24]
test edi, edi
je 0x4f009439
mov eax, dword [esi + 0x28]
mov edx, dword [ebp + 0xc]
add eax, esi
push ecx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x20]
mov ecx, edi
add eax, esi
push eax
call fcn.4f007fb9
test eax, eax
je 0x4f009377
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4f009374
mov eax, dword [esi + 0x10]
mov edx, dword [ebp + 0x14]
add eax, esi
push ecx
push eax
push dword [esi + 4]
mov eax, dword [esi + 8]
add eax, esi
push eax
call fcn.4f007fb9
jmp 0x4f009370
xor ebx, ebx
inc ebx
jmp 0x4f00937a
push dword [ebp - 0xc]
push dword [ebp - 0x18]
push dword [ebp - 0x30]
call sub.ntdll.dll_memcpy
add esp, 0xc
cmp dword [ebp - 0x34], esi
je 0x4f0094bf
mov edx, dword [ebp + 0x14]
xor eax, eax
cmp dword [ebp + 0x18], eax
push ecx
mov ecx, dword [ebp + 0x10]
sete al
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.4f00a7f5
mov esi, eax
test esi, esi
je 0x4f0094bf
mov eax, dword [ebp - 0x40]
cmp eax, dword [ebp - 0x10]
jae 0x4f0094ae
xor ebx, ebx
jmp 0x4f0094bf
push dword [ebp - 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x34]
call sub.ntdll.dll_memcpy
add esp, 0xc
test edi, edi
je 0x4f0094ca
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
test esi, esi
je 0x4f0094d5
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4f0094eb
push eax
push 0
push dword [0x4f01a9dc]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 8]
test eax, eax
je 0x4f009501
push eax
push 0
push dword [0x4f01a9dc]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 0x28]
call sym.IMM32.dll_ImmUnlockImeDpi
mov eax, ebx
jmp 0x4f00950f
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x14