Function at 0x1008cf95
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x50
mov dword [ebp - 0x28], edx
mov edx, dword [ebp + 0xc]
mov edi, dword [ecx + 0x30]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x34], ecx
mov ecx, dword [ecx + 0x4bb64]
mov eax, edx
mov esi, edi
mov dword [ebp - 0x50], ecx
xor eax, 1
xor esi, 1
or esi, eax
sete byte [ebp - 0x20]
test edx, edx
mov edx, dword [ebx + 0x5c]
je 0x1008d011
test edi, edi
je 0x1008d011
xor ebx, ebx
test edx, edx
mov edx, 0x102b64dc
mov esi, 0x102b649c
mov ecx, 0xc
mov edi, 0x18
mov eax, 0x102b64ec
cmovne edi, ecx
cmovne esi, edx
mov edx, 0x102b64ac
setne bl
mov ecx, 6
cmovne edx, eax
sub ecx, ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x4c], ecx
jmp 0x1008d048
xor eax, eax
test edx, edx
mov edx, 0x102b64bc
mov esi, 0x102b647c
mov ecx, 0x102b64cc
mov edi, 0x3c
cmovne esi, edx
mov edx, 0x102b648c
setne al
cmovne edx, ecx
mov ecx, 0x1f
cmovne edi, ecx
xor eax, 7
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x4c], eax
cmp dword [ebx + 8], 0
mov edi, 0
je 0x1008d5eb
mov cl, byte [ebp - 0x20]
xor eax, eax
mov edx, dword [edx]
mov al, cl
mov ecx, dword [esi]
mov dword [ebp - 0x54], edx
lea edx, [ebx + 0x151c0]
xor esi, esi
inc eax
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 0x4c]
and eax, 1
mov dword [ebp - 0x50], eax
neg eax
neg cl
mov dword [ebp - 0x58], eax
lea eax, [ebx + 0x151c1]
mov byte [ebp - 0x35], cl
mov dword [ebp - 0x5c], eax
cmp byte [ebx + esi + 0x18], 0
je 0x1008d1d6
lea eax, [esi + 1]
mov dword [ebp - 0x20], eax
movzx eax, byte [ebx + esi + 0xd]
cmp al, byte [ebx + esi + 0xc]
jne 0x1008d35b
mov ecx, dword [ebp - 0x34]
cmp dword [ecx + eax*4 + 0x4bb60], 0
je 0x1008d5db
lea edx, [esi + esi*2]
xor edi, edi
shl edx, 4
add edx, dword [ebp - 0x48]
mov dword [ebp - 0x30], edx
mov al, byte [edx + edi - 0x30]
mov byte [ebp - 0x14], al
mov eax, dword [ebp - 0x28]
mov ebx, dword [eax + 8]
mov ecx, dword [eax]
mov esi, dword [eax + 0x10]
mov eax, ebx
mov dword [ebp - 0x1c], ecx
shr eax, 3
push dword [ecx + eax]
call fcn.101688a0
add esp, 4
mov ecx, ebx
and cl, 7
shl eax, cl
mov ecx, dword [ebp - 0x24]
shr eax, 0xf7
movsx edx, word [ecx + eax*4]
movsx ecx, word [ecx + eax*4 + 2]
test ecx, ecx
jns 0x1008d190
add ebx, 9
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 0x1c]
cmp esi, ebx
cmovbe ebx, esi
mov eax, ebx
shr eax, 3
push dword [ecx + eax]
mov dword [ebp - 0x18], edx
call fcn.101688a0
add esp, 4
mov ecx, ebx
and cl, 7
shl eax, cl
mov ecx, dword [ebp - 0x10]
shr eax, cl
mov ecx, dword [ebp - 0x24]
add eax, dword [ebp - 0x18]
movsx edx, word [ecx + eax*4]
movsx ecx, word [ecx + eax*4 + 2]
test ecx, ecx
jns 0x1008d190
sub ebx, dword [ebp - 0x10]
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 0x1c]
cmp esi, ebx
cmovbe ebx, esi
mov eax, ebx
shr eax, 3
push dword [ecx + eax]
mov dword [ebp - 0x18], edx
call fcn.101688a0
add esp, 4
mov ecx, ebx
and cl, 7
shl eax, cl
mov ecx, dword [ebp - 0x10]
shr eax, cl
mov ecx, dword [ebp - 0x24]
add eax, dword [ebp - 0x18]
movsx edx, word [ecx + eax*4]
movsx ecx, word [ecx + eax*4 + 2]
add ebx, ecx
mov eax, dword [ebp - 0x28]
cmp esi, ebx
cmovbe ebx, esi
sub edx, dword [ebp - 0x3c]
mov dword [eax + 8], ebx
mov al, byte [ebp - 0x14]
imul edx, dword [ebp - 0x40]
add al, dl
mov edx, dword [ebp - 0x30]
mov byte [edx + edi], al
js 0x1008d622
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x34]
inc edi
movzx eax, byte [ebx + eax + 0xc]
cmp edi, dword [ecx + eax*4 + 0x4bb60]
jb 0x1008d0d5
jmp 0x1008d5db
mov edi, dword [ebp - 0x28]
mov ecx, dword [edi + 0x10]
mov ebx, dword [edi + 8]
mov eax, dword [edi]
mov dword [ebp - 0x20], ecx
mov ecx, ebx
shr ecx, 3
push dword [eax + ecx]
call fcn.101688a0
add esp, 4
mov ecx, ebx
add ebx, dword [ebp - 0x4c]
and cl, 7
shl eax, cl
mov cl, byte [ebp - 0x35]
shr eax, cl
mov ecx, dword [ebp - 0x20]
cmp ecx, ebx
cmovbe ebx, ecx
imul eax, dword [ebp - 0x40]
lea ecx, [esi + 1]
mov dword [edi + 8], ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x20], ecx
lea ecx, [ecx + ecx*2]
shl ecx, 4
mov byte [ebx + ecx + 0x15190], al
mov ecx, dword [ebp - 0x34]
movzx edx, byte [ebx + esi + 0xd]
cmp dword [ecx + edx*4 + 0x4bb60], 2
jb 0x1008d5db
lea ecx, [esi + esi*2]
mov dword [ebp - 0x14], eax
xor edi, edi
shl ecx, 4
add ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x30], ecx
mov eax, dword [ebp - 0x28]
mov ebx, dword [eax + 8]
mov ecx, dword [eax]
mov esi, dword [eax + 0x10]
mov eax, ebx
mov dword [ebp - 0x1c], ecx
shr eax, 3
push dword [ecx + eax]
call fcn.101688a0
add esp, 4
mov ecx, ebx
and cl, 7
shl eax, cl
mov ecx, dword [ebp - 0x54]
shr eax, 0xf7
movsx edx, word [ecx + eax*4]
movsx eax, word [ecx + eax*4 + 2]
test eax, eax
jns 0x1008d30b
add ebx, 9
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x10], eax
cmp esi, ebx
cmovbe ebx, esi
mov eax, ebx
shr eax, 3
push dword [ecx + eax]
mov dword [ebp - 0x18], edx
call fcn.101688a0
add esp, 4
mov ecx, ebx
and cl, 7
shl eax, cl
mov ecx, dword [ebp - 0x10]
shr eax, cl
mov ecx, dword [ebp - 0x54]
add eax, dword [ebp - 0x18]
movsx edx, word [ecx + eax*4]
movsx ecx, word [ecx + eax*4 + 2]
test ecx, ecx
js 0x1008d2cf
mov eax, ecx
jmp 0x1008d30b
sub ebx, dword [ebp - 0x10]
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 0x1c]
cmp esi, ebx
cmovbe ebx, esi
mov eax, ebx
shr eax, 3
push dword [ecx + eax]
mov dword [ebp - 0x18], edx
call fcn.101688a0
add esp, 4
mov ecx, ebx
and cl, 7
shl eax, cl
mov ecx, dword [ebp - 0x10]
shr eax, cl
mov ecx, dword [ebp - 0x54]
add eax, dword [ebp - 0x18]
movsx edx, word [ecx + eax*4]
movsx eax, word [ecx + eax*4 + 2]
add ebx, eax
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x14]
cmp esi, ebx
cmovbe ebx, esi
sub edx, dword [ebp - 0x3c]
mov dword [eax + 8], ebx
mov eax, dword [ebp - 0x30]
imul edx, dword [ebp - 0x40]
add cl, dl
mov byte [eax + edi], cl
js 0x1008d622
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x34]
mov dword [ebp - 0x14], ecx
lea ecx, [edi + 1]
add edi, 2
movzx eax, byte [ebx + eax + 0xc]
cmp edi, dword [edx + eax*4 + 0x4bb60]
mov edi, ecx
jb 0x1008d24f
jmp 0x1008d5db
mov ecx, dword [ebp - 0x34]
test al, al
mov eax, dword [ecx + eax*4 + 0x4bb60]
je 0x1008d4a3
test eax, eax
je 0x1008d5db
mov eax, dword [ebp - 0x48]
lea ecx, [esi + esi*2]
xor edi, edi
shl ecx, 4
mov dword [ebp - 0x30], ecx
lea eax, [eax + ecx]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x30]
lea eax, [eax + edi]
lea ecx, [ebx + ecx]
shr eax, 1
mov al, byte [eax + ecx + 0x15190]
mov byte [ebp - 0x14], al
mov eax, dword [ebp - 0x28]
mov ebx, dword [eax + 8]
mov ecx, dword [eax]
mov esi, dword [eax + 0x10]
mov eax, ebx
mov dword [ebp - 0x1c], ecx
shr eax, 3
push dword [ecx + eax]
call fcn.101688a0
add esp, 4
mov ecx, ebx
and cl, 7
shl eax, cl
mov ecx, dword [ebp - 0x24]
shr eax, 0xf7
movsx edx, word [ecx + eax*4]
movsx eax, word [ecx + eax*4 + 2]
test eax, eax
jns 0x1008d45d
add ebx, 9
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], eax
cmp esi, ebx
cmovbe ebx, esi
mov eax, ebx
shr eax, 3
push dword [ecx + eax]
mov dword [ebp - 0x10], edx
call fcn.101688a0
add esp, 4
mov ecx, ebx
and cl, 7
shl eax, cl
mov ecx, dword [ebp - 0x2c]
shr eax, cl
mov ecx, dword [ebp - 0x24]
add eax, dword [ebp - 0x10]
movsx edx, word [ecx + eax*4]
movsx ecx, word [ecx + eax*4 + 2]
test ecx, ecx
js 0x1008d421
mov eax, ecx
jmp 0x1008d45d
sub ebx, dword [ebp - 0x2c]
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebp - 0x1c]
cmp esi, ebx
cmovbe ebx, esi
mov eax, ebx
shr eax, 3
push dword [ecx + eax]
mov dword [ebp - 0x10], edx
call fcn.101688a0
add esp, 4
mov ecx, ebx
and cl, 7
shl eax, cl
mov ecx, dword [ebp - 0x2c]
shr eax, cl
mov ecx, dword [ebp - 0x24]
add eax, dword [ebp - 0x10]
movsx edx, word [ecx + eax*4]
movsx eax, word [ecx + eax*4 + 2]
add ebx, eax
mov eax, dword [ebp - 0x28]
mov cl, byte [ebp - 0x14]
cmp esi, ebx
cmovbe ebx, esi
sub edx, dword [ebp - 0x3c]
mov dword [eax + 8], ebx
mov eax, dword [ebp - 0x18]
imul edx, dword [ebp - 0x40]
add cl, dl
mov byte [eax + edi], cl
js 0x1008d622
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x34]
inc edi
movzx eax, byte [ebx + eax + 0xc]
cmp edi, dword [ecx + eax*4 + 0x4bb60]
jb 0x1008d389
jmp 0x1008d5db
test eax, eax
je 0x1008d5db
mov eax, dword [ebp - 0x48]
lea ecx, [esi + esi*2]
mov edx, dword [ebp - 0x58]
xor edi, edi
shl ecx, 4
mov dword [ebp - 0x18], ecx
lea eax, [eax + ecx]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x18]
test edi, edi
mov eax, edx
mov dword [ebp - 0x1c], edx
cmove eax, edi
lea ecx, [ebx + ecx]
mov al, byte [eax + ecx + 0x15190]
mov byte [ebp - 0x14], al
mov eax, dword [ebp - 0x28]
mov ebx, dword [eax + 8]
mov ecx, dword [eax]
mov esi, dword [eax + 0x10]
mov eax, ebx
mov dword [ebp - 0x30], ecx
shr eax, 3
push dword [ecx + eax]
call fcn.101688a0
add esp, 4
mov ecx, ebx
and cl, 7
shl eax, cl
mov ecx, dword [ebp - 0x24]
shr eax, 0xf7
movsx edx, word [ecx + eax*4]
movsx eax, word [ecx + eax*4 + 2]
test eax, eax
jns 0x1008d598
add ebx, 9
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x44], eax
cmp esi, ebx
cmovbe ebx, esi
mov eax, ebx
shr eax, 3
push dword [ecx + eax]
mov dword [ebp - 0x2c], edx
call fcn.101688a0
add esp, 4
mov ecx, ebx
and cl, 7
shl eax, cl
mov ecx, dword [ebp - 0x44]
shr eax, cl
mov ecx, dword [ebp - 0x24]
add eax, dword [ebp - 0x2c]
movsx edx, word [ecx + eax*4]
movsx ecx, word [ecx + eax*4 + 2]
test ecx, ecx
js 0x1008d55c
mov eax, ecx
jmp 0x1008d598
sub ebx, dword [ebp - 0x44]
mov dword [ebp - 0x44], ecx
mov ecx, dword [ebp - 0x30]
cmp esi, ebx
cmovbe ebx, esi
mov eax, ebx
shr eax, 3
push dword [ecx + eax]
mov dword [ebp - 0x2c], edx
call fcn.101688a0
add esp, 4
mov ecx, ebx
and cl, 7
shl eax, cl
mov ecx, dword [ebp - 0x44]
shr eax, cl
mov ecx, dword [ebp - 0x24]
add eax, dword [ebp - 0x2c]
movsx edx, word [ecx + eax*4]
movsx eax, word [ecx + eax*4 + 2]
add ebx, eax
mov eax, dword [ebp - 0x28]
mov cl, byte [ebp - 0x14]
cmp esi, ebx
cmovbe ebx, esi
sub edx, dword [ebp - 0x3c]
mov dword [eax + 8], ebx
mov eax, dword [ebp - 0x10]
imul edx, dword [ebp - 0x40]
add cl, dl
mov byte [eax + edi], cl
js 0x1008d622
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x34]
inc edi
movzx eax, byte [ebx + eax + 0xc]
add edx, 2
cmp edi, dword [ecx + eax*4 + 0x4bb60]
jb 0x1008d4c2
mov eax, dword [ebp - 0x20]
mov edi, dword [ebx + 8]
cmp eax, edi
mov esi, eax
jb 0x1008d096
lea eax, [edi + edi*2]
shl eax, 4
movaps xmm0, xmmword [ebx + eax + 0x151b0]
movaps xmmword [ebx + 0x151b0], xmm0
movaps xmm0, xmmword [ebx + eax + 0x15190]
movaps xmm1, xmmword [ebx + eax + 0x151a0]
xor eax, eax
movaps xmmword [ebx + 0x151a0], xmm1
movaps xmmword [ebx + 0x15190], xmm0
jmp 0x1008d627
mov eax, 0xbebbb1b7
add esp, 0x50
pop esi
pop edi
pop ebx
pop ebp
ret