Function at 0x10002188
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 0x1c]
push ebx
push esi
mov esi, dword [ebp + 0x18]
mov ecx, dword [eax]
push edi
mov edi, dword [esi + 0x34]
mov ebx, dword [esi + 0x20]
mov edx, dword [esi + 0x1c]
mov dword [ebp - 4], ecx
mov ecx, dword [eax + 4]
mov dword [ebp + 0x18], edi
mov dword [ebp - 8], ecx
mov ecx, dword [esi + 0x30]
cmp edi, ecx
jae 0x100021ba
sub ecx, edi
dec ecx
jmp 0x100021bf
mov ecx, dword [esi + 0x2c]
sub ecx, edi
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx*4 + 0x10005318]
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx*4 + 0x10005318]
mov dword [ebp - 0x14], ecx
cmp edx, 0x14
jae 0x100021f8
mov ecx, dword [ebp - 4]
dec dword [ebp - 8]
movzx edi, byte [ecx]
mov ecx, edx
shl edi, cl
or ebx, edi
inc dword [ebp - 4]
add edx, 8
jmp 0x100021dc
mov ecx, dword [ebp - 0x10]
mov edi, dword [ebp + 0x10]
and ecx, ebx
lea edi, [edi + ecx*8]
movzx ecx, byte [edi]
mov dword [ebp + 0x1c], ecx
test ecx, ecx
movzx ecx, byte [edi + 1]
je 0x10002393
shr ebx, cl
movzx ecx, byte [edi + 1]
sub edx, ecx
mov ecx, dword [ebp + 0x1c]
test cl, 0x10
jne 0x10002247
test cl, 0x40
jne 0x1000240f
mov ecx, dword [ecx*4 + 0x10005318]
and ecx, ebx
add ecx, dword [edi + 4]
lea edi, [edi + ecx*8]
movzx ecx, byte [edi]
mov dword [ebp + 0x1c], ecx
test ecx, ecx
jmp 0x1000220b
and ecx, 0xf
mov dword [ebp + 0x1c], ecx
mov ecx, dword [ecx*4 + 0x10005318]
and ecx, ebx
add ecx, dword [edi + 4]
mov dword [ebp + 8], ecx
mov ecx, dword [ebp + 0x1c]
shr ebx, cl
dec ebp
pop edx
nop
add byte [eax], al
add byte [ebx + 0xe2b57c8], cl
mov dword [esi], eax
mov ecx, eax
push edi
adc dl, bl
push ss
add byte [eax], dl
test eax, 0x8a100018
sbb al, byte [eax]
adc ch, dl
sbb al, byte [eax]
adc byte [ebx + 0x4b], bl
or byte [ebx + 0x65830c4d], cl
adc byte [eax], al
dec dword [ebp - 4]
shl edx, cl
mov ecx, eax
push edi
mov ecx, eax
push edi
mov ecx, eax
push edi
inc ebp
or byte [ebx - 0x74a83775], cl
enter 0xffffffffffff8b57, 0xffffffffffffffc8
push edi
mov ecx, eax
push edi
mov ecx, eax
push edi
mov ecx, eax
push edi
mov ecx, eax
push edi
mov ecx, eax
push edi
mov ecx, eax
push edi
mov ecx, eax
push edi
mov ecx, eax
push edi
mov ecx, eax
push edi
mov ecx, eax
push edi
mov ecx, eax
push edi
mov ecx, eax
push edi
mov ecx, eax
push edi
or al, 0x8d
add al, 0x8b
enter 0xfffffffffffffd57, 0
add byte [eax], al
test cl, 0x40
je 0x100023c8
test cl, 0x20
je 0x184badf9
dec ebx
or byte [ebx], ah
inc ebp
or al, 0x8d
add al, 0xc1
and eax, dword [ebp + 0xc]
lea eax, [ecx + eax*8]
mov dword [ebp - 0x14], eax
movzx ecx, byte [eax + 1]
dec ebp
or al, 0x83
adc byte gs:[eax], al
dec ebp
or byte [ebx - 0x72fb3eac], cl
add al, 0xc1
cmp edx, 0x10
inc edi
add ecx, dword [ecx]
add byte [eax], al
add bh, al
inc esi
sbb byte [eax + eax*2 - 0x3274f000], dl
mov eax, dword [ebp - 4]
mov ecx, eax
sub ecx, dword [esi]
add byte [eax], dl
mov bl, byte [edx]
add byte [eax], dl
aad 0x1a
add byte [eax], dl
pop ebx
dec ebx
mov eax, dword [edi + 0x2c]
jge 0x1000232d
inc edi
sub al, 0x7d
cld
add byte [edi], cl
test byte [edi + 0x72], ah
popal
insd dword es:[edi], dx
lea ebx, [eax]
push ebx
add byte [eax], dl
and esp, dword [ecx + 0x6e]
aad 0x1a
add byte [eax], dl
pop ebx
dec ebx
or byte [ebx + 0x65830c4d], cl
adc byte [eax], al
dec dword [ebp - 4]
ror dword [ebp + 0x10005318], cl
mov eax, dword [edi + 0x28]
jb 0x100022e7
dec ebp
or al, 0x83
adc byte gs:[eax], al
dec dword [ebp - 4]
shl edx, cl
mov ecx, eax
push edi
mov ecx, eax
and byte [ecx + 0x6e], ch
mov dword [esi + 4], eax
mov eax, dword [ebp - 4]
mov edx, dword [ebx + 0x20]
insd dword es:[edi], dx
outsd dx, dword [esi]
add byte [eax], dl
test eax, 0x8a100018
sbb dl, byte [edi + 0x34]
mov dword [ebp - 8], eax
mov eax, dword [edi + 0x20]
add esp, 0x18
mov dword [ebp + 0xc], eax
mov eax, dword [edi + 0xd]
add al, 0xc8
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x75]
enter 0xffffffffffff8b57, 0xffffffffffffffc8
push edi
mov ecx, eax
push edi
enter 0xe2b, 0xffffffffffffff89
push es
add dword [esi + 8], ecx
mov dword [edi - 0x5c], edx
add dword [eax], eax
add byte [ebx - 0x2ec4d3b1], cl
mov dword [ebp - 0x10], ecx
jne 0x10002344
push ebp
invalid
xchg edx, eax
mov ecx, dword [edi + 0x2c]
cmp edx, ecx
mov dword [ebp - 0x10], ecx
jne 0x1000235c
push ebp
invalid
cmp dword [ebx + 4], 0
mov eax, dword [ebp - 0xc]
je 0x670a257f
mov ecx, eax
add esp, 0x18
mov dword [edi + edx*2], esi
push esi
call 0x1000395a
add esp, 0xc
pop edi
cmp dword [ebp - 8], edx
jne 0x1000244e
add byte [ebx - 0x2ec4d3b1], cl
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x10], edx
mov edx, dword [esi + 0x5a]
nop
add byte [eax], al
add byte [ebx + 0xe2b57c8], cl
mov dword [esi], eax
arpl word [eax - 0x75], bp
dec edi
sub al, 0x3b
push 0x3b2c4f8b
ror dword [ecx - 0x768a0fb3], 1
push ebp
invalid