Function at 0x76fc2b20
Capabilities:
Get keyboard layout

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov ecx, dword [0x76fdac28]
mov eax, ecx
or eax, dword [0x76fdac2c]
push ebx
push esi
push edi
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
je 0x76fc62c2
test byte [ecx], 4
je 0x76fc62c2
mov edi, dword [ebp + 0xc]
mov dword [ebp - 8], 0xc000000f
test edi, edi
je 0x76fc2e37
mov ecx, dword fs:[0x18]
mov eax, dword [ecx + 0xfdc]
test eax, eax
jns 0x76fc2b7b
add ecx, eax
mov eax, dword [0x76fdac28]
xor esi, esi
movzx edx, di
cmp esi, dword [eax + 0xc]
jb 0x76fc2b99
ja 0x76fc61fb
cmp edx, dword [eax + 8]
jae 0x76fc61fb
mov eax, dword [0x76fda9f0]
imul eax, edx
add eax, dword [0x76fda9e8]
cdq
mov esi, eax
mov dword [ebp - 0x14], edx
mov eax, edi
shr eax, 0x10
cmp ax, word [esi + 0x1a]
jne 0x76fc61e4
test byte [esi + 0x19], 1
jne 0x76fc61fb
cmp byte [esi + 0x18], 0x11
jne 0x76fc61fb
mov edx, dword [ecx + 0x820]
mov eax, edx
or eax, dword [ecx + 0x824]
je 0x76fc6208
mov eax, dword [esi + 0x10]
cmp eax, dword [edx]
jne 0x76fc6208
mov eax, dword [esi + 0x14]
cmp eax, dword [edx + 4]
jne 0x76fc6208
mov ebx, dword [ecx + 0x828]
add ebx, dword [esi]
mov ecx, dword [ecx + 0x82c]
adc ecx, dword [esi + 4]
mov eax, ebx
or eax, ecx
je 0x76fc61fb
movzx esi, word [ebx]
imul esi, dword [0x76fda9f0]
mov eax, dword fs:[0x18]
add esi, dword [0x76fda9e8]
mov ecx, dword [eax + 0xfdc]
test ecx, ecx
jns 0x76fc2c38
add eax, ecx
cmp dword [eax + 0x78], 0
je 0x76fc621a
mov eax, dword fs:[0x18]
mov ecx, dword [eax + 0xfdc]
test ecx, ecx
jns 0x76fc2c54
add eax, ecx
mov ecx, dword [eax + 0x78]
mov dword [ebp - 4], ecx
mov ecx, dword [eax + 0x7c]
mov eax, dword [esi + 8]
cdq
cmp eax, dword [ebp - 4]
jne 0x76fc6234
cmp edx, ecx
jne 0x76fc6234
mov esi, dword [ebx + 0x18]
mov dword [ebp - 4], esi
test esi, esi
je 0x76fc6254
test byte [esi + 8], 0x40
jne 0x76fc2e37
lock inc dword [esi + 4]
mov ebx, dword [ebp + 0x10]
test ebx, ebx
jne 0x76fc2dd7
test esi, esi
je 0x76fc2ca1
and dword [esi + 8], 0xfffffffd
mov esi, dword [ebp + 8]
push esi
push ebx
push edi
call dword [sym.imp.MSCTF.dll_CtfImeAssociateFocus]
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
cmp byte [0x76fda5a0], 0
mov esi, eax
mov dword [ebp - 0x14], esi
je 0x76fc2d8a
push 0x76fda5c0
call dword [sym.imp.ntdll.dll_RtlEnterCriticalSection]
mov ecx, esi
shr ecx, 0x10
and ecx, 0xf000
cmp ecx, 0xe000
je 0x76fc62c9
mov edx, 1
mov esi, dword [0x76fdac30]
test esi, esi
je 0x76fc2d31
mov eax, dword [ebp - 0x14]
jmp 0x76fc2d00
cmp dword [esi + 8], eax
jne 0x76fc62e4
test byte [esi + 0x50], 4
je 0x76fc62dd
mov ecx, 1
cmp edx, ecx
jne 0x76fc62e4
test esi, esi
je 0x76fc2d31
test byte [esi + 0x50], 1
jne 0x76fc62f3
inc dword [esi + 0x4c]
push 0x76fda5c0
call dword [sym.imp.ntdll.dll_RtlLeaveCriticalSection]
test esi, esi
je 0x76fc2d8a
push ebx
push edi
mov edi, dword [esi + 0x80]
mov ecx, edi
call dword [0x76fdb2cc]
call edi
cmp byte [0x76fda5a0], 0
je 0x76fc2d8a
push 0x76fda5c0
call dword [sym.imp.ntdll.dll_RtlEnterCriticalSection]
add dword [esi + 0x4c], 0xffffffff
jne 0x76fc2d7f
mov eax, dword [esi + 0x50]
test al, 1
jne 0x76fc6304
test al, 2
jne 0x76fc62fa
push 0x76fda5c0
call dword [sym.imp.ntdll.dll_RtlLeaveCriticalSection]
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x76fc634d
test ebx, ebx
jne 0x76fc2e25
push dword [ebp - 8]
push ebx
push 0x281
push edi
call dword [sym.imp.USER32.dll_SendMessageW]
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x76fc2dc9
or eax, 0xffffffff
lock xadd dword [ebx + 4], eax
je 0x76fc6372
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
test edi, edi
je 0x76fc2e41
test esi, esi
je 0x76fc62c2
mov edx, 1
mov ecx, edi
call fcn.76fc2e80
mov ecx, eax
test ecx, ecx
je 0x76fc62bc
mov eax, dword [ebp - 4]
mov esi, dword [ebp + 8]
mov dword [ecx], esi
or dword [eax + 8], 2
test byte [ecx + 0x14c], 2
jne 0x76fc2e76
mov eax, dword [ecx + 4]
mov dword [ebp - 0x10], eax
mov eax, dword [ecx + 0x18]
push edi
mov dword [ebp - 0xc], eax
call sym.IMM32.dll_ImmUnlockIMC
jmp 0x76fc2ca4
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push edi
call dword [sym.imp.win32u.dll_NtUserNotifyIMEStatus]
jmp 0x76fc2da4
xor esi, esi
mov dword [ebp - 4], esi
jmp 0x76fc2c8e
mov esi, dword [ebp + 8]
mov edx, 1
mov ecx, esi
call fcn.76fc26f0
mov edx, 1
mov dword [ebp - 0x14], eax
mov ecx, eax
call fcn.76fc2e80
test eax, eax
je 0x76fc2ca4
push dword [ebp - 0x14]
mov dword [eax], esi
call sym.IMM32.dll_ImmUnlockIMC
jmp 0x76fc2ca4
mov dword [ebp - 8], 0x4000000f
jmp 0x76fc2e0e
test ax, ax
je 0x76fc2bbc
mov edx, 0xffff
cmp ax, dx
je 0x76fc2bbc
push 6
call dword [sym.imp.ntdll.dll_RtlSetLastWin32Error]
jmp 0x76fc2e37
push 0x38
push edi
call dword [sym.imp.win32u.dll_NtUserCallOneParam]
mov ebx, eax
xor ecx, ecx
jmp 0x76fc2c0c
push 0xe
call dword [sym.imp.win32u.dll_NtUserGetThreadState]
test eax, eax
jne 0x76fc2c42
mov dword [ebp - 4], eax
xor ecx, ecx
jmp 0x76fc2c5d
mov eax, dword [ebx]
mov esi, dword fs:[0x18]
push 0
push eax
call dword [sym.imp.win32u.dll_NtUserQueryInputContext]
cmp eax, dword [esi + 0x20]
jne 0x76fc2e37
jmp 0x76fc2c72
mov edx, 0x34
lea ecx, [edx - 0x2c]
call fcn.76fc2470
mov esi, eax
mov dword [ebp - 4], eax
test esi, esi
je 0x76fc2e37
lea ebx, [esi + 0x10]
push ebx
call dword [sym.imp.ntdll.dll_RtlInitializeCriticalSection]
lock inc dword [esi + 4]
push 0xb
call dword [sym.imp.win32u.dll_NtUserGetThreadState]
push esi
push 0
push edi
mov dword [esi + 0xc], eax
call dword [sym.imp.win32u.dll_NtUserUpdateInputContext]
test eax, eax
jne 0x76fc62b0
push ebx
call dword [sym.imp.ntdll.dll_RtlDeleteCriticalSection]
push esi
push 0
push dword [0x76fda9dc]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x76fc2e37
or dword [esi + 8], 0x100
jmp 0x76fc2c8a
push esi
call sym.IMM32.dll_ImmUnlockClientImc
xor eax, eax
jmp 0x76fc2dce
call fcn.76fc4180
test eax, eax
jne 0x76fc2ce9
xor edx, edx
jmp 0x76fc2cee
xor ecx, ecx
jmp 0x76fc2d18
mov esi, dword [esi]
test esi, esi
jne 0x76fc2d00
jmp 0x76fc2d20
xor esi, esi
jmp 0x76fc2d31
test byte [esi + 0x10], 1
je 0x76fc2d7f
mov ecx, dword [0x76fdac30]
cmp ecx, esi
jne 0x76fc6317
mov eax, dword [esi]
mov dword [0x76fdac30], eax
jmp 0x76fc632d
test ecx, ecx
je 0x76fc632d
mov eax, dword [ecx]
cmp eax, esi
je 0x76fc6329
mov ecx, eax
test ecx, ecx
jne 0x76fc631b
jmp 0x76fc632d
mov eax, dword [esi]
mov dword [ecx], eax
mov edx, 1
mov ecx, esi
call fcn.76fcbfc0
push esi
push 0
push dword [0x76fda9dc]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x76fc2d7f
test ebx, ebx
jne 0x76fc2db4
push ebx
call sym.IMM32.dll_ImmGetDefaultIMEWnd
test eax, eax
je 0x76fc2db4
push dword [ebp - 8]
push ebx
push 0x281
push eax
jmp 0x76fc2dae
test byte [ebx + 8], 0x40
je 0x76fc2dc9
mov eax, dword [ebx]
test eax, eax
je 0x76fc6389
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea ecx, [ebx + 0x10]
push ecx
call dword [sym.imp.ntdll.dll_RtlDeleteCriticalSection]
push ebx
push 0
push dword [0x76fda9dc]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x76fc2dc9