Function at 0x1008d670
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x20
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x10097930
lea eax, [ebp - 0x18]
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
mov dword [ebp - 0x10], 0
push dword [ebp + 0xc]
call fcn.1008e1e0
add esp, 4
mov edi, dword [ebp + 8]
test al, al
je 0x1008d6e9
mov ecx, dword [ebp + 0x10]
mov byte [edi + 0x1a], 3
mov eax, dword [ecx]
test eax, eax
je 0x1008d834
mov esi, ecx
mov eax, dword [eax + 0x10]
add ecx, 0xc
mov dword [ebp - 0x10], 0xffffffff
mov edx, dword [esi + 4]
mov esi, dword [esi + 8]
push esi
push edx
push ecx
call eax
add esp, 0xc
jmp 0x1008d834
push dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
push edi
call fcn.1008d350
add esp, 8
movzx ecx, word [edi + 0x38]
mov word [ebp - 0x1e], ax
mov dword [ebp - 0x24], 0
and cx, ax
movzx ebx, cx
jmp 0x1008d724
movzx eax, byte [eax + 4]
mov ecx, dword [ebp + 0x10]
cmp al, byte [ecx + 4]
je 0x1008d847
nop
inc dword [ebp - 0x24]
inc ebx
cmp ebx, dword [edi + 0x1c]
jb 0x1008d736
mov eax, dword [edi + 0x1c]
nop dword [eax]
test eax, eax
je 0x1008d730
xor ebx, ebx
mov eax, dword [edi + 0x18]
movzx ecx, word [eax + ebx*4]
cmp ecx, 0xffff
je 0x1008d7ee
mov dword [ebp - 0x28], ecx
movzx ecx, word [edi + 0x38]
movzx eax, word [eax + ebx*4 + 2]
mov esi, ebx
mov edx, ecx
and edx, eax
sub esi, edx
and esi, ecx
cmp esi, dword [ebp - 0x24]
jb 0x1008d7ee
cmp ax, word [ebp - 0x1e]
jne 0x1008d720
mov eax, dword [edi + 0x28]
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x2c], ebx
cmp eax, ecx
jbe 0x1008d85d
mov eax, dword [edi + 0x24]
imul edx, ecx, 0x34
mov esi, dword [ebp + 0x10]
mov ecx, dword [eax + edx + 0x20]
test ecx, ecx
setne bl
cmp dword [esi], 0
sete bh
cmp bl, bh
mov ebx, dword [ebp - 0x2c]
je 0x1008d720
lea eax, [eax + edx + 0x20]
test ecx, ecx
je 0x1008d70f
mov dword [ebp - 0x10], 0
push dword [ebp + 0x10]
push eax
call fcn.101863a0
add esp, 8
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp - 0x2c]
test al, al
je 0x1008d720
mov eax, edi
mov edi, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
mov dword [edi], eax
mov eax, dword [ebp - 0x28]
mov dword [edi + 4], ebx
mov dword [edi + 8], eax
mov eax, dword [ecx]
mov byte [edi + 0x1a], 2
test eax, eax
jne 0x1008d6c7
jmp 0x1008d834
cmp dword [ebp - 0x24], 0x200
mov ecx, dword [edi]
mov edx, edi
movzx esi, word [ebp - 0x1e]
setae al
xor ecx, 2
or ecx, dword [edi + 4]
mov ecx, dword [ebp + 8]
mov dword [ecx], edx
mov edx, dword [ebp + 0x10]
mov edi, ecx
movsd xmm0, qword [edx]
mov ecx, dword [edx + 0xc]
movsd qword [edi + 4], xmm0
mov dword [edi + 0x10], ecx
mov ecx, dword [edx + 8]
setne dl
and dl, al
mov dword [edi + 0xc], ecx
mov dword [edi + 0x14], ebx
mov word [edi + 0x18], si
mov byte [edi + 0x1a], dl
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
mov eax, edi
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, edi
mov edi, dword [ebp + 8]
mov ecx, dword [ebp - 0x28]
mov dword [edi], eax
mov dword [edi + 4], ebx
mov dword [edi + 8], ecx
mov byte [edi + 0x1a], 2
jmp 0x1008d834
mov dword [ebp - 0x10], 0
push 0x101dc118
push eax
push ecx
call fcn.101cc694
add esp, 0xc
ud2