Function at 0x10021150
Capabilities:
Hide graphical window
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x10c
mov eax, dword [0x10050050]
xor eax, esp
mov dword [esp + 0x108], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
push eax
mov ebx, ecx
mov ecx, dword [ebp + 8]
push ecx
push ebx
push 0x10048590
xor esi, esi
push str.Ime_SetContext
mov dword [esp + 0x20], esi
call fcn.10014390
add esp, 0x14
push esi
push ebx
call dword [sym.imp.USER32.dll_GetWindowLongW]
mov edi, eax
test edi, edi
je 0x1002137f
push edi
call dword [sym.imp.IMM32.dll_ImmLockIMC]
mov esi, eax
mov dword [esp + 0xc], esi
test esi, esi
je 0x1002137d
mov edx, dword [esi + 0x124]
push edx
call dword [sym.imp.IMM32.dll_ImmGetIMCCSize]
cmp eax, 0x3932c
jb 0x100211e6
cmp dword [esi + 0x124], 0
je 0x100211e6
cmp dword [esi + 0x11c], 0
je 0x100211e6
cmp dword [esi + 0x118], 0
jne 0x100211f3
call fcn.10015e40
test eax, eax
je 0x1002137d
mov eax, dword [esi + 0x124]
push eax
call dword [sym.imp.IMM32.dll_ImmLockIMCC]
mov esi, eax
test esi, esi
je 0x1002137f
mov eax, dword [esp + 0xc]
mov ecx, dword [esi + 0x39200]
mov edx, dword [eax]
push ecx
push edx
push eax
push edi
push str.hIME___x__pIMC___x__pIMC__hWnd___x__context__hwnd___x
push str.Ime_SetContext
call fcn.10014390
add esp, 0x18
push edi
call dword [sym.imp.IMM32.dll_ImmGetOpenStatus]
mov ebx, dword [ebp + 8]
push eax
push ebx
push str.selected:_d__status:_d
push str.Ime_SetContext
call fcn.10014390
add esp, 0x10
test ebx, ebx
jne 0x10021286
mov eax, dword [esp + 0xc]
mov dword [eax + 4], ebx
cmp dword [0x107578f0], ebx
jne 0x10021274
mov eax, dword [esi + 0x3921c]
test eax, eax
je 0x1002133c
cmp dword [eax + 0x50], ebx
je 0x1002133c
mov eax, dword [esi + 0x3921c]
mov ecx, esi
call fcn.1001f890
jmp 0x1002133c
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.USER32.dll_GetKeyboardState]
mov edx, dword [esp + 0xc]
mov dword [edx + 4], 1
mov eax, dword [esi + 0x3921c]
push eax
push esi
call fcn.10020f70
mov cl, byte [esp + 0x2c]
mov al, cl
add esp, 8
and al, 1
je 0x100212bf
cmp dword [esi + 0x39208], 0
je 0x100212cc
test al, al
jne 0x100212df
cmp dword [esi + 0x39208], 0
je 0x100212df
movzx ecx, cl
and ecx, 1
mov dword [esi + 0x39208], ecx
call fcn.10003280
jmp 0x10021314
cmp dword [0x107578f0], 0
jne 0x100212f8
mov eax, dword [esi + 0x3921c]
test eax, eax
je 0x10021314
cmp dword [eax + 0x50], 0
je 0x10021314
mov eax, dword [esi + 0x3921c]
mov ecx, esi
call fcn.10020430
mov eax, dword [esi + 0x3921c]
push esi
call fcn.1001f6e0
add esp, 4
mov edx, dword [esi + 0x3921c]
push edx
push esi
call fcn.10021030
add esp, 8
cmp dword [esi + 0x1118], 0
jne 0x1002133c
push 0x10e
xor ebx, ebx
call fcn.10017040
add esp, 4
mov esi, dword [esi + 0x3921c]
xor eax, eax
cmp esi, eax
je 0x1002134b
mov dword [esi + 0x50], eax
mov dword [0x107578f0], eax
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 0x124]
push ecx
call dword [sym.imp.IMM32.dll_ImmUnlockIMCC]
push edi
call dword [sym.imp.IMM32.dll_ImmUnlockIMC]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x108]
xor ecx, esp
call fcn.1002656f
mov esp, ebp
pop ebp
ret
xor esi, esi
mov edx, dword [esp + 0xc]
push esi
push edx
push edi
push 0x10048610
push str.Ime_SetContext
call fcn.10014390
add esp, 0x14
test esi, esi
je 0x100213ad
mov esi, dword [esi + 0x3921c]
test esi, esi
je 0x100213ad
mov dword [esi + 0x50], 1
cmp dword [ebp + 8], 0
mov dword [0x107578f0], 1
je 0x10021426
push ebx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x10021426
push 4
push ebx
call dword [sym.imp.USER32.dll_GetWindowLongW]
test eax, eax
je 0x10021426
mov esi, dword [eax]
test esi, esi
je 0x10021426
mov edi, dword [esi + 0x3921c]
push 0x100482d4
push str.HideMainWindow
call fcn.10014390
add esp, 8
test edi, edi
je 0x1002141b
mov eax, dword [edi + 8]
push eax
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x10021411
mov ecx, dword [edi + 8]
push 0
push ecx
call dword [sym.imp.USER32.dll_ShowWindow]
call fcn.1001e140
call fcn.100202d0
mov edi, dword [esi + 0x3921c]
call fcn.10020370
mov ecx, dword [esp + 0x114]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1002656f
mov esp, ebp
pop ebp
ret