Function at 0x4687b8
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff80
push ebx
push esi
push edi
mov esi, edx
lea edi, [ebp - 0x38]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov byte [ebp - 1], cl
mov edi, eax
mov ebx, dword [ebp + 0xc]
mov eax, ebx
call sub.vcl210.bpl__Vcl_Graphics_ColorToRGB_qqr21System_Uitypes_TColor
mov ebx, eax
mov eax, dword [ebp + 8]
call sub.vcl210.bpl__Vcl_Graphics_ColorToRGB_qqr21System_Uitypes_TColor
mov dword [ebp + 8], eax
mov eax, 0xff
and eax, ebx
mov dword [ebp - 0xc], eax
mov eax, ebx
shr eax, 8
and eax, 0xff
mov dword [ebp - 0x10], eax
mov eax, ebx
shr eax, 0x10
and eax, 0xff
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 8]
and eax, 0xff
sub eax, dword [ebp - 0xc]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 8]
shr eax, 8
and eax, 0xff
sub eax, dword [ebp - 0x10]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 8]
shr eax, 0x10
and eax, 0xff
sub eax, dword [ebp - 0x14]
mov dword [ebp - 0x20], eax
mov esi, dword [ebp - 0x2c]
sub esi, dword [ebp - 0x34]
mov edx, dword [ebp - 0x30]
mov ecx, edx
mov eax, dword [ebp - 0x38]
sub ecx, eax
mov dword [ebp - 8], ecx
cmp byte [ebp - 1], 1
jne 0x4688ec
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x40], edx
xor ebx, ebx
mov eax, ebx
imul esi
push ecx
mov ecx, 0xff
cdq
idiv ecx
pop ecx
mov ecx, dword [ebp - 0x34]
add eax, ecx
mov dword [ebp - 0x44], eax
lea eax, [ebx + 1]
imul esi
push ecx
mov ecx, 0xff
cdq
idiv ecx
pop ecx
add eax, ecx
mov dword [ebp - 0x3c], eax
mov eax, ebx
imul dword [ebp - 0x20]
mov ecx, 0xff
cdq
idiv ecx
mov ecx, eax
add cl, byte [ebp - 0x14]
mov eax, ebx
imul dword [ebp - 0x1c]
push ecx
mov ecx, 0xff
cdq
idiv ecx
pop ecx
add al, byte [ebp - 0x10]
push eax
mov eax, ebx
imul dword [ebp - 0x18]
push ecx
mov ecx, 0xff
cdq
idiv ecx
pop ecx
add al, byte [ebp - 0xc]
pop edx
call fcn.00401ee0
mov edx, eax
mov eax, dword [edi + 0x48]
call sub.vcl210.bpl__Vcl_Graphics_TBrush_SetColor_qqr21System_Uitypes_TColor
lea edx, [ebp - 0x48]
mov eax, edi
mov ecx, dword [eax]
call dword [ecx + 0x54]
inc ebx
cmp ebx, 0x100
jne 0x46885f
jmp 0x468ca3
cmp byte [ebp - 1], 3
jne 0x468987
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x3c], eax
xor ebx, ebx
mov eax, ebx
imul dword [ebp - 8]
mov esi, 0xff
cdq
idiv esi
mov ecx, dword [ebp - 0x38]
add eax, ecx
mov dword [ebp - 0x48], eax
lea eax, [ebx + 1]
imul dword [ebp - 8]
mov esi, 0xff
cdq
idiv esi
add eax, ecx
mov dword [ebp - 0x40], eax
mov eax, ebx
imul dword [ebp - 0x20]
mov ecx, 0xff
cdq
idiv ecx
mov ecx, eax
add cl, byte [ebp - 0x14]
mov eax, ebx
imul dword [ebp - 0x1c]
mov esi, 0xff
cdq
idiv esi
add al, byte [ebp - 0x10]
push eax
mov eax, ebx
imul dword [ebp - 0x18]
mov esi, 0xff
cdq
idiv esi
add al, byte [ebp - 0xc]
pop edx
call fcn.00401ee0
mov edx, eax
mov eax, dword [edi + 0x48]
call sub.vcl210.bpl__Vcl_Graphics_TBrush_SetColor_qqr21System_Uitypes_TColor
lea edx, [ebp - 0x48]
mov eax, edi
mov ecx, dword [eax]
call dword [ecx + 0x54]
inc ebx
cmp ebx, 0x100
jne 0x468904
jmp 0x468ca3
cmp byte [ebp - 1], 2
jne 0x468baf
mov dl, 1
mov eax, dword [sym.imp.vcl210.bpl__Vcl_Graphics_TBitmap_]
call sub.vcl210.bpl__Vcl_Graphics_TBitmap__bctr_qqrv
mov dword [ebp - 0x28], eax
mov ecx, esi
movzx edx, word [ebp - 8]
mov eax, dword [ebp - 0x28]
call fcn.00468508
xor ebx, ebx
mov eax, ebx
imul dword [ebp - 0x20]
mov ecx, 0xff
cdq
idiv ecx
mov ecx, eax
add cl, byte [ebp - 0x14]
mov eax, ebx
imul dword [ebp - 0x1c]
push ecx
mov ecx, 0xff
cdq
idiv ecx
pop ecx
add al, byte [ebp - 0x10]
push eax
mov eax, ebx
imul dword [ebp - 0x18]
push ecx
mov ecx, 0xff
cdq
idiv ecx
pop ecx
add al, byte [ebp - 0xc]
pop edx
call fcn.00401ee0
push eax
mov eax, dword [ebp - 0x28]
call sub.vcl210.bpl__Vcl_Graphics_TBitmap_GetCanvas_qqrv
mov eax, dword [eax + 0x48]
pop edx
call sub.vcl210.bpl__Vcl_Graphics_TBrush_SetColor_qqr21System_Uitypes_TColor
cmp ebx, 0x80
jge 0x468aa6
lea ecx, [ebp - 0x70]
mov edx, ebx
imul edx, esi
test edx, edx
jns 0x468a1a
add edx, 0x7f
sar edx, 7
xor eax, eax
call sub.rtl210.bpl__System_Classes_Point_qqrii
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x64], eax
lea ecx, [ebp - 0x70]
lea edx, [ebx + 1]
imul edx, esi
test edx, edx
jns 0x468a40
add edx, 0x7f
sar edx, 7
xor eax, eax
call sub.rtl210.bpl__System_Classes_Point_qqrii
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x5c], eax
lea ecx, [ebp - 0x70]
lea eax, [ebx + 1]
imul dword [ebp - 8]
test eax, eax
jns 0x468a66
add eax, 0x7f
sar eax, 7
xor edx, edx
call sub.rtl210.bpl__System_Classes_Point_qqrii
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x54], eax
lea ecx, [ebp - 0x70]
mov eax, ebx
imul dword [ebp - 8]
test eax, eax
jns 0x468a8b
add eax, 0x7f
sar eax, 7
xor edx, edx
call sub.rtl210.bpl__System_Classes_Point_qqrii
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x4c], eax
jmp 0x468b54
lea ecx, [ebp - 0x70]
mov eax, ebx
sub eax, 0x80
imul dword [ebp - 8]
test eax, eax
jns 0x468aba
add eax, 0x7f
sar eax, 7
mov edx, esi
call sub.rtl210.bpl__System_Classes_Point_qqrii
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x64], eax
lea ecx, [ebp - 0x70]
lea eax, [ebx + 1]
sub eax, 0x80
imul dword [ebp - 8]
test eax, eax
jns 0x468ae5
add eax, 0x7f
sar eax, 7
mov edx, esi
call sub.rtl210.bpl__System_Classes_Point_qqrii
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x5c], eax
lea ecx, [ebp - 0x70]
lea edx, [ebx + 1]
sub edx, 0x80
imul edx, esi
test edx, edx
jns 0x468b11
add edx, 0x7f
sar edx, 7
mov eax, dword [ebp - 8]
call sub.rtl210.bpl__System_Classes_Point_qqrii
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x54], eax
lea ecx, [ebp - 0x70]
mov edx, ebx
sub edx, 0x80
imul edx, esi
test edx, edx
jns 0x468b3d
add edx, 0x7f
sar edx, 7
mov eax, dword [ebp - 8]
call sub.rtl210.bpl__System_Classes_Point_qqrii
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x4c], eax
push 1
push 4
lea eax, [ebp - 0x68]
push eax
call sub.gdi32.dll_CreatePolygonRgn
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x28]
call sub.vcl210.bpl__Vcl_Graphics_TBitmap_GetCanvas_qqrv
call sub.vcl210.bpl__Vcl_Graphics_TCanvas_GetHandle_qqrv
push eax
call sub.gdi32.dll_PaintRgn
mov eax, dword [ebp - 0x24]
push eax
call sub.gdi32.dll_DeleteObject
inc ebx
cmp ebx, 0x100
jne 0x4689b0
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x38]
mov eax, edi
mov ebx, dword [eax]
call dword [ebx + 0x44]
mov eax, dword [ebp - 0x28]
call sub.rtl210.bpl__System_TObject_Free_qqrv
jmp 0x468ca3
cmp byte [ebp - 1], 4
jne 0x468ca3
fild dword [ebp - 0x20]
fmul dword [0x468cac]
call sub.rtl210.bpl__System__TRUNC_qqrv
add al, byte [ebp - 0x14]
push eax
fild dword [ebp - 0x1c]
fmul dword [0x468cac]
call sub.rtl210.bpl__System__TRUNC_qqrv
add al, byte [ebp - 0x10]
push eax
fild dword [ebp - 0x18]
fmul dword [0x468cac]
call sub.rtl210.bpl__System__TRUNC_qqrv
add al, byte [ebp - 0xc]
pop edx
pop ecx
call fcn.00401ee0
mov esi, eax
mov eax, dword [ebp - 0x2c]
sub eax, dword [ebp - 0x34]
sar eax, 1
jns 0x468c04
adc eax, 0
mov edx, dword [ebp - 0x2c]
sub edx, eax
push edx
lea eax, [ebp - 0x48]
push eax
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x38]
call sub.rtl210.bpl__System_Classes_Rect_qqriiii
push ebx
push esi
mov cl, 1
lea edx, [ebp - 0x48]
mov eax, edi
call fcn.004687b8
fild dword [ebp - 0x20]
fld xword [0x468cb0]
fmulp st(1)
call sub.rtl210.bpl__System__TRUNC_qqrv
add al, byte [ebp - 0x14]
push eax
fild dword [ebp - 0x1c]
fld xword [0x468cb0]
fmulp st(1)
call sub.rtl210.bpl__System__TRUNC_qqrv
add al, byte [ebp - 0x10]
push eax
fild dword [ebp - 0x18]
fld xword [0x468cb0]
fmulp st(1)
call sub.rtl210.bpl__System__TRUNC_qqrv
add al, byte [ebp - 0xc]
pop edx
pop ecx
call fcn.00401ee0
mov esi, eax
mov eax, dword [ebp - 0x2c]
push eax
lea eax, [ebp - 0x80]
push eax
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x38]
call sub.rtl210.bpl__System_Classes_Rect_qqriiii
push esi
push edi
lea esi, [ebp - 0x80]
lea edi, [ebp - 0x48]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop edi
pop esi
mov eax, dword [ebp + 8]
push eax
push esi
mov cl, 1
lea edx, [ebp - 0x48]
mov eax, edi
call fcn.004687b8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8