Function at 0x10080e80
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, ecx
mov eax, dword [esi + 0x30]
imul eax, dword [esi + 0x50]
mov dword [esp + 0xc], eax
mov eax, dword [esi + 0x4c]
push edi
mov ebx, 1
cmp eax, dword [esi + 0xc]
jae 0x10081145
mov ecx, dword [esi + 0x50]
cmp ecx, dword [esi + 0x34]
jae 0x10081145
mov edx, dword [esi + 0x4c]
cmp edx, dword [esi + 0x40]
jne 0x10080ec2
mov al, byte [esi + 0x45]
cmp byte [esi + 0x44], al
je 0x10080ec2
mov byte [esi + 0x44], al
xor edi, edi
cmp dword [esi + 0x48], edi
jne 0x10080fbc
test byte [esi + 0x13], 8
je 0x10080f49
push 0xe5
mov ecx, esi
call fcn.10080b80
cmp al, 2
je 0x1008114d
mov cl, byte [esi + 0x62]
xor cl, al
sete al
mov byte [esi + 0x62], al
test al, al
jne 0x10080f49
mov eax, dword [esi + 0x28]
cmp eax, edi
jne 0x10080f1f
mov edx, dword [esi + 0x30]
mov eax, dword [esi + 0x24]
push edx
push edi
push eax
call fcn.1013f910
mov ecx, dword [esi + 0x30]
add dword [esi + 0x28], ecx
add dword [esi + 0x4c], ebx
add esp, 0xc
add dword [esi + 0x50], ebx
jmp 0x10081139
mov edx, dword [esi + 0x24]
mov ecx, dword [esi + 0x30]
mov edi, edx
sub edi, ecx
push ecx
add edi, eax
add edx, eax
push edi
push edx
call fcn.1013fc90
mov ecx, dword [esi + 0x30]
add dword [esi + 0x28], ecx
add dword [esi + 0x4c], ebx
add esp, 0xc
add dword [esi + 0x50], ebx
jmp 0x10081139
mov ecx, dword [esi + 0x50]
cmp ecx, ebx
jbe 0x10080f70
mov edx, dword [esi + 0x30]
mov eax, dword [esi + 0x28]
add edx, edx
sub eax, edx
mov edx, dword [esi + 0x24]
add eax, edx
movzx edx, byte [eax + 1]
movzx eax, byte [eax]
shl eax, 8
or edx, eax
mov dword [esi + 0x5c], edx
jmp 0x10080f73
mov dword [esi + 0x5c], edi
cmp ecx, edi
jbe 0x10080f8f
mov eax, dword [esi + 0x28]
add eax, dword [esi + 0x24]
sub eax, dword [esi + 0x30]
movzx edx, byte [eax]
movzx ecx, byte [eax + 1]
shl edx, 8
or ecx, edx
mov dword [esi + 0x58], ecx
mov eax, dword [esi + 0x58]
mov ecx, dword [esi + 0x5c]
shr eax, 0xb
shr ecx, 7
and eax, 0x7c
and ecx, 0x380
or eax, ecx
cmp byte [esi + 0x44], 0
mov dword [esi + 0x54], edi
mov word [esi + 0x60], ax
jle 0x10080fbc
and eax, 0xfffb
mov word [esi + 0x60], ax
mov edx, dword [esi + 0x48]
cmp edx, dword [esi + 4]
jae 0x100810f6
jmp 0x10080fd0
mov eax, dword [esi + 0x28]
cmp eax, dword [esi + 0x2c]
jae 0x100810f6
lea esp, [esp]
movzx ecx, word [esi + 0x60]
push ecx
mov ecx, esi
call fcn.10080b80
cmp al, 2
je 0x1008114d
mov edx, dword [esi + 0x54]
shl dword [esi + 0x5c], 1
shl dword [esi + 0x58], 1
mov ecx, dword [esi + 0x5c]
mov edi, dword [esi + 0x58]
add dword [esi + 0x48], ebx
mov ebp, dword [esi + 0x48]
movzx eax, al
add edx, edx
or edx, eax
shr ecx, 7
shr edi, 0xb
and ecx, 0x380
and edi, 0x7c
mov ax, dx
and ax, 3
or ecx, edi
or cx, ax
mov al, byte [esi + 0x44]
mov dword [esi + 0x54], edx
mov word [esi + 0x60], cx
test al, al
jle 0x1008108f
mov edi, ecx
movsx ecx, al
and edi, 0xfffb
mov word [esi + 0x60], di
cmp ecx, ebp
ja 0x1008108f
cmp al, 0x20
ja 0x10081061
dec ecx
shr edx, cl
and edx, ebx
add edx, edx
add edx, edx
or edx, edi
mov word [esi + 0x60], dx
jmp 0x1008108f
mov eax, ebp
sub eax, ecx
mov edx, eax
and al, 7
shr edx, 3
add edx, dword [esi + 0x24]
mov cl, 7
sub cl, al
mov eax, dword [esp + 0x10]
mov dl, byte [edx + eax]
shr dl, cl
and dl, bl
movzx ax, dl
add ax, ax
add ax, ax
or ax, di
mov word [esi + 0x60], ax
test ebp, 7
je 0x100810a0
cmp ebp, dword [esi + 4]
jb 0x10080fe0
mov ecx, dword [esi + 0x28]
mov al, byte [esi + 0x54]
mov edx, dword [esi + 0x24]
mov byte [ecx + edx], al
mov ecx, dword [esi + 4]
sub ecx, dword [esi + 0x48]
add dword [esi + 0x28], ebx
mov eax, dword [esi + 0x28]
cmp ecx, 8
jbe 0x100810ea
mov ecx, dword [esi + 0x50]
cmp ecx, ebx
jbe 0x100810d8
mov edx, dword [esi + 0x30]
add edx, edx
mov edi, eax
sub edi, edx
mov edx, dword [esi + 0x24]
movzx edx, byte [edi + edx + 1]
or dword [esi + 0x5c], edx
test ecx, ecx
jbe 0x100810ea
sub eax, dword [esi + 0x30]
mov ecx, dword [esi + 0x24]
movzx edx, byte [eax + ecx + 1]
or dword [esi + 0x58], edx
mov eax, dword [esi + 0x48]
cmp eax, dword [esi + 4]
jb 0x10080fd0
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x24]
lea eax, [ecx + edx - 1]
mov cl, byte [esi + 0x30]
add cl, cl
add cl, cl
add cl, cl
sub cl, byte [esi + 4]
shl byte [eax], cl
test byte [esi + 0x13], 0x20
je 0x10081125
cmp dword [esi + 8], 0xffffffff
jne 0x10081125
mov ecx, esi
call fcn.100807e0
test al, al
je 0x1008114d
mov eax, dword [esi + 0x30]
add dword [esi + 0x4c], ebx
add dword [esi + 0x50], ebx
add dword [esp + 0x10], eax
mov dword [esi + 0x48], 0
mov ecx, dword [esi + 0x4c]
cmp ecx, dword [esi + 0xc]
jb 0x10080ea3
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
xor al, al
pop ebx
pop ecx
ret