Function at 0x534060
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
test edx, edx
mov dword [ebp - 0x18], ecx
mov ebx, 0xb
cmovne ebx, edx
mov dword [ebp - 0x24], ebx
push esi
push edi
cmp ebx, 5
jb 0x53427c
cmp ebx, 0xc
jbe 0x534093
mov eax, 0xffffffd4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0xc]
mov edx, 0
bsr eax, esi
mov ecx, 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x38], 0
cmovne edx, eax
mov eax, dword [ebp + 0x10]
inc edx
bsr eax, eax
cmovne ecx, eax
add ecx, 2
cmp edx, ecx
cmovb ecx, edx
cmp ebx, ecx
jb 0x53427c
xor eax, eax
mov edi, 0x3e
cmp dword [ebp + 0x14], eax
push 0
sete al
sub edi, ebx
push esi
push 0x40000000
push 0
lea eax, [eax*2 - 1]
mov dword [ebp - 0x1c], edi
movzx eax, ax
mov dword [ebp - 0x20], eax
call fcn.00568d90
xor ecx, ecx
mov dword [ebp - 0x28], edx
xor edx, edx
mov dword [ebp - 0x2c], eax
lea eax, [edi - 0x14]
mov dword [ebp - 0x14], 0
bts ecx, eax
mov dword [ebp - 4], 0
cmp eax, 0x20
mov edi, 1
cmovae edx, ecx
xor ecx, edx
cmp eax, 0x40
mov eax, dword [ebp - 0x18]
cmovae edx, ecx
mov dword [ebp - 0x34], ecx
mov ecx, ebx
mov dword [ebp - 0x30], edx
shl edi, cl
mov edx, esi
shr edx, cl
xor ebx, ebx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x38], edx
nop dword [eax]
mov ecx, dword [ecx + ebx*4]
cmp ecx, esi
je 0x534273
test ecx, ecx
jne 0x534166
xor edx, edx
jmp 0x534210
cmp ecx, edx
ja 0x534176
mov ecx, dword [ebp - 0x20]
dec edi
movzx edx, cx
jmp 0x53420d
mov eax, dword [ebp - 0x28]
mul ecx
mov esi, eax
mov eax, dword [ebp - 0x2c]
mul ecx
mov ecx, dword [ebp - 0x1c]
add esi, edx
mov dword [ebp - 0xc], eax
mov edx, esi
mov dword [ebp - 8], esi
call fcn.00567b90
movzx esi, ax
cmp si, 8
jge 0x5341e0
mov ecx, dword [ebp - 0x1c]
movsx edi, si
mov eax, edi
cdq
call fcn.00567b70
sub dword [ebp - 0xc], eax
mov ecx, dword [edi*4 + 0x5b6a50]
sbb dword [ebp - 8], edx
mov eax, dword [ebp - 0x30]
mul ecx
mov edi, eax
mov eax, dword [ebp - 0x34]
mul ecx
add edi, edx
cmp dword [ebp - 8], edi
jb 0x5341d9
ja 0x5341d2
cmp dword [ebp - 0xc], eax
jbe 0x5341d9
mov eax, 1
jmp 0x5341db
xor eax, eax
mov edi, dword [ebp - 0x10]
add esi, eax
movsx eax, si
sub edi, eax
movzx ecx, si
cmp si, word [ebp - 4]
mov eax, ebx
movzx edx, si
cmovle eax, dword [ebp - 0x14]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
movzx eax, ax
cmovle ecx, eax
movzx eax, cx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x10], edi
mov ecx, dword [ebp + 8]
mov word [eax + ebx*2], dx
inc ebx
mov edx, dword [ebp - 0x38]
cmp ebx, dword [ebp + 0x10]
jbe 0x534150
mov ecx, dword [ebp - 0x14]
movzx ebx, word [eax + ecx*2]
lea edx, [eax + ecx*2]
movsx ecx, bx
mov eax, edi
sar ecx, 1
neg eax
cmp eax, ecx
jl 0x534261
push dword [ebp - 0x20]
mov ecx, dword [ebp - 0x18]
push dword [ebp + 0x10]
push esi
push dword [ebp + 8]
mov esi, dword [ebp - 0x24]
mov edx, esi
call fcn.00533e00
add esp, 0x10
cmp eax, 0xffffff88
jbe 0x53426a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x24]
lea ecx, [ebx + edi]
mov word [edx], cx
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret