Function at 0x50145388
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd0
push ebx
push esi
xor ecx, ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
lea esi, [ebp - 4]
xor eax, eax
push ebp
push 0x5014556a
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, dword [ebp - 8]
mov eax, dword [esi]
call sym.vcl120.bpl__Controls_TWinControl_KeyPress_qqrrb
mov eax, dword [esi]
cmp byte [eax + 0x268], 0
je 0x5014554f
call sub.kernel32.dll_GetTickCount
mov edx, dword [esi]
sub eax, dword [edx + 0x278]
mov edx, dword [esi]
cmp eax, dword [edx + 0x2d0]
jb 0x501453f0
mov eax, dword [esi]
add eax, 0x274
xor edx, edx
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
call sub.kernel32.dll_GetTickCount
mov edx, dword [esi]
mov dword [edx + 0x278], eax
mov eax, dword [ebp - 8]
movzx eax, word [eax]
cmp ax, 8
je 0x501454d6
mov eax, dword [ebp - 8]
movzx eax, word [eax]
cmp ax, 0xd800
jb 0x5014541f
cmp ax, 0xdfff
jbe 0x50145423
xor eax, eax
jmp 0x50145425
mov al, 1
test al, al
je 0x50145493
push 1
push 0x102
push 0x102
mov eax, dword [esi]
call sym.vcl120.bpl__Controls_TWinControl_GetHandle_qqrv
push eax
lea eax, [ebp - 0x24]
push eax
call sub.user32.dll_PeekMessageW
test eax, eax
je 0x5014551a
mov eax, dword [esi]
push dword [eax + 0x274]
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 8]
movzx edx, word [edx]
call sub.rtl120.bpl__System__UStrFromWChar_qqrr20System_UnicodeStringb
push dword [ebp - 0x28]
lea eax, [ebp - 0x2c]
mov edx, dword [ebp - 0x1c]
call sub.rtl120.bpl__System__UStrFromWChar_qqrr20System_UnicodeStringb
push dword [ebp - 0x2c]
mov eax, dword [esi]
add eax, 0x274
mov edx, 3
call sub.rtl120.bpl__System__UStrCatN_qqrv
mov eax, dword [ebp - 8]
mov word [eax], 0
jmp 0x5014551a
lea eax, [ebp - 0x30]
mov edx, dword [ebp - 8]
movzx edx, word [edx]
call sub.rtl120.bpl__System__UStrFromWChar_qqrr20System_UnicodeStringb
mov edx, dword [ebp - 0x30]
mov eax, dword [esi]
add eax, 0x274
call sub.rtl120.bpl__System__UStrCat_qqrr20System_UnicodeStringx20System_UnicodeString
jmp 0x5014551a
mov eax, dword [esi]
mov ebx, dword [eax + 0x274]
test ebx, ebx
je 0x501454c3
sub ebx, 4
mov ebx, dword [ebx]
mov eax, dword [esi]
add eax, 0x274
mov ecx, 1
mov edx, ebx
call sub.rtl120.bpl__System__UStrDelete_qqrr20System_UnicodeStringii
mov eax, dword [esi]
mov eax, dword [eax + 0x274]
call sub.rtl120.bpl__System__UStrLen_qqrx20System_UnicodeString
mov edx, eax
mov eax, dword [esi]
mov eax, dword [eax + 0x274]
call fcn.501233cc
cmp al, 2
je 0x501454b2
mov eax, dword [esi]
mov eax, dword [eax + 0x274]
test eax, eax
je 0x50145507
sub eax, 4
mov eax, dword [eax]
mov edx, dword [esi]
add edx, 0x274
mov ecx, 1
xchg edx, eax
call sub.rtl120.bpl__System__UStrDelete_qqrr20System_UnicodeStringii
mov eax, dword [esi]
mov eax, dword [eax + 0x274]
test eax, eax
je 0x5014552b
sub eax, 4
mov eax, dword [eax]
test eax, eax
jle 0x50145538
push ebp
call fcn.501452a0
pop ecx
jmp 0x5014554f
xor edx, edx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0xe0]
mov eax, dword [esi]
mov si, 0xffeb
call sub.rtl120.bpl__System__CallDynaInst_qqrv
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50145571
lea eax, [ebp - 0x30]
mov edx, 3
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
ret