Function at 0x59098bb0
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 0x59098e72
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 0x59098e5c
dec edx
je 0x59098e4c
xor edx, edx
mov dl, byte [eax + 1]
mov ebp, edx
cmp ebp, 2
jl 0x59098e84
cmp ebp, edi
jg 0x59098e84
add esi, 0xfffffff9
cmp esi, 0x82
ja case.0x59098c4d.10
xor edx, edx
mov dl, byte [esi + 0x59098ea0]
jmp dword [edx*4 + 0x59098e90]
cmp ebp, 3
jl 0x59098e84
cmp byte [eax + 2], 4
jb 0x59098e84
mov dl, byte [esp + 0x25]
test dl, dl
jne 0x59098e84
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 0x59098e52
mov dl, byte [esp + 0x26]
test dl, dl
jne 0x59098e84
cmp ebp, 3
jl 0x59098e84
mov dl, byte [eax + 2]
cmp dl, 4
jb 0x59098e84
and edx, 0xff
cmp edx, ebp
jg 0x59098cf8
lea esi, [edx + 3]
cmp esi, ebp
jg 0x59098e84
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 0x59098e52
test cl, cl
jne 0x59098e84
cmp ebp, 4
jl 0x59098e84
mov cl, byte [eax + 2]
cmp cl, 5
jb 0x59098e84
and ecx, 0xff
cmp ecx, ebp
jg 0x59098e11
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 0x59098e84
mov cl, byte [eax + 3]
and ecx, 0xf
sub ecx, 0
je 0x59098dd5
dec ecx
je 0x59098d9c
sub ecx, 2
jne 0x59098e84
add esi, 7
cmp esi, edi
jg 0x59098e84
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 0x59098e52
lea ecx, [esi + 7]
cmp ecx, edi
jg 0x59098e84
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 0x59098def
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 0x59098d8b
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 0x59098e52
mov dl, byte [eax + 3]
mov byte [esp + 0x13], dl
and dl, 0xf0
cmp dl, 0xf0
je 0x59098e84
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 0x59098e52
dec edi
inc eax
mov dword [esp + 0x14], edi
test edi, edi
jg 0x59098bfe
jmp 0x59098e72
inc eax
dec edi
test edi, edi
jle 0x59098e72
mov ecx, edi
cmp byte [eax], 0
je 0x59098e6f
mov byte [eax], 0
or bl, 0x10
dec ecx
jne 0x59098e64
mov al, byte [esp + 0x25]
test al, al
jne 0x59098e84
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