Function at 0x50335a2
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x50737db
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x2604
call fcn.050704b0
mov eax, dword [0x509ddfc]
xor eax, esp
mov dword [esp + 0x2600], eax
push ebx
push esi
push edi
mov eax, dword [0x509ddfc]
xor eax, esp
push eax
lea eax, [esp + 0x2618]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov eax, dword [edi + 4]
xor esi, esi
add eax, 0x60
mov ebx, ecx
push esi
push eax
mov dword [esp + 0x38], ebx
mov dword [esp + 0x28], edi
call fcn.050148cd
cmp dword [ebx], esi
pop ecx
pop ecx
jne 0x5033622
mov eax, dword [edi + 4]
push esi
push 0x753
push 0xb71b
push eax
call fcn.05062683
add esp, 0x10
mov dword [ebx], eax
mov ecx, edi
mov dword [esp + 0x34], edi
call fcn.0503f80c
xor ecx, ecx
mov dword [esp + 0x2620], esi
lea eax, [esp + 0x50]
inc ecx
mov edi, 0x4000
mov edx, ecx
shr edx, 1
mov word [eax - 2], dx
mov word [eax], di
mov word [eax + 2], di
add ecx, 0x101
add eax, 8
cmp ecx, 0x10101
jb 0x5033640
mov ecx, dword [esp + 0x20]
push esi
push 0x50524742
push 0x504c4142
mov esi, 0x100
push esi
lea eax, [esp + 0x5c]
push eax
push eax
call fcn.0506bbf5
and dword [esp + 0x14], 0
mov eax, dword [esp + 0x14]
shl eax, 3
movzx ecx, word [esp + eax + 0x52]
push ecx
movzx ecx, word [esp + eax + 0x54]
movzx eax, word [esp + eax + 0x52]
push ecx
push eax
call fcn.05030f11
mov ecx, dword [esp + 0x20]
add esp, 0xc
inc dword [esp + 0x14]
cmp dword [esp + 0x14], esi
mov word [esp + ecx*2 + 0x1bd4], ax
jb 0x5033685
lea ecx, [esp + 0x1bd4]
call fcn.0502f325
test al, al
jne 0x50336d8
lea ecx, [esp + 0x1bd4]
call fcn.0502f30c
push 2
lea ecx, [esp + 0x1bd8]
call fcn.0502f341
lea eax, [ebx + 0x168]
lea edx, [esp + 0x1bd4]
movzx ecx, word [edx]
imul ecx, ecx, 0xff
add ecx, edi
shr ecx, 0xf
inc edx
inc edx
mov byte [eax - 0x100], cl
mov byte [eax], cl
mov byte [eax + 0x100], cl
inc eax
dec esi
jne 0x50336f3
lea eax, [esp + 0x1dd4]
push eax
lea ecx, [esp + 0x1bd8]
call fcn.0502f4ac
lea ecx, [esp + 0x25dc]
mov dword [esp + 0x14], 0xc
mov eax, dword [esp + 0x14]
xor edx, edx
push 0x18
pop esi
div esi
add dword [esp + 0x14], 0x8000
mov word [ecx], ax
inc ecx
inc ecx
cmp dword [esp + 0x14], 0xc800c
jb 0x5033738
and dword [esp + 0x18], 0
lea eax, [esp + 0x25dc]
mov dword [esp + 0x24], eax
jmp 0x5033770
mov ebx, dword [esp + 0x30]
mov eax, dword [esp + 0x24]
movzx eax, word [eax]
and dword [esp + 0x14], 0
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x850]
mov edx, dword [esp + 0x14]
movzx edx, word [esp + edx*2 + 0x25dc]
xor ecx, ecx
mov si, word [esp + 0x1c]
mov word [eax - 2], si
mov si, word [esp + ecx*2 + 0x25dc]
mov word [eax], dx
mov word [eax + 2], si
inc ecx
add eax, 8
cmp ecx, 0x19
jb 0x5033795
inc dword [esp + 0x14]
cmp dword [esp + 0x14], 0x19
jb 0x5033787
mov ecx, dword [esp + 0x20]
push 0
push 0x50524742
push 0x504c4142
push 0x271
lea eax, [esp + 0x85c]
push eax
push eax
call fcn.0506bbf5
push 1
push 0x753
push dword [esp + 0x20]
lea ecx, [esp + 0x44]
push dword [ebx]
call fcn.050623fb
lea ecx, [esp + 0x38]
mov byte [esp + 0x2620], 1
call fcn.05062448
lea ebx, [esp + 0x84c]
lea esi, [eax + 2]
mov dword [esp + 0x1c], 0x19
mov dword [esp + 0x14], 0x19
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
shr eax, 0x10
mov dword [esp + 0x2c], ecx
push eax
lea ecx, [esp + 0x1dd8]
call fcn.0502f1e6
mov word [esp + 0x2a], ax
movzx eax, word [esp + 0x2c]
push eax
lea ecx, [esp + 0x1dd8]
call fcn.0502f1e6
mov word [esp + 0x2c], ax
movzx eax, word [esp + 0x2e]
push eax
lea ecx, [esp + 0x1dd8]
call fcn.0502f1e6
movzx ecx, word [esp + 0x2a]
imul ecx, ecx, 0xff
add ecx, edi
shr ecx, 0xf
mov byte [esi - 2], cl
movzx ecx, word [esp + 0x2c]
movzx eax, ax
imul ecx, ecx, 0xff
imul eax, eax, 0xff
add ecx, edi
add eax, edi
shr ecx, 0xf
shr eax, 0xf
mov byte [esi - 1], cl
mov byte [esi], al
add esi, 3
add ebx, 8
dec dword [esp + 0x14]
jne 0x5033825
dec dword [esp + 0x1c]
jne 0x503381d
lea ecx, [esp + 0x38]
mov byte [esp + 0x2620], 0
call fcn.0506242e
add dword [esp + 0x18], 0x753
add dword [esp + 0x24], 2
cmp dword [esp + 0x18], 0xb71b
jb 0x503376c
mov ecx, dword [esp + 0x20]
or dword [esp + 0x2620], 0xffffffff
call fcn.0503f832
mov ecx, dword [esp + 0x2618]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2600]
xor ecx, esp
call fcn.05070186
mov esp, ebp
pop ebp
ret 4