Function at 0x47ab7c
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff90
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 esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov eax, ebx
call sub.vcl210.bpl__Vcl_Graphics_ColorToRGB_qqr21System_Uitypes_TColor
mov ebx, eax
mov eax, esi
call sub.vcl210.bpl__Vcl_Graphics_ColorToRGB_qqr21System_Uitypes_TColor
mov esi, 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
shr ebx, 0x10
and ebx, 0xff
mov dword [ebp - 0x14], ebx
mov eax, 0xff
and eax, esi
sub eax, dword [ebp - 0xc]
mov dword [ebp - 0x18], eax
mov eax, esi
shr eax, 8
and eax, 0xff
sub eax, dword [ebp - 0x10]
mov dword [ebp - 0x1c], eax
shr esi, 0x10
and esi, 0xff
sub esi, dword [ebp - 0x14]
mov dword [ebp - 0x20], esi
mov esi, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x34]
sub esi, ecx
mov edx, dword [ebp - 0x30]
mov ebx, edx
mov eax, dword [ebp - 0x38]
sub ebx, eax
mov dword [ebp - 8], ebx
cmp byte [ebp - 1], 1
jne 0x47acae
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 0x47ac21
jmp 0x47af69
cmp byte [ebp - 1], 3
jne 0x47ad46
mov dword [ebp - 0x44], ecx
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 0x47acc3
jmp 0x47af69
cmp byte [ebp - 1], 2
jne 0x47af69
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.0047a980
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 0x47ae65
lea ecx, [ebp - 0x70]
mov edx, ebx
imul edx, esi
test edx, edx
jns 0x47add9
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 0x47adff
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 0x47ae25
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 0x47ae4a
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 0x47af13
lea ecx, [ebp - 0x70]
mov eax, ebx
sub eax, 0x80
imul dword [ebp - 8]
test eax, eax
jns 0x47ae79
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 0x47aea4
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 0x47aed0
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 0x47aefc
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 0x47ad6f
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
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8