Function at 0x1020a980
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x68
mov dword [ebp - 0x68], edx
mov dword [ebp - 0x74], ecx
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x18]
mov eax, dword [0x1038000c]
xor eax, ebp
mov dword [ebp - 0x10], eax
movzx esi, byte [ecx + edx*4]
mov dword [ebp - 0x58], esi
and esi, 0xfffffff8
shl esi, 8
movzx edi, byte [ecx + edx*4 + 1]
mov dword [ebp - 0x70], edi
and edi, 0xfffffffc
lea esi, [esi + edi*8]
movzx edx, byte [ecx + edx*4 + 2]
mov dword [ebp - 0x6c], edx
shr edx, 3
or edx, esi
mov eax, dword [ebp + 0x14]
movzx ebx, byte [ecx + eax*4]
mov dword [ebp - 0x54], ebx
and ebx, 0xfffffff8
shl ebx, 8
movzx esi, byte [ecx + eax*4 + 1]
mov edi, esi
and edi, 0xfffffffc
lea ebx, [ebx + edi*8]
movzx ecx, byte [ecx + eax*4 + 2]
mov edi, ecx
shr edi, 3
or edi, ebx
mov dword [ebp - 0x60], edx
cmp dx, di
jne 0x1020ab54
xor eax, eax
cmp byte [ebp + 0x1c], 0
mov esi, dword [ebp - 0x60]
je 0x1020ad74
mov eax, dword [ebp - 0x68]
mov esi, dword [eax]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x5c], edi
xor edx, edx
mov ebx, dword [ebp + 0xc]
cmp byte [ebx + esi*4 + 3], 0
sete dl
xor edi, edi
cmp byte [ebx + ecx*4 + 3], 0
mov esi, 0xc
cmovne esi, edi
mov ecx, dword [eax + 8]
cmp byte [ebx + ecx*4 + 3], 0
mov ecx, 0x30
cmovne ecx, edi
or ecx, esi
lea edx, [edx + edx*2]
or ecx, edx
mov edx, dword [eax + 0xc]
cmp byte [ebx + edx*4 + 3], 0
mov edx, 0xc0
cmovne edx, edi
mov esi, dword [eax + 0x10]
cmp byte [ebx + esi*4 + 3], 0
mov esi, 0x300
cmovne esi, edi
or esi, edx
mov edx, dword [eax + 0x14]
cmp byte [ebx + edx*4 + 3], 0
mov edx, 0xc00
cmovne edx, edi
or edx, esi
or edx, ecx
mov ecx, dword [eax + 0x18]
cmp byte [ebx + ecx*4 + 3], 0
mov ecx, 0x3000
cmovne ecx, edi
mov esi, dword [eax + 0x1c]
cmp byte [ebx + esi*4 + 3], 0
mov esi, 0xc000
cmovne esi, edi
or esi, ecx
mov ecx, dword [eax + 0x20]
cmp byte [ebx + ecx*4 + 3], 0
mov edi, 0x30000
mov ecx, 0
cmovne edi, ecx
or edi, esi
mov ecx, dword [eax + 0x24]
cmp byte [ebx + ecx*4 + 3], 0
mov ecx, 0xc0000
mov esi, 0
cmovne ecx, esi
or ecx, edi
or ecx, edx
mov edx, dword [eax + 0x28]
cmp byte [ebx + edx*4 + 3], 0
mov edx, 0x300000
mov edi, 0
cmovne edx, edi
mov esi, dword [eax + 0x2c]
cmp byte [ebx + esi*4 + 3], 0
mov esi, 0xc00000
cmovne esi, edi
or esi, edx
mov edx, dword [eax + 0x30]
cmp byte [ebx + edx*4 + 3], 0
mov edx, 0x3000000
cmovne edx, edi
or edx, esi
mov esi, dword [eax + 0x34]
cmp byte [ebx + esi*4 + 3], 0
mov esi, 0xc000000
cmovne esi, edi
xor edi, edi
or esi, edx
mov edx, dword [eax + 0x38]
cmp byte [ebx + edx*4 + 3], 0
mov edx, 0x30000000
cmovne edx, edi
or edx, esi
mov esi, dword [ebp - 0x60]
or edx, ecx
mov ecx, dword [eax + 0x3c]
xor eax, eax
cmp byte [ebx + ecx*4 + 3], 0
setne al
shl eax, 0x1e
add eax, 0xc0000000
or eax, edx
mov edi, dword [ebp - 0x5c]
jmp 0x1020ad74
mov dword [ebp - 0x5c], edi
mov ebx, dword [ebp - 0x58]
mov edx, ebx
sub edx, dword [ebp - 0x54]
mov edi, dword [ebp - 0x70]
mov eax, edi
sub eax, esi
mov dword [ebp - 0x64], eax
imul ebx, edx
imul edi, eax
add edi, ebx
mov eax, dword [ebp - 0x6c]
mov ebx, eax
sub ebx, ecx
imul eax, ebx
add eax, edi
mov dword [ebp - 0x58], edx
mov edi, dword [ebp - 0x54]
imul edi, edx
imul esi, dword [ebp - 0x64]
add esi, edi
mov dword [ebp - 0x54], ebx
imul ecx, ebx
add ecx, esi
sub eax, ecx
cvtsi2ss xmm0, eax
cmp byte [ebp + 0x1c], 0
mov esi, ecx
je 0x1020ac40
xor edx, edx
movss xmm1, dword [0x102cdfe0]
mov edi, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
cmp dword [eax + edx*4], 0
jle 0x1020ac31
cmp byte [edi + edx*4 + 3], 0
je 0x1020ac28
movzx eax, byte [edi + edx*4 + 1]
imul eax, dword [ebp - 0x64]
mov ebx, ecx
movzx ecx, byte [edi + edx*4 + 2]
imul ecx, dword [ebp - 0x54]
add ecx, eax
movzx eax, byte [edi + edx*4]
imul eax, dword [ebp - 0x58]
sub eax, ebx
add eax, ecx
xorps xmm2, xmm2
cvtsi2ss xmm2, eax
divss xmm2, xmm0
addss xmm2, xmm2
addss xmm2, xmm1
cvttss2si edi, xmm2
mov ebx, edi
cmp edi, 2
jl 0x1020ac08
mov ebx, 2
xor eax, eax
test ebx, ebx
jg 0x1020ac10
xor ebx, ebx
xor ecx, ecx
cmp ebx, 1
sete bl
test edi, edi
jle 0x1020ac21
mov cl, bl
inc ecx
mov eax, ecx
mov edi, dword [ebp + 0xc]
mov ecx, esi
jmp 0x1020ac2d
mov eax, 3
mov dword [ebp + edx*4 - 0x50], eax
inc edx
cmp dword [ebp + 0x10], edx
jne 0x1020abb3
jmp 0x1020acc1
xor edx, edx
movss xmm1, dword [0x10307954]
movss xmm2, dword [0x102cdfe0]
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
cmp dword [eax + edx*4], 0
jle 0x1020acbb
movzx eax, byte [ebx + edx*4 + 1]
imul eax, dword [ebp - 0x64]
mov edi, ecx
movzx ecx, byte [ebx + edx*4 + 2]
imul ecx, dword [ebp - 0x54]
add ecx, eax
movzx eax, byte [ebx + edx*4]
imul eax, dword [ebp - 0x58]
sub eax, edi
add eax, ecx
xorps xmm3, xmm3
cvtsi2ss xmm3, eax
divss xmm3, xmm0
mulss xmm3, xmm1
addss xmm3, xmm2
cvttss2si ecx, xmm3
cmp ecx, 3
jl 0x1020aca1
mov ecx, 3
xor edi, edi
test ecx, ecx
jg 0x1020aca9
xor ecx, ecx
cmp ecx, 2
ja 0x1020acb5
mov edi, dword [ecx*4 + 0x10307d78]
mov dword [ebp + edx*4 - 0x50], edi
mov ecx, esi
inc edx
cmp dword [ebp + 0x10], edx
jne 0x1020ac55
mov edx, dword [ebp - 0x68]
mov eax, dword [edx + 0x3c]
mov ecx, dword [ebp + eax*4 - 0x50]
mov eax, dword [edx + 0x38]
mov eax, dword [ebp + eax*4 - 0x50]
shl ecx, 4
shl eax, 2
or eax, ecx
mov ecx, dword [edx + 0x34]
or eax, dword [ebp + ecx*4 - 0x50]
mov ecx, dword [edx + 0x30]
mov ecx, dword [ebp + ecx*4 - 0x50]
shl eax, 4
shl ecx, 2
or ecx, eax
mov eax, dword [edx + 0x2c]
or ecx, dword [ebp + eax*4 - 0x50]
mov eax, dword [edx + 0x28]
mov eax, dword [ebp + eax*4 - 0x50]
shl ecx, 4
shl eax, 2
or eax, ecx
mov ecx, dword [edx + 0x24]
or eax, dword [ebp + ecx*4 - 0x50]
mov ecx, dword [edx + 0x20]
mov ecx, dword [ebp + ecx*4 - 0x50]
shl eax, 4
shl ecx, 2
or ecx, eax
mov eax, dword [edx + 0x1c]
or ecx, dword [ebp + eax*4 - 0x50]
mov eax, dword [edx + 0x18]
mov eax, dword [ebp + eax*4 - 0x50]
shl ecx, 4
shl eax, 2
or eax, ecx
mov ecx, dword [edx + 0x14]
or eax, dword [ebp + ecx*4 - 0x50]
mov ecx, dword [edx + 0x10]
mov ecx, dword [ebp + ecx*4 - 0x50]
shl eax, 4
shl ecx, 2
or ecx, eax
mov eax, dword [edx + 0xc]
or ecx, dword [ebp + eax*4 - 0x50]
mov eax, dword [edx + 8]
mov eax, dword [ebp + eax*4 - 0x50]
shl ecx, 4
shl eax, 2
or eax, ecx
mov ecx, dword [edx + 4]
or eax, dword [ebp + ecx*4 - 0x50]
mov ecx, dword [edx]
shl eax, 2
or eax, dword [ebp + ecx*4 - 0x50]
mov edi, dword [ebp - 0x5c]
mov esi, dword [ebp - 0x60]
cmp si, di
jae 0x1020ad94
mov ecx, eax
not ecx
shr ecx, 1
mov edx, 0x55555555
and ecx, edx
mov bl, byte [ebp + 0x1c]
test bl, bl
cmove ecx, edx
xor eax, ecx
mov ecx, edi
jmp 0x1020ad9b
mov ecx, esi
mov esi, edi
mov bl, byte [ebp + 0x1c]
test bl, bl
mov edx, ecx
cmovne edx, esi
cmovne esi, ecx
mov ecx, dword [ebp - 0x74]
mov word [ecx], dx
mov word [ecx + 2], si
mov dword [ecx + 4], eax
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10212780
add esp, 0x68
pop esi
pop edi
pop ebx
pop ebp
ret