Function at 0x407480
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov rcx, qword gs:[0x28]
mov rcx, qword [rcx]
cmp rsp, qword [rcx + 0x10]
jbe 0x40789c
sub rsp, 0x78
mov qword [rsp + 0x70], rbp
lea rbp, [rsp + 0x70]
mov rax, qword [rsp + 0x80]
mov rdx, qword [rax + 0x28]
lea rbx, [rax + 0x28]
mov qword [rsp + 0x68], rbx
test rdx, rdx
je 0x407868
mov rsi, qword [rdx + 0x10]
lea rdi, [rdx + 0x10]
test rsi, rsi
je 0x407868
mov qword [rsp + 0x60], rsi
mov r8, qword [rsp + 0x88]
movzx r9d, word [r8 + 0x54]
mov r10, rsi
lea r10, [r9 + r10 - 8]
test byte [r8], al
mov r11, qword [r10]
test r11, r11
je 0x407823
mov edx, dword [0x006313e0]
test edx, edx
jne 0x4077f2
mov qword [r10], 0
mov rdx, qword [rax + 0x28]
test byte [rdx], al
mov edi, dword [0x006313e0]
lea r9, [rdx + 0x10]
test edi, edi
jne 0x4077c1
mov qword [rdx + 0x10], 0
movzx edx, byte [rax + 9]
cmp dl, 0x10
jae 0x407760
movzx ecx, word [rax + 0xa]
inc ecx
mov word [rax + 0xa], cx
mov qword [rsp + 0x48], rsi
mov rcx, qword [r8 + 0x40]
movzx ecx, byte [rcx + 0x17]
test cl, 0x80
je 0x4075b2
mov rcx, qword [rax + 0x28]
test rcx, rcx
je 0x407706
mov rcx, qword [rax + 0x28]
mov rcx, qword [rcx]
test rcx, rcx
je 0x4076ac
mov rax, qword [rax + 0x28]
mov rcx, qword [rax]
test byte [rax], al
mov rax, qword [rcx + 0x10]
mov rdx, qword [rcx]
mov rbx, qword [rcx + 8]
lea rdi, [rbx + 1]
cmp rdi, rax
jg 0x407617
lea rax, [rbx + 1]
mov qword [rcx + 8], rax
mov eax, dword [0x006313e0]
lea rcx, [rdx + rbx*8]
test eax, eax
jne 0x4075fa
mov qword [rdx + rbx*8], rsi
movzx eax, word [r8 + 0x54]
mov rcx, qword [rsp + 0x90]
lea rax, [rcx + rax - 8]
test byte [rax], al
mov ecx, dword [0x006313e0]
test ecx, ecx
jne 0x4075e5
mov qword [rax], rsi
mov qword [rsp + 0x98], rsi
mov rbp, qword [rsp + 0x70]
add rsp, 0x78
ret
mov qword [rsp], rax
mov qword [rsp + 8], rsi
call dbg.runtime.writebarrierptr
mov rsi, qword [rsp + 0x48]
jmp 0x4075d3
mov qword [rsp], rcx
mov qword [rsp + 8], rsi
call dbg.runtime.writebarrierptr
mov rsi, qword [rsp + 0x48]
mov r8, qword [rsp + 0x88]
jmp 0x4075b2
mov qword [rsp + 0x58], rcx
lea rcx, [0x00536380]
mov qword [rsp], rcx
mov qword [rsp + 8], rdx
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rax
mov qword [rsp + 0x20], rdi
call dbg.runtime.growslice
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x30]
mov rdx, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x58]
mov qword [rbx + 0x10], rdx
mov edx, dword [0x006313e0]
test edx, edx
jne 0x407683
mov qword [rbx], rax
mov rsi, qword [rsp + 0x48]
mov r8, qword [rsp + 0x88]
mov rdx, rax
mov rdi, rcx
mov rcx, rbx
mov rbx, rdi
jmp 0x407598
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x40], rcx
mov qword [rsp], rbx
mov qword [rsp + 8], rax
call dbg.runtime.writebarrierptr
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x58]
jmp 0x407665
lea rax, [0x00527000]
mov qword [rsp], rax
call dbg.runtime.newobject
mov rax, qword [rsp + 0x80]
mov rcx, qword [rax + 0x28]
test byte [rcx], al
mov edx, dword [0x006313e0]
mov rbx, qword [rsp + 8]
test edx, edx
jne 0x4076ee
mov qword [rcx], rbx
mov rsi, qword [rsp + 0x48]
mov r8, qword [rsp + 0x88]
jmp 0x40757b
mov qword [rsp], rcx
mov qword [rsp + 8], rbx
call dbg.runtime.writebarrierptr
mov rax, qword [rsp + 0x80]
jmp 0x4076dc
lea rax, [0x0053e720]
mov qword [rsp], rax
call dbg.runtime.newobject
mov eax, dword [0x006313e0]
mov rcx, qword [rsp + 8]
test eax, eax
jne 0x407743
mov rax, qword [rsp + 0x80]
mov qword [rax + 0x28], rcx
mov rsi, qword [rsp + 0x48]
mov r8, qword [rsp + 0x88]
jmp 0x40756b
mov rax, qword [rsp + 0x68]
mov qword [rsp], rax
mov qword [rsp + 8], rcx
call dbg.runtime.writebarrierptr
mov rax, qword [rsp + 0x80]
jmp 0x407731
mov rdi, qword gs:[0x28]
mov rdi, qword [rdi]
mov rdi, qword [rdi + 0x30]
mov r9d, dword [rdi + 0xec]
mov r10d, r9d
sar r9d, 0x1f
and r9d, 0xa8888eef
shl r10d, 1
xor r10d, r9d
mov dword [rdi + 0xec], r10d
lea ecx, [rdx - 0xf]
mov edx, 1
shl edx, cl
cmp cl, 0x20
sbb edi, edi
and edx, edi
dec edx
test edx, r10d
jne 0x40754c
movzx ecx, word [rax + 0xa]
inc ecx
mov word [rax + 0xa], cx
jmp 0x40754c
mov qword [rsp], r9
mov qword [rsp + 8], 0
call dbg.runtime.writebarrierptr
mov rax, qword [rsp + 0x80]
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x60]
mov r8, qword [rsp + 0x88]
jmp 0x407535
mov qword [rsp], r10
mov qword [rsp + 8], 0
call dbg.runtime.writebarrierptr
mov rax, qword [rsp + 0x80]
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x60]
mov r8, qword [rsp + 0x88]
jmp 0x407515
mov r10d, dword [0x006313e0]
add r9, rsi
test r10d, r10d
jne 0x40783b
mov qword [rdx + 0x10], r9
jmp 0x407535
mov qword [rsp], rdi
mov qword [rsp + 8], r9
call dbg.runtime.writebarrierptr
mov rax, qword [rsp + 0x80]
mov rbx, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x60]
mov r8, qword [rsp + 0x88]
jmp 0x407535
mov rax, qword [rsp + 0x88]
mov rcx, qword [rax + 0x40]
mov qword [rsp], rcx
call dbg.runtime.newobject
mov rsi, qword [rsp + 8]
mov rax, qword [rsp + 0x80]
mov rbx, qword [rsp + 0x68]
mov r8, qword [rsp + 0x88]
jmp 0x407535
call dbg.runtime.morestack_noctxt
jmp dbg.runtime.(*hmap).newoverflow