Function at 0x1002106
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov ecx, dword [ebp + 0x18]
push esi
xor esi, esi
cmp ecx, esi
jbe 0x100212d
mov eax, 0x101a924
mov edx, ecx
mov dword [eax - 4], esi
mov dword [eax], esi
mov dword [eax + 4], esi
add eax, 0xc
dec edx
jne 0x100211f
push ebx
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 4]
imul eax, dword [ebp + 0x14]
add eax, dword [ebp + 0x10]
add dword [ebp + 0xc], eax
mov eax, dword [ebp + 0x20]
mov edx, dword [eax + 4]
imul edx, dword [ebp + 0x2c]
add edx, dword [ebp + 0x28]
add dword [ebp + 0x24], edx
mov edx, dword [ebp + 0x1c]
cmp edx, esi
jbe 0x10022f7
push edi
mov dword [ebp + 0x28], edx
cmp ecx, esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
jbe 0x10022dd
mov edi, 0x101a920
mov dword [ebp + 0x10], edi
mov dword [ebp + 0x2c], ecx
jmp 0x1002184
mov edi, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
mov al, byte [eax]
inc dword [ebp + 0xc]
movzx eax, al
movzx edx, byte [ebx + eax*4 + 0x2a]
movzx ecx, byte [ebx + eax*4 + 0x29]
movzx ebx, byte [ebx + eax*4 + 0x28]
add ebx, dword [edi + 8]
add edx, dword [edi]
add ecx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
add ecx, dword [edi + 4]
add ebx, esi
lea esi, [ebp - 0x18]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, 0x80
xor al, al
cmp edx, esi
mov dword [ebp + 0x1c], ecx
mov edi, 0xc0
jle 0x10021cf
add al, 2
cmp edx, edi
jle 0x10021cf
mov al, 3
cmp ecx, esi
jle 0x10021db
or al, 8
cmp ecx, edi
jle 0x10021db
or al, 4
cmp ebx, esi
jle 0x10021e7
or al, 0x20
cmp ebx, edi
jle 0x10021e7
or al, 0x10
cmp edx, esi
jle 0x10021f5
cmp ebx, esi
jle 0x10021f5
cmp ecx, esi
jle 0x10021f5
or al, 0x80
mov ecx, dword [ebp + 0x24]
inc dword [ebp + 0x24]
mov byte [ecx], al
movzx eax, al
push eax
call fcn.0100209a
mov dword [ebp + 0x14], eax
movzx eax, byte [ebp + 0x16]
sub edx, eax
shl edx, 3
mov esi, edx
mov eax, esi
cdq
mov ecx, eax
xor ecx, edx
sub ecx, edx
mov eax, ecx
cdq
push 0x20
pop edi
idiv edi
push 0x40
mov edi, eax
mov eax, ecx
cdq
pop ecx
idiv ecx
test esi, esi
jg 0x1002235
neg edi
test esi, esi
mov dword [ebp - 0xc], edi
jg 0x100223e
neg eax
mov ecx, dword [ebp + 0x10]
movzx edx, byte [ebp + 0x15]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xc]
add dword [ecx], eax
mov eax, dword [ebp + 0x1c]
sub eax, edx
shl eax, 3
mov dword [ebp + 0x10], eax
cdq
mov edi, eax
xor edi, edx
sub edi, edx
mov eax, edi
cdq
push 0x20
pop esi
idiv esi
push 0x40
mov esi, eax
mov eax, edi
cdq
pop edi
idiv edi
cmp dword [ebp + 0x10], 0
jg 0x1002279
neg esi
cmp dword [ebp + 0x10], 0
mov dword [ebp - 8], esi
jg 0x1002284
neg eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 8]
add dword [ecx + 4], eax
movzx eax, byte [ebp + 0x14]
sub ebx, eax
shl ebx, 3
mov eax, ebx
cdq
mov edi, eax
xor edi, edx
sub edi, edx
mov eax, edi
cdq
push 0x20
pop esi
idiv esi
push 0x40
mov esi, eax
mov eax, edi
cdq
pop edi
idiv edi
test ebx, ebx
jg 0x10022bd
neg esi
test ebx, ebx
jg 0x10022bd
neg eax
add dword [ecx + 8], esi
mov ebx, dword [ebp + 8]
add ecx, 0xc
dec dword [ebp + 0x2c]
mov dword [ebp - 0x10], eax
mov dword [ebp + 0x10], ecx
jne 0x1002181
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x18]
xor esi, esi
mov edx, dword [ebx + 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 0x100215d
pop edi
lea edx, [eax + 0x28]
pop ebx
push esi
call fcn.0100209a
mov dword [edx], eax
inc esi
add edx, 4
cmp esi, 0x100
jb 0x10022fb
pop esi
leave
ret 0x28