Function at 0x4f017402
Capabilities:
Get keyboard layout

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x15c
mov eax, dword [0x4f01a01c]
xor eax, esp
mov dword [esp + 0x158], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov eax, ecx
mov ecx, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 0x10]
push eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x24], esi
mov dword [esp + 0x14], ecx
call sym.IMM32.dll_ImmLockClientImc
test eax, eax
jne 0x4f01744b
or ebx, 0xffffffff
jmp 0x4f017459
mov ebx, dword [eax + 8]
push eax
call sym.IMM32.dll_ImmUnlockClientImc
not ebx
and ebx, 1
and dword [esp + 0x1c], 0
push 0
push dword [esp + 0x18]
mov dword [esp + 0x2c], esi
mov esi, edi
mov dword [esp + 0x30], esi
call dword [sym.imp.win32u.dll_NtUserQueryInputContext]
mov dword [esp + 0x18], eax
test eax, eax
je 0x4f01769b
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [esp + 0x18], eax
je 0x4f0174b5
cmp dword [ebp + 0x18], 0
jne 0x4f01769b
push dword [esp + 0x10]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x10]
push edi
push ecx
push dword [ebp + 8]
mov ecx, dword [esp + 0x24]
call fcn.4f017062
jmp 0x4f01769d
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4f01769b
xor edx, edx
mov ecx, eax
inc edx
call fcn.4f002e80
test eax, eax
je 0x4f01769b
push 1
push dword [esp + 0x18]
call dword [sym.imp.win32u.dll_NtUserQueryInputContext]
test eax, eax
je 0x4f01768c
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
call sym.IMM32.dll_ImmLockImeDpi
mov dword [esp + 0x18], eax
test eax, eax
je 0x4f01768c
xor edx, edx
cmp dword [eax + 0x90], edx
je 0x4f017683
mov dword [esp + 0x2c], edx
cmp ebx, dword [ebp + 0x18]
je 0x4f0175b6
mov ecx, dword [esp + 0x20]
cmp dword [ebp + 0x18], edx
je 0x4f01755b
test ecx, ecx
je 0x4f017544
lea eax, [esp + 0xa0]
push ecx
push edx
mov edx, eax
mov dword [esp + 0x2c], eax
call fcn.4f016ec1
test eax, eax
je 0x4f017683
test edi, edi
je 0x4f0175b6
mov eax, dword [esp + 0x10]
xor edx, edx
push 0x70
pop ecx
div ecx
imul eax, eax, 0xc0
jmp 0x4f01758f
test ecx, ecx
je 0x4f017577
push dword [eax + 0x28]
lea edx, [esp + 0x34]
mov dword [esp + 0x28], edx
call fcn.4f016f2e
test eax, eax
je 0x4f017683
test edi, edi
je 0x4f0175b6
mov eax, dword [esp + 0x10]
xor edx, edx
mov ecx, 0xc0
div ecx
push 0x70
xor edx, edx
pop ecx
div ecx
mov dword [esp + 0x10], eax
test eax, eax
je 0x4f017683
mov edx, eax
xor ecx, ecx
call fcn.4f002470
mov dword [esp + 0x2c], eax
mov esi, eax
mov dword [esp + 0x28], esi
test eax, eax
je 0x4f017683
push dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
push esi
push dword [esp + 0x2c]
push dword [ebp + 8]
mov esi, dword [eax + 0x90]
mov ecx, esi
push dword [esp + 0x1c]
push dword [esp + 0x28]
call dword [0x4f01b2cc]
call esi
mov esi, eax
mov dword [esp + 0x1c], esi
test esi, esi
je 0x4f01766c
cmp ebx, dword [ebp + 0x18]
je 0x4f01766c
mov ebx, dword [esp + 0x28]
test ebx, ebx
je 0x4f01766c
and dword [esp + 0xc], 0
cmp dword [ebp + 0x18], 0
je 0x4f017631
test esi, esi
je 0x4f01766c
push 0
mov edx, edi
mov ecx, ebx
call fcn.4f016f2e
push 0x70
pop ecx
add ebx, 0xc0
add edi, ecx
test eax, eax
je 0x4f017667
mov eax, dword [esp + 0xc]
inc eax
mov dword [esp + 0xc], eax
cmp eax, esi
jb 0x4f017608
jmp 0x4f01766c
mov esi, dword [esp + 0x10]
test esi, esi
je 0x4f01766c
mov eax, dword [esp + 0x18]
mov edx, edi
push ecx
mov ecx, ebx
push dword [eax + 0x28]
call fcn.4f016ec1
push 0x70
pop ecx
add ebx, ecx
add ecx, 0x50
add edi, ecx
test eax, eax
je 0x4f017667
mov eax, dword [esp + 0xc]
inc eax
mov dword [esp + 0xc], eax
cmp eax, esi
jb 0x4f017639
jmp 0x4f01766c
and dword [esp + 0x1c], 0
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4f017683
push eax
push 0
push dword [0x4f01a9dc]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [esp + 0x18]
call sym.IMM32.dll_ImmUnlockImeDpi
push dword [esp + 0x14]
call sym.IMM32.dll_ImmUnlockIMC
mov eax, dword [esp + 0x1c]
jmp 0x4f01769d
xor eax, eax
mov ecx, dword [esp + 0x164]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.4f0051a0
mov esp, ebp
pop ebp
ret 0x14