Function at 0x10012986
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1006c6f2
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
sub esp, 0xa0
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
movzx eax, byte [ebp + 0x30]
test eax, eax
je 0x10012a03
lea eax, [ebp + 0x28]
mov dword [ebp - 0x88], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x80], eax
mov eax, dword [ebp - 0x88]
movzx eax, byte [eax]
test eax, eax
je 0x100129e7
mov byte [ebp - 0x11], 0
movzx eax, byte [ebp - 0x11]
test eax, eax
je 0x100129e5
push 0
push 0
call dword [0x106190dc]
jmp 0x100129fe
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax]
dec eax
mov ecx, dword [ebp - 0x3c]
mov dword [ecx], eax
jmp 0x10012c56
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x90], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x4c], eax
lea eax, [ebp + 8]
mov dword [ebp - 0x98], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp + 0x2c]
mov dword [ebp - 0xac], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp - 0x98]
movzx eax, byte [eax]
test eax, eax
je 0x10012c1d
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0xac]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x18]
mov dword [eax], 0
jmp 0x10012abd
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
inc eax
mov ecx, dword [ebp - 0x18]
mov dword [ecx], eax
mov eax, dword [ebp - 0x18]
cmp dword [eax], 3
jg 0x10012c1b
mov dword [ebp - 0x44], 0xc0c
mov dword [ebp - 0x6c], 0x1000b368
cmp dword [ebp - 0x44], 0xf9f
jle 0x10012b39
and dword [ebp - 0x1c], 0
jmp 0x10012aed
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0x7764
jge 0x10012b39
and dword [ebp - 0x20], 0
jmp 0x10012b03
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x1c04
jge 0x10012b37
mov eax, dword [ebp - 0x1c]
xor eax, dword [ebp - 0x20]
cdq
mov dword [ebp - 0xa8], eax
mov dword [ebp - 0xa4], edx
push dword [ebp - 0xa4]
push dword [ebp - 0xa8]
mov ecx, 0x106150f8
call fcn.10022b54
jmp 0x10012afc
jmp 0x10012ae6
mov dword [ebp - 0x40], 0xfa1a8f1
and dword [ebp - 4], 0
cmp dword [ebp - 0x44], 0x87c
jge 0x10012b5a
mov edx, dword [ebp - 0x6c]
mov ecx, 0x106150f8
call fcn.1002618a
jmp 0x10012b76
or dword [ebp - 4], 0xffffffff
jmp 0x10012b80
mov dword [ebp - 0x2c], 0x8264d924
mov dword [ebp - 0x74], 0x2404e547
mov dword [ebp - 0x34], 0x9c1c73b0
mov dword [ebp - 0x2c], 1
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0xb0], eax
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x30]
mov ecx, dword [ecx]
sub ecx, dword [eax]
mov eax, dword [ebp - 0x2c]
add eax, dword [ebp - 0x74]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x34]
mov dword [eax], ecx
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x28]
mov ecx, dword [ecx]
add ecx, dword [eax]
mov eax, dword [ebp - 0x28]
mov dword [eax], ecx
mov eax, dword [ebp - 0x28]
cmp dword [eax], 0x1f08a1ba
jge 0x10012be3
mov dword [ebp - 0x24], 1
jmp 0x10012be7
and dword [ebp - 0x24], 0
mov dword [ebp - 0x40], 0
mov eax, dword [ebp - 0x7c]
mov ecx, dword [ebp - 0x24]
mov dword [eax], ecx
mov eax, dword [ebp - 0x40]
cmp eax, dword [ebp - 0x24]
je 0x10012c07
mov dword [ebp - 0x48], 1
jmp 0x10012c0b
and dword [ebp - 0x48], 0
mov eax, dword [ebp - 0x84]
mov ecx, dword [ebp - 0x48]
mov dword [eax], ecx
jmp 0x10012ab2
jmp 0x10012c56
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0x94], eax
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x9c], eax
mov eax, dword [ebp - 0x9c]
movzx eax, byte [eax]
test eax, eax
je 0x10012c56
push 0x6cd9
push 0
push 0x4d4b
call fcn.10011879
add esp, 0xc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret