Function at 0x10135790
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 8]
and ecx, 7
je 0x101357f9
mov edx, dword [ebp - 4]
mov eax, dword [edx + 8]
and eax, 7
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 8]
cmp edx, dword [ebp - 0x14]
jge 0x101357c3
mov ecx, dword [ebp - 4]
call fcn.10134c40
mov eax, 1
mov ecx, dword [ebp - 0x14]
shl eax, cl
sub eax, 1
mov ecx, dword [ebp - 4]
and eax, dword [ecx + 0xc]
mov dword [ebp - 0x24], eax
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0xc]
mov ecx, dword [ebp - 0x14]
shr eax, cl
mov ecx, dword [ebp - 4]
mov dword [ecx + 0xc], eax
mov edx, dword [ebp - 4]
mov eax, dword [edx + 8]
sub eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 4]
mov dword [ecx + 8], eax
mov dword [ebp - 8], 0
mov edx, dword [ebp - 4]
cmp dword [edx + 8], 0
jle 0x10135845
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0xc]
and ecx, 0xff
mov edx, dword [ebp - 8]
mov byte [ebp + edx - 0x10], cl
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0xc]
shr edx, 8
mov eax, dword [ebp - 4]
mov dword [eax + 0xc], edx
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 8]
sub edx, 8
mov eax, dword [ebp - 4]
mov dword [eax + 8], edx
jmp 0x10135800
mov ecx, dword [ebp - 4]
cmp dword [ecx + 8], 0
jge 0x1013585d
mov ecx, str.zlib_corrupt
call fcn.10129840
jmp 0x1013599d
cmp dword [ebp - 8], 4
jge 0x101358bc
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 4]
mov ecx, dword [edx]
cmp ecx, dword [eax + 4]
jb 0x10135879
mov dword [ebp - 0x18], 1
jmp 0x10135880
mov dword [ebp - 0x18], 0
cmp dword [ebp - 0x18], 0
je 0x1013588f
mov dword [ebp - 0x1c], 0
jmp 0x101358a7
mov edx, dword [ebp - 4]
mov eax, dword [edx]
movzx ecx, byte [eax]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx]
add eax, 1
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
mov edx, dword [ebp - 8]
mov al, byte [ebp - 0x1c]
mov byte [ebp + edx - 0x10], al
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
jmp 0x1013585d
mov edx, 1
shl edx, 0
movzx eax, byte [ebp + edx - 0x10]
shl eax, 8
mov ecx, 1
imul edx, ecx, 0
movzx ecx, byte [ebp + edx - 0x10]
add eax, ecx
mov dword [ebp - 0xc], eax
mov edx, 1
imul eax, edx, 3
movzx ecx, byte [ebp + eax - 0x10]
shl ecx, 8
mov edx, 1
shl edx, 1
movzx eax, byte [ebp + edx - 0x10]
add ecx, eax
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0xc]
xor ecx, 0xffff
cmp dword [ebp - 0x20], ecx
je 0x1013591c
mov ecx, str.zlib_corrupt
call fcn.10129840
jmp 0x1013599d
mov edx, dword [ebp - 4]
mov eax, dword [edx]
add eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
cmp eax, dword [ecx + 4]
jbe 0x10135938
mov ecx, str.read_past_buffer
call fcn.10129840
jmp 0x1013599d
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x10]
add eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
cmp eax, dword [ecx + 0x18]
jbe 0x10135963
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x10]
mov ecx, dword [ebp - 4]
call fcn.10134e70
test eax, eax
jne 0x10135963
xor eax, eax
jmp 0x1013599d
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x10]
push edx
call fcn.1016db00
add esp, 0xc
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
add ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
mov dword [edx], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x10]
add ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
mov dword [edx + 0x10], ecx
mov eax, 1
mov esp, ebp
pop ebp
ret