Function at 0x10002210
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x14
xor eax, eax
mov dword [esp + 8], eax
mov dword [esp + 4], eax
mov dword [esp + 0xc], eax
cmp dword [esp + 0x20], eax
jbe 0x100024c2
push ebx
push ebp
push esi
push edi
nop
mov eax, dword [0x100491a4]
mov ebx, dword [0x100491b4]
mov edx, eax
mov esi, dword [0x100491a8]
imul edx, ebx
mov ecx, dword [0x100491ac]
imul edx, esi
mov ebp, eax
imul ebp, ecx
add edx, 4
imul edx, dword [0x100491b0]
sub ebp, edx
mov edx, eax
mov edi, dword [0x100491b8]
imul edx, esi
sub ebp, edx
mov edx, ecx
imul edx, edi
sub ebp, edx
sub ebp, ebx
sub ebp, ebx
sub ebp, ebx
add ebp, eax
mov eax, dword [esp + 0x18]
add ebp, ecx
lea eax, [eax + ebp + 1]
cdq
mov ebp, 0x5c40
idiv ebp
mov eax, ebx
imul eax, ecx
imul eax, edi
inc eax
imul eax, ecx
mov ebp, edx
mov edx, dword [0x100491a4]
add eax, edx
lea eax, [eax + eax*4]
add ebp, eax
mov eax, dword [0x100491b0]
mov dword [esp + 0x18], ebp
mov ebp, eax
imul ebp, edi
add eax, edi
inc ebp
lea eax, [eax + esi + 1]
imul ebp, ecx
imul eax, esi
add ebp, 2
imul ebp, ebx
add ebp, eax
lea eax, [edx + 1]
imul eax, edx
add ebp, eax
lea eax, [ebp + edi*2]
sub eax, dword [0x100491b0]
mov ebp, 0x5c40
add eax, ecx
lea edx, [eax*8]
sub edx, eax
add edx, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
movzx eax, byte [edx + eax]
add eax, dword [esp + 0x14]
cdq
idiv ebp
lea eax, [ecx + esi]
imul eax, esi
lea ebp, [ebx + edi]
add ebp, ebp
sub eax, ebp
add eax, ecx
lea eax, [eax + eax*2]
lea edx, [edx + eax*2]
mov eax, dword [0x100491b0]
mov dword [esp + 0x14], edx
lea edx, [eax + eax]
mov eax, esi
sub eax, edx
sub eax, edi
sub eax, edi
lea edx, [eax + esi - 2]
imul edx, ebx
mov ebp, dword [esp + 0x18]
add edx, ebp
lea eax, [ecx - 2]
imul eax, dword [0x100491a4]
lea eax, [eax + ecx*2]
sub eax, dword [0x100491b0]
sub eax, edi
lea edx, [edx + eax*2]
mov eax, dword [esp + 0x28]
movzx edx, byte [edx + eax]
mov eax, dword [esp + 0x14]
mov byte [esp + 0x13], dl
mov edx, esi
imul edx, esi
sub eax, ecx
mov dword [esp + 0x20], eax
lea eax, [edx + ebx - 3]
imul eax, ebx
mov edx, edi
imul edx, esi
sub eax, edx
lea edx, [ecx + ecx*2]
mov ebx, 3
sub ebx, edx
imul ebx, dword [0x100491b0]
lea esi, [eax + ebp]
mov edx, 2
sub edx, edi
lea edx, [edx + edx*2]
add ebx, edx
imul ebx, ecx
mov ecx, dword [esp + 0x28]
lea eax, [esi + eax*2]
add ebx, eax
mov eax, dword [esp + 0x20]
movzx edx, byte [eax + ecx]
mov byte [ebx + ecx], dl
mov esi, dword [0x100491a4]
mov eax, dword [0x100491b4]
mov edi, dword [0x100491b8]
mov ebx, esi
imul ebx, eax
mov edx, dword [0x100491ac]
imul ebx, eax
imul ebx, edi
mov ebp, edx
sub ebp, ebx
add ebp, 4
imul ebp, eax
inc esi
imul esi, dword [0x100491b0]
lea eax, [edx + edx*2]
mov edx, dword [esp + 0x14]
add ebp, esi
add ebp, eax
sub ebp, edi
lea eax, [edx + ebp*4]
movzx edx, byte [esp + 0x13]
mov byte [eax + ecx], dl
mov ebx, dword [0x100491ac]
mov edx, dword [esp + 0x1c]
mov edi, dword [0x100491b8]
mov esi, dword [0x100491a4]
imul esi, dword [0x100491b4]
lea eax, [ebx*8]
sub edx, eax
mov eax, dword [esp + 0x2c]
add edx, eax
mov dword [esp + 0x20], edx
mov edx, dword [0x100491b0]
imul edx, edi
mov eax, ebx
sub eax, edx
lea edx, [esi + esi]
mov ebp, 2
sub ebp, edx
imul ebp, dword [0x100491a8]
add ebp, dword [esp + 0x14]
lea eax, [ebp + eax*2]
mov edx, dword [0x100491b4]
mov ebp, edx
imul ebp, edx
mov edx, dword [0x100491b0]
imul ebp, edi
movzx eax, byte [eax + ecx]
add ebp, ebp
sub ebp, edx
sub ebp, edx
imul ebp, ebx
add ebp, dword [esp + 0x18]
lea edx, [ebp + edi*2]
movzx edx, byte [edx + ecx]
add eax, edx
cdq
mov ebp, 0x5c40
idiv ebp
lea eax, [esi*4 - 3]
imul eax, ebx
add edx, eax
lea eax, [edi + edi*4]
sub edx, eax
mov eax, dword [esp + 0x20]
add edx, ecx
mov ecx, dword [0x100491a8]
movzx edx, byte [edx + ecx*4]
xor byte [eax], dl
mov eax, dword [esp + 0x1c]
inc eax
mov dword [esp + 0x1c], eax
cmp eax, dword [esp + 0x30]
jb 0x10002230
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret