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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb0
mov eax, dword [0x100b5004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov dword [ebp - 0xb0], eax
xor ecx, ecx
mov dword [ebp - 0x90], edx
mov dword [ebp - 0xa0], edi
mov dword [ebp - 0xac], ecx
mov al, byte [edi + 0x21b]
movzx esi, byte [edi + 0x21f]
mov dword [ebp - 0x9c], esi
cmp al, 1
jne 0x1002ca24
movzx ecx, word [edi + 0x3de]
xor eax, eax
mov dword [ebp - 0xa4], ecx
test cl, 0x10
je 0x1002c84e
movzx eax, word [edi + 0x216]
mov esi, dword [ebp - 0x90]
mov edx, ebx
sub edx, eax
mov dword [ebp - 0xac], 1
dec esi
mov dword [ebp - 0xa8], edx
add esi, edx
test byte [ebp - 0xa4], 8
mov al, byte [esi]
movzx ecx, al
mov byte [ebp - 0x85], al
mov eax, ecx
mov dword [ebp - 0x8c], ecx
mov dword [ebp - 0x98], eax
mov dword [ebp - 0x94], eax
je 0x1002c991
mov ebx, ecx
lea eax, [edx - 1]
sub ebx, edx
mov dword [ebp - 0x94], eax
add ebx, dword [ebp - 0x9c]
shr ebx, 0x1f
dec bl
cmp eax, 0xff
jle 0x1002c8c2
mov dword [ebp - 0x94], 0xff
jmp 0x1002c8c6
test eax, eax
jle 0x1002c8fd
mov edi, dword [ebp - 0x94]
xor edx, edx
mov ah, byte [ebp - 0x85]
mov al, byte [esi]
lea esi, [esi - 1]
sub ecx, edx
xor al, ah
shr ecx, 0x1f
inc edx
dec cl
and cl, al
or bl, cl
mov ecx, dword [ebp - 0x8c]
cmp edx, edi
jl 0x1002c8d4
mov edi, dword [ebp - 0xa0]
mov edx, dword [ebp - 0xa8]
sub edx, dword [ebp - 0x9c]
lea eax, [ebp - 0x84]
mov ecx, dword [ebp - 0x98]
sub edx, ecx
push 1
push 1
push dword [ebp + 0xc]
dec edx
push ecx
push edx
push dword [ebp - 0x90]
push eax
mov eax, dword [edi + 0xbc]
push edi
call eax
mov edx, dword [ebp - 0xa8]
mov edi, eax
mov ecx, dword [ebp - 0x90]
lea eax, [ebp - 0x84]
push eax
mov eax, dword [ebp - 0xa0]
movzx esi, byte [eax + 0x21f]
push esi
call fcn.1002bdb0
or al, bl
add esp, 0x28
not al
mov cl, al
shr cl, 4
and al, cl
movzx eax, al
mov ecx, eax
shr ecx, 2
and ecx, eax
mov eax, ecx
shr eax, 1
and eax, ecx
dec eax
add eax, edi
jne 0x1002ca69
mov edi, dword [ebp - 0xa0]
mov ecx, dword [ebp - 0x98]
mov esi, dword [ebp - 0x9c]
jmp 0x1002ca81
mov esi, dword [ebp - 0x9c]
sub ebx, esi
mov dword [ebp - 0x8c], 0
push 1
push 1
push dword [ebp + 0xc]
lea edx, [ebx - 1]
cmp eax, edx
mov dword [ebp - 0xa4], edx
cmova eax, dword [ebp - 0x8c]
mov dword [ebp - 0x98], eax
xor eax, eax
cmp dword [ebp - 0x94], edx
cmovbe eax, ecx
sub ebx, eax
push eax
lea eax, [ebx - 1]
push eax
push dword [ebp - 0x90]
lea eax, [ebp - 0x44]
push eax
mov eax, dword [edi + 0xbc]
push edi
call eax
mov edx, dword [ebp - 0x90]
lea ecx, [ebp - 0x44]
dec edx
mov dword [ebp - 0x8c], eax
push esi
add edx, ebx
call fcn.100209b0
add esp, 0x24
test eax, eax
jne 0x1002ca69
cmp dword [ebp - 0x8c], eax
jne 0x1002ca69
mov eax, dword [ebp - 0xa4]
cmp dword [ebp - 0x94], eax
ja 0x1002ca69
mov ecx, dword [ebp - 0x98]
jmp 0x1002ca81
test al, al
jne 0x1002ca81
push 1
push 1
push dword [ebp + 0xc]
sub ebx, esi
lea eax, [ebp - 0x44]
push 0xffffffffffffffff
push ebx
push edx
push eax
mov eax, dword [edi + 0xbc]
push edi
call eax
mov edx, dword [ebp - 0x90]
lea ecx, [ebp - 0x44]
push esi
mov dword [ebp - 0x8c], eax
lea edx, [ebx + edx]
call fcn.100209b0
add esp, 0x24
test eax, eax
jne 0x1002ca69
cmp dword [ebp - 0x8c], eax
je 0x1002ca7f
pop edi
pop esi
mov eax, 0xfffffecf
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1007bc9e
mov esp, ebp
pop ebp
ret
xor ecx, ecx
cmp byte [edi + 0x21b], 2
jne 0x1002ca93
movzx eax, word [edi + 0x218]
jmp 0x1002ca9d
mov eax, dword [ebp - 0xac]
add eax, esi
add eax, ecx
mov ecx, dword [ebp - 0xb0]
pop edi
pop esi
pop ebx
mov dword [ecx], eax
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1007bc9e
mov esp, ebp
pop ebp
ret