Function at 0x47efda
Capabilities:
Get keyboard layout

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x689702
push eax
mov eax, dword [esp + 0x18]
mov dword fs:[0], esp
sub esp, 0x12c
test ah, 8
push ebx
push ebp
push esi
push edi
mov ebp, ecx
je 0x47f0da
mov ebx, dword [esp + 0x14c]
push ebx
mov dword [esp + 0x18], ebx
call sub.IMM32.dll_ImmGetContext
mov dword [esp + 0x18], eax
test eax, eax
mov dword [esp + 0x144], 0
jne 0x47f040
mov dword [esp + 0x144], 0xffffffff
lea ecx, [esp + 0x14]
jmp 0x47f181
push 0
push 0
push 0x800
lea ecx, [esp + 0x20]
call fcn.0047eb4a
mov edi, eax
test edi, edi
jge 0x47f06c
mov dword [esp + 0x144], 0xffffffff
lea ecx, [esp + 0x14]
jmp 0x47f181
lea eax, [esp + 0x13]
lea ecx, [esp + 0x2c]
push eax
push 0x58
push edi
call fcn.0048061a
mov ecx, dword [0x7d9770]
lea esi, [ebp + 0x18]
push ecx
push 0
push eax
mov ecx, esi
mov byte [esp + 0x150], 1
call fcn.00480dc6
push 1
lea ecx, [esp + 0x30]
mov byte [esp + 0x148], 0
call fcn.00481356
mov ecx, esi
call fcn.004810c6
mov edx, dword [esi + 4]
push edi
push edx
push 0x800
lea ecx, [esp + 0x20]
call fcn.0047eb4a
mov dword [esp + 0x144], 0xffffffff
lea ecx, [esp + 0x14]
jmp 0x47f181
test al, 8
je 0x47f310
mov ebx, dword [esp + 0x14c]
lea ecx, [esp + 0x14]
push ebx
call fcn.0047f397
mov eax, dword [esp + 0x18]
mov dword [esp + 0x144], 2
test eax, eax
je 0x47f172
push 0
push 0
push 8
lea ecx, [esp + 0x20]
call fcn.0047eb4a
mov edi, eax
test edi, edi
jl 0x47f172
lea eax, [esp + 0x13]
lea ecx, [esp + 0x2c]
push eax
push 0x58
push edi
call fcn.0048061a
mov ecx, dword [0x7d9770]
lea esi, [ebp + 8]
push ecx
push 0
push eax
mov ecx, esi
mov byte [esp + 0x150], 3
call fcn.00480dc6
push 1
lea ecx, [esp + 0x30]
mov byte [esp + 0x148], 2
call fcn.00481356
mov ecx, esi
call fcn.004810c6
mov edx, dword [esi + 4]
push edi
push edx
push 8
lea ecx, [esp + 0x20]
call fcn.0047eb4a
mov dword [esp + 0x144], 0xffffffff
lea ecx, [esp + 0x14]
call fcn.0047efc9
push ebx
mov dword [esp + 0x28], ebx
call sub.IMM32.dll_ImmGetContext
mov dword [esp + 0x28], eax
test eax, eax
mov dword [esp + 0x144], 4
je 0x47f32f
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
lea ecx, [esp + 0x3c]
push 0x100
push ecx
push eax
call sub.IMM32.dll_ImmGetDescriptionA
push 0x10
lea edx, [esp + 0x40]
push 0x7a3518
push edx
xor bl, bl
call fcn.00675536
add esp, 0xc
test eax, eax
jne 0x47f1db
mov bl, 1
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x54]
cmp eax, ecx
jbe 0x47f2fb
mov cl, byte [ebp + 8]
lea esi, [ebp + 8]
mov byte [esp + 0x14], cl
push 0
lea ecx, [esp + 0x18]
call fcn.00481356
mov edx, dword [0x7d9770]
lea ecx, [esp + 0x14]
push edx
push 0
push esi
call fcn.00480dc6
mov edi, dword [ebp + 0x54]
mov eax, dword [esp + 0x1c]
mov esi, dword [0x7d9770]
cmp eax, edi
mov byte [esp + 0x144], 5
jae 0x47f22f
call fcn.00673ff7
lea ecx, [esp + 0x14]
call fcn.00481276
mov eax, dword [esp + 0x1c]
mov ecx, eax
sub ecx, edi
cmp ecx, esi
jae 0x47f246
mov esi, ecx
test esi, esi
jbe 0x47f28a
sub eax, esi
lea ecx, [edi + esi]
sub eax, edi
push eax
mov eax, dword [esp + 0x1c]
lea edx, [eax + ecx*2]
lea eax, [eax + edi*2]
push edx
push eax
call fcn.0047f34a
mov edi, dword [esp + 0x28]
add esp, 0xc
sub edi, esi
lea ecx, [esp + 0x14]
push 0
push edi
call fcn.00481146
test al, al
je 0x47f286
push edi
lea ecx, [esp + 0x18]
call fcn.004810a6
mov eax, dword [esp + 0x1c]
test bl, bl
jne 0x47f2b7
mov ecx, dword [esp + 0x28]
push 0
push 4
push 0x15
push ecx
call sub.IMM32.dll_ImmNotifyIME
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x47f2ab
mov eax, 0x7d9784
mov edx, dword [esp + 0x1c]
push 0
push 0
push edx
push eax
jmp 0x47f2ca
mov ecx, dword [esp + 0x18]
test ecx, ecx
jne 0x47f2c4
mov ecx, 0x7d9784
push 0
push 0
push eax
push ecx
push 9
lea ecx, [esp + 0x38]
call fcn.0047eba5
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x47f2fb
mov al, byte [ecx - 1]
test al, al
je 0x47f2ef
cmp al, 0xff
je 0x47f2ef
dec al
mov byte [ecx - 1], al
jmp 0x47f2fb
add ecx, 0xfffffffe
push ecx
call fcn.00673d19
add esp, 4
mov eax, dword [esp + 0x28]
test eax, eax
je 0x47f32f
push eax
mov eax, dword [esp + 0x28]
push eax
call sub.IMM32.dll_ImmReleaseContext
jmp 0x47f32f
test eax, eax
jne 0x47f32f
push 0x6b1f34
call fcn.006754eb
add esp, 4
lea ecx, [ebp + 8]
push eax
push 0x6b1f34
call fcn.0048232f
mov ecx, dword [esp + 0x13c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x138
ret 0xc