Function at 0x461240
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x461552
sub esp, 0x34
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
xor edx, edx
xor ebx, ebx
mov ebp, edx
mov esi, ebp
xor edi, edi
jmp 0x461284
dec ecx
mov dword [esp + 0x3c], ecx
neg ecx
sar ecx, 0x1f
and ecx, 1
add ecx, esi
mov esi, eax
mov eax, ecx
mov ecx, dword [esp + 0x3c]
test ecx, ecx
jle 0x46150b
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
xchg edi, eax
mov byte [esp + 0x22], al
xchg edi, eax
movzx eax, byte [eax]
mov byte [esp + 0x23], al
cmp al, 0x20
jbe 0x4614a5
cmp al, 0x22
je 0x46134a
cmp al, 0x5c
jne 0x4612c9
lea eax, [esi + 1]
mov esi, dword [esp + 0x38]
cmp ecx, 1
jae 0x46126d
jmp 0x46154b
mov dword [esp], ebx
mov dword [esp + 4], edx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], esi
call dbg.os.appendBSBytes
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
lea ebx, [ecx + 1]
cmp ebx, edx
jg 0x461313
movzx ebp, byte [esp + 0x23]
xchg ebp, ebx
mov byte [eax + ecx], bl
xchg ebp, ebx
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov ebp, edx
mov edx, ebx
mov ebx, eax
xor eax, eax
movzx edi, byte [esp + 0x22]
jmp 0x4612bf
mov dword [esp + 0x28], ecx
lea ebp, [0x492620]
mov dword [esp], ebp
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ebx
call dbg.runtime.growslice
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
lea ebx, [ecx + 1]
mov ecx, dword [esp + 0x28]
jmp 0x4612f0
mov dword [esp + 0x24], esi
mov eax, esi
sar esi, 0x1f
shr esi, 0x1f
lea ecx, [eax + esi]
sar ecx, 1
mov dword [esp + 0x2c], ecx
mov dword [esp + 0xc], ecx
mov dword [esp], ebx
mov dword [esp + 4], edx
mov dword [esp + 8], ebp
call dbg.os.appendBSBytes
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x28], ecx
mov edx, dword [esp + 0x18]
mov ebx, dword [esp + 0x2c]
shl ebx, 1
mov ebp, dword [esp + 0x24]
sub ebp, ebx
test ebp, ebp
jne 0x46144b
movzx ebx, byte [esp + 0x22]
test bl, bl
je 0x461441
mov ebp, dword [esp + 0x3c]
cmp ebp, 1
jle 0x46143b
mov esi, dword [esp + 0x38]
movzx edi, byte [esi + 1]
lea ebx, [esi + 1]
xchg edi, eax
cmp al, 0x22
xchg edi, eax
jne 0x461431
lea esi, [ecx + 1]
cmp esi, edx
jg 0x4613f2
movzx edi, byte [esp + 0x23]
xchg edi, ebx
mov byte [eax + ecx], bl
xchg edi, ebx
lea ecx, [ebp - 1]
movzx ebp, byte [esp + 0x22]
xor ebp, 1
mov edi, ebp
mov ebp, edx
mov edx, esi
mov esi, ebx
mov ebx, eax
xor eax, eax
jmp 0x4612bf
mov dword [esp + 0x30], ebx
lea ebx, [0x492620]
mov dword [esp], ebx
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], esi
call dbg.runtime.growslice
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
lea esi, [ecx + 1]
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x30]
mov ebp, dword [esp + 0x3c]
jmp 0x4613ca
mov ebx, esi
mov ecx, ebp
mov esi, dword [esp + 0x28]
jmp 0x4613d9
mov esi, dword [esp + 0x38]
jmp 0x461431
mov ebp, dword [esp + 0x3c]
mov esi, dword [esp + 0x38]
jmp 0x461431
lea ebx, [ecx + 1]
cmp ebx, edx
jg 0x461472
movzx edi, byte [esp + 0x23]
xchg edi, ebx
mov byte [eax + ecx], bl
xchg edi, ebx
mov ecx, dword [esp + 0x3c]
mov esi, ebx
movzx ebp, byte [esp + 0x22]
mov ebx, dword [esp + 0x38]
jmp 0x4613e1
lea ebp, [0x492620]
mov dword [esp], ebp
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ebx
call dbg.runtime.growslice
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
lea ebx, [ecx + 1]
mov ecx, dword [esp + 0x28]
jmp 0x461452
cmp al, 9
jne 0x461501
xchg edi, eax
test al, al
xchg edi, eax
jne 0x4612c9
mov dword [esp], ebx
mov dword [esp + 4], edx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], esi
call dbg.os.appendBSBytes
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], edx
mov eax, dword [esp + 0x3c]
dec eax
mov ecx, eax
neg eax
sar eax, 0x1f
and eax, 1
mov edx, dword [esp + 0x38]
add eax, edx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], ecx
add esp, 0x34
ret
cmp al, 0x20
je 0x4614aa
jmp 0x4612c9
mov dword [esp], ebx
mov dword [esp + 4], edx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], esi
call dbg.os.appendBSBytes
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], 0
mov dword [esp + 0x50], 0
add esp, 0x34
ret
call dbg.runtime.panicslice
ud2
call dbg.runtime.morestack_noctxt
jmp dbg.os.readNextArg