Function at 0x4a0490
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x20
mov edi, ecx
mov ecx, dword [ecx]
test ecx, ecx
je 0x4a0509
mov ebx, dword [edi + 4]
mov esi, dword [edi + 8]
cmp esi, ebx
jae 0x4a0509
movzx eax, byte [ecx + esi]
cmp eax, 0x49
je 0x4a0520
cmp eax, 0x42
jne 0x4a0509
lea eax, [esi + 1]
cmp eax, ebx
mov dword [edi + 8], eax
jae 0x4a0558
cmp byte [ecx + eax], 0x5f
jne 0x4a0558
lea eax, [esi + 2]
xor ecx, ecx
xor edx, edx
mov dword [edi + 8], eax
cmp ecx, esi
sbb edx, 0
jae 0x4a0689
mov eax, dword [edi + 0xc]
inc eax
cmp eax, 0x1f4
jbe 0x4a06d8
mov cl, 1
xor ebx, ebx
mov eax, dword [edi + 0x10]
test eax, eax
jne 0x4a0694
jmp 0x4a06c8
mov ecx, edi
xor edx, edx
call fcn.0049f0a0
mov ebx, eax
add bl, bl
mov eax, ebx
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret
inc esi
mov ecx, edi
xor edx, edx
mov dword [edi + 8], esi
call fcn.0049f0a0
test al, al
jne 0x4a0554
mov eax, dword [edi + 0x10]
test eax, eax
je 0x4a060e
push 1
push 0x564a5f
push eax
call fcn.004162f0
add esp, 0xc
test al, al
je 0x4a060e
mov bl, 2
jmp 0x4a0516
cmp eax, ebx
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x1c], ecx
lea esi, [esi + 2]
mov dword [ebp - 0x18], edi
cmova ebx, eax
xor ecx, ecx
xor edx, edx
neg ebx
mov dword [ebp - 0x14], ebx
nop word cs:[eax + eax]
nop dword [eax]
lea eax, [ebx + esi]
mov bl, 1
cmp eax, 1
je 0x4a068b
mov eax, dword [ebp - 0x1c]
movzx eax, byte [eax + esi - 1]
cmp al, 0x5f
je 0x4a0670
mov ebx, eax
add bl, 0xd0
cmp bl, 0xa
jb 0x4a05c4
mov ah, al
add ah, 0x9f
cmp ah, 0x1a
jae 0x4a05b6
add al, 0xa9
jmp 0x4a05c2
mov ah, al
add ah, 0xbf
cmp ah, 0x1a
jae 0x4a05fa
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 - 0x18]
setb cl
or cl, bh
mov dword [edi + 8], esi
jne 0x4a05fa
mov ecx, eax
movzx ebx, bl
inc esi
add ecx, ebx
mov ebx, dword [ebp - 0x14]
adc edx, 0
jae 0x4a0580
xor ecx, ecx
mov bl, 1
mov eax, dword [edi + 0x10]
test eax, eax
jne 0x4a0694
jmp 0x4a06c8
mov eax, dword [edi]
mov bl, 1
test eax, eax
je 0x4a0516
xor esi, esi
nop dword [eax]
mov ecx, dword [edi + 8]
cmp ecx, dword [edi + 4]
jae 0x4a0632
cmp byte [eax + ecx], 0x45
je 0x4a0716
sub esi, 1
jb 0x4a0656
mov eax, dword [edi + 0x10]
test eax, eax
je 0x4a0656
push 2
push 0x564dca
push eax
call fcn.004162f0
add esp, 0xc
test al, al
jne 0x4a0554
mov ecx, edi
call fcn.0049f930
test al, al
jne 0x4a0554
mov eax, dword [edi]
test eax, eax
jne 0x4a0620
jmp 0x4a0516
add ecx, 1
mov dword [edi + 8], esi
adc edx, 0
jb 0x4a068b
mov esi, dword [ebp - 0x10]
cmp ecx, esi
sbb edx, 0
jb 0x4a04e6
mov bl, 1
xor ecx, ecx
mov eax, dword [edi + 0x10]
test eax, eax
je 0x4a06c8
mov esi, ecx
mov edx, 0x564da1
mov ecx, str.recursion_limit_reachedinvalid_syntax
test bl, bl
cmovne ecx, edx
xor bl, 1
movzx edx, bl
mov bl, 2
lea edx, [edx + edx*8]
or edx, 0x10
push edx
push ecx
push eax
call fcn.004162f0
mov ecx, esi
add esp, 0xc
test al, al
jne 0x4a0516
mov dword [edi], 0
mov byte [edi + 4], cl
xor ebx, ebx
jmp 0x4a0516
cmp dword [edi + 0x10], 0
je 0x4a06d1
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 - 0x24], xmm1
movsd qword [ebp - 0x2c], xmm0
call fcn.004a0490
movsd xmm0, qword [ebp - 0x2c]
movsd xmm1, qword [ebp - 0x24]
movsd qword [edi], xmm0
movsd qword [edi + 8], xmm1
jmp 0x4a0518
inc ecx
mov dword [edi + 8], ecx
jmp 0x4a0516