Function at 0x524250
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x74
mov esi, ecx
mov ebx, edx
push 0
push 0xa
push edx
push ecx
call fcn.00532ff0
add esp, 0x10
cmp esi, 0xa
mov edi, esi
mov esi, ebx
mov dword [ebp - 0x20], 0
sbb ebx, 0
jb 0x5242cf
or eax, edx
jne 0x5242cf
mov ecx, edi
mov edx, esi
mov dword [ebp - 0x10], 0
nop dword [eax]
mov esi, edx
mov dword [ebp - 0x14], ecx
push 0
push 0xa
push edx
push ecx
call fcn.00532f50
add esp, 0x10
inc dword [ebp - 0x10]
push 0
push 0xa
mov edi, edx
push edx
mov ebx, eax
push eax
call fcn.00532ff0
add esp, 0x10
cmp dword [ebp - 0x14], 0x64
sbb esi, 0
jb 0x52435a
or eax, edx
mov ecx, ebx
mov edx, edi
je 0x524290
jmp 0x5242da
mov ecx, edi
mov edx, esi
mov dword [ebp - 0x10], 0
mov ebx, dword [ebp + 0x10]
cmp dword [ebx + 0x10], 1
je 0x52436b
cmp ecx, 0x64
mov eax, edx
sbb eax, 0
jb 0x52446c
xor esi, esi
nop word [eax + eax]
mov dword [ebp - 0x14], edx
mov edi, ecx
push 0
push 0x64
push edx
push ecx
call fcn.00532f50
add esp, 0x10
mov ebx, eax
imul eax, eax, 0x64
mov ecx, edi
sub ecx, eax
movzx eax, word [ecx + ecx + 0xa5ed4a]
mov ecx, ebx
mov ebx, 0x270f
mov word [ebp + esi - 0x5a], ax
add esi, 0xfffffffe
cmp ebx, edi
mov edi, 0
sbb edi, dword [ebp - 0x14]
jb 0x524300
mov eax, dword [ebp - 0x10]
mov ebx, dword [ebp + 0x10]
mov edx, ecx
sub eax, esi
add esi, 0x28
cmp ecx, 9
ja 0x52447b
jmp 0x5244a1
mov ecx, ebx
mov edx, edi
mov ebx, dword [ebp + 0x10]
cmp dword [ebx + 0x10], 1
jne 0x5242e7
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x1c], ecx
cmp ecx, 0xa
mov ecx, edx
mov esi, 0
mov dword [ebp - 0x14], edx
sbb ecx, 0
mov dword [ebp - 0x24], eax
jb 0x5243b3
mov ebx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x14]
xor esi, esi
nop
push 0
push 0xa
push edi
push ebx
call fcn.00532f50
add esp, 0x10
mov ecx, 0x63
inc esi
cmp ecx, ebx
mov ebx, 0
sbb ebx, edi
mov ebx, eax
mov edi, edx
jb 0x524390
mov edi, dword [ebp - 0x24]
mov ecx, 0
mov ebx, esi
mov eax, edi
sub eax, esi
cmovb eax, ecx
mov dword [ebp - 0x20], eax
mov eax, esi
sub eax, edi
cmovb eax, ecx
cmp eax, 2
jb 0x524410
add eax, dword [ebp - 0x10]
cmp ebx, edi
mov esi, edi
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x14]
cmovb esi, ebx
not esi
add esi, ebx
mov dword [ebp - 0x10], eax
nop word [eax + eax]
push 0
push 0xa
push edx
push ecx
call fcn.00532f50
add esp, 0x10
mov ecx, eax
dec esi
jne 0x5243f0
mov eax, dword [ebp - 0x10]
dec eax
mov dword [ebp - 0x10], eax
cmp ebx, edi
ja 0x52441a
jmp 0x52445b
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x14]
cmp ebx, edi
jbe 0x52445b
push 0
push 0xa
push edx
push ecx
mov ebx, ecx
mov dword [ebp - 0x14], edx
call fcn.00532f50
add esp, 0x10
mov edi, edx
mov edx, 0xa
mov ecx, eax
mul edx
lea esi, [edi + edi*4]
lea edx, [edx + esi*2]
mov esi, dword [ebp - 0x14]
sub ebx, eax
sbb esi, edx
mov edx, 4
inc dword [ebp - 0x10]
xor eax, eax
cmp edx, ebx
sbb eax, esi
adc ecx, 0
adc edi, 0
mov edx, edi
mov ebx, dword [ebp + 0x10]
cmp ecx, 0x64
mov eax, edx
sbb eax, 0
jae 0x5242f5
mov eax, dword [ebp - 0x10]
mov esi, 0x28
mov edx, ecx
cmp ecx, 9
jbe 0x5244a1
mov edi, ebx
mov ebx, edx
inc eax
movzx ecx, bl
imul ecx, ecx, 0xcd
shr ecx, 0xb
lea edx, [ecx + ecx]
lea edx, [edx + edx*4]
sub bl, dl
or bl, 0x30
mov byte [ebp + esi - 0x81], bl
mov ebx, edi
dec esi
movzx edx, byte [ebp + 0xc]
cmp eax, dword [ebp - 0x10]
jne 0x5244b0
cmp dword [ebp - 0x20], 0
je 0x5244b9
mov byte [ebp + esi - 0x81], 0x2e
dec esi
xor dl, 1
lea edi, [ebp - 0x80]
add cl, 0x30
shl dl, 5
mov byte [esi + edi - 1], cl
mov ecx, 0x29
lea edi, [esi + edi - 1]
or dl, 0x45
sub ecx, esi
cmp eax, 0xa
mov byte [ebp - 0x17], dl
movzx edx, byte [ebp + 8]
jae 0x5244ef
add al, 0x30
mov byte [ebp - 0x16], al
mov eax, 2
jmp 0x524500
movzx eax, word [eax + eax + 0xa5ed4a]
mov word [ebp - 0x16], ax
mov eax, 3
mov word [ebp - 0x58], 2
mov dword [ebp - 0x54], edi
mov edi, dword [ebp - 0x20]
test dl, dl
lea esi, [ebp - 0x17]
mov dword [ebp - 0x50], ecx
mov word [ebp - 0x4c], 0
mov dword [ebp - 0x48], edi
mov word [ebp - 0x40], 2
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x38], eax
je 0x524540
mov eax, dword [ebx + 0x18]
mov edx, 0xa5cbc8
mov ecx, 0xa5e309
and eax, 1
cmove ecx, edx
jmp 0x52454a
mov eax, 1
mov ecx, 0xa5e308
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x58]
lea edx, [ebp - 0x34]
mov ecx, ebx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], 3
call fcn.00515e30
add esp, 0x74
pop esi
pop edi
pop ebx
pop ebp
ret