Function at 0x1002082
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov ecx, dword [ebp + 0x18]
push ebx
push esi
push edi
xor edi, edi
cmp ecx, edi
jbe 0x10020a9
mov eax, 0x10189c4
mov edx, ecx
mov dword [eax - 4], edi
mov dword [eax], edi
mov dword [eax + 4], edi
add eax, 0xc
dec edx
jne 0x100209b
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x2c]
imul eax, dword [esi + 4]
add eax, dword [ebp + 0x10]
add dword [ebp + 0xc], eax
mov eax, dword [ebp + 0x20]
imul edx, dword [eax + 4]
add edx, dword [ebp + 0x28]
add dword [ebp + 0x24], edx
mov edx, dword [ebp + 0x1c]
cmp edx, edi
jbe 0x100227d
mov dword [ebp + 0x28], edx
cmp ecx, edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], edi
jbe 0x1002264
mov ebx, 0x10189c0
mov dword [ebp + 0x2c], ecx
jmp 0x10020fb
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
inc dword [ebp + 0xc]
mov al, byte [eax]
movzx ecx, al
movzx eax, byte [esi + ecx*4 + 0x2a]
movzx edx, byte [esi + ecx*4 + 0x29]
movzx ecx, byte [esi + ecx*4 + 0x28]
add eax, dword [ebp - 0x10]
add edx, dword [ebp - 0xc]
add ecx, edi
lea esi, [ebp - 0x1c]
add eax, dword [ebx]
add edx, dword [ebx + 4]
add ecx, dword [ebx + 8]
mov edi, ebx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [ebp + 0x14], edx
mov esi, 0x80
xor dl, dl
cmp eax, esi
mov dword [ebp + 0x1c], eax
mov dword [ebp - 4], ecx
jle 0x100214d
add dl, 2
cmp eax, 0xc0
jle 0x100214d
mov dl, 3
cmp dword [ebp + 0x14], esi
jle 0x1002161
or dl, 8
cmp dword [ebp + 0x14], 0xc0
jle 0x1002161
or dl, 4
cmp ecx, esi
jle 0x1002173
or dl, 0x20
cmp ecx, 0xc0
jle 0x1002173
or dl, 0x10
cmp eax, esi
jle 0x1002183
cmp ecx, esi
jle 0x1002183
cmp dword [ebp + 0x14], esi
jle 0x1002183
or dl, 0x80
mov eax, dword [ebp + 0x24]
inc dword [ebp + 0x24]
mov byte [eax], dl
movzx eax, dl
push eax
call fcn.0100201d
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 0x1c]
movzx ecx, byte [ebp + 0x12]
sub eax, ecx
push 0x20
shl eax, 3
mov esi, eax
pop edi
cdq
mov ecx, eax
push 0x40
xor ecx, edx
sub ecx, edx
mov eax, ecx
cdq
idiv edi
mov edi, eax
mov eax, ecx
cdq
pop ecx
idiv ecx
test esi, esi
jg 0x10021c4
neg edi
test esi, esi
mov dword [ebp - 0x10], edi
jg 0x10021cd
neg eax
movzx ecx, byte [ebp + 0x11]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x10]
add dword [ebx], eax
mov eax, dword [ebp + 0x14]
sub eax, ecx
push 0x20
shl eax, 3
mov esi, eax
pop edi
cdq
mov ecx, eax
push 0x40
xor ecx, edx
sub ecx, edx
mov eax, ecx
cdq
idiv edi
mov edi, eax
mov eax, ecx
cdq
pop ecx
idiv ecx
test esi, esi
jg 0x1002202
neg edi
test esi, esi
mov dword [ebp - 0xc], edi
jg 0x100220b
neg eax
movzx ecx, byte [ebp + 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xc]
add dword [ebx + 4], eax
mov eax, dword [ebp - 4]
sub eax, ecx
push 0x20
shl eax, 3
mov esi, eax
pop edi
cdq
mov ecx, eax
push 0x40
xor ecx, edx
sub ecx, edx
mov eax, ecx
cdq
idiv edi
mov edi, eax
mov eax, ecx
cdq
pop ecx
idiv ecx
test esi, esi
jg 0x1002247
neg edi
test esi, esi
jg 0x1002247
neg eax
add dword [ebx + 8], edi
add ebx, 0xc
dec dword [ebp + 0x2c]
mov dword [ebp - 0x14], eax
jne 0x10020f8
mov eax, dword [ebp + 0x20]
mov esi, dword [ebp + 8]
mov ecx, dword [ebp + 0x18]
xor edi, edi
mov edx, dword [esi + 4]
sub edx, ecx
add dword [ebp + 0xc], edx
mov edx, dword [eax + 4]
sub edx, ecx
add dword [ebp + 0x24], edx
dec dword [ebp + 0x28]
jne 0x10020d7
lea esi, [eax + 0x28]
push edi
call fcn.0100201d
mov dword [esi], eax
inc edi
add esi, 4
cmp edi, 0x100
jb 0x1002280
pop edi
pop esi
pop ebx
leave
ret 0x28