Function at 0x4aa12c10
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [ebp + 0xc]
cmp dword [eax + 4], 0
jne 0x4aa12c5d
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx + 8]
and edx, 0x70
jne 0x4aa12c5d
mov eax, dword [ebp + 0xc]
movzx ecx, byte [eax + 8]
and ecx, 0x80
jne 0x4aa12c5d
mov edx, dword [ebp + 0x10]
cmp dword [edx + 4], 0
jne 0x4aa12c5d
mov eax, dword [ebp + 0x10]
movzx ecx, byte [eax + 8]
and ecx, 0x70
jne 0x4aa12c5d
mov edx, dword [ebp + 0x10]
movzx eax, byte [edx + 8]
and eax, 0x80
je 0x4aa12c7a
mov ecx, dword [ebp + 0x14]
push ecx
push 0x80
mov edx, dword [ebp + 8]
push edx
call fcn.4aa19780
add esp, 0xc
mov eax, dword [ebp + 8]
jmp 0x4aa12eb0
mov eax, dword [ebp + 0xc]
add eax, 9
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp + 0x10]
add ecx, 9
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp + 8]
add edx, 9
mov dword [ebp - 0xc], edx
mov eax, dword [ebp + 0xc]
cmp dword [eax], 0x31
jg 0x4aa12cae
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
movzx eax, byte [edx + 0x4aa52868]
mov dword [ebp - 0x2c], eax
jmp 0x4aa12cb6
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x1c]
lea edx, [ecx + eax - 1]
mov dword [ebp - 8], edx
mov eax, dword [ebp + 0x10]
cmp dword [eax], 0x31
jg 0x4aa12cdc
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
movzx eax, byte [edx + 0x4aa52868]
mov dword [ebp - 0x30], eax
jmp 0x4aa12ce4
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
mov dword [ebp - 0x30], edx
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x10]
lea edx, [ecx + eax - 1]
mov dword [ebp - 4], edx
mov eax, dword [ebp + 0x14]
cmp dword [eax], 0x31
jg 0x4aa12d0a
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
movzx eax, byte [edx + 0x4aa52868]
mov dword [ebp - 0x34], eax
jmp 0x4aa12d12
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
mov dword [ebp - 0x34], edx
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0xc]
lea edx, [ecx + eax - 1]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp + 0x14]
cmp dword [eax], 0x31
jg 0x4aa12d38
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
movzx eax, byte [edx + 0x4aa52868]
mov dword [ebp - 0x38], eax
jmp 0x4aa12d40
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x38]
sub eax, 1
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
sub edx, eax
mov dword [ebp - 0x14], edx
jmp 0x4aa12d6d
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x18]
ja 0x4aa12e7c
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp - 8]
jbe 0x4aa12d87
mov byte [ebp - 0x1d], 0
jmp 0x4aa12d8f
mov edx, dword [ebp - 0x1c]
mov al, byte [edx]
mov byte [ebp - 0x1d], al
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 4]
jbe 0x4aa12d9d
mov byte [ebp - 0x1e], 0
jmp 0x4aa12da5
mov edx, dword [ebp - 0x10]
mov al, byte [edx]
mov byte [ebp - 0x1e], al
mov ecx, dword [ebp - 0xc]
mov byte [ecx], 0
movzx edx, byte [ebp - 0x1d]
movzx eax, byte [ebp - 0x1e]
or edx, eax
je 0x4aa12e77
mov dword [ebp - 0x24], 0
jmp 0x4aa12dcd
mov ecx, dword [ebp - 0x24]
add ecx, 1
mov dword [ebp - 0x24], ecx
cmp dword [ebp - 0x24], 1
jge 0x4aa12e77
movzx edx, byte [ebp - 0x1d]
movzx eax, byte [ebp - 0x1e]
xor edx, eax
and edx, 1
je 0x4aa12dfe
mov ecx, dword [ebp - 0xc]
movzx edx, byte [ecx]
mov eax, dword [ebp - 0x24]
movzx ecx, byte [eax*4 + 0x4aa528a8]
add edx, ecx
mov eax, dword [ebp - 0xc]
mov byte [eax], dl
movzx eax, byte [ebp - 0x1d]
cdq
mov ecx, 0xa
idiv ecx
mov dword [ebp - 0x28], edx
movzx eax, byte [ebp - 0x1d]
cdq
mov ecx, 0xa
idiv ecx
mov byte [ebp - 0x1d], al
movzx eax, byte [ebp - 0x1e]
cdq
mov ecx, 0xa
idiv ecx
or edx, dword [ebp - 0x28]
mov dword [ebp - 0x28], edx
movzx eax, byte [ebp - 0x1e]
cdq
mov ecx, 0xa
idiv ecx
mov byte [ebp - 0x1e], al
cmp dword [ebp - 0x28], 1
jle 0x4aa12e5d
mov edx, dword [ebp + 0x14]
push edx
push 0x80
mov eax, dword [ebp + 8]
push eax
call fcn.4aa19780
add esp, 0xc
mov eax, dword [ebp + 8]
jmp 0x4aa12eb0
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp - 0x18]
jne 0x4aa12e72
mov edx, dword [ebp - 0x14]
sub edx, 1
cmp dword [ebp - 0x24], edx
jne 0x4aa12e72
jmp 0x4aa12e77
jmp 0x4aa12dc4
jmp 0x4aa12d52
mov eax, dword [ebp + 8]
add eax, 9
mov ecx, dword [ebp - 0xc]
sub ecx, eax
push ecx
mov edx, dword [ebp + 8]
add edx, 9
push edx
call fcn.4aa197d0
add esp, 8
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov edx, dword [ebp + 8]
mov dword [edx + 4], 0
mov eax, dword [ebp + 8]
mov byte [eax + 8], 0
mov eax, dword [ebp + 8]
mov esp, ebp
pop ebp
ret