Function at 0x5b5140
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov edx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
test esi, esi
sete al
test ebx, ebx
sete cl
or cl, al
test edx, edx
sete al
or al, cl
jne 0x5b54e4
mov eax, dword [0x857d9c]
mov dword [esp + 0xc], eax
mov eax, dword [esi + 8]
add eax, edx
add eax, dword [0x889b1c]
mov dword [esi + 8], eax
cmp eax, edx
jae 0x5b518a
inc dword [esi + 4]
mov eax, dword [esi]
lea edi, [eax - 0x40]
neg edi
cmp edi, edx
cmovae edi, edx
cmp eax, 0x40
je 0x5b52c9
lea ebp, [esi + eax]
add ebp, 0x2c
cmp edi, 1
mov edx, edi
adc edx, 0
mov dword [esp], 0
mov dword [esp + 8], edi
cmp edi, 8
mov dword [esp + 4], eax
jb 0x5b525d
mov eax, dword [esp + 4]
lea ecx, [eax + esi]
sub ecx, ebx
add ecx, 0x2c
cmp ecx, 0x20
mov ecx, dword [esp + 4]
mov eax, dword [esp + 8]
jb 0x5b525d
mov dword [esp], 0
cmp eax, 0x20
jb 0x5b5235
mov eax, edx
mov edi, edx
and edi, 0xffffffe0
add ecx, esi
add ecx, 0x3c
xor edx, edx
nop dword [eax + eax]
movdqu xmm0, xmmword [ebx + edx]
movdqu xmm1, xmmword [ebx + edx + 0x10]
movdqu xmmword [ecx + edx - 0x10], xmm0
movdqu xmmword [ecx + edx], xmm1
add edx, 0x20
cmp edi, edx
jne 0x5b5200
mov ecx, edi
mov edi, dword [esp + 8]
mov dword [esp], ecx
cmp edi, ecx
je 0x5b52c9
mov edx, eax
test dl, 0x18
je 0x5b525d
mov ecx, dword [esp]
mov eax, edx
and eax, 0xfffffff8
nop dword [eax]
movq xmm0, qword [ebx + ecx]
movq qword [ebp + ecx], xmm0
add ecx, 8
cmp eax, ecx
jne 0x5b5240
mov edi, dword [esp + 8]
mov dword [esp], eax
cmp edi, eax
je 0x5b52c9
mov edi, edx
mov ecx, edx
mov edx, dword [esp]
and ecx, 3
je 0x5b527c
neg ecx
mov edx, dword [esp]
nop
movzx eax, byte [ebx + edx]
mov byte [ebp + edx], al
inc edx
inc ecx
jne 0x5b5270
mov eax, dword [esp]
sub eax, edi
cmp eax, 0xfffffffc
mov edi, dword [esp + 8]
mov eax, dword [esp + 4]
ja 0x5b52c9
lea ecx, [eax + esi]
add ecx, 0x2f
nop word cs:[eax + eax]
movzx eax, byte [ebx + edx]
mov byte [ecx + edx - 3], al
movzx eax, byte [ebx + edx + 1]
mov byte [ecx + edx - 2], al
movzx eax, byte [ebx + edx + 2]
mov byte [ecx + edx - 1], al
movzx eax, byte [ebx + edx + 3]
mov byte [ecx + edx], al
add edx, 4
cmp edi, edx
jne 0x5b52a0
mov eax, dword [esi]
add eax, edi
mov dword [esi], eax
cmp eax, 0x40
mov ebp, dword [esp + 0x2c]
jne 0x5b54e4
mov eax, edi
lea edi, [esi + 0x2c]
add ebx, eax
sub ebp, eax
xor dword [esp + 0xc], 0xcb6b01e
jmp 0x5b5301
mov dword [esi], eax
mov ebp, ecx
sub ebp, eax
add ebx, eax
cmp ecx, 0x3f
jbe 0x5b54e4
movdqu xmm1, xmmword [esi + 0x2c]
movdqu xmm0, xmmword [esi + 0x3c]
movdqa xmm2, xmm1
pxor xmm3, xmm3
punpckhbw xmm2, xmm3
pshuflw xmm2, xmm2, 0x1b
pshufhw xmm2, xmm2, 0x1b
punpcklbw xmm1, xmm3
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
packuswb xmm1, xmm2
movdqu xmmword [esi + 0x2c], xmm1
movdqa xmm1, xmm0
punpckhbw xmm1, xmm3
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
punpcklbw xmm0, xmm3
pshuflw xmm0, xmm0, 0x1b
pshufhw xmm0, xmm0, 0x1b
packuswb xmm0, xmm1
movdqu xmmword [esi + 0x3c], xmm0
movdqu xmm0, xmmword [esi + 0x4c]
movdqa xmm1, xmm0
punpckhbw xmm1, xmm3
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
punpcklbw xmm0, xmm3
pshuflw xmm0, xmm0, 0x1b
pshufhw xmm0, xmm0, 0x1b
packuswb xmm0, xmm1
movdqu xmmword [esi + 0x4c], xmm0
movdqu xmm0, xmmword [esi + 0x5c]
movdqa xmm1, xmm0
punpckhbw xmm1, xmm3
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
punpcklbw xmm0, xmm3
pshuflw xmm0, xmm0, 0x1b
pshufhw xmm0, xmm0, 0x1b
packuswb xmm0, xmm1
movdqu xmmword [esi + 0x5c], xmm0
mov ecx, esi
mov edx, dword [esp + 0xc]
call fcn.005b54f0
cmp ebp, 0x40
mov eax, 0x40
cmovb eax, ebp
test ebp, ebp
je 0x5b54e2
mov ecx, ebp
xor ebp, ebp
cmp ecx, 8
mov dword [esp], eax
jb 0x5b5470
mov eax, edi
sub eax, ebx
cmp eax, 0x20
mov eax, dword [esp]
mov edx, dword [esp + 0x24]
jb 0x5b5470
xor ebp, ebp
cmp ecx, 0x20
jb 0x5b5443
mov ebp, eax
and ebp, 0x60
movdqu xmm0, xmmword [ebx]
movdqu xmm1, xmmword [ebx + 0x10]
movdqu xmmword [edx + 0x2c], xmm0
movdqu xmmword [edx + 0x3c], xmm1
cmp ebp, 0x20
je 0x5b5433
movdqu xmm0, xmmword [ebx + 0x20]
movdqu xmm1, xmmword [ebx + 0x30]
movdqu xmmword [edx + 0x4c], xmm0
movdqu xmmword [edx + 0x5c], xmm1
cmp eax, ebp
mov esi, dword [esp + 0x24]
je 0x5b52f0
test al, 0x18
je 0x5b5470
mov edx, eax
mov eax, ebp
mov ebp, edx
and ebp, 0x78
nop dword [eax]
movq xmm0, qword [ebx + eax]
movq qword [edi + eax], xmm0
add eax, 8
cmp ebp, eax
jne 0x5b5450
mov eax, dword [esp]
cmp eax, ebp
mov esi, dword [esp + 0x24]
je 0x5b52f0
mov dword [esp + 4], ecx
mov edx, ebp
and eax, 3
je 0x5b548b
mov edx, ebp
nop dword [eax]
movzx ecx, byte [ebx + edx]
mov byte [edi + edx], cl
inc edx
dec eax
jne 0x5b5480
mov eax, dword [esp]
sub ebp, eax
cmp ebp, 0xfffffffc
mov ecx, dword [esp + 4]
mov esi, dword [esp + 0x24]
ja 0x5b52f0
nop word cs:[eax + eax]
movzx eax, byte [ebx + edx]
mov byte [esi + edx + 0x2c], al
movzx eax, byte [ebx + edx + 1]
mov byte [esi + edx + 0x2d], al
movzx eax, byte [ebx + edx + 2]
mov byte [esi + edx + 0x2e], al
movzx eax, byte [ebx + edx + 3]
mov byte [esi + edx + 0x2f], al
mov eax, dword [esp]
add edx, 4
cmp eax, edx
jne 0x5b54b0
jmp 0x5b52f0
mov dword [esi], eax
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret