Function at 0x76fc4440
Capabilities:
Get keyboard layout
Get system information on windows
Get thread local storage value
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x76fda01c]
xor eax, ebp
mov dword [ebp - 4], eax
sub edx, 0
je 0x76fc4506
sub edx, 1
je 0x76fc447e
sub edx, 2
je 0x76fc454d
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.76fc5210
mov esp, ebp
pop ebp
ret 4
test ecx, ecx
je 0x76fc4488
mov dword [0x76fda5a4], ecx
cmp byte [0x76fda5a0], 0
jne 0x76fc44ee
push 0x76fda5c0
call dword [sym.imp.ntdll.dll_RtlInitializeCriticalSection]
test eax, eax
js 0x76fc6efc
push 0
push 0x2c
lea eax, [ebp - 0x30]
push eax
push 0
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
test eax, eax
js 0x76fc6efc
push 4
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 0
push eax
push 0xb
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessMitigationPolicy]
test eax, eax
je 0x76fc44e7
mov eax, dword [ebp - 0x34]
and eax, 0xf
mov dword [0x76fdac20], eax
mov byte [0x76fda5a0], 1
push 0x19650412
call dword [sym.imp.USER32.dll_User32InitializeImmEntryTable]
test eax, eax
jne 0x76fc4469
jmp 0x76fc6efc
cmp byte [0x76fda5a0], 0
je 0x76fc4469
push 0x76fda5c0
call dword [sym.imp.ntdll.dll_RtlEnterCriticalSection]
cmp dword [0x76fda034], 0xffffffff
jne 0x76fc46c2
push 0x76fda5c0
call dword [sym.imp.ntdll.dll_RtlLeaveCriticalSection]
push 0x76fda5c0
call dword [sym.imp.ntdll.dll_RtlDeleteCriticalSection]
mov byte [0x76fda5a0], 0
jmp 0x76fc4469
mov eax, dword [0x76fda034]
push esi
cmp eax, 0xffffffff
je 0x76fc4569
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x76fc6d84
mov ecx, dword [0x76fdac28]
mov eax, ecx
or eax, dword [0x76fdac2c]
je 0x76fc46bc
test byte [ecx], 4
je 0x76fc46bc
mov ecx, dword fs:[0x18]
mov eax, dword [ecx + 0xfdc]
test eax, eax
jns 0x76fc4599
add ecx, eax
mov eax, dword [ecx + 0x78]
or eax, dword [ecx + 0x7c]
je 0x76fc46bc
push ebx
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push 4
mov dword [ebp - 0x38], eax
call dword [sym.imp.win32u.dll_NtUserGetThreadState]
mov edx, dword [0x76fdac28]
mov ebx, eax
mov ecx, edx
or ecx, dword [0x76fdac2c]
je 0x76fc46bb
test byte [edx], 4
je 0x76fc46bb
test ebx, ebx
je 0x76fc46bb
mov ecx, dword fs:[0x18]
mov eax, dword [ecx + 0xfdc]
test eax, eax
jns 0x76fc45f3
add ecx, eax
mov eax, dword [0x76fdac28]
xor esi, esi
push edi
movzx edx, bx
cmp esi, dword [eax + 0xc]
jb 0x76fc4612
ja 0x76fc6dc5
cmp edx, dword [eax + 8]
jae 0x76fc6dc5
mov eax, dword [0x76fda9f0]
imul eax, edx
add eax, dword [0x76fda9e8]
cdq
mov esi, eax
mov dword [ebp - 0x3c], edx
mov eax, ebx
shr eax, 0x10
cmp ax, word [esi + 0x1a]
jne 0x76fc6dae
test byte [esi + 0x19], 1
jne 0x76fc6dc5
cmp byte [esi + 0x18], 0x11
jne 0x76fc6dc5
mov edx, dword [ecx + 0x820]
mov eax, edx
or eax, dword [ecx + 0x824]
je 0x76fc6dd2
mov eax, dword [esi + 0x10]
cmp eax, dword [edx]
jne 0x76fc6dd2
mov eax, dword [esi + 0x14]
cmp eax, dword [edx + 4]
jne 0x76fc6dd2
mov edi, dword [ecx + 0x828]
add edi, dword [esi]
mov eax, dword [ecx + 0x82c]
adc eax, dword [esi + 4]
mov ecx, edi
or ecx, eax
je 0x76fc6dc5
mov eax, dword [edi]
mov ecx, dword [0x76fda9e8]
movzx eax, ax
imul eax, dword [0x76fda9f0]
mov esi, dword [eax + ecx + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp esi, eax
jne 0x76fc46ba
mov edi, dword [edi + 0x18]
test edi, edi
jne 0x76fc6de4
pop edi
pop ebx
pop esi
jmp 0x76fc4469
call fcn.76fc2675
push dword [0x76fda034]
call dword [sym.imp.KERNEL32.dll_TlsFree]
mov dword [0x76fda034], 0xffffffff
jmp 0x76fc452b
push 0
push dword [0x76fda034]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x76fc4569
push esi
push 0
push dword [0x76fda9dc]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x76fc4569
test ax, ax
je 0x76fc4635
mov edx, 0xffff
cmp ax, dx
je 0x76fc4635
push 6
call dword [sym.imp.ntdll.dll_RtlSetLastWin32Error]
jmp 0x76fc46ba
push 0x38
push ebx
call dword [sym.imp.win32u.dll_NtUserCallOneParam]
mov edi, eax
xor eax, eax
jmp 0x76fc4685
test byte [edi + 8], 0x40
jne 0x76fc46ba
lea eax, [edi + 4]
mov dword [ebp - 0x34], eax
lock inc dword [eax]
mov ecx, dword [edi]
test ecx, ecx
je 0x76fc6eea
push ecx
call dword [sym.imp.KERNEL32.dll_LocalLock]
mov esi, eax
mov dword [ebp - 0x3c], esi
test esi, esi
jne 0x76fc6e1c
mov eax, dword [ebp - 0x34]
lock dec dword [eax]
jmp 0x76fc46ba
mov ecx, ebx
call fcn.76fd7f23
mov eax, dword [ebp - 0x38]
cmp dword [edi + 0x2c], eax
jne 0x76fc6e83
push eax
call sym.IMM32.dll_ImmLockImeDpi
mov dword [ebp - 0x34], eax
test eax, eax
je 0x76fc6e7c
test byte [eax + 0x50], 4
jne 0x76fc6e53
mov esi, dword [eax + 0x7c]
mov ecx, esi
push 0
push ebx
call dword [0x76fdb2cc]
call esi
mov esi, dword [ebp - 0x3c]
jmp 0x76fc6e74
mov ecx, dword [0x76fdac28]
mov eax, ecx
or eax, dword [0x76fdac2c]
je 0x76fc6e74
test byte [ecx], 4
je 0x76fc6e74
push dword [ebp - 0x38]
push 0
push ebx
call dword [sym.imp.MSCTF.dll_CtfImeSelectEx]
push dword [ebp - 0x34]
call sym.IMM32.dll_ImmUnlockImeDpi
mov dword [edi + 0x2c], 0
mov eax, dword [esi + 0x124]
test eax, eax
je 0x76fc6e94
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esi + 0x12c]
test eax, eax
je 0x76fc6ea5
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esi + 0x120]
test eax, eax
je 0x76fc6eb6
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esi + 0x11c]
test eax, eax
je 0x76fc6ec7
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esi + 0x118]
test eax, eax
je 0x76fc6ed8
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, esi
call fcn.76fc73b0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_LocalUnlock]
lea eax, [edi + 4]
or dword [edi + 8], 0x40
lock dec dword [eax]
push edi
call sym.IMM32.dll_ImmUnlockClientImc
jmp 0x76fc46ba
xor eax, eax
jmp 0x76fc446e