Function at 0x87d8dc
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push ebx
push esi
push edi
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], 0xffffffff
xor eax, eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], 0xffffffff
mov dword [ebp - 0x38], 5
mov dword [ebp - 0x34], 0xffffffff
xor eax, eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], 0xffffffff
xor eax, eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x1c], 1
mov dl, 1
mov eax, dword [sym.imp.vcl140.bpl__Graphics_TBitmap_]
call sub.vcl140.bpl__Graphics_TBitmap__bctr_qqrv
mov dword [ebp - 8], eax
mov dl, 1
mov eax, dword [sym.imp.vcl140.bpl__Graphics_TBitmap_]
call sub.vcl140.bpl__Graphics_TBitmap__bctr_qqrv
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x87dc70
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
call dword [ecx + 8]
mov dl, 6
mov eax, dword [ebp - 8]
call sub.vcl140.bpl__Graphics_TBitmap_SetPixelFormat_qqr21Graphics_TPixelFormat
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x30]
mov edx, eax
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
call dword [ecx + 0x44]
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x24]
mov edx, eax
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 8]
mov dl, 6
mov eax, dword [ebp - 0xc]
call sub.vcl140.bpl__Graphics_TBitmap_SetPixelFormat_qqr21Graphics_TPixelFormat
mov eax, dword [ebp - 8]
mov edx, dword [eax]
call dword [edx + 0x24]
sub eax, 2
test eax, eax
jle 0x87dc47
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], 1
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 8]
call sub.vcl140.bpl__Graphics_TBitmap_GetScanline_qqri
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x18]
dec edx
mov eax, dword [ebp - 0xc]
call sub.vcl140.bpl__Graphics_TBitmap_GetScanline_qqri
mov esi, eax
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0xc]
call sub.vcl140.bpl__Graphics_TBitmap_GetScanline_qqri
mov edi, eax
mov edx, dword [ebp - 0x18]
inc edx
mov eax, dword [ebp - 0xc]
call sub.vcl140.bpl__Graphics_TBitmap_GetScanline_qqri
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 8]
mov edx, dword [eax]
call dword [edx + 0x30]
sub eax, 2
test eax, eax
jle 0x87dc3b
mov dword [ebp - 0x24], eax
mov ebx, 1
mov eax, ebx
dec eax
lea eax, [eax + eax*2]
movzx eax, byte [esi + eax + 2]
imul dword [ebp - 0x48]
lea edx, [ebx + ebx*2]
movzx edx, byte [esi + edx + 2]
imul edx, dword [ebp - 0x44]
add eax, edx
lea edx, [ebx + 1]
lea edx, [edx + edx*2]
movzx edx, byte [esi + edx + 2]
imul edx, dword [ebp - 0x40]
add eax, edx
mov edx, ebx
dec edx
lea edx, [edx + edx*2]
movzx edx, byte [edi + edx + 2]
imul edx, dword [ebp - 0x3c]
add eax, edx
lea edx, [ebx + ebx*2]
movzx edx, byte [edi + edx + 2]
imul edx, dword [ebp - 0x38]
add eax, edx
lea edx, [ebx + 1]
lea edx, [edx + edx*2]
movzx edx, byte [edi + edx + 2]
imul edx, dword [ebp - 0x34]
add eax, edx
mov edx, ebx
dec edx
lea edx, [edx + edx*2]
mov ecx, dword [ebp - 0x14]
movzx edx, byte [ecx + edx + 2]
imul edx, dword [ebp - 0x30]
add eax, edx
lea edx, [ebx + ebx*2]
mov ecx, dword [ebp - 0x14]
movzx edx, byte [ecx + edx + 2]
imul edx, dword [ebp - 0x34]
add eax, edx
lea edx, [ebx + 1]
lea edx, [edx + edx*2]
mov ecx, dword [ebp - 0x14]
movzx edx, byte [ecx + edx + 2]
imul edx, dword [ebp - 0x28]
add eax, edx
cdq
idiv dword [ebp - 0x1c]
mov edx, eax
xor eax, eax
call sub.rtl140.bpl__Math_Max_qqrxixi
mov edx, eax
mov eax, 0xff
call sub.rtl140.bpl__Math_Min_qqrxixi
lea edx, [ebx + ebx*2]
mov ecx, dword [ebp - 0x10]
mov byte [ecx + edx + 2], al
mov eax, ebx
dec eax
lea eax, [eax + eax*2]
movzx eax, byte [esi + eax + 1]
imul dword [ebp - 0x48]
lea edx, [ebx + ebx*2]
movzx edx, byte [esi + edx + 1]
imul edx, dword [ebp - 0x44]
add eax, edx
lea edx, [ebx + 1]
lea edx, [edx + edx*2]
movzx edx, byte [esi + edx + 1]
imul edx, dword [ebp - 0x40]
add eax, edx
mov edx, ebx
dec edx
lea edx, [edx + edx*2]
movzx edx, byte [edi + edx + 1]
imul edx, dword [ebp - 0x3c]
add eax, edx
lea edx, [ebx + ebx*2]
movzx edx, byte [edi + edx + 1]
imul edx, dword [ebp - 0x38]
add eax, edx
lea edx, [ebx + 1]
lea edx, [edx + edx*2]
movzx edx, byte [edi + edx + 1]
imul edx, dword [ebp - 0x34]
add eax, edx
mov edx, ebx
dec edx
lea edx, [edx + edx*2]
mov ecx, dword [ebp - 0x14]
movzx edx, byte [ecx + edx + 1]
imul edx, dword [ebp - 0x30]
add eax, edx
lea edx, [ebx + ebx*2]
mov ecx, dword [ebp - 0x14]
movzx edx, byte [ecx + edx + 1]
imul edx, dword [ebp - 0x34]
add eax, edx
lea edx, [ebx + 1]
lea edx, [edx + edx*2]
mov ecx, dword [ebp - 0x14]
movzx edx, byte [ecx + edx + 1]
imul edx, dword [ebp - 0x28]
add eax, edx
cdq
idiv dword [ebp - 0x1c]
mov edx, eax
xor eax, eax
call sub.rtl140.bpl__Math_Max_qqrxixi
mov edx, eax
mov eax, 0xff
call sub.rtl140.bpl__Math_Min_qqrxixi
lea edx, [ebx + ebx*2]
mov ecx, dword [ebp - 0x10]
mov byte [ecx + edx + 1], al
mov eax, ebx
dec eax
lea eax, [eax + eax*2]
movzx eax, byte [esi + eax]
imul dword [ebp - 0x48]
lea edx, [ebx + ebx*2]
movzx edx, byte [esi + edx]
imul edx, dword [ebp - 0x44]
add eax, edx
lea edx, [ebx + 1]
lea edx, [edx + edx*2]
movzx edx, byte [esi + edx]
imul edx, dword [ebp - 0x40]
add eax, edx
mov edx, ebx
dec edx
lea edx, [edx + edx*2]
movzx edx, byte [edi + edx]
imul edx, dword [ebp - 0x3c]
add eax, edx
lea edx, [ebx + ebx*2]
movzx edx, byte [edi + edx]
imul edx, dword [ebp - 0x38]
add eax, edx
lea edx, [ebx + 1]
lea edx, [edx + edx*2]
movzx edx, byte [edi + edx]
imul edx, dword [ebp - 0x34]
add eax, edx
mov edx, ebx
dec edx
lea edx, [edx + edx*2]
mov ecx, dword [ebp - 0x14]
movzx edx, byte [ecx + edx]
imul edx, dword [ebp - 0x30]
add eax, edx
lea edx, [ebx + ebx*2]
mov ecx, dword [ebp - 0x14]
movzx edx, byte [ecx + edx]
imul edx, dword [ebp - 0x34]
add eax, edx
lea edx, [ebx + 1]
lea edx, [edx + edx*2]
mov ecx, dword [ebp - 0x14]
movzx edx, byte [ecx + edx]
imul edx, dword [ebp - 0x28]
add eax, edx
cdq
idiv dword [ebp - 0x1c]
mov edx, eax
xor eax, eax
call sub.rtl140.bpl__Math_Max_qqrxixi
mov edx, eax
mov eax, 0xff
call sub.rtl140.bpl__Math_Min_qqrxixi
lea edx, [ebx + ebx*2]
mov ecx, dword [ebp - 0x10]
mov byte [ecx + edx], al
inc ebx
dec dword [ebp - 0x24]
jne 0x87da10
inc dword [ebp - 0x18]
dec dword [ebp - 0x20]
jne 0x87d9bd
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 8]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x87dc77
mov eax, dword [ebp - 8]
call sub.rtl140.bpl__System_TObject_Free_qqrv
mov eax, dword [ebp - 0xc]
call sub.rtl140.bpl__System_TObject_Free_qqrv
ret