Function at 0x523e00
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x70
mov esi, edx
mov edx, 0xcccccccd
mov eax, ecx
mov dword [ebp - 0x18], 0
mul edx
cmp ecx, 0xa
mov dword [ebp - 0x20], esi
jb 0x523e72
shr edx, 2
mov esi, ecx
xor ebx, ebx
and edx, 0xfffffffe
lea eax, [edx + edx*4]
sub esi, eax
jne 0x523e64
mov esi, 0xcccccccd
nop dword [eax]
mov eax, ecx
mov edi, ecx
inc ebx
mul esi
mov ecx, edx
shr ecx, 3
mov eax, ecx
mul esi
cmp edi, 0x64
jb 0x523e64
shr edx, 2
mov edi, ecx
and edx, 0xfffffffe
lea eax, [edx + edx*4]
sub edi, eax
je 0x523e40
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x10], 1
je 0x523e81
jmp 0x523f24
xor ebx, ebx
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x10], 1
jne 0x523f24
mov eax, dword [eax + 0x14]
cmp ecx, 0xa
mov esi, 0
mov dword [ebp - 0x10], eax
jb 0x523eb4
xor esi, esi
mov edi, ecx
nop word cs:[eax + eax]
nop
mov eax, edi
mov edx, 0xcccccccd
inc esi
mul edx
shr edx, 3
cmp edi, 0x63
mov edi, edx
ja 0x523ea0
mov edx, dword [ebp - 0x10]
mov edi, 0
mov eax, edx
sub eax, esi
cmovb eax, edi
mov dword [ebp - 0x18], eax
mov eax, esi
sub eax, edx
cmovb eax, edi
cmp eax, 2
jb 0x523f03
add eax, ebx
cmp esi, edx
mov ebx, edx
mov edi, 0xcccccccd
cmovb ebx, esi
mov dword [ebp - 0x1c], eax
not ebx
add ebx, esi
nop word [eax + eax]
mov eax, ecx
mul edi
mov ecx, edx
shr ecx, 3
dec ebx
jne 0x523ef0
mov ebx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x10]
dec ebx
cmp esi, edx
jbe 0x523f24
mov edx, 0xcccccccd
mov eax, ecx
inc ebx
mul edx
shr edx, 3
lea eax, [edx + edx]
lea eax, [eax + eax*4]
sub ecx, eax
cmp ecx, 5
sbb edx, 0xffffffff
mov ecx, edx
mov esi, 0x28
cmp ecx, 0x64
jb 0x523f6d
xor esi, esi
mov edi, ecx
mov eax, ecx
mov ecx, 0x51eb851f
mul ecx
mov ecx, edx
mov edx, edi
shr ecx, 5
imul eax, ecx, 0x64
sub edx, eax
movzx eax, word [edx + edx + 0xa5ed4a]
mov word [ebp + esi - 0x56], ax
add esi, 0xfffffffe
cmp edi, 0x270f
ja 0x523f30
mov eax, ebx
sub eax, esi
add esi, 0x28
cmp ecx, 9
ja 0x523f74
jmp 0x523f99
mov eax, ebx
cmp ecx, 9
jbe 0x523f99
movzx edx, cl
mov dword [ebp - 0x10], eax
imul edx, edx, 0xcd
shr edx, 0xb
lea edi, [edx + edx]
lea eax, [edi + edi*4]
sub cl, al
mov eax, dword [ebp - 0x10]
or cl, 0x30
mov byte [ebp + esi - 0x7d], cl
dec esi
mov ecx, edx
inc eax
movzx edx, byte [ebp + 8]
cmp eax, ebx
jne 0x523fab
cmp dword [ebp - 0x18], 0
jne 0x523fab
mov edi, eax
jmp 0x523fb3
mov byte [ebp + esi - 0x7d], 0x2e
mov edi, eax
dec esi
xor dl, 1
lea eax, [ebp - 0x7c]
add cl, 0x30
mov ebx, 0x29
shl dl, 5
mov byte [esi + eax - 1], cl
lea eax, [esi + eax - 1]
sub ebx, esi
or dl, 0x45
mov dword [ebp - 0x10], eax
mov eax, edi
cmp edi, 0xa
mov byte [ebp - 0x13], dl
jae 0x523fea
add al, 0x30
mov byte [ebp - 0x12], al
mov eax, 2
jmp 0x523ffb
movzx eax, word [eax + eax + 0xa5ed4a]
mov word [ebp - 0x12], ax
mov eax, 3
mov ecx, dword [ebp + 0xc]
cmp byte [ebp - 0x20], 0
mov edx, dword [ebp - 0x10]
mov edi, dword [ebp - 0x18]
lea esi, [ebp - 0x13]
mov word [ebp - 0x54], 2
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x4c], ebx
mov word [ebp - 0x48], 0
mov dword [ebp - 0x44], edi
mov word [ebp - 0x3c], 2
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], eax
je 0x524043
mov eax, dword [ecx + 0x18]
mov edx, 0xa5cbc8
mov esi, 0xa5e309
and eax, 1
cmove esi, edx
jmp 0x52404d
mov eax, 1
mov esi, 0xa5e308
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x54]
lea edx, [ebp - 0x30]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], 3
call fcn.00515e30
add esp, 0x70
pop esi
pop edi
pop ebx
pop ebp
ret