Function at 0x5b0520
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1c
mov dword [esp + 0x10], edx
mov dword [esp], ecx
cmp dword [esp + 0x30], 0
js 0x5b0a6b
mov eax, dword [esp + 0x10]
movzx ebp, word [eax + 2]
xor edx, edx
mov ecx, 0x8a
test bp, bp
sete bl
je 0x5b0555
mov ecx, 7
mov dl, bl
mov eax, 4
sub eax, edx
mov dword [esp + 4], eax
mov edi, 0xffffffff
xor esi, esi
xor ebx, ebx
jmp 0x5b059a
xor ecx, ecx
cmp edi, ebp
sete cl
mov eax, 4
sub eax, ecx
mov dword [esp + 4], eax
xor ecx, 7
mov edx, dword [esp + 0x18]
lea eax, [edx + 1]
mov ebx, esi
cmp edx, dword [esp + 0x30]
mov esi, eax
je 0x5b0a6b
mov edx, ebp
mov eax, dword [esp + 0x10]
mov dword [esp + 0x18], esi
movzx ebp, word [eax + esi*4 + 6]
lea esi, [ebx + 1]
cmp esi, ecx
jge 0x5b05b4
cmp edx, ebp
je 0x5b0585
mov dword [esp + 8], edx
cmp esi, dword [esp + 4]
mov dword [esp + 0x14], ebp
jge 0x5b0690
mov eax, dword [esp]
mov ecx, dword [eax + 0x16bc]
mov edi, dword [esp + 8]
jmp 0x5b05f5
add ecx, edx
mov dword [eax + 0x16bc], ecx
add esi, 0xffffffff
mov edi, dword [esp + 8]
je 0x5b0a4a
movzx edx, word [eax + edi*4 + 0xa7e]
mov ebp, 0x10
sub ebp, edx
movzx edi, word [eax + edi*4 + 0xa7c]
mov ebx, edi
shl ebx, cl
or bx, word [eax + 0x16b8]
mov word [eax + 0x16b8], bx
cmp ecx, ebp
jle 0x5b05e0
mov ecx, dword [eax + 8]
mov dword [esp + 4], ecx
mov ebp, dword [eax + 0x14]
lea eax, [ebp + 1]
mov ecx, dword [esp]
mov dword [ecx + 0x14], eax
mov eax, dword [esp + 4]
mov byte [eax + ebp], bl
mov eax, dword [esp]
movzx eax, byte [eax + 0x16b9]
mov byte [esp + 4], al
mov ecx, dword [esp]
mov ecx, dword [ecx + 8]
mov ebx, dword [esp]
mov ebx, dword [ebx + 0x14]
lea ebp, [ebx + 1]
mov eax, dword [esp]
mov dword [eax + 0x14], ebp
movzx eax, byte [esp + 4]
mov byte [ecx + ebx], al
mov eax, dword [esp]
mov ebx, dword [eax + 0x16bc]
mov cl, 0x10
sub cl, bl
shr edi, cl
mov word [eax + 0x16b8], di
lea ecx, [edx + ebx]
add ecx, 0xfffffff0
jmp 0x5b05e2
mov dword [esp + 4], ebx
mov ecx, dword [esp + 8]
test ecx, ecx
mov eax, dword [esp]
je 0x5b06b6
cmp ecx, edi
jne 0x5b0735
mov ecx, dword [eax + 0x16bc]
mov dword [esp + 4], esi
jmp 0x5b0839
cmp dword [esp + 4], 9
jg 0x5b07b7
movzx edx, word [eax + 0xac2]
mov ecx, dword [eax + 0x16bc]
mov esi, eax
mov eax, 0x10
movzx edi, word [esi + 0xac0]
mov ebx, edi
shl ebx, cl
sub eax, edx
or bx, word [esi + 0x16b8]
cmp ecx, eax
jle 0x5b0928
mov word [esi + 0x16b8], bx
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0x14]
lea ebp, [ecx + 1]
mov dword [esi + 0x14], ebp
mov byte [eax + ecx], bl
mov al, byte [esi + 0x16b9]
mov ecx, dword [esi + 8]
mov ebx, dword [esi + 0x14]
lea ebp, [ebx + 1]
mov dword [esi + 0x14], ebp
mov byte [ecx + ebx], al
mov ebx, dword [esi + 0x16bc]
mov cl, 0x10
sub cl, bl
shr edi, cl
lea ecx, [edx + ebx]
add ecx, 0xfffffff0
mov ebx, edi
jmp 0x5b092a
movzx edi, word [eax + ecx*4 + 0xa7e]
mov edx, dword [eax + 0x16bc]
mov esi, eax
mov eax, 0x10
mov dword [esp + 0xc], edi
sub eax, edi
movzx edi, word [esi + ecx*4 + 0xa7c]
mov ebx, edi
mov ecx, edx
shl ebx, cl
or bx, word [esi + 0x16b8]
mov word [esi + 0x16b8], bx
cmp edx, eax
jle 0x5b082b
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0x14]
lea ebp, [ecx + 1]
mov dword [esi + 0x14], ebp
mov byte [eax + ecx], bl
mov al, byte [esi + 0x16b9]
mov ecx, dword [esi + 8]
mov ebx, dword [esi + 0x14]
lea ebp, [ebx + 1]
mov dword [esi + 0x14], ebp
mov byte [ecx + ebx], al
mov ebx, dword [esi + 0x16bc]
mov cl, 0x10
sub cl, bl
shr edi, cl
mov word [esi + 0x16b8], di
mov eax, dword [esp + 0xc]
lea ecx, [eax + ebx]
add ecx, 0xfffffff0
jmp 0x5b0831
movzx edx, word [eax + 0xac6]
mov ecx, dword [eax + 0x16bc]
mov esi, eax
mov eax, 0x10
movzx edi, word [esi + 0xac4]
mov ebx, edi
shl ebx, cl
sub eax, edx
or bx, word [esi + 0x16b8]
cmp ecx, eax
jle 0x5b09ac
mov word [esi + 0x16b8], bx
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0x14]
lea ebp, [ecx + 1]
mov dword [esi + 0x14], ebp
mov byte [eax + ecx], bl
mov al, byte [esi + 0x16b9]
mov ecx, dword [esi + 8]
mov ebx, dword [esi + 0x14]
lea ebp, [ebx + 1]
mov dword [esi + 0x14], ebp
mov byte [ecx + ebx], al
mov ebx, dword [esi + 0x16bc]
mov cl, 0x10
sub cl, bl
shr edi, cl
lea ecx, [edx + ebx]
add ecx, 0xfffffff0
mov ebx, edi
jmp 0x5b09ae
mov ecx, edx
add ecx, dword [esp + 0xc]
mov eax, esi
mov dword [esi + 0x16bc], ecx
movzx edx, word [eax + 0xabe]
mov esi, eax
mov eax, 0x10
movzx edi, word [esi + 0xabc]
mov ebx, edi
shl ebx, cl
sub eax, edx
or bx, word [esi + 0x16b8]
cmp ecx, eax
jle 0x5b08a0
mov word [esi + 0x16b8], bx
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0x14]
lea ebp, [ecx + 1]
mov dword [esi + 0x14], ebp
mov byte [eax + ecx], bl
mov al, byte [esi + 0x16b9]
mov ecx, dword [esi + 8]
mov ebx, dword [esi + 0x14]
lea ebp, [ebx + 1]
mov dword [esi + 0x14], ebp
mov byte [ecx + ebx], al
mov ebx, dword [esi + 0x16bc]
mov cl, 0x10
sub cl, bl
shr edi, cl
lea ecx, [edx + ebx]
add ecx, 0xfffffff0
mov ebx, edi
jmp 0x5b08a2
add ecx, edx
mov edx, dword [esp + 4]
add edx, 0xfffd
movzx edx, dx
mov eax, edx
shl eax, cl
mov dword [esi + 0x16bc], ecx
or ebx, eax
mov word [esi + 0x16b8], bx
cmp ecx, 0xf
jl 0x5b0920
mov eax, dword [esp]
mov eax, dword [eax + 8]
mov ecx, dword [esp]
mov ecx, dword [ecx + 0x14]
lea esi, [ecx + 1]
mov edi, dword [esp]
mov dword [edi + 0x14], esi
mov byte [eax + ecx], bl
mov eax, dword [esp]
mov al, byte [eax + 0x16b9]
mov ecx, dword [esp]
mov ecx, dword [ecx + 8]
mov esi, dword [esp]
mov esi, dword [esi + 0x14]
lea edi, [esi + 1]
mov ebx, dword [esp]
mov dword [ebx + 0x14], edi
mov byte [ecx + esi], al
mov esi, dword [esp]
mov eax, dword [esi + 0x16bc]
mov cl, 0x10
sub cl, al
shr edx, cl
mov ecx, eax
mov word [esi + 0x16b8], dx
add ecx, 0xfffffff2
jmp 0x5b0a40
add ecx, 2
jmp 0x5b0a40
add ecx, edx
mov edx, dword [esp + 4]
add edx, 0xfffe
movzx edx, dx
mov eax, edx
shl eax, cl
mov dword [esi + 0x16bc], ecx
or ebx, eax
mov word [esi + 0x16b8], bx
cmp ecx, 0xe
jl 0x5b0a29
mov eax, dword [esp]
mov eax, dword [eax + 8]
mov ecx, dword [esp]
mov ecx, dword [ecx + 0x14]
lea esi, [ecx + 1]
mov edi, dword [esp]
mov dword [edi + 0x14], esi
mov byte [eax + ecx], bl
mov eax, dword [esp]
mov al, byte [eax + 0x16b9]
mov ecx, dword [esp]
mov ecx, dword [ecx + 8]
mov esi, dword [esp]
mov esi, dword [esi + 0x14]
lea edi, [esi + 1]
mov ebx, dword [esp]
mov dword [ebx + 0x14], edi
mov byte [ecx + esi], al
mov esi, dword [esp]
mov eax, dword [esi + 0x16bc]
mov cl, 0x10
sub cl, al
shr edx, cl
mov ecx, eax
mov word [esi + 0x16b8], dx
add ecx, 0xfffffff3
jmp 0x5b0a40
add ecx, edx
mov edx, dword [esp + 4]
add edx, 0xfff6
movzx edx, dx
mov eax, edx
shl eax, cl
mov dword [esi + 0x16bc], ecx
or ebx, eax
mov word [esi + 0x16b8], bx
cmp ecx, 0xa
jl 0x5b0a2e
mov eax, dword [esp]
mov eax, dword [eax + 8]
mov ecx, dword [esp]
mov ecx, dword [ecx + 0x14]
lea esi, [ecx + 1]
mov edi, dword [esp]
mov dword [edi + 0x14], esi
mov byte [eax + ecx], bl
mov eax, dword [esp]
mov al, byte [eax + 0x16b9]
mov ecx, dword [esp]
mov ecx, dword [ecx + 8]
mov esi, dword [esp]
mov esi, dword [esi + 0x14]
lea edi, [esi + 1]
mov ebx, dword [esp]
mov dword [ebx + 0x14], edi
mov byte [ecx + esi], al
mov esi, dword [esp]
mov eax, dword [esi + 0x16bc]
mov cl, 0x10
sub cl, al
shr edx, cl
mov ecx, eax
mov word [esi + 0x16b8], dx
add ecx, 0xfffffff7
jmp 0x5b0a40
add ecx, 3
jmp 0x5b0a40
add ecx, 7
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, dword [esp + 8]
mov dword [esi + 0x16bc], ecx
xor esi, esi
mov ebp, dword [esp + 0x14]
test bp, bp
jne 0x5b0570
mov ecx, 0x8a
mov dword [esp + 4], 3
jmp 0x5b0585
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret