Function at 0x570180
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
xor ecx, ecx
mov dword [ebp - 4], ebx
push edi
mov eax, dword [esi + 0x20]
sub eax, 0x20
mov dword [esi + 0x5c], 0
mov dword [esi + 0x24], eax
mov eax, dword [esi + 0x28]
mov dword [esi + 0x58], eax
mov word [esi + 0x56], 0
mov dword [esi + 0x30], 0
mov dword [eax + 8], eax
xor eax, eax
mov word [esi + 0x54], ax
cmp cx, word [esi + 0x80]
jge 0x5702a9
nop dword [eax]
mov eax, dword [esi + 0x8c]
push dword [ebp + 0xc]
mov dword [esi + 0x64], 0
mov dword [esi + 0x60], 0
movzx eax, word [eax + ebx*2]
push eax
push ecx
push esi
call fcn.005705e0
add esp, 0x10
test al, al
jne 0x5703ea
mov eax, dword [esi + 0x8c]
mov edx, dword [esi + 0x48]
movzx eax, word [eax + ebx*2]
mov ebx, dword [esi + 4]
mov dword [ebp - 0xc], eax
lea eax, [ebx - 1]
test edx, eax
jne 0x57023b
cmp edx, dword [esi + 0x4c]
jl 0x57023b
cmp edx, dword [esi + 0x50]
jg 0x57023b
mov ecx, dword [esi + 0x60]
test ecx, ecx
je 0x57023b
mov eax, dword [esi + 0x58]
mov ecx, dword [ecx + 0xc]
xor ecx, dword [eax + 0xc]
test cl, 8
jne 0x57023b
add dword [esi + 0x28], 0xfffffffc
mov eax, dword [esi + 0x58]
mov ecx, ebx
mov edi, dword [esi + 8]
neg ecx
mov dword [ebp - 8], eax
test byte [eax + 0xc], 8
je 0x570258
mov eax, edx
and eax, ecx
sub edx, eax
cmp edx, edi
jmp 0x570263
lea eax, [ebx - 1]
add eax, edx
and eax, ecx
sub eax, edx
cmp eax, edi
setge byte [ebp + 8]
push dword [ebp + 8]
push esi
call fcn.00570d60
add esp, 8
test al, al
jne 0x5703ea
mov eax, dword [esi + 0x60]
test eax, eax
je 0x570288
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x1c], eax
mov eax, dword [ebp - 0xc]
mov ebx, dword [ebp - 4]
inc eax
inc ebx
movzx ecx, ax
movsx eax, word [esi + 0x80]
mov dword [ebp - 4], ebx
cmp ebx, eax
jl 0x5701d0
movzx eax, word [esi + 0x54]
mov edi, dword [esi + 0x5c]
movzx ecx, ax
mov dword [ebp + 8], ecx
cmp ax, 1
jbe 0x5703f3
test edi, edi
je 0x5703f3
lea edx, [edi + 4]
mov dword [ebp - 0xc], edx
cmp cx, 1
jbe 0x5702db
mov ecx, dword [edi + 0x10]
mov eax, dword [edi + 8]
lea eax, [eax + ecx*4]
jmp 0x5702dd
xor eax, eax
mov dword [edx], eax
test byte [edi + 0xc], 8
mov ebx, dword [edi + 0x14]
mov edx, ebx
mov eax, dword [edi + 0x10]
je 0x5702f2
dec ebx
add ebx, eax
jmp 0x570302
sub edx, eax
lea eax, [eax*4 - 4]
inc edx
add dword [edi + 8], eax
mov dword [edi + 0x14], edx
mov eax, dword [esi + 0x30]
mov edi, dword [esi + 0x20]
lea ecx, [eax - 1]
shl eax, 2
sub edi, eax
test ecx, ecx
js 0x57033d
mov eax, dword [edi + ecx*4]
cmp edx, eax
jge 0x570322
sub ecx, 1
jns 0x570314
jmp 0x57033d
test ecx, ecx
js 0x57033d
cmp edx, eax
jle 0x57035d
nop word [eax + eax]
mov eax, dword [edi + ecx*4]
mov dword [edi + ecx*4], edx
sub ecx, 1
mov edx, eax
jns 0x570330
add dword [esi + 0x24], 0xfffffffc
mov eax, dword [esi + 0x24]
cmp eax, dword [esi + 0x28]
jbe 0x5703e3
inc dword [esi + 0x30]
mov eax, dword [esi + 0x30]
mov ecx, dword [esi + 0x20]
shl eax, 2
sub ecx, eax
mov dword [ecx], edx
mov eax, dword [esi + 0x30]
lea edx, [ebx + 1]
mov edi, dword [esi + 0x20]
lea ecx, [eax - 1]
shl eax, 2
sub edi, eax
test ecx, ecx
js 0x57039d
mov eax, dword [edi + ecx*4]
cmp edx, eax
jge 0x570380
sub ecx, 1
jns 0x570372
jmp 0x57039d
test ecx, ecx
js 0x57039d
cmp edx, eax
jle 0x5703b9
nop dword [eax + eax]
mov eax, dword [edi + ecx*4]
mov dword [edi + ecx*4], edx
sub ecx, 1
mov edx, eax
jns 0x570390
add dword [esi + 0x24], 0xfffffffc
mov eax, dword [esi + 0x24]
cmp eax, dword [esi + 0x28]
jbe 0x5703e3
inc dword [esi + 0x30]
mov eax, dword [esi + 0x30]
mov ecx, dword [esi + 0x20]
shl eax, 2
sub ecx, eax
mov dword [ecx], edx
mov ecx, dword [ebp + 8]
mov edi, dword [ebp - 0xc]
add ecx, 0xffff
mov dword [ebp + 8], ecx
mov edi, dword [edi]
test cx, cx
jne 0x5702c4
mov eax, dword [esi + 0x28]
cmp eax, dword [esi + 0x24]
pop edi
pop esi
setae al
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x2c], 0x62
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x28]
cmp eax, dword [esi + 0x24]
pop edi
mov dword [esi + 0x5c], 0
setae al
pop esi
pop ebx
mov esp, ebp
pop ebp
ret