Function at 0x10001910
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x1c
mov eax, dword [0x10165138]
xor edx, edx
push ebx
push ebp
mov ebp, dword [esp + 0x28]
push esi
push edi
mov edi, dword [esp + 0x34]
mov esi, dword [ebp]
movzx ecx, word [edi + eax*2]
sub ecx, eax
mov eax, dword [0x10165124]
mov dword [esp + 0x10], ecx
movzx ecx, word [edi]
movzx ecx, byte [ecx + eax]
mov eax, dword [0x10165110]
movzx eax, word [ebp + eax*4]
imul ecx, eax
movzx eax, cx
mov ecx, 0x1588
mov dword [esp + 0x28], eax
mov eax, dword [0x1016511c]
or eax, 0x1e7e
mov dword [esp + 0x1c], eax
movzx eax, byte [0x10165100]
div ecx
lea eax, [esi + esi*2]
mov ecx, 0x700
or cx, word [edi + eax*2 - 2]
mov ebx, edx
mov eax, dword [0x10165128]
or eax, 0x1822
movzx edx, cx
mov dword [esp + 0x20], eax
mov eax, dword [0x101650f4]
mov dword [esp + 0x18], eax
lea eax, [esi - 1]
mov dword [ebp], eax
mov esi, 0xffff
mov ebp, dword [esp + 0x38]
mov dword [esp + 0x14], edx
movzx ecx, byte [eax + ebp]
movzx eax, dx
mov dword [esp + 0x38], ecx
cmp ecx, eax
jae 0x10001b1b
lea eax, [ecx*2 + 0x20]
mov dword [esp + 0x34], eax
nop dword [eax]
add word [ebx], si
movzx esi, word [ebx]
push dword [esp + 0x38]
movzx eax, byte [esi + ebp]
add ax, dx
movzx ecx, ax
movzx eax, ax
mov dword [esp + 0x18], eax
lea eax, [esi*2]
add eax, ebp
mov dword [esp + 0x28], ecx
movzx ecx, byte [ebp]
movzx edx, byte [esi + eax + 9]
add esi, esi
mov eax, dword [0x10165134]
movzx eax, byte [ecx + eax]
mov ecx, dword [esp + 0x14]
or edx, eax
movzx eax, byte [ebp - 1]
sub ebp, 2
push dword [ecx + esi*8]
movzx eax, word [ebx + eax*2]
push eax
push edx
call fcn.10004ef0
mov edx, dword [0x10165134]
add esp, 0x10
mov ecx, dword [0x10165128]
mov byte [edx + ecx], al
xor edx, edx
movzx ecx, word [ebx]
mov eax, dword [0x1016512c]
lea esi, [eax + ecx*4]
mov eax, dword [esp + 0x34]
movzx ecx, byte [ebp + 0x3bc]
movzx eax, word [eax + edi - 0x22]
div ecx
mov ecx, dword [esp + 0x34]
movzx ecx, word [ecx + ebx]
sub ebx, 2
sub eax, ecx
cdq
idiv dword [esi]
mov dword [esi], edx
mov eax, dword [0x101650f8]
mov ecx, dword [0x10165134]
mov edx, dword [esp + 0x18]
movzx ecx, byte [eax + ecx]
movzx eax, word [ebx]
movzx eax, byte [eax + edx]
cmp ecx, eax
jbe 0x10001af9
nop dword [eax + eax]
mov eax, dword [0x10165128]
inc ecx
mov edx, dword [esp + 0x1c]
lea esi, [edx + eax*2]
movzx eax, byte [ebp]
xor edx, edx
movzx eax, word [edi + eax*2 - 2]
div dword [0x101650f4]
add word [esi], dx
mov eax, dword [0x10165148]
dec dword [0x10165128]
mov edx, dword [esp + 0x20]
or dword [edx + eax*4], 0x205
inc dword [0x10165148]
movzx eax, word [ebx]
movzx edx, word [edi + eax*2 - 2]
mov eax, dword [esp + 0x24]
movzx eax, ax
or edx, eax
sub edx, dword [0x1016510c]
mov dword [0x1016510c], edx
movzx eax, word [ebx]
mov edx, dword [esp + 0x18]
movzx eax, byte [eax + edx]
cmp ecx, eax
jg 0x10001a90
mov ecx, dword [esp + 0x38]
mov esi, 0xffff
mov edx, dword [esp + 0x14]
inc ecx
add dword [esp + 0x34], 2
movzx eax, dx
mov dword [esp + 0x38], ecx
cmp ecx, eax
jl 0x100019d0
movzx eax, word [0x1016513c]
mov esi, dword [esp + 0x30]
mov eax, dword [esi + eax*8]
cmp eax, dword [0x1016514c]
jl 0x10001bd5
mov eax, dword [0x10165128]
mov ecx, dword [esp + 0x10]
movzx edx, word [ecx + eax*4]
movzx eax, word [ebx]
lea eax, [eax + eax*2]
mov ecx, dword [esi + eax*4]
mov eax, 0xffff
add word [edi - 2], ax
movzx eax, word [edi - 2]
mov esi, dword [esp + 0x1c]
movzx eax, word [esi + eax*2]
dec dword [0x10165138]
push eax
push 0x8da
push ecx
push 0x1a
push edx
call fcn.10005010
mov ecx, dword [0x10165138]
add esp, 0x14
mov edx, dword [esp + 0x30]
add ecx, ecx
mov dword [edx + ecx*8], eax
mov eax, 0xffff
add word [edi - 2], ax
movzx eax, word [edi - 2]
movzx ecx, byte [0x10165101]
mov edx, dword [0x1016512c]
lea esi, [eax*4]
mov eax, dword [0x10165124]
movzx eax, byte [ecx + eax + 2]
mov ecx, dword [0x101650fc]
add eax, dword [0x10165108]
and eax, dword [edx + ecx*4]
xor edx, edx
movzx ecx, word [0x1016513c]
and eax, ecx
movzx ecx, byte [esi + ebp]
div ecx
mov byte [esi + ebp], al
movzx edx, word [ebx]
mov eax, dword [0x10165120]
mov ecx, dword [0x10165128]
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 0x20]
lea ecx, [eax + ecx*8]
movzx eax, word [ebx + edx*2]
xor eax, dword [ebp + edx*8]
xor edx, edx
div dword [ecx]
mov dword [ecx], eax
movzx eax, word [ebx]
imul ecx, dword [ebp + eax*4], 0x1bf0
lea edx, [esi + eax*4]
mov eax, dword [esp + 0x14]
movzx eax, ax
add eax, 0x17c6
add eax, ecx
imul eax, dword [edx]
mov dword [edx], eax
mov ecx, dword [0x101650fc]
mov eax, dword [0x10165154]
mov edx, dword [esp + 0x28]
and edx, 0x4f7
mov dword [eax + ecx*8], edx
movzx eax, word [ebx]
movzx ecx, word [edi - 2]
mov al, byte [ebp + eax*4]
xor al, byte [edi + ecx*2 - 2]
sub al, byte [0x10165101]
mov byte [0x10165101], al
movzx ecx, word [ebx]
pop edi
mov eax, dword [esi + ecx*4]
and eax, dword [ebp + ecx*4]
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret