Function at 0x40dd50
Capabilities:
Log keystrokes via input method manager

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59ff48
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x78
mov eax, dword [0x5f300c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi + 0x2a4]
push eax
mov dword [ebp - 0x60], eax
call dword [sym.imp.IMM32.dll_ImmGetContext]
mov dword [ebp - 0x5c], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x40e1be
mov esi, dword [edi + 0x298]
cmp byte [esi + 0x54], 0
jne 0x40e1a5
mov ecx, edi
call fcn.0043b820
test al, al
jne 0x40e1a2
mov eax, dword [esi + 0x7c]
shr eax, 0x1f
xor al, 1
mov dword [ebp - 0x4c], eax
je 0x40dde5
mov ecx, esi
call fcn.00420fd0
mov eax, dword [ebx + 0xc]
mov byte [edi + 0x4b6], 0
test eax, 0x800
je 0x40de30
push 0x800
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x60]
call fcn.0040bed0
mov byte [ebp - 4], 1
cmp dword [eax + 0x14], 8
mov ecx, dword [eax + 0x10]
jb 0x40de16
mov eax, dword [eax]
push ecx
push eax
push 2
mov ecx, edi
call fcn.0040dbf0
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0
call fcn.0040ab30
mov eax, dword [ebx + 0xc]
test al, 8
je 0x40e18d
push 8
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x60]
call fcn.0040bed0
mov byte [ebp - 4], 2
cmp dword [ebp - 0x34], 0
jne 0x40de64
mov ecx, edi
call fcn.0043d460
lea ecx, [ebp - 0x44]
call fcn.0040ab30
jmp 0x40e1b2
cmp byte [ebp - 0x4c], 0
jne 0x40de71
mov ecx, edi
call fcn.0043f6e0
mov ecx, edi
call fcn.0040d2b0
mov ecx, dword [edi + 0x298]
sub esp, 0xc
mov esi, esp
mov dword [ebp - 0x54], esi
mov eax, dword [ecx + 0x70]
push 0
push 0
push 0x10
push dword [ebp - 0x5c]
mov dword [ecx + 0x7c], eax
call dword [sym.imp.IMM32.dll_ImmGetCompositionStringW]
push ecx
lea ecx, [ebp - 0x45]
mov byte [ebp - 0x45], 0
push ecx
push eax
mov ecx, esi
call fcn.00414540
mov ecx, dword [esi]
mov eax, dword [esi + 4]
sub eax, ecx
push eax
push ecx
push 0x10
push dword [ebp - 0x5c]
call dword [sym.imp.IMM32.dll_ImmGetCompositionStringW]
lea ecx, [ebp - 0x74]
call fcn.0040dae0
add esp, 0xc
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.0040e3f0
cmp dword [ebp - 0x30], 8
mov dword [ebp - 0x78], eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x4c], eax
jb 0x40deeb
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x4c], eax
mov edx, dword [ebp - 0x34]
xor esi, esi
mov dword [ebp - 0x58], edx
mov dword [ebp - 0x50], esi
test edx, edx
je 0x40e051
lea ecx, [eax + esi*2]
mov edx, 0x3ff
movzx eax, word [ecx]
add eax, 0x2800
cmp dx, ax
mov eax, dword [ebp - 0x58]
sbb edx, edx
add edx, 2
mov dword [ebp - 0x54], edx
cmp eax, esi
jb 0x40e1e0
sub eax, esi
cmp eax, edx
jb 0x40df2c
mov eax, edx
mov edx, dword [ebp - 0x78]
push eax
push ecx
lea ecx, [ebp - 0x2c]
call fcn.0040cc00
add esp, 8
mov byte [ebp - 4], 4
cmp dword [ebp - 0x18], 0x10
mov eax, dword [edi]
mov edx, dword [eax + 0x50]
lea eax, [ebp - 0x2c]
jb 0x40df51
mov eax, dword [ebp - 0x2c]
push 1
push dword [ebp - 0x1c]
mov ecx, edi
push eax
call edx
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x74]
mov edx, dword [eax + esi*4]
lea eax, [edx - 8]
cmp eax, 0x1b
ja 0x40e001
mov ecx, dword [edi + 0x298]
add ecx, 4
push edx
push ecx
mov eax, dword [ecx]
call dword [eax + 0x38]
mov eax, dword [edi + 0x23c]
mov ecx, dword [edi + 0x238]
sub eax, ecx
sar eax, 4
mov dword [ebp - 0x64], 0
test eax, eax
je 0x40e001
xor edx, edx
mov dword [ebp - 0x68], edx
add ecx, edx
mov eax, dword [ecx + 8]
lea esi, [ecx + 8]
cmp eax, dword [ecx]
jne 0x40dfb6
mov eax, dword [ecx + 0xc]
cmp eax, dword [ecx + 4]
setl al
test al, al
jne 0x40dfbf
mov esi, ecx
mov ecx, dword [edi + 0x298]
mov edx, dword [esi]
add ecx, 4
mov esi, dword [ebp - 0x7c]
sub edx, esi
push esi
push 1
mov eax, dword [ecx]
push edx
push ecx
call dword [eax + 0x3c]
mov eax, dword [edi + 0x23c]
mov esi, dword [ebp - 0x64]
mov ecx, dword [edi + 0x238]
inc esi
mov edx, dword [ebp - 0x68]
sub eax, ecx
add edx, 0x10
sar eax, 4
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x68], edx
cmp esi, eax
jb 0x40dfa4
mov esi, dword [ebp - 0x50]
add esi, dword [ebp - 0x54]
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x50], esi
cmp edx, 0x10
jb 0x40e03b
mov ecx, dword [ebp - 0x2c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40e031
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40e048
push edx
push ecx
call fcn.0059e222
add esp, 8
cmp esi, dword [ebp - 0x58]
jae 0x40e04e
mov eax, dword [ebp - 0x4c]
jmp 0x40defe
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x74]
mov ecx, dword [ebp - 0x70]
cmp eax, ecx
je 0x40e169
nop
cmp dword [eax], 0x21
jne 0x40e071
add eax, 4
cmp eax, ecx
jne 0x40e060
jmp 0x40e169
mov eax, dword [ebx + 0xc]
neg edx
and eax, 0x4080
mov dword [ebp - 0x58], edx
cmp eax, 0x80
jne 0x40e098
push 0
push 0
push eax
push dword [ebp - 0x5c]
call dword [sym.imp.IMM32.dll_ImmGetCompositionStringW]
mov edx, dword [ebp - 0x58]
add edx, eax
test edx, edx
je 0x40e169
mov ecx, dword [edi + 0x260]
mov eax, dword [edi + 0x238]
add ecx, ecx
push edx
mov esi, dword [eax + ecx*8]
mov ecx, dword [edi + 0x298]
push esi
call fcn.004230c0
mov ecx, dword [edi + 0x23c]
sub eax, esi
mov esi, dword [edi + 0x238]
sub ecx, esi
sar ecx, 4
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x4c], 0
test ecx, ecx
je 0x40e144
xor edx, edx
mov dword [ebp - 0x50], edx
add edx, esi
mov eax, dword [edx + 8]
lea esi, [edx + 8]
cmp eax, dword [edx]
jne 0x40e0f6
mov eax, dword [edx + 0xc]
cmp eax, dword [edx + 4]
setl al
test al, al
jne 0x40e0ff
mov esi, edx
mov ecx, dword [esi]
add ecx, dword [ebp - 0x54]
mov dword [edx], ecx
mov dword [edx + 4], 0
mov edx, dword [ebp - 0x50]
mov eax, dword [edi + 0x238]
mov dword [eax + edx + 8], ecx
mov ecx, dword [ebp - 0x4c]
mov dword [eax + edx + 0xc], 0
inc ecx
mov eax, dword [edi + 0x23c]
add edx, 0x10
mov esi, dword [edi + 0x238]
sub eax, esi
sar eax, 4
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x50], edx
cmp ecx, eax
jb 0x40e0e4
mov eax, dword [ebp - 0x74]
mov ecx, dword [ebp - 0x70]
cmp eax, ecx
je 0x40e169
mov edi, edi
cmp dword [eax], 0x21
je 0x40e15e
add eax, 4
cmp eax, ecx
jne 0x40e150
jmp 0x40e169
cmp eax, ecx
je 0x40e169
mov ecx, edi
call fcn.0040d2b0
call fcn.0040d240
test al, al
je 0x40e179
mov byte [edi + 0x4b6], 1
lea ecx, [ebp - 0x74]
call fcn.004147a0
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 0
call fcn.0040ab30
push ecx
push 1
push 1
mov ecx, edi
call fcn.0043d3b0
mov ecx, edi
call fcn.0043d460
jmp 0x40e1b2
mov eax, dword [ebp - 0x5c]
push 0
push 4
push 0x15
push eax
call dword [sym.imp.IMM32.dll_ImmNotifyIME]
push dword [ebp - 0x5c]
push dword [ebp - 0x60]
call dword [sym.imp.IMM32.dll_ImmReleaseContext]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0059df64
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 8
call fcn.0040b040
int3