Function at 0x5d4845f4
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc98
mov eax, dword [0x5d49f044]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, ecx
mov dword [ebp - 0xc90], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xc88], eax
mov dword [ebp - 0xc8c], edx
mov esi, dword [edi + 0x870]
lea eax, [esi*8 + 0x100]
cmp eax, 0x320
jae 0x5d4848d8
add esi, 0x20
lea eax, [ebp - 0x644]
shl esi, 4
push esi
push 0
push eax
call fcn.5d49ebc8
push esi
xor esi, esi
lea eax, [ebp - 0xc84]
push esi
push eax
call fcn.5d49ebc8
mov eax, dword [ebp - 0xc88]
add esp, 0x18
mov ecx, dword [edi + 0x30]
shl eax, 2
shl ebx, 2
mov dword [ebp - 0xc98], esi
mov esi, dword [ebp - 0xc90]
mov dword [ebp - 0xc88], eax
mov dword [ebp - 0xc94], ebx
mov eax, dword [ebp - 0xc8c]
xor edx, edx
inc edx
mov bl, byte [ecx + eax]
mov ecx, eax
and ecx, 7
shr eax, 3
shl edx, cl
mov ecx, dword [edi + 0x34]
test byte [eax + ecx], dl
jne 0x5d4846b6
movzx eax, bl
jmp 0x5d484746
mov eax, dword [edi + 0x2c]
mov edx, dword [ebp - 0xc94]
mov eax, dword [edx + eax]
cmp bl, 7
jae 0x5d484705
cmp eax, 0x400
jae 0x5d4846d8
movzx ecx, byte [eax + edi + 0x45c]
jmp 0x5d4846f8
cmp eax, 0x80000
jae 0x5d4846ef
shr eax, 9
movzx ecx, byte [eax + edi + 0x45c]
add ecx, 0x12
jmp 0x5d4846f8
shr eax, 0x11
movzx ecx, al
add ecx, 0x22
movzx eax, bl
lea eax, [eax + ecx*8]
add eax, 0x100
jmp 0x5d48473d
cmp eax, 0x400
jae 0x5d484716
movzx eax, byte [eax + edi + 0x45c]
jmp 0x5d484736
cmp eax, 0x80000
jae 0x5d48472d
shr eax, 9
movzx eax, byte [eax + edi + 0x45c]
add eax, 0x12
jmp 0x5d484736
shr eax, 0x11
movzx eax, al
add eax, 0x22
lea eax, [eax*8 + 0x107]
add edx, 4
mov dword [ebp - 0xc94], edx
inc dword [ebp - 0xc8c]
cmp eax, 0x320
jae 0x5d4848d8
inc word [ebp + eax*2 - 0x644]
xor edx, edx
mov eax, dword [edi + 0x30]
mov ecx, esi
and ecx, 7
inc edx
shl edx, cl
mov ecx, dword [edi + 0x34]
mov bl, byte [eax + esi]
mov eax, esi
shr eax, 3
test byte [eax + ecx], dl
jne 0x5d484784
movzx eax, bl
jmp 0x5d484818
mov eax, dword [edi + 0x2c]
mov edx, dword [ebp - 0xc88]
mov eax, dword [edx + eax]
cmp bl, 7
jae 0x5d4847d7
cmp eax, 0x400
jae 0x5d4847a6
movzx ecx, byte [eax + edi + 0x45c]
jmp 0x5d4847c6
cmp eax, 0x80000
jae 0x5d4847bd
shr eax, 9
movzx ecx, byte [eax + edi + 0x45c]
add ecx, 0x12
jmp 0x5d4847c6
shr eax, 0x11
movzx ecx, al
add ecx, 0x22
mov eax, dword [edi + 0x30]
movzx eax, byte [eax + esi]
lea eax, [eax + ecx*8]
add eax, 0x100
jmp 0x5d48480f
cmp eax, 0x400
jae 0x5d4847e8
movzx eax, byte [eax + edi + 0x45c]
jmp 0x5d484808
cmp eax, 0x80000
jae 0x5d4847ff
shr eax, 9
movzx eax, byte [eax + edi + 0x45c]
add eax, 0x12
jmp 0x5d484808
shr eax, 0x11
movzx eax, al
add eax, 0x22
lea eax, [eax*8 + 0x107]
add edx, 4
mov dword [ebp - 0xc88], edx
inc esi
cmp eax, 0x320
jae 0x5d4848d8
inc word [ebp + eax*2 - 0xc84]
mov eax, dword [ebp - 0xc98]
mov ecx, dword [edi + 0x30]
inc eax
mov dword [ebp - 0xc98], eax
cmp eax, 0x400
jb 0x5d484690
mov eax, dword [edi + 0x870]
xor ebx, ebx
mov ecx, ebx
lea edi, [eax*8 + 0x100]
test edi, edi
je 0x5d4848d4
mov esi, 0x100
mov dword [ebp - 0xc90], esi
movzx eax, word [ebp + ecx*2 - 0x644]
mov edx, eax
cmp ax, si
jae 0x5d48487f
movzx esi, byte [edx + 0x5d481f10]
jmp 0x5d48488c
shr edx, 8
movzx esi, byte [edx + 0x5d481f10]
add esi, 8
movzx eax, word [ebp + ecx*2 - 0xc84]
mov edx, eax
cmp ax, word [ebp - 0xc90]
jae 0x5d4848a8
movzx edx, byte [edx + 0x5d481f10]
jmp 0x5d4848b5
shr edx, 8
movzx edx, byte [edx + 0x5d481f10]
add edx, 8
mov eax, dword [esi*4 + 0x5d481ec0]
mov esi, 0x100
sub eax, dword [edx*4 + 0x5d481ec0]
cdq
xor eax, edx
sub eax, edx
add ebx, eax
inc ecx
cmp ecx, edi
jb 0x5d484867
mov eax, ebx
jmp 0x5d4848da
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call int.5d49e560
leave
ret 0x10