Function at 0x1012a460
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x24
mov ebx, dword [ecx]
mov edi, ecx
test ebx, ebx
je 0x1012a4bb
mov ecx, dword [edi + 4]
mov esi, dword [edi + 8]
cmp esi, ecx
jae 0x1012a4bb
movzx eax, byte [ebx + esi]
cmp eax, 0x49
je 0x1012a4d2
cmp eax, 0x42
jne 0x1012a4bb
lea eax, [esi + 1]
cmp eax, ecx
mov dword [edi + 8], eax
jae 0x1012a560
cmp byte [ebx + eax], 0x5f
jne 0x1012a560
lea eax, [esi + 2]
xor ecx, ecx
xor edx, edx
mov dword [edi + 8], eax
cmp ecx, esi
sbb edx, 0
jb 0x1012a61b
jmp 0x1012a66c
mov ecx, edi
xor edx, edx
call fcn.10129090
mov ebx, eax
add bl, bl
mov eax, ebx
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret
inc esi
mov ecx, edi
xor edx, edx
mov dword [edi + 8], esi
call fcn.10129090
test al, al
jne 0x1012a6ab
mov eax, dword [edi + 0x10]
test eax, eax
je 0x1012a506
push 1
push 0x10385880
push eax
call fcn.10029440
add esp, 0xc
test al, al
jne 0x1012a6ab
mov eax, dword [edi]
mov bl, 1
test eax, eax
je 0x1012a4c8
xor esi, esi
mov ecx, dword [edi + 8]
cmp ecx, dword [edi + 4]
jae 0x1012a522
cmp byte [eax + ecx], 0x45
je 0x1012a6d2
sub esi, 1
jb 0x1012a546
mov eax, dword [edi + 0x10]
test eax, eax
je 0x1012a546
push 2
push 0x10385bb0
push eax
call fcn.10029440
add esp, 0xc
test al, al
jne 0x1012a6ab
mov ecx, edi
call fcn.101298c0
test al, al
jne 0x1012a6ab
mov eax, dword [edi]
test eax, eax
jne 0x1012a510
jmp 0x1012a4c8
cmp eax, ecx
mov dword [ebp - 0x14], esi
lea esi, [esi + 2]
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], ebx
cmova ecx, eax
xor edx, edx
neg ecx
mov dword [ebp - 0x20], ecx
xor ecx, ecx
nop word [eax + eax]
mov eax, dword [ebp - 0x20]
add eax, esi
cmp eax, 1
je 0x1012a66c
movzx eax, byte [ebx + esi - 1]
cmp al, 0x5f
je 0x1012a606
mov bl, 1
mov dword [ebp - 0x10], ebx
mov ebx, eax
add bl, 0xd0
cmp bl, 0xa
jb 0x1012a5c2
mov ah, al
add ah, 0x9f
cmp ah, 0x1a
jae 0x1012a5b4
add al, 0xa9
jmp 0x1012a5c0
mov ah, al
add ah, 0xbf
cmp ah, 0x1a
jae 0x1012a5f8
add al, 0xe3
mov ebx, eax
mov eax, edx
mov edx, 0x3e
mul edx
mov edx, 0x3e
mov edi, eax
mov eax, ecx
seto bh
mul edx
add edx, edi
mov edi, dword [ebp - 0x1c]
setb cl
or cl, bh
mov dword [edi + 8], esi
jne 0x1012a5f8
mov ecx, eax
movzx ebx, bl
inc esi
add ecx, ebx
mov ebx, dword [ebp - 0x18]
adc edx, 0
jae 0x1012a580
xor ecx, ecx
mov eax, dword [edi + 0x10]
test eax, eax
jne 0x1012a67a
jmp 0x1012a6c2
add ecx, 1
mov dword [edi + 8], esi
adc edx, 0
jb 0x1012a66c
mov esi, dword [ebp - 0x14]
cmp ecx, esi
sbb edx, 0
jae 0x1012a66c
mov eax, dword [edi + 0xc]
inc eax
cmp eax, 0x1f4
ja 0x1012a6b2
cmp dword [edi + 0x10], 0
je 0x1012a6cb
movsd xmm0, qword [edi]
movsd xmm1, qword [edi + 8]
mov dword [edi + 8], ecx
mov ecx, edi
mov dword [edi + 0xc], eax
movsd qword [ebp - 0x28], xmm1
movsd qword [ebp - 0x30], xmm0
call fcn.1012a460
movsd xmm0, qword [ebp - 0x30]
movsd xmm1, qword [ebp - 0x28]
movsd qword [edi], xmm0
movsd qword [edi + 8], xmm1
jmp 0x1012a4ca
mov al, 1
xor ecx, ecx
mov dword [ebp - 0x10], eax
mov eax, dword [edi + 0x10]
test eax, eax
je 0x1012a6c2
mov ebx, dword [ebp - 0x10]
mov esi, ecx
mov ecx, str.invalid_syntaxrecursion_limit_reached
mov edx, 0x10385b7c
test bl, bl
cmovne edx, ecx
xor bl, 1
movzx ecx, bl
lea ecx, [ecx + ecx*8]
or ecx, 0x10
push ecx
push edx
push eax
call fcn.10029440
mov ecx, esi
add esp, 0xc
test al, al
je 0x1012a6c2
mov bl, 2
jmp 0x1012a4c8
mov cl, 1
mov dword [ebp - 0x10], 0
mov eax, dword [edi + 0x10]
test eax, eax
jne 0x1012a67a
mov dword [edi], 0
mov byte [edi + 4], cl
xor ebx, ebx
jmp 0x1012a4c8
inc ecx
mov dword [edi + 8], ecx
jmp 0x1012a4c8