Function at 0x50c1b0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x50
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x18], 0xffffffc0
jmp 0x50c1d5
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], 0x3f
jg 0x50c4a4
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x50c1c8
mov dword [ebp - 0x1c], 0
mov edx, dword [ebp - 0x18]
shr edx, 0x1f
mov dword [ebp - 0x34], edx
jmp 0x50c3fa
mov edi, dword [ebp - 0x38]
mov ecx, dword [ebp + 8]
movzx eax, byte [edi + ecx + 0x40]
mov byte [ebp - 0x2d], al
movzx eax, al
cmp eax, edx
jle 0x50c224
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x38]
mov dword [esi + eax*4], edi
mov byte [ebx + ecx + 0x40], dl
mov ecx, dword [ebp - 0x10]
mov byte [ebp - 0x2d], dl
mov ebx, dword [ecx]
mov esi, dword [ecx + 8]
movzx edi, word [esi + ebx*4 + 2]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
movzx eax, word [esi + ebx*4]
inc edi
mov dword [ebp - 0x40], edi
mov edi, dword [ebp - 0x10]
add eax, eax
mov dword [ebp - 0x28], eax
mov eax, dword [edi + ecx*4 + 0x1c]
movsx ecx, byte [edx + eax]
mov edx, dword [ebp - 0x3c]
sub edx, ecx
test edx, edx
jle 0x50c2d0
mov eax, dword [ebp - 0x20]
mov eax, dword [edi + eax*4 + 0x14]
mov edi, dword [ebp - 0x1c]
movzx edi, byte [edi + eax]
mov dword [ebp - 0x5c], edi
mov edi, ebx
cmp ebx, dword [ebp - 0x5c]
jle 0x50c280
cmp ecx, edx
jl 0x50c280
mov ecx, dword [ebp - 0x5c]
lea edi, [ecx + edx - 1]
mov esi, esi
lea edi, [edi]
movzx ecx, word [esi + edi*4 + 2]
mov eax, dword [ebp - 0x28]
movzx edx, word [esi + edi*4]
shl eax, cl
add eax, edx
mov edx, dword [ebp - 0x34]
cmp ebx, edi
lea eax, [edx + eax*2]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x40]
lea edx, [eax + ecx + 1]
je 0x50c2d0
movzx edi, byte [ebp - 0x2d]
cmp edi, edx
jle 0x50c2d0
mov ecx, dword [ebp - 0x44]
mov edi, dword [ebp - 0x24]
mov eax, dword [ebp - 0x14]
mov esi, dword [ebp - 0x38]
mov ebx, dword [ebp + 8]
mov dword [eax + edi*4], ecx
mov byte [esi + ebx + 0x40], dl
mov ecx, dword [ebp - 0x10]
mov byte [ebp - 0x2d], dl
mov ebx, dword [ecx]
mov esi, dword [ecx + 8]
lea esi, [esi]
movzx ecx, word [esi + ebx*4 + 2]
mov edx, dword [ebp - 0x20]
movzx eax, word [esi + ebx*4]
add ecx, 2
mov dword [ebp - 0x48], ecx
mov ecx, dword [ebp - 0x10]
lea edi, [eax*4 + 2]
mov eax, dword [ecx + edx*4 + 0x24]
mov ecx, dword [ebp - 0x3c]
movsx eax, byte [ecx + eax]
mov ecx, dword [ebp - 0x1c]
sub ecx, eax
mov edx, ecx
dec edx
js 0x50c390
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + edx*4 + 0x14]
movzx edx, byte [edx + ecx - 1]
mov dword [ebp - 0x2c], edx
mov edx, ebx
cmp ebx, dword [ebp - 0x2c]
jle 0x50c340
mov edx, dword [ebp - 0x20]
mov edx, dword [eax + edx*4 + 0x1c]
movsx eax, byte [edx + ecx - 1]
mov edx, ebx
cmp eax, dword [ebp - 0x3c]
jl 0x50c340
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x3c]
lea edx, [ecx + eax - 1]
nop
lea esi, [esi]
movzx ecx, word [esi + edx*4 + 2]
movzx eax, word [esi + edx*4]
shl edi, cl
lea eax, [edi + eax]
mov edi, dword [ebp - 0x34]
cmp ebx, edx
lea eax, [edi + eax*2]
mov dword [ebp - 0x4c], eax
mov edi, dword [ebp - 0x48]
lea ecx, [edi + ecx + 1]
je 0x50c390
movzx edx, byte [ebp - 0x2d]
cmp edx, ecx
jle 0x50c390
mov edi, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x14]
mov esi, dword [ebp - 0x38]
mov ebx, dword [ebp + 8]
mov dword [eax + edx*4], edi
mov byte [esi + ebx + 0x40], cl
mov edi, dword [ebp - 0x10]
mov byte [ebp - 0x2d], cl
mov ebx, dword [edi]
mov esi, dword [edi + 8]
nop
lea esi, [esi]
movzx ecx, word [esi + ebx*4]
mov edx, dword [ebp - 0x1c]
movzx edi, word [esi + ebx*4 + 2]
mov esi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x18]
lea eax, [esi + ecx*8 + 6]
shl eax, 6
movzx ecx, byte [ebp - 0x2d]
add eax, edx
and ebx, 0xfff
shl eax, 0xd
lea edx, [edi + 0x17]
lea esi, [eax + ebx + 0x1000]
cmp ecx, edx
lea ebx, [esi + esi + 1]
jle 0x50c3dd
mov esi, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x38]
mov edi, dword [ebp + 8]
mov dword [ecx + esi*4], ebx
mov byte [eax + edi + 0x40], dl
inc dword [ebp - 0x20]
add dword [ebp - 0x38], 0x2000
cmp dword [ebp - 0x20], 1
jle 0x50c40f
inc dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], 0x3f
jg 0x50c1c8
mov dword [ebp - 0x20], 0
mov ecx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x18]
shl ecx, 7
add ecx, edi
mov dword [ebp - 0x38], ecx
mov ebx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x18]
mov esi, dword [ebp - 0x38]
sar ebx, 0x1f
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp + 8]
xor edi, ebx
add esi, 0x40
sub edi, ebx
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x3c], edi
mov byte [ecx + edx + 0x40], 0x64
mov edi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x10]
mov esi, dword [ebp - 0x1c]
mov ebx, dword [eax + edi*4 + 0x14]
movzx edx, byte [esi + ebx]
mov esi, dword [ebp - 0x10]
mov ebx, dword [esi]
cmp ebx, edx
mov ecx, ebx
jle 0x50c470
mov eax, dword [esi + edi*4 + 0x1c]
mov edi, dword [ebp - 0x1c]
movsx eax, byte [edi + eax]
cmp eax, dword [ebp - 0x3c]
jl 0x50c470
mov esi, dword [ebp - 0x3c]
lea ecx, [edx + esi - 1]
lea esi, [esi]
lea edi, [edi]
mov edx, dword [ebp - 0x10]
mov edi, dword [ebp - 0x34]
mov esi, dword [edx + 8]
movzx eax, word [esi + ecx*4]
movzx edx, word [esi + ecx*4 + 2]
lea eax, [edi + eax*2]
inc edx
mov dword [ebp - 0x4c], eax
cmp ebx, ecx
jne 0x50c1f1
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp + 8]
movzx ecx, byte [eax + edx + 0x40]
mov byte [ebp - 0x2d], cl
jmp 0x50c224
add esp, 0x50
pop ebx
pop esi
pop edi
pop ebp
ret