Function at 0x10078e50
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
mov eax, dword [0x10100008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ecx]
push ebx
push esi
push edi
test byte [eax + 0x22], 0x20
mov dword [ebp - 0x8c], eax
jne 0x100790ff
mov edx, dword [eax + 4]
mov dword [ebp - 0x98], edx
mov ebx, dword [edx + 0x18]
test byte [ebx + 0x2c], 0x10
jne 0x100790ff
cmp dword [edx + 0x50], 0
jne 0x100790ff
mov edx, dword [edx + 0x38]
lea edi, [eax + 0x148]
mov eax, dword [ecx + 0xc]
xor esi, esi
push esi
push 2
xor ecx, ecx
mov dword [ebp - 0x84], edx
push 0xffffffffffffffff
mov word [eax + 0x1a], cx
lea ecx, [ebp - 0x78]
push edx
mov edx, edi
mov dword [ebp - 0x94], edi
mov dword [ebp - 0x7c], eax
mov dword [eax + 0x24], 0
call fcn.100708c0
mov edx, eax
add esp, 0x10
test edx, edx
je 0x10078f07
nop dword [eax + eax]
mov ecx, dword [edx + 0x20]
mov eax, esi
or ecx, dword [edx + 0x24]
mov edi, esi
jne 0x10078ef2
test byte [edx + 0x12], 2
jne 0x10078f09
mov esi, edx
lea ecx, [ebp - 0x78]
test edi, edi
cmovne esi, eax
call fcn.10070610
mov edx, eax
test edx, edx
jne 0x10078ee0
mov edx, esi
mov ecx, 1
test edx, edx
je 0x10078f37
mov esi, dword [ebp - 0x7c]
mov eax, dword [esi + 0x2c]
mov dword [esi + 0x24], 0x1101
mov dword [eax], edx
mov eax, 0x21
mov word [esi + 0x28], cx
mov word [esi + 0x18], cx
mov word [esi + 0x14], ax
jmp 0x10078ffa
mov edi, dword [ebx + 8]
mov dword [ebp - 0x80], edi
test edi, edi
je 0x100790dd
cmp byte [edi + 0x36], 0
je 0x10078fe4
cmp dword [edi + 0x24], 0
jne 0x10078fe4
movzx eax, word [edi + 0x32]
cmp eax, 4
ja 0x10078fe4
xor ecx, ecx
xor ebx, ebx
cmp cx, ax
jae 0x10078fd8
nop
mov eax, dword [edi + 4]
lea ecx, [ebp - 0x78]
mov edx, dword [ebp - 0x94]
xor esi, esi
push edi
push 2
movsx eax, word [eax + ebx*2]
push eax
push dword [ebp - 0x84]
call fcn.100708c0
add esp, 0x10
test eax, eax
je 0x10078fbd
mov ecx, dword [eax + 0x20]
mov edx, esi
or ecx, dword [eax + 0x24]
mov edi, esi
jne 0x10078faa
test byte [eax + 0x12], 2
jne 0x10078fbf
mov esi, eax
lea ecx, [ebp - 0x78]
test edi, edi
cmovne esi, edx
call fcn.10070610
test eax, eax
jne 0x10078f98
mov eax, esi
mov edi, dword [ebp - 0x80]
test eax, eax
je 0x10078fd8
mov ecx, dword [ebp - 0x7c]
mov ecx, dword [ecx + 0x2c]
mov dword [ecx + ebx*4], eax
inc ebx
movzx eax, word [edi + 0x32]
cmp ebx, eax
jl 0x10078f70
movzx eax, word [edi + 0x32]
cmp ebx, eax
je 0x1007908f
mov edi, dword [edi + 0x14]
mov dword [ebp - 0x80], edi
test edi, edi
jne 0x10078f45
mov esi, dword [ebp - 0x7c]
mov ecx, 1
cmp dword [esi + 0x24], 0
je 0x100790ff
mov edi, dword [ebp - 0x8c]
xor eax, eax
mov ebx, dword [ebp - 0x84]
mov word [esi + 0x16], cx
mov dword [edi + 0x318], esi
mov edx, dword [edi + 0x44]
test edx, edx
jle 0x10079036
lea ecx, [edi + 0x48]
cmp dword [ecx], ebx
je 0x100790e5
inc eax
add ecx, 4
cmp eax, edx
jl 0x10079026
xorps xmm0, xmm0
movlpd qword [ebp - 0x90], xmm0
mov edx, dword [ebp - 0x8c]
mov ecx, dword [ebp - 0x90]
mov dword [esi + 0xc], edx
mov edx, 1
mov dword [esi + 8], ecx
mov dword [edi + 0x2e4], ebx
mov eax, dword [edi + 8]
mov word [edi + 0x20], dx
test eax, eax
je 0x1007906e
mov al, byte [eax]
mov byte [edi + 0x24], al
mov ecx, 0x400
test word [edi + 0x22], cx
je 0x1007907c
mov byte [edi + 0x28], dl
mov eax, edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100be1f9
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x7c]
mov dword [esi + 0x24], 0x1201
test byte [edi + 0x38], 0x20
jne 0x100790ba
mov ecx, edi
call fcn.100768a0
mov ecx, dword [ebp - 0x98]
not eax
not edx
and eax, dword [ecx + 0x48]
and edx, dword [ecx + 0x4c]
or eax, edx
jne 0x100790c1
mov dword [esi + 0x24], 0x1241
movzx eax, bx
mov word [esi + 0x28], ax
mov word [esi + 0x18], ax
mov eax, 0x27
mov dword [esi + 0x1c], edi
mov word [esi + 0x14], ax
jmp 0x10078ff5
mov esi, dword [ebp - 0x7c]
jmp 0x10078ffa
xor ecx, ecx
xor edx, edx
bts ecx, eax
cmp eax, 0x20
cmovae edx, ecx
xor ecx, edx
cmp eax, 0x40
cmovae edx, ecx
jmp 0x1007904d
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100be1f9
mov esp, ebp
pop ebp
ret