Function at 0x10078910
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 0x10078bbf
mov edx, dword [eax + 4]
mov dword [ebp - 0x98], edx
mov ebx, dword [edx + 0x18]
test byte [ebx + 0x2c], 0x10
jne 0x10078bbf
cmp dword [edx + 0x50], 0
jne 0x10078bbf
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.100703f0
mov edx, eax
add esp, 0x10
test edx, edx
je 0x100789c7
nop dword [eax + eax]
mov ecx, dword [edx + 0x20]
mov eax, esi
or ecx, dword [edx + 0x24]
mov edi, esi
jne 0x100789b2
test byte [edx + 0x12], 2
jne 0x100789c9
mov esi, edx
lea ecx, [ebp - 0x78]
test edi, edi
cmovne esi, eax
call fcn.10070140
mov edx, eax
test edx, edx
jne 0x100789a0
mov edx, esi
mov ecx, 1
test edx, edx
je 0x100789f7
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 0x10078aba
mov edi, dword [ebx + 8]
mov dword [ebp - 0x80], edi
test edi, edi
je 0x10078b9d
cmp byte [edi + 0x36], 0
je 0x10078aa4
cmp dword [edi + 0x24], 0
jne 0x10078aa4
movzx eax, word [edi + 0x32]
cmp eax, 4
ja 0x10078aa4
xor ecx, ecx
xor ebx, ebx
cmp cx, ax
jae 0x10078a98
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.100703f0
add esp, 0x10
test eax, eax
je 0x10078a7d
mov ecx, dword [eax + 0x20]
mov edx, esi
or ecx, dword [eax + 0x24]
mov edi, esi
jne 0x10078a6a
test byte [eax + 0x12], 2
jne 0x10078a7f
mov esi, eax
lea ecx, [ebp - 0x78]
test edi, edi
cmovne esi, edx
call fcn.10070140
test eax, eax
jne 0x10078a58
mov eax, esi
mov edi, dword [ebp - 0x80]
test eax, eax
je 0x10078a98
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 0x10078a30
movzx eax, word [edi + 0x32]
cmp ebx, eax
je 0x10078b4f
mov edi, dword [edi + 0x14]
mov dword [ebp - 0x80], edi
test edi, edi
jne 0x10078a05
mov esi, dword [ebp - 0x7c]
mov ecx, 1
cmp dword [esi + 0x24], 0
je 0x10078bbf
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 0x10078af6
lea ecx, [edi + 0x48]
cmp dword [ecx], ebx
je 0x10078ba5
inc eax
add ecx, 4
cmp eax, edx
jl 0x10078ae6
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 0x10078b2e
mov al, byte [eax]
mov byte [edi + 0x24], al
mov ecx, 0x400
test word [edi + 0x22], cx
je 0x10078b3c
mov byte [edi + 0x28], dl
mov eax, edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100be889
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x7c]
mov dword [esi + 0x24], 0x1201
test byte [edi + 0x38], 0x20
jne 0x10078b7a
mov ecx, edi
call fcn.100763b0
mov ecx, dword [ebp - 0x98]
not eax
not edx
and eax, dword [ecx + 0x48]
and edx, dword [ecx + 0x4c]
or eax, edx
jne 0x10078b81
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 0x10078ab5
mov esi, dword [ebp - 0x7c]
jmp 0x10078aba
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 0x10078b0d
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100be889
mov esp, ebp
pop ebp
ret