Function at 0x5637e0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x850
mov eax, dword [0x5fa040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
mov dword [ebp - 0x834], esi
cmp byte [esi + 0x4c5], 0
je 0x56383e
cmp byte [esi + 0x504], 0
mov ecx, dword [esi + 0x4b8]
mov eax, dword [esi + 0x4b0]
lea eax, [eax + ecx*2]
mov dword [esi + 0x4a4], eax
je 0x56383e
movzx eax, word [eax]
inc eax
add eax, ecx
mov dword [esi + 0x4b8], eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00587d99
mov esp, ebp
pop ebp
ret
cmp byte [esi + 0x4ad], 0
push ebx
push edi
je 0x56385d
lea edx, [ebp - 0x820]
mov ecx, esi
call fcn.00450f40
mov edi, eax
jmp 0x563a0e
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x844], eax
cmp eax, 3
jae 0x56387d
mov ecx, esi
call fcn.00450d40
lea edi, [ebp - 0x820]
jmp 0x563a0e
mov ecx, dword [esi]
lea edi, [ebp - 0x820]
mov dword [ebp - 0x82c], 2
movzx edx, byte [ecx]
movzx eax, byte [ecx + 2]
shl edx, 8
or edx, eax
movzx eax, byte [ecx + 1]
movzx eax, word [esi + eax*4 + 0x60]
xor edx, eax
mov eax, dword [esi + 0x24]
mov ebx, dword [eax + edx*4]
lea ecx, [eax + edx*4]
mov eax, dword [esi + 4]
mov dword [ecx], eax
mov eax, dword [esi + 0x30]
mov ecx, dword [esi]
mov edx, dword [esi + 4]
mov dword [ebp - 0x828], eax
mov eax, dword [esi + 0x18]
mov dword [ebp - 0x848], eax
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x838], eax
mov eax, dword [esi + 0x28]
mov dword [ebp - 0x840], eax
mov eax, dword [ebp - 0x838]
mov dword [ebp - 0x830], ecx
mov ecx, dword [ebp - 0x840]
mov dword [ebp - 0x83c], edx
mov dword [ecx + eax*4], ebx
mov ecx, dword [ebp - 0x830]
nop
test ebx, ebx
je 0x5639f6
sub edx, ebx
mov ebx, dword [ebp - 0x848]
mov dword [ebp - 0x824], edx
cmp edx, ebx
jae 0x5639f6
cmp eax, edx
sbb eax, eax
and eax, ebx
mov ebx, dword [ebp - 0x840]
sub eax, edx
add eax, dword [ebp - 0x838]
mov eax, dword [ebx + eax*4]
mov ebx, edx
mov edx, dword [ebp - 0x82c]
neg ebx
mov dword [ebp - 0x850], eax
lea eax, [ebx + ecx]
mov dword [ebp - 0x84c], eax
lea esi, [ebx + ecx]
mov eax, dword [ebp - 0x82c]
mov al, byte [ecx + eax]
cmp al, byte [esi + edx]
mov esi, dword [ebp - 0x834]
mov edx, dword [ebp - 0x824]
jne 0x5639c5
mov esi, dword [ebp - 0x84c]
mov eax, ecx
mov cl, byte [ecx]
cmp cl, byte [esi]
mov esi, dword [ebp - 0x834]
jne 0x5639a4
nop
mov ecx, dword [ebp - 0x830]
inc eax
add ecx, dword [ebp - 0x844]
mov esi, dword [ebp - 0x834]
mov edx, dword [ebp - 0x824]
cmp eax, ecx
je 0x5639e5
mov cl, byte [eax]
cmp cl, byte [eax + ebx]
je 0x563980
mov ecx, dword [ebp - 0x830]
sub eax, ecx
cmp dword [ebp - 0x82c], eax
jae 0x5639c5
mov dword [edi], eax
mov dword [ebp - 0x82c], eax
lea eax, [edx - 1]
mov dword [edi + 4], eax
add edi, 8
sub dword [ebp - 0x828], 1
je 0x5639f6
mov ebx, dword [ebp - 0x850]
mov eax, dword [ebp - 0x838]
mov edx, dword [ebp - 0x83c]
jmp 0x563900
sub ecx, dword [ebp - 0x830]
lea eax, [edx - 1]
mov dword [edi], ecx
mov dword [edi + 4], eax
add edi, 8
mov eax, dword [esi + 4]
inc dword [esi + 0x14]
inc eax
inc dword [esi]
mov dword [esi + 4], eax
cmp eax, dword [esi + 8]
jne 0x563a0e
mov ecx, esi
call fcn.00450b80
lea eax, [ebp - 0x820]
sub edi, eax
mov eax, dword [esi + 0x4a4]
sar edi, 2
mov dword [ebp - 0x824], edi
mov word [eax], di
test edi, edi
je 0x563af4
xor edx, edx
test edi, edi
je 0x563a6d
nop word [eax + eax]
mov ecx, dword [esi + 0x4a4]
movzx eax, word [ebp + edx*4 - 0x820]
mov word [ecx + edx*2 + 2], ax
mov ecx, dword [esi + 0x4a4]
movzx eax, word [ebp + edx*4 - 0x81c]
mov word [ecx + edx*2 + 4], ax
add edx, 2
cmp edx, edi
jb 0x563a40
mov ecx, dword [ebp + edi*4 - 0x828]
mov eax, dword [esi + 0x4a8]
cmp ecx, eax
jne 0x563af4
mov ebx, dword [esi + 0x4d0]
cmp eax, ebx
je 0x563af4
mov eax, dword [esi + 0xc]
sub eax, dword [esi + 4]
mov edi, dword [esi]
inc eax
dec edi
cmp eax, ebx
mov dword [ebp - 0x828], edi
mov edi, dword [ebp - 0x824]
cmovbe ebx, eax
mov dword [ebp - 0x83c], ebx
cmp ecx, ebx
jae 0x563ae9
mov ebx, dword [ebp - 0x828]
sub ebx, dword [ebp + edi*4 - 0x824]
mov esi, dword [ebp - 0x83c]
dec ebx
mov edi, dword [ebp - 0x828]
add ebx, ecx
nop dword [eax]
mov al, byte [edi + ecx]
cmp al, byte [ebx]
jne 0x563add
inc ecx
inc ebx
cmp ecx, esi
jb 0x563ad0
mov esi, dword [ebp - 0x834]
mov edi, dword [ebp - 0x824]
mov eax, dword [esi + 0x4a4]
mov word [eax + edx*2 - 2], cx
cmp byte [esi + 0x4c5], 0
je 0x563b06
lea eax, [edi + 1]
add dword [esi + 0x4b8], eax
cmp byte [esi + 0x504], 0
pop edi
pop ebx
jne 0x563b17
inc dword [esi + 0x508]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00587d99
mov esp, ebp
pop ebp
ret