Function at 0x405ff0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x406328
sub esp, 0x3c
mov eax, dword [esp + 0x40]
mov edx, dword [eax + 0x18]
lea ebx, [eax + 0x18]
mov dword [esp + 0x38], ebx
test edx, edx
je 0x406308
mov ebp, dword [edx + 8]
lea esi, [edx + 8]
test ebp, ebp
je 0x406308
mov dword [esp + 0x34], esi
mov dword [esp + 0x30], ebp
mov edi, dword [esp + 0x44]
mov ecx, ebx
movzx ebx, word [edi + 0x34]
mov esi, ebp
lea ebp, [ebx + esi - 4]
test byte [edi], al
mov edi, dword [ebp]
add ebx, esi
test edi, edi
je 0x4062d9
mov edx, dword [0x51b720]
test edx, edx
jne 0x4062bc
mov dword [ebp], 0
mov edx, dword [eax + 0x18]
test byte [edx], al
mov ebx, dword [0x51b720]
lea ebp, [edx + 8]
test ebx, ebx
jne 0x40629f
mov dword [edx + 8], 0
mov edx, dword [esp + 0x30]
movzx ebx, byte [eax + 5]
cmp bl, 0x10
jae 0x406248
movzx ebx, word [eax + 6]
inc ebx
mov word [eax + 6], bx
mov dword [esp + 0x24], edx
mov ebx, dword [esp + 0x44]
mov ebp, dword [ebx + 0x28]
movzx ebp, byte [ebp + 0xf]
xchg ebp, eax
test al, 0x80
xchg ebp, eax
je 0x4060fc
mov ebp, dword [eax + 0x18]
test ebp, ebp
je 0x406202
mov ecx, dword [eax + 0x18]
mov ecx, dword [ecx]
test ecx, ecx
je 0x4061bc
mov eax, dword [eax + 0x18]
mov ecx, dword [eax]
test byte [eax], al
mov eax, dword [ecx + 8]
mov ebp, dword [ecx]
mov esi, dword [ecx + 4]
lea edi, [esi + 1]
cmp edi, eax
jg 0x406146
lea eax, [esi + 1]
mov dword [ecx + 4], eax
mov eax, dword [0x51b720]
lea ecx, [ebp + esi*4]
test eax, eax
jne 0x406130
mov dword [ebp + esi*4], edx
movzx eax, word [ebx + 0x34]
mov ecx, dword [esp + 0x48]
lea eax, [ecx + eax - 4]
test byte [eax], al
mov ecx, dword [0x51b720]
test ecx, ecx
jne 0x40611e
mov dword [eax], edx
mov dword [esp + 0x4c], edx
add esp, 0x3c
ret
mov dword [esp], eax
mov dword [esp + 4], edx
call dbg.runtime.writebarrierptr
mov edx, dword [esp + 0x24]
jmp 0x406116
mov dword [esp], ecx
mov dword [esp + 4], edx
call dbg.runtime.writebarrierptr
mov edx, dword [esp + 0x24]
mov ebx, dword [esp + 0x44]
jmp 0x4060fc
mov dword [esp + 0x2c], ecx
lea ecx, [0x495500]
mov dword [esp], ecx
mov dword [esp + 4], ebp
mov dword [esp + 8], esi
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edi
call dbg.runtime.growslice
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x2c]
mov dword [ebx + 8], edx
mov edx, dword [0x51b720]
test edx, edx
jne 0x40619a
mov dword [ebx], eax
mov edx, dword [esp + 0x24]
mov esi, ecx
mov ebp, eax
mov ecx, ebx
mov ebx, dword [esp + 0x44]
jmp 0x4060e4
mov dword [esp + 0x28], eax
mov dword [esp + 0x20], ecx
mov dword [esp], ebx
mov dword [esp + 4], eax
call dbg.runtime.writebarrierptr
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x20]
mov ebx, dword [esp + 0x2c]
jmp 0x406187
lea eax, [0x48c040]
mov dword [esp], eax
call dbg.runtime.newobject
mov eax, dword [esp + 0x40]
mov ecx, dword [eax + 0x18]
test byte [ecx], al
mov edx, dword [0x51b720]
mov ebx, dword [esp + 4]
test edx, edx
jne 0x4061f0
mov dword [ecx], ebx
mov edx, dword [esp + 0x24]
mov ebx, dword [esp + 0x44]
jmp 0x4060ce
mov dword [esp], ecx
mov dword [esp + 4], ebx
call dbg.runtime.writebarrierptr
mov eax, dword [esp + 0x40]
jmp 0x4061e3
lea eax, [0x496fa0]
mov dword [esp], eax
call dbg.runtime.newobject
mov eax, dword [0x51b720]
mov ecx, dword [esp + 4]
test eax, eax
jne 0x406232
mov eax, dword [esp + 0x40]
mov dword [eax + 0x18], ecx
mov edx, dword [esp + 0x24]
mov ebx, dword [esp + 0x44]
jmp 0x4060c1
mov eax, dword [esp + 0x38]
mov dword [esp], eax
mov dword [esp + 4], ecx
call dbg.runtime.writebarrierptr
mov eax, dword [esp + 0x40]
jmp 0x406225
mov ebp, dword fs:[0x14]
mov ebp, dword [ebp]
mov ebp, dword [ebp + 0x18]
mov esi, dword [ebp + 0x8c]
mov edi, esi
sar esi, 0x1f
and esi, 0xa8888eef
shl edi, 1
xor edi, esi
mov dword [ebp + 0x8c], edi
add ebx, 0xfffffff1
mov ebp, ecx
mov ecx, ebx
mov esi, 1
shl esi, cl
cmp cl, 0x20
sbb ebx, ebx
and esi, ebx
lea ebx, [esi - 1]
test ebx, edi
jne 0x406298
movzx ecx, word [eax + 6]
inc ecx
mov word [eax + 6], cx
mov ecx, ebp
jmp 0x4060a0
mov dword [esp], ebp
mov dword [esp + 4], 0
call dbg.runtime.writebarrierptr
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x38]
jmp 0x406086
mov dword [esp], ebp
mov dword [esp + 4], 0
call dbg.runtime.writebarrierptr
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x38]
jmp 0x406069
mov ebp, dword [0x51b720]
test ebp, ebp
jne 0x4062eb
mov dword [edx + 8], ebx
jmp 0x406086
mov eax, dword [esp + 0x34]
mov dword [esp], eax
mov dword [esp + 4], ebx
call dbg.runtime.writebarrierptr
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x38]
jmp 0x406086
mov eax, dword [esp + 0x44]
mov ecx, dword [eax + 0x28]
mov dword [esp], ecx
call dbg.runtime.newobject
mov edx, dword [esp + 4]
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x38]
jmp 0x40608a
call dbg.runtime.morestack_noctxt
jmp dbg.runtime.(*hmap).newoverflow