Function at 0x5022f634
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov esi, edx
mov ebx, eax
mov edi, dword [ebp + 8]
test byte [ebx + 0x2cc], 1
je 0x5022f81f
cmp ebx, esi
je 0x5022f676
mov eax, esi
mov edx, dword [sym.vcl120.bpl__Controls_TBaseDragControlObject_]
call sub.rtl120.bpl__System__IsClass_qqrp14System_TObjectp17System_TMetaClass
test al, al
je 0x5022f81f
cmp ebx, dword [esi + 0x40]
jne 0x5022f81f
lea edx, [ebp - 0x10]
mov eax, ebx
call sym.vcl120.bpl__Categorybuttons_TCategoryButtons_ShouldScrollDown_qqrrui
test al, al
je 0x5022f68f
mov dl, 1
mov eax, ebx
call sym.vcl120.bpl__Categorybuttons_TCategoryButtons_AutoScroll_qqr20Stdctrls_TScrollCode
jmp 0x5022f6a6
lea edx, [ebp - 0x10]
mov eax, ebx
call sym.vcl120.bpl__Categorybuttons_TCategoryButtons_ShouldScrollUp_qqrrui
test al, al
je 0x5022f6a6
xor edx, edx
mov eax, ebx
call sym.vcl120.bpl__Categorybuttons_TCategoryButtons_AutoScroll_qqr20Stdctrls_TScrollCode
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 4]
mov eax, ebx
call sym.vcl120.bpl__Categorybuttons_TCategoryButtons_GetTargetAt_qqriirp27Categorybuttons_TButtonItemrp31Categorybuttons_TButtonCatego
test byte [ebx + 0x2cc], 2
je 0x5022f6e2
push 0x11
call sub.user32.dll_GetKeyState
test ax, ax
jge 0x5022f6e2
cmp dword [ebx + 0x274], 0
setne byte [edi]
mov word [ebx + 0x7a], 0xffe9
jmp 0x5022f71f
mov esi, dword [ebx + 0x274]
test esi, esi
je 0x5022f711
cmp esi, dword [ebp - 8]
je 0x5022f711
cmp dword [ebp - 8], 0
je 0x5022f711
mov eax, dword [ebp - 8]
call sub.rtl120.bpl__Classes_TCollectionItem_GetIndex_qqrv
mov esi, eax
mov eax, dword [ebx + 0x274]
call sub.rtl120.bpl__Classes_TCollectionItem_GetIndex_qqrv
inc eax
cmp esi, eax
jne 0x5022f715
xor eax, eax
jmp 0x5022f717
mov al, 1
mov byte [edi], al
mov word [ebx + 0x7a], 0xfff4
cmp byte [edi], 0
jne 0x5022f7be
cmp dword [ebx + 0x274], 0
je 0x5022f772
cmp dword [ebp - 0xc], 0
je 0x5022f772
cmp dword [ebp - 8], 0
je 0x5022f776
mov eax, dword [ebx + 0x274]
call sym.vcl120.bpl__Categorybuttons_TButtonItem_GetCategory_qqrv
cmp eax, dword [ebp - 0xc]
jne 0x5022f776
mov eax, dword [ebx + 0x274]
cmp eax, dword [ebp - 8]
je 0x5022f772
mov eax, dword [ebp - 8]
call sub.rtl120.bpl__Classes_TCollectionItem_GetIndex_qqrv
mov esi, eax
mov eax, dword [ebx + 0x274]
call sub.rtl120.bpl__Classes_TCollectionItem_GetIndex_qqrv
inc eax
cmp esi, eax
jne 0x5022f776
xor eax, eax
jmp 0x5022f778
mov al, 1
mov byte [edi], al
cmp byte [edi], 0
jne 0x5022f7be
cmp dword [ebx + 0x278], 0
je 0x5022f7be
xor eax, eax
mov dword [ebp - 8], eax
mov esi, dword [ebx + 0x278]
cmp esi, dword [ebp - 0xc]
setne byte [edi]
cmp byte [edi], 0
je 0x5022f7be
cmp dword [ebp - 0xc], 0
jne 0x5022f7be
mov eax, esi
call sub.rtl120.bpl__Classes_TCollectionItem_GetIndex_qqrv
push eax
mov eax, dword [ebx + 0x2c8]
call sub.rtl120.bpl__Classes_TCollection_GetCount_qqrv
dec eax
pop edx
cmp edx, eax
setne byte [edi]
cmp dword [ebx + 0x274], 0
je 0x5022f835
cmp byte [edi], 0
je 0x5022f7e1
cmp byte [ebp + 0xc], 1
je 0x5022f7e1
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov eax, ebx
call sym.vcl120.bpl__Categorybuttons_TCategoryButtons_SetInsertionButton_qqrp27Categorybuttons_TButtonItemp31Categorybuttons_TButtonCat
jmp 0x5022f835
mov eax, dword [ebx + 0x288]
cmp byte [eax + 0x72], 0
je 0x5022f7f2
call sym.vcl120.bpl__Controls_TDragImageList_HideDragImage_qqrv
mov eax, ebx
call sym.vcl120.bpl__Categorybuttons_TCategoryButtons_RemoveInsertionPoints_qqrv
mov eax, dword [ebx + 0x288]
cmp byte [eax + 0x72], 0
je 0x5022f835
mov eax, ebx
call sym.vcl120.bpl__Controls_TWinControl_GetHandle_qqrv
push eax
call sub.user32.dll_UpdateWindow
mov eax, dword [ebx + 0x288]
call sym.vcl120.bpl__Controls_TDragImageList_ShowDragImage_qqrv
jmp 0x5022f835
mov eax, dword [ebp + 0x10]
push eax
movzx eax, byte [ebp + 0xc]
push eax
push edi
mov ecx, dword [ebp - 4]
mov edx, esi
mov eax, ebx
call sym.vcl120.bpl__Controls_TControl_DragOver_qqrp14System_TObjectii19Controls_TDragStatero
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc