Function at 0x10012250
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8f8
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, eax
and eax, 3
shl eax, 7
add eax, dword [ebp + 0x18]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x8f4], eax
mov eax, dword [edi]
mov dword [ebp - 0x8c0], edx
sar esi, 2
lea edx, [ebp - 0x8ac]
mov dword [ebp - 0x8ec], edi
mov dword [ebp - 0x8d0], edx
mov dword [ebp - 0x8f0], esi
test eax, eax
je 0x100122c6
mov esi, dword [edi + 0xc]
mov edx, ebx
imul edx, ecx
lea eax, [eax + edx*2]
mov edx, dword [edi + 8]
mov dword [ebp - 0x8d0], eax
mov eax, edx
sub eax, dword [edi + 4]
shr eax, 2
mov dword [esi + ebx*4], eax
xor eax, eax
test ecx, ecx
jbe 0x100122fa
lea esp, [esp]
mov esi, dword [ebp + 0x1c]
mov si, word [esi + eax*4]
mov ebx, 0x1fff
and si, bx
or si, word [ebp + 0x20]
mov ebx, 0x6000
or si, bx
mov ebx, dword [ebp - 0x8d0]
mov word [ebx + eax*2], si
inc eax
cmp eax, ecx
jb 0x100122d0
mov ebx, dword [ebp + 0x10]
mov esi, 1
shl esi, cl
add edx, 4
mov dword [ebp - 0x8e8], edx
dec esi
and esi, ebx
mov ecx, esi
shr ecx, 1
and ecx, 0x5555
mov eax, esi
sub eax, ecx
mov ecx, eax
shr ecx, 2
and ecx, 0x3333
and eax, 0x3333
add ecx, eax
mov eax, ecx
shr eax, 4
add eax, ecx
and eax, 0xf0f
mov ecx, eax
shr ecx, 8
mov dword [edx - 4], esi
add ecx, eax
and ecx, 0xff
lea edx, [edx + ecx*8]
mov dword [ebp - 0x8c4], esi
mov dword [ebp - 0x8c8], edx
test ebx, 0xffff0000
jne 0x10012379
mov dword [ebp - 0x8e0], 0x10035a90
mov dword [ebp - 0x8e4], 0x1ff
jmp 0x1001238d
mov dword [ebp - 0x8e0], 0x10035c90
mov dword [ebp - 0x8e4], 0xff
mov eax, dword [ebp - 0x8c0]
mov ebx, dword [eax + 4]
mov ecx, eax
mov edx, dword [ecx]
mov eax, dword [ecx + 8]
mov dword [ebp - 0x8b0], ebx
test esi, esi
je 0x10012699
xor ecx, ecx
mov dword [ebp - 0x8dc], ecx
mov dword [ebp - 0x8d8], ecx
mov dword [ebp - 0x8cc], ecx
mov dword [ebp - 0x8b8], 1
jmp 0x100123d6
mov ecx, dword [ebp - 0x8bc]
dec ecx
mov dword [ebp - 0x8bc], ecx
test ecx, ecx
jg 0x1001249e
cmp eax, 9
jae 0x100123f4
mov esi, dword [ebx]
mov ecx, eax
shl esi, cl
or esi, edx
jmp 0x100123f6
mov esi, edx
mov ecx, dword [ebp - 0x8e0]
and esi, 0x1ff
and esi, dword [ebp - 0x8e4]
movzx edi, byte [esi + ecx]
mov esi, edi
and esi, 0xf
sar edi, 4
mov ecx, esi
cmp eax, esi
jae 0x10012434
mov edx, dword [ebx]
sub ecx, eax
shr edx, cl
mov ecx, 0x20
sub ecx, esi
add eax, ecx
add ebx, 4
mov dword [ebp - 0x8b0], ebx
jmp 0x10012438
shr edx, cl
sub eax, esi
movzx esi, byte [edi + 0x10035d90]
movzx ecx, byte [edi + 0x10035da0]
mov dword [ebp - 0x8bc], ecx
cmp esi, 0xb
jne 0x10012487
cmp eax, 6
jae 0x1001247c
mov edi, dword [ebx]
mov ecx, eax
mov esi, edi
shl esi, cl
mov ecx, 6
sub ecx, eax
shr edi, cl
or esi, edx
and esi, 0x3f
add eax, 0x1a
add ebx, 4
mov edx, edi
mov dword [ebp - 0x8b0], ebx
jmp 0x10012487
mov esi, edx
and esi, 0x3f
shr edx, 6
sub eax, 6
mov ecx, dword [ebp - 0x8b8]
add ecx, esi
mov dword [ebp - 0x8b8], ecx
cmp ecx, 0x3f
ja 0x100125f1
cmp eax, 0xb
jae 0x100124ad
mov esi, dword [ebx]
mov ecx, eax
shl esi, cl
or esi, edx
jmp 0x100124af
mov esi, edx
and esi, 0x7ff
not esi
bsf ecx, esi
mov edi, ecx
inc edi
mov dword [ebp - 0x8b4], ecx
mov ecx, edi
cmp eax, edi
jae 0x100124e3
mov edx, dword [ebx]
sub ecx, eax
shr edx, cl
mov ecx, 0x20
sub ecx, edi
add eax, ecx
add ebx, 4
mov dword [ebp - 0x8b0], ebx
jmp 0x100124e7
shr edx, cl
sub eax, edi
cmp edi, 4
jl 0x10012556
add edi, 0xfffffffd
mov ecx, 0x20
or esi, 0xffffffff
sub ecx, edi
shr esi, cl
cmp eax, edi
jae 0x10012535
mov ebx, dword [ebx]
mov dword [ebp - 0x8b4], ebx
mov ecx, eax
shl ebx, cl
mov ecx, edi
sub ecx, eax
or ebx, edx
mov edx, dword [ebp - 0x8b4]
shr edx, cl
mov ecx, 0x20
and esi, ebx
mov ebx, dword [ebp - 0x8b0]
sub ecx, edi
add eax, ecx
add ebx, 4
mov dword [ebp - 0x8b0], ebx
jmp 0x1001253d
and esi, edx
mov ecx, edi
shr edx, cl
sub eax, edi
mov ecx, 1
mov dword [ebp - 0x8b4], ecx
mov ecx, edi
mov edi, dword [ebp - 0x8b4]
shl edi, cl
lea edi, [esi + edi + 2]
test eax, eax
jne 0x10012570
mov ecx, dword [ebx]
add ebx, 4
mov edx, ecx
mov dword [ebp - 0x8b0], ebx
shr edx, 1
mov eax, 0x1f
jmp 0x10012575
mov ecx, edx
shr edx, 1
dec eax
and ecx, 1
neg ecx
mov esi, ecx
xor esi, edi
mov edi, dword [ebp - 0x8f4]
sub esi, ecx
mov ecx, dword [ebp - 0x8b8]
movzx ecx, byte [ecx + 0x10035840]
movzx edi, word [edi + ecx*2]
mov ecx, dword [ebp - 0x8f0]
imul edi, esi
inc dword [ebp - 0x8cc]
shl edi, cl
mov ecx, dword [ebp - 0x8c8]
add ecx, 2
mov dword [ebp - 0x8c8], ecx
add edi, 0x40
sar edi, 7
mov word [ecx - 2], di
mov ecx, dword [ebp - 0x8b8]
mov esi, dword [ecx*8 + 0x1003b190]
or dword [ebp - 0x8dc], esi
mov esi, dword [ecx*8 + 0x1003b194]
or dword [ebp - 0x8d8], esi
inc ecx
mov dword [ebp - 0x8b8], ecx
cmp ecx, 0x40
jb 0x100123d0
bsf ecx, dword [ebp - 0x8c4]
mov dword [ebp - 0x8bc], ecx
mov ecx, dword [ebp - 0x8cc]
cmp ecx, 8
sbb esi, esi
neg esi
cmp ecx, 4
sbb edi, edi
neg edi
add si, di
mov edi, dword [ebp - 0x8bc]
cmp ecx, 1
sbb ecx, ecx
neg ecx
add si, cx
mov ecx, 0x2000
imul si, cx
mov ecx, dword [ebp + 0x1c]
mov cx, word [ecx + edi*4]
mov edi, 0x1fff
and cx, di
mov edi, dword [ebp - 0x8bc]
or si, cx
or si, word [ebp + 0x20]
mov ecx, dword [ebp - 0x8d0]
mov word [ecx + edi*2], si
mov ecx, dword [ebp - 0x8e8]
mov esi, dword [ebp - 0x8dc]
mov dword [ecx], esi
mov esi, dword [ebp - 0x8d8]
add ecx, 4
mov dword [ecx], esi
add ecx, 4
mov dword [ebp - 0x8e8], ecx
mov ecx, dword [ebp - 0x8c4]
lea esi, [ecx - 1]
and ecx, esi
mov dword [ebp - 0x8c4], ecx
jne 0x100123ab
mov edi, dword [ebp - 0x8ec]
mov ecx, dword [ebp - 0x8c0]
cmp dword [edi], 0
je 0x100126ad
mov esi, dword [ebp - 0x8c8]
add esi, 3
and esi, 0xfffffffc
mov dword [edi + 8], esi
mov dword [ecx + 4], ebx
mov dword [ecx], edx
mov dword [ecx + 8], eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100329a0
mov esp, ebp
pop ebp
ret