Function at 0x1036c680
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
mov ebx, 1
xor ecx, ecx
mov dword [ebp - 8], ebx
lea edx, [eax*4 + 0x7c]
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x10], ecx
test eax, eax
jle 0x1036c883
push edi
mov edi, dword [esi + 0xc]
lea eax, [esi + 0xf8]
mov ecx, dword [esi + 0x14]
add edx, ebx
shr edi, cl
lea eax, [eax + edx*2]
mov dword [ebp - 0x14], eax
mov al, byte [eax]
mov byte [ebp + 0xb], al
movzx eax, al
mov dword [ebp - 4], eax
mov eax, edi
mov ecx, dword [ebp - 4]
and eax, 0xc0
movzx eax, byte [eax + ecx + 0x10b3ceb0]
mov ecx, dword [esi + 0x14]
sub edi, eax
mov dword [ebp - 0x1c], eax
mov eax, edi
shl eax, cl
mov ecx, dword [esi + 0x10]
mov dword [ebp - 0x18], eax
lea eax, [esi + 0xf9]
lea eax, [eax + edx*2]
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x20], eax
cmp ecx, edx
jb 0x1036c749
sub ecx, edx
mov edx, dword [ebp - 0x1c]
mov dword [esi + 0x10], ecx
mov edi, edx
mov ecx, dword [esi + 0x14]
shl edx, cl
mov dword [esi + 0xc], edx
movzx edx, byte [eax]
mov eax, dword [ebp - 4]
xor edx, 1
mov dword [ebp - 0x18], edx
test eax, eax
je 0x1036c73a
mov ecx, dword [ebp - 0x14]
mov al, byte [eax + 0x10b3ce30]
mov byte [ecx], al
jmp 0x1036c76c
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x14]
mov byte [eax], dl
mov al, byte [ebp + 0xb]
mov byte [ecx], al
jmp 0x1036c76c
mov ecx, dword [ebp - 0x14]
mov dword [esi + 0xc], edx
movzx eax, byte [eax]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x10b3ce70]
mov byte [ecx], al
cmp edi, 0xff
jg 0x1036c83f
mov eax, dword [esi + 0x14]
bsr ecx, edi
add eax, 0xfffffff8
add eax, ecx
mov dword [esi + 0x14], eax
jns 0x1036c83f
mov edx, dword [esi + 4]
add eax, 0x10
mov ebx, dword [esi + 8]
shl dword [esi + 0xc], 0x10
mov edi, dword [esi + 0x10]
mov dword [esi + 0x14], eax
lea ecx, [edx + 2]
mov eax, dword [esi]
shl ebx, 8
mov dword [ebp + 8], ebx
cmp ecx, eax
ja 0x1036c809
movzx ebx, byte [edx]
mov eax, dword [ebp + 8]
movzx edx, byte [edx + 1]
add eax, ebx
shl eax, 8
mov dword [esi + 4], ecx
cmp eax, 0x300
jne 0x1036c7de
mov ebx, edx
cmp ecx, dword [esi]
jae 0x1036c7d3
movzx edx, byte [ecx]
lea eax, [ecx + 1]
mov dword [esi + 4], eax
mov eax, ebx
shl eax, 8
add eax, edx
jmp 0x1036c829
mov eax, ebx
xor edx, edx
shl eax, 8
add eax, edx
jmp 0x1036c829
and eax, 0xffffff
add eax, edx
cmp eax, 3
jne 0x1036c829
cmp ecx, dword [esi]
jae 0x1036c7ff
movzx edx, byte [ecx]
lea eax, [ecx + 1]
mov dword [esi + 4], eax
lea eax, [edx + 0x300]
jmp 0x1036c829
xor edx, edx
lea eax, [edx + 0x300]
jmp 0x1036c829
cmp edx, eax
jae 0x1036c812
movzx ecx, byte [edx]
jmp 0x1036c814
xor ecx, ecx
mov dword [ebp + 8], ecx
xor edx, edx
add ecx, ebx
mov dword [esi + 4], eax
xor ebx, ebx
xor eax, eax
cmp ecx, 3
cmovne ebx, dword [ebp + 8]
shl edi, 8
add edi, ebx
movzx eax, ax
mov ebx, dword [ebp - 8]
shl edi, 8
add edi, edx
mov dword [esi + 8], eax
mov dword [esi + 0x10], edi
cmp dword [ebp - 0x18], 0
mov ecx, dword [ebp - 0x10]
je 0x1036c855
mov eax, dword [ebp - 0xc]
bts eax, ecx
xor ebx, ebx
mov dword [ebp - 0xc], eax
jmp 0x1036c862
lea eax, [ebx + 1]
sar eax, 1
and eax, 1
add ebx, eax
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x24]
inc ecx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x10], ecx
cmp ecx, dword [ebp + 0xc]
jl 0x1036c6b3
mov ecx, dword [ebp + 0x10]
pop edi
pop esi
mov dword [ecx], ebx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 0x10]
pop esi
mov dword [eax], ebx
mov eax, ecx
pop ebx
mov esp, ebp
pop ebp
ret 0xc