Function at 0x10077290
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x24
push esi
mov esi, ecx
mov eax, dword [esi + 0x46c8c]
test eax, eax
je 0x100772cd
mov ecx, dword [esi + 0x46c90]
push 2
push 0
push 0x10
push ecx
call eax
add esp, 0x10
test eax, eax
je 0x100772cd
push 0x102419c0
lea edx, [esp + 0x14]
push edx
mov dword [esp + 0x18], 6
call fcn.101525f9
push ebp
xor ebp, ebp
xor eax, eax
mov dword [esp + 0xc], ebp
cmp ax, word [esi + 0xac]
jae 0x100774ec
push ebx
push edi
jmp 0x100772f0
movzx eax, word [esi + 0xae]
mov dword [esp + 0x10], 0
test eax, eax
jbe 0x100774d6
mov ecx, ebp
and ecx, 7
lea edx, [ecx + ecx]
mov dword [esp + 0x20], edx
mov ecx, dword [esp + 0x10]
movzx eax, word [esi + 0x409dc]
mov ebx, dword [esi + 0x98]
movzx edx, word [esi + 0xb6]
and ecx, 1
or ecx, dword [esp + 0x20]
mov edi, dword [esi + 0x40860]
add ecx, ecx
shr ebx, cl
mov dword [esp + 0x28], ecx
mov ecx, eax
shr ebp, cl
and ebx, 3
mov dword [esp + 0x30], ebx
imul ebp, edx
mov edx, dword [esp + 0x10]
mov ecx, edx
mov dword [esp + 0x1c], ecx
mov ecx, eax
mov eax, edx
shr eax, cl
add ebp, eax
lea ecx, [ebx + ebp*4]
xor eax, eax
cmp word [edi + ecx*2], ax
jne 0x100774ba
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
add eax, 2
lea ebp, [eax - 4]
cmp ebp, eax
ja 0x100774ba
lea eax, [edx + 2]
lea edx, [eax - 4]
mov dword [esp + 0x24], edx
mov edi, dword [esp + 0x24]
cmp edi, eax
ja 0x1007746d
nop
movzx eax, word [esi + 0xac]
cmp ebp, eax
jae 0x10077459
movzx eax, word [esi + 0xae]
cmp edi, eax
jae 0x10077459
mov edx, dword [esi + 0x98]
mov eax, ebp
and eax, 7
add eax, eax
mov ecx, edi
and ecx, 1
or eax, ecx
lea ebx, [eax + eax]
mov eax, edx
mov ecx, ebx
shr eax, cl
mov ecx, dword [esp + 0x28]
shr edx, cl
xor eax, edx
test al, 3
jne 0x10077459
movzx eax, word [esi + 0x409dc]
mov edx, dword [esi + 0x98]
mov ecx, ebx
shr edx, cl
mov ecx, eax
mov ebx, ebp
shr ebx, cl
movzx ecx, word [esi + 0xb6]
imul ebx, ecx
mov ecx, edi
mov dword [esp + 0x2c], ecx
mov ecx, eax
mov eax, edi
shr eax, cl
and edx, 3
add ebx, eax
mov eax, dword [esi + 0x40860]
lea ecx, [edx + ebx*4]
cmp word [eax + ecx*2], 0
je 0x10077459
movzx ecx, word [esi + 0x409dc]
movzx eax, word [esi + 0xb6]
inc dword [esp + 0x18]
mov ebx, ebp
shr ebx, cl
imul ebx, eax
mov eax, edi
shr eax, cl
add ebx, eax
mov eax, dword [esi + 0x40860]
lea ecx, [edx + ebx*4]
movzx edx, word [eax + ecx*2]
add dword [esp + 0x1c], edx
mov eax, dword [esp + 0x10]
inc edi
add eax, 2
cmp edi, eax
jbe 0x100773a0
mov ebx, dword [esp + 0x30]
mov ecx, dword [esp + 0x14]
inc ebp
add ecx, 2
cmp ebp, ecx
jbe 0x10077393
cmp dword [esp + 0x18], 0
je 0x100774ba
mov eax, dword [esp + 0x1c]
movzx ecx, word [esi + 0x409dc]
mov edi, dword [esp + 0x14]
xor edx, edx
div dword [esp + 0x18]
movzx edx, word [esi + 0xb6]
shr edi, cl
imul edi, edx
mov edx, dword [esp + 0x10]
shr edx, cl
mov ecx, dword [esi + 0x40860]
add edi, edx
lea edx, [ebx + edi*4]
mov word [ecx + edx*2], ax
mov ecx, dword [esp + 0x10]
movzx eax, word [esi + 0xae]
mov ebp, dword [esp + 0x14]
inc ecx
mov dword [esp + 0x10], ecx
cmp ecx, eax
jb 0x10077313
movzx eax, word [esi + 0xac]
inc ebp
mov dword [esp + 0x14], ebp
cmp ebp, eax
jb 0x100772f0
pop edi
pop ebx
mov eax, dword [esi + 0x46c8c]
pop ebp
test eax, eax
je 0x10077524
mov ecx, dword [esi + 0x46c90]
push 2
push 1
push 0x10
push ecx
call eax
add esp, 0x10
test eax, eax
je 0x10077524
push 0x102419c0
lea edx, [esp + 0x28]
push edx
mov dword [esp + 0x2c], 6
call fcn.101525f9
pop esi
add esp, 0x24
ret