Function at 0x590a1090
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x20
xor eax, eax
push ebx
mov dword [esp + 0x14], eax
push ebp
mov dword [esp + 0x1c], eax
push esi
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x30]
mov bl, byte [esp + 0x24]
push edi
mov cl, byte [eax]
add eax, 0x14
and cl, 0xf
and bl, 0xfd
add cl, 0x3b
mov byte [esp + 0x28], bl
shl cl, 2
mov byte [esp + 0x24], cl
mov edi, dword [esp + 0x24]
and edi, 0xff
mov dword [esp + 0x14], edi
jle 0x590a1352
mov cl, byte [esp + 0x27]
mov dl, byte [eax]
mov esi, edx
mov byte [esp + 0x18], dl
and esi, 0xff
mov edx, esi
sub edx, 0
je 0x590a133c
dec edx
je 0x590a132c
xor edx, edx
mov dl, byte [eax + 1]
mov ebp, edx
cmp ebp, 2
jl 0x590a1364
cmp ebp, edi
jg 0x590a1364
add esi, 0xfffffff9
cmp esi, 0x82
ja case.0x590a112d.10
xor edx, edx
mov dl, byte [esi + 0x590a1380]
jmp dword [edx*4 + 0x590a1370]
cmp ebp, 3
jl 0x590a1364
cmp byte [eax + 2], 4
jb 0x590a1364
mov dl, byte [esp + 0x25]
test dl, dl
jne 0x590a1364
cmp byte [esp + 0x18], 0x89
sete dl
and dl, 1
and bl, 0xfb
shl dl, 2
or dl, bl
mov bl, byte [esp + 0x34]
mov byte [esp + 0x28], dl
mov dl, al
sub dl, bl
mov bl, byte [esp + 0x28]
sub edi, ebp
mov byte [esp + 0x25], dl
mov dword [esp + 0x14], edi
add eax, ebp
jmp 0x590a1332
mov dl, byte [esp + 0x26]
test dl, dl
jne 0x590a1364
cmp ebp, 3
jl 0x590a1364
mov dl, byte [eax + 2]
cmp dl, 4
jb 0x590a1364
and edx, 0xff
cmp edx, ebp
jg 0x590a11d8
lea esi, [edx + 3]
cmp esi, ebp
jg 0x590a1364
mov dword [edx + eax - 1], 0x4cb2f
mov dl, byte [eax + 2]
or bl, 0x10
add dl, 4
or bl, 0x20
mov byte [eax + 2], dl
mov byte [esp + 0x28], bl
mov bl, byte [esp + 0x34]
mov dl, al
sub dl, bl
mov bl, byte [esp + 0x28]
sub edi, ebp
mov byte [esp + 0x26], dl
mov dword [esp + 0x14], edi
add eax, ebp
jmp 0x590a1332
test cl, cl
jne 0x590a1364
cmp ebp, 4
jl 0x590a1364
mov cl, byte [eax + 2]
cmp cl, 5
jb 0x590a1364
and ecx, 0xff
cmp ecx, ebp
jg 0x590a12f1
mov cl, byte [eax + 2]
mov byte [esp + 0x1c], cl
mov esi, ecx
xor ecx, ecx
and esi, 0xff
mov cl, byte [eax + 1]
mov edi, ecx
lea edx, [esi + 3]
cmp edx, edi
jg 0x590a1364
mov cl, byte [eax + 3]
and ecx, 0xf
sub ecx, 0
je 0x590a12b5
dec ecx
je 0x590a127c
sub ecx, 2
jne 0x590a1364
add esi, 7
cmp esi, edi
jg 0x590a1364
mov dl, byte [esp + 0x34]
mov cl, al
sub cl, dl
mov edi, dword [esp + 0x14]
sub edi, ebp
add eax, ebp
mov dword [esp + 0x14], edi
jmp 0x590a1332
lea ecx, [esi + 7]
cmp ecx, edi
jg 0x590a1364
mov dl, byte [esp + 0x34]
mov cl, al
sub cl, dl
mov dword [esi + eax - 1], 0x4cb2f
mov dl, byte [eax + 2]
or bl, 0x80
mov esi, edx
or bl, 0x40
and esi, 0xff
mov byte [esp + 0x28], bl
add dl, 8
lea esi, [esi + eax + 3]
jmp 0x590a12cf
mov dl, byte [esp + 0x34]
mov cl, al
sub cl, dl
mov dl, byte [esp + 0x1c]
or bl, 0x40
lea esi, [esi + eax - 1]
mov byte [esp + 0x28], bl
add dl, 4
test esi, esi
mov byte [eax + 2], dl
je 0x590a126b
mov edi, dword [esp + 0x14]
or bl, 0x10
sub edi, ebp
mov dword [esi], 1
mov byte [esp + 0x28], bl
mov dword [esp + 0x14], edi
add eax, ebp
jmp 0x590a1332
mov dl, byte [eax + 3]
mov byte [esp + 0x13], dl
and dl, 0xf0
cmp dl, 0xf0
je 0x590a1364
mov bl, byte [esp + 0x34]
mov cl, al
sub cl, bl
mov bl, byte [esp + 0x13]
add dl, 0x10
and bl, 0xf
xor dl, bl
mov bl, byte [esp + 0x28]
or bl, 0x10
sub edi, ebp
mov byte [eax + 3], dl
mov byte [esp + 0x28], bl
mov dword [esp + 0x14], edi
add eax, ebp
jmp 0x590a1332
dec edi
inc eax
mov dword [esp + 0x14], edi
test edi, edi
jg 0x590a10de
jmp 0x590a1352
inc eax
dec edi
test edi, edi
jle 0x590a1352
mov ecx, edi
cmp byte [eax], 0
je 0x590a134f
mov byte [eax], 0
or bl, 0x10
dec ecx
jne 0x590a1344
mov al, byte [esp + 0x25]
test al, al
jne 0x590a1364
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x20
ret