Function at 0x548cf0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 0x18]
push ebx
and eax, 2
push esi
mov esi, ecx
cmp al, 2
sete byte [ebp - 1]
cmp byte [esi + 0x12c], 8
push edi
ja 0x548d25
mov cl, byte [esi + 0x11e]
movzx eax, cl
dec eax
je 0x548d30
dec eax
dec eax
je 0x548d30
sub eax, 6
je 0x548d30
mov dword [esi], 0x1c
jmp 0x5490a9
xor ebx, ebx
cmp cl, 3
jne 0x548d3f
mov dword [esi + 0x108], ebx
jmp 0x548d49
mov dword [esi + 0x108], 1
mov al, byte [esi + 0x11c]
cmp al, bl
je 0x548d72
mov ecx, dword [ebp + 8]
movzx eax, al
push eax
lea eax, [esi + 4]
push eax
call fcn.005452e6
test al, al
jne 0x548d72
mov dword [esi], 3
jmp 0x5490a9
mov al, byte [esi + 0x12d]
mov edi, dword [ebp + 0x14]
mov cl, al
push 0x400
shr al, 5
and cl, 0xf
and al, 1
push ebx
push edi
mov byte [esi + 0x104], cl
mov byte [ebp + 0x1b], al
call 0x607d80
add esp, 0xc
cmp byte [esi + 0x11d], bl
je 0x548dfb
movzx eax, word [esi + 0x121]
movzx ecx, word [esi + 0x11f]
add eax, ecx
mov dword [ebp - 0x10], ebx
test eax, eax
jle 0x548e24
add edi, 2
movzx eax, byte [esi + 0x123]
push eax
lea eax, [edi + 1]
push dword [ebp + 8]
mov ecx, esi
push eax
lea eax, [edi - 1]
push edi
push eax
lea eax, [edi - 2]
push eax
call fcn.005490b2
movzx eax, word [esi + 0x121]
movzx ecx, word [esi + 0x11f]
inc dword [ebp - 0x10]
add eax, ecx
add edi, 4
cmp dword [ebp - 0x10], eax
jl 0x548dbf
jmp 0x548e24
cmp dword [esi + 0x108], ebx
jne 0x5490a3
xor ecx, ecx
lea eax, [edi + 2]
or byte [eax + 1], 0xff
mov byte [eax - 2], cl
mov byte [eax - 1], cl
mov byte [eax], cl
inc ecx
add eax, 4
cmp ecx, 0x100
jl 0x548e0c
mov al, byte [esi + 0x11e]
cmp al, 9
je 0x548e36
cmp al, 0xa
je 0x548e36
cmp al, 0xb
jne 0x548e3d
or dword [esi + 0x108], 4
movzx eax, word [esi + 0x128]
cmp byte [ebp - 1], bl
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], ebx
je 0x548e69
lea eax, [eax*8 + 0x1f]
push 0x20
cdq
pop ecx
mov dword [ebp - 0x10], 0x428
idiv ecx
shl eax, 2
mov dword [ebp - 8], eax
movzx edi, word [esi + 0x12a]
imul edi, eax
add edi, dword [ebp - 0x10]
lea ecx, [ebp - 0x24]
call fcn.00550461
push edi
lea ecx, [ebp - 0x24]
call fcn.0055046d
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
jne 0x548e99
mov dword [esi], 1
jmp 0x5490a9
cmp byte [ebp - 1], bl
mov ecx, eax
mov dword [ebp - 0x18], ecx
je 0x548f0e
mov dword [eax], 0x28
push 0x400
movzx ecx, word [esi + 0x128]
mov dword [eax + 4], ecx
push dword [ebp + 0x14]
movzx ecx, word [esi + 0x12a]
mov dword [eax + 8], ecx
mov word [eax + 0xc], 1
mov word [eax + 0xe], 8
mov dword [eax + 0x10], ebx
movzx ecx, word [esi + 0x12a]
imul ecx, dword [ebp - 8]
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ebx
mov dword [eax + 0x1c], ebx
mov dword [eax + 0x20], 0x100
mov dword [eax + 0x24], ebx
mov eax, dword [ebp - 0x1c]
add eax, 0x28
push eax
call dword [0x66bd5c]
mov ecx, dword [ebp - 0x18]
add esp, 0xc
cmp byte [ebp + 0x1b], bl
sete al
mov byte [ebp + 0x1b], al
mov eax, dword [ebp - 0x10]
mov dword [esi + 0x114], ebx
add eax, ecx
cmp byte [ebp + 0x1b], bl
mov dword [esi + 0x118], ebx
mov dword [ebp - 0xc], eax
jne 0x548f2f
sub ecx, dword [ebp - 8]
add ecx, edi
mov dword [ebp - 0xc], ecx
cmp word [esi + 0x12a], bx
mov dword [ebp - 0x10], ebx
jbe 0x54901d
mov edi, 0x66bdb8
cmp dword [esi], ebx
jne 0x54901d
mov eax, dword [ebp - 0xc]
cmp word [esi + 0x128], bx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], ebx
jbe 0x548fa9
movzx eax, byte [esi + 0x12c]
push dword [ebp + 0x14]
mov ecx, esi
push eax
lea eax, [ebp - 2]
push dword [ebp + 8]
push eax
lea eax, [ebp - 3]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 1]
push eax
call fcn.005491dd
test eax, eax
je 0x548fa3
mov ecx, dword [ebp - 0x14]
mov al, byte [ebp - 1]
inc dword [ebp - 0x14]
inc dword [ebp - 0x18]
mov byte [ecx], al
movzx eax, word [esi + 0x128]
cmp dword [ebp - 0x18], eax
jb 0x548f5e
jmp 0x548fa9
mov dword [esi], 3
cmp byte [ebp + 0x1b], bl
mov eax, dword [ebp - 8]
jne 0x548fb6
sub dword [ebp - 0xc], eax
jmp 0x548fb9
add dword [ebp - 0xc], eax
mov ecx, edi
call fcn.0053c623
cmp dword [eax + 4], 1
jne 0x548ffc
mov ecx, edi
call fcn.0053c623
cmp dword [eax], ebx
je 0x548ffc
mov ecx, edi
call fcn.0053c623
mov ecx, edi
mov dword [ebp - 0x18], eax
call fcn.0053c623
push dword [eax + 8]
movzx eax, word [esi + 0x12a]
push eax
mov eax, dword [ebp - 0x18]
push dword [ebp - 0x10]
call dword [eax]
neg eax
sbb eax, eax
inc eax
jmp 0x548ffe
xor eax, eax
cmp eax, ebx
jne 0x549017
movzx eax, word [esi + 0x12a]
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], eax
jb 0x548f44
jmp 0x54901d
mov dword [esi], 0xe
movzx eax, word [esi + 0x128]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov ecx, dword [ebp + 0x10]
movzx eax, word [esi + 0x12a]
mov dword [ecx], eax
lea eax, [esi + 0x31d]
push eax
mov ecx, esi
push dword [ebp + 8]
call fcn.005495a5
test al, al
je 0x549099
push 0x649ad0
push ebx
call fcn.005c32e1
mov eax, dword [esi + 0x31d]
pop ecx
cmp eax, ebx
pop ecx
je 0x549084
lea ecx, [esi + 0x12e]
push ecx
push eax
push dword [ebp + 8]
mov ecx, esi
call fcn.00549600
test al, al
je 0x549084
push 0x649ab8
push ebx
call fcn.005c32e1
pop ecx
pop ecx
cmp dword [esi + 0x321], ebx
je 0x549099
push 0x649aa0
push ebx
call fcn.005c32e1
pop ecx
pop ecx
lea ecx, [ebp - 0x24]
call fcn.005505ce
jmp 0x5490ab
mov dword [esi], 0x20
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x14