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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push edi
call sub.IMM32.dll_ImmGetContext
mov esi, eax
xor ebx, ebx
cmp esi, ebx
mov dword [ebp - 0xc], esi
je 0x1004eff
push 0x288
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, ebx
mov dword [ebp - 0x14], eax
je 0x1004d5b
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x10], ecx
and dword [ebp - 0x10], 8
je 0x1004d42
push ebx
push ebx
push 8
push esi
call sub.IMM32.dll_ImmGetCompositionStringW
cmp eax, ebx
mov dword [ebp - 4], eax
jl 0x1004d5b
test byte [ebp + 0x10], 0x10
je 0x1004d69
push ebx
push ebx
push 0x10
push esi
call sub.IMM32.dll_ImmGetCompositionStringW
cmp eax, ebx
mov dword [ebp - 8], eax
jge 0x1004d6c
jmp 0x1004d69
mov eax, 0x800
test eax, ecx
je 0x1004d62
push ebx
push ebx
push eax
push esi
call sub.IMM32.dll_ImmGetCompositionStringW
cmp eax, ebx
mov dword [ebp - 4], eax
jge 0x1004d69
push esi
push edi
jmp 0x1004efa
cmp ecx, ebx
jne 0x1004d6c
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
mov esi, dword [ebp + 0xc]
lea edi, [eax + ecx + 0x2f]
mov eax, dword [esi + 0x240]
cmp eax, ebx
je 0x1004d94
cmp edi, dword [eax]
jbe 0x1004d94
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [esi + 0x240], ebx
cmp dword [esi + 0x240], ebx
jne 0x1004db5
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, ebx
mov dword [esi + 0x240], eax
je 0x1004ef4
mov dword [eax], edi
mov ebx, dword [esi + 0x240]
mov ecx, dword [ebx]
sub ecx, 4
mov edx, ecx
shr ecx, 2
lea edi, [ebx + 4]
mov dword [ebp - 0x18], edi
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp - 4]
add esi, 0x244
lea edi, [ebx + 0x1c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
xor edi, edi
cmp dword [ebp - 0x10], edi
lea ecx, [ebx + 0x2c]
lea edx, [ebx + eax + 0x2e]
je 0x1004e49
mov esi, eax
push esi
push ecx
push 8
push dword [ebp - 0xc]
call sub.IMM32.dll_ImmGetCompositionStringW
mov ecx, esi
shr ecx, 1
lea eax, [ebx + 0x2c]
mov word [eax + ecx*2], di
mov edi, dword [ebp - 8]
test edi, edi
je 0x1004e2c
push edi
lea eax, [ebx + esi + 0x2e]
push eax
push 0x10
push dword [ebp - 0xc]
call sub.IMM32.dll_ImmGetCompositionStringW
lea eax, [ebx + esi + 0x2e]
mov byte [eax + edi], 0
test esi, esi
mov dword [ebx + 0xc], esi
je 0x1004e3a
mov dword [ebx + 0x10], 0x2c
test edi, edi
mov dword [ebx + 4], edi
je 0x1004eba
add esi, 0x2e
mov dword [ebx + 8], esi
jmp 0x1004eba
mov eax, 0x800
test dword [ebp + 0x10], eax
je 0x1004e98
mov esi, dword [ebp - 4]
push esi
push ecx
push eax
push dword [ebp - 0xc]
call sub.IMM32.dll_ImmGetCompositionStringW
mov ecx, esi
shr ecx, 1
cmp esi, edi
lea eax, [ebx + 0x2c]
mov word [eax + ecx*2], di
mov dword [ebx + 0x14], esi
je 0x1004e7a
mov dword [ebx + 0x18], 0x2c
mov dword [ebp - 0x24], 0x4b425930
mov eax, dword [ebx]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push dword [eax + 4]
mov dword [ebp - 0x1c], ebx
jmp 0x1004ee6
cmp dword [ebp + 0x10], edi
jne 0x1004eeb
mov eax, dword [ebp - 4]
mov esi, eax
shr esi, 1
mov word [ecx + esi*2], di
mov ecx, dword [ebp - 8]
mov byte [edx + ecx], 0
mov dword [ebx + 0x14], eax
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x18]
mov dword [eax], ecx
mov eax, dword [ebp - 0x14]
mov esi, dword [ebp + 0xc]
push eax
push esi
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], 0x288
mov dword [ebp - 0x24], 0x4b425931
call fcn.01003493
test eax, eax
je 0x1004eeb
lea eax, [ebp - 0x24]
push eax
push dword [ebp + 8]
push dword [esi + 4]
call fcn.01001981
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0xc]
push dword [ebp + 8]
call sub.IMM32.dll_ImmReleaseContext
pop edi
pop esi
pop ebx
leave
ret 0xc