Function at 0x102228d0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x14200], 0
lea ecx, [eax + 0x141f8]
mov dword [ebp - 0xc], ecx
je 0x10222b1e
push ebx
mov ebx, dword [eax + 0xe0]
mov eax, dword [eax + 0xe4]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x10], eax
push edi
mov eax, dword [esi]
movzx eax, byte [eax + 0xca25]
add eax, 0xfffffffc
cmp eax, 0x3c
ja case.0x1022291c.5
movzx eax, byte [eax + 0x10222b44]
jmp dword [eax*4 + 0x10222b2c]
mov edi, 0x10
jmp 0x10222944
mov edi, 8
jmp 0x10222944
mov edi, 2
jmp 0x10222944
mov edi, 1
jmp 0x10222944
mov edi, 4
mov ecx, dword [ebp + 0x10]
xor edx, edx
movzx eax, byte [ecx + 0x1057ba30]
div edi
xor edx, edx
mov dword [ebp - 4], eax
movzx eax, byte [ecx + 0x1057ba48]
div edi
cmp dword [ebp - 4], 1
mov dword [ebp - 0x14], eax
jl 0x10222b1b
cmp eax, 1
jl 0x10222b1b
mov ecx, dword [esi + 0x3e6f8]
mov eax, ebx
cdq
mov ebx, dword [ebp - 0xc]
mov esi, dword [ecx + 0x1c]
movzx ecx, byte [esi + 0x1057ba48]
idiv ecx
movzx ecx, byte [esi + 0x1057ba30]
mov eax, edx
cdq
idiv edi
imul eax, dword [ebx + 0xb10]
mov dword [ebp + 0xc], eax
mov eax, dword [ebp - 0x10]
cdq
idiv ecx
mov eax, edx
cdq
idiv edi
mov edi, dword [ebp + 0x18]
add dword [ebp + 0xc], eax
mov eax, dword [ebp - 0x14]
imul eax, dword [ebp - 4]
xor esi, esi
mov dword [ebp - 8], esi
mov dword [ebp - 0x20], eax
mov dword [edi + 4], eax
nop word [eax + eax]
xor ecx, ecx
mov dword [ebp - 0x10], ecx
mov eax, dword [ebx + 0xb10]
imul eax, esi
add eax, ecx
mov ecx, dword [ebp + 0xc]
add ecx, 0x25
add eax, ecx
lea ecx, [eax*8]
sub ecx, eax
add ecx, dword [ebp + 0x14]
mov edx, dword [ebx + ecx*4]
cmp edx, 0x80008000
je 0x10222b1b
mov eax, edx
not eax
movzx ecx, ax
shr ecx, 0xf
add ecx, 3
movsx eax, dx
add eax, ecx
shr edx, 0x10
sar eax, 3
movzx esi, ax
mov eax, esi
mov word [ebp - 0x28], si
mov dword [ebp - 0x18], eax
mov eax, edx
not eax
movzx ecx, ax
movsx eax, dx
mov edx, dword [ebp + 0x1c]
add eax, 3
shr ecx, 0xf
add eax, ecx
sar eax, 3
mov ebx, dword [edx]
mov dword [ebp - 0x1c], eax
mov word [ebp - 0x26], ax
xor eax, eax
test ebx, ebx
jle 0x10222ac4
mov ecx, dword [ebp - 0x18]
not esi
movsx ecx, cx
movzx edx, si
add ecx, 3
shr edx, 0xf
add ecx, edx
sar ecx, 3
mov dword [ebp - 0x18], ecx
movzx esi, word [edi + eax*8]
mov ecx, esi
not ecx
movzx edx, cx
movsx ecx, si
add ecx, 3
shr edx, 0xf
add ecx, edx
sar ecx, 3
cmp dword [ebp - 0x18], ecx
jne 0x10222abc
movzx esi, word [edi + eax*8 + 2]
mov ecx, esi
movsx esi, si
not ecx
movzx edx, cx
mov ecx, dword [ebp - 0x26]
shr edx, 0xf
not ecx
add edx, 3
add esi, edx
movzx edx, cx
mov ecx, dword [ebp - 0x1c]
movsx ecx, cx
shr edx, 0xf
add ecx, 3
add ecx, edx
xor esi, ecx
test esi, 0xfffffff8
je 0x10222b22
inc eax
cmp eax, ebx
jl 0x10222a67
mov edx, dword [ebp + 0x1c]
mov eax, dword [ebp - 0x28]
mov dword [edi + ebx*8], eax
mov eax, dword [edx]
mov dword [edi + eax*8 + 4], 1
inc dword [edx]
mov ecx, dword [ebp - 0x10]
mov ebx, dword [ebp - 0xc]
inc ecx
mov esi, dword [ebp - 8]
mov dword [ebp - 0x10], ecx
cmp ecx, dword [ebp - 4]
jl 0x102229d5
inc esi
mov dword [ebp - 8], esi
cmp esi, dword [ebp - 0x14]
jl 0x102229d0
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp - 0x20]
add ecx, ecx
mov dword [eax], ecx
mov eax, dword [edx]
cmp eax, 2
jle 0x10222b1b
push 0x102227c0
push 8
push eax
push edi
call fcn.103a43f0
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
inc dword [edi + eax*8 + 4]
mov edx, dword [ebp + 0x1c]
jmp 0x10222ad6