Function at 0x5022f618
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 0x5022f803
cmp ebx, esi
je 0x5022f65a
mov eax, esi
mov edx, dword [sym.vcl120.bpl__Controls_TBaseDragControlObject_]
call sub.rtl120.bpl__System__IsClass_qqrp14System_TObjectp17System_TMetaClass
test al, al
je 0x5022f803
cmp ebx, dword [esi + 0x40]
jne 0x5022f803
lea edx, [ebp - 0x10]
mov eax, ebx
call sym.vcl120.bpl__Categorybuttons_TCategoryButtons_ShouldScrollDown_qqrrui
test al, al
je 0x5022f673
mov dl, 1
mov eax, ebx
call sym.vcl120.bpl__Categorybuttons_TCategoryButtons_AutoScroll_qqr20Stdctrls_TScrollCode
jmp 0x5022f68a
lea edx, [ebp - 0x10]
mov eax, ebx
call sym.vcl120.bpl__Categorybuttons_TCategoryButtons_ShouldScrollUp_qqrrui
test al, al
je 0x5022f68a
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 0x5022f6c6
push 0x11
call sub.user32.dll_GetKeyState
test ax, ax
jge 0x5022f6c6
cmp dword [ebx + 0x274], 0
setne byte [edi]
mov word [ebx + 0x7a], 0xffe9
jmp 0x5022f703
mov esi, dword [ebx + 0x274]
test esi, esi
je 0x5022f6f5
cmp esi, dword [ebp - 8]
je 0x5022f6f5
cmp dword [ebp - 8], 0
je 0x5022f6f5
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 0x5022f6f9
xor eax, eax
jmp 0x5022f6fb
mov al, 1
mov byte [edi], al
mov word [ebx + 0x7a], 0xfff4
cmp byte [edi], 0
jne 0x5022f7a2
cmp dword [ebx + 0x274], 0
je 0x5022f756
cmp dword [ebp - 0xc], 0
je 0x5022f756
cmp dword [ebp - 8], 0
je 0x5022f75a
mov eax, dword [ebx + 0x274]
call sym.vcl120.bpl__Categorybuttons_TButtonItem_GetCategory_qqrv
cmp eax, dword [ebp - 0xc]
jne 0x5022f75a
mov eax, dword [ebx + 0x274]
cmp eax, dword [ebp - 8]
je 0x5022f756
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 0x5022f75a
xor eax, eax
jmp 0x5022f75c
mov al, 1
mov byte [edi], al
cmp byte [edi], 0
jne 0x5022f7a2
cmp dword [ebx + 0x278], 0
je 0x5022f7a2
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 0x5022f7a2
cmp dword [ebp - 0xc], 0
jne 0x5022f7a2
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 0x5022f819
cmp byte [edi], 0
je 0x5022f7c5
cmp byte [ebp + 0xc], 1
je 0x5022f7c5
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov eax, ebx
call sym.vcl120.bpl__Categorybuttons_TCategoryButtons_SetInsertionButton_qqrp27Categorybuttons_TButtonItemp31Categorybuttons_TButtonCat
jmp 0x5022f819
mov eax, dword [ebx + 0x288]
cmp byte [eax + 0x72], 0
je 0x5022f7d6
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 0x5022f819
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 0x5022f819
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