Function at 0x5524a0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push 0xffffffffffffffff
push 0x6c906e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x16c
push ebx
push ebp
mov ebx, ecx
push esi
push edi
lea ecx, [esp + 0x14]
call fcn.0061d780
lea ecx, [esp + 0x48]
mov dword [esp + 0x184], 0
call fcn.0061aaa0
lea ecx, [esp + 0x20]
mov byte [esp + 0x184], 1
call fcn.0063bb20
lea ecx, [esp + 0x10]
mov byte [esp + 0x184], 2
call fcn.0061d780
mov esi, dword [esp + 0x18c]
mov byte [esp + 0x184], 3
mov cl, byte [esi]
cmp cl, 8
jae 0x55281a
xor edx, edx
mov al, cl
mov dl, byte [ebx + 0x1d]
mov byte [esp + 0x31], cl
add al, 3
and ecx, 0xff
mov byte [esp + 0x32], dl
mov byte [esp + 0x30], al
mov al, byte [ebx + 0x1c]
mov edx, ecx
inc esi
lea edi, [esp + 0x34]
shr ecx, 2
mov byte [esp + 0x33], al
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
movzx ax, byte [esp + 0x30]
lea ecx, [esp + 0x31]
push eax
push ecx
lea ecx, [esp + 0x1c]
call fcn.0061dd00
push 1
lea ecx, [esp + 0x24]
call fcn.0062daa0
push ecx
lea edx, [esp + 0x18]
mov ecx, esp
mov dword [esp + 0x20], esp
push edx
call fcn.0061d790
lea ecx, [esp + 0x24]
call fcn.0062d730
sub esp, 0x24
lea ecx, [esp + 0x44]
mov eax, esp
mov dword [esp + 0x40], esp
push 0
push ecx
push eax
mov ecx, 0x72baa8
call fcn.00628090
lea ecx, [esp + 0x6c]
call fcn.0061ac40
push ecx
lea ecx, [esp + 0x4c]
mov edx, esp
mov dword [esp + 0x20], esp
push edx
call fcn.0061afb0
lea ecx, [esp + 0x14]
call fcn.0061dab0
lea ecx, [esp + 0x10]
call fcn.0061dc40
test ax, ax
jle 0x55281a
push 3
lea ecx, [esp + 0x14]
call fcn.0061daa0
cmp al, 0x10
push 3
lea ecx, [esp + 0x14]
jne 0x552961
call fcn.0061daa0
and al, 0xf
push 4
lea ecx, [esp + 0x14]
mov byte [esp + 0x84], al
call fcn.0061daa0
movzx bp, byte [esp + 0x80]
mov byte [esp + 0x81], al
push 1
movzx ax, al
shl ebp, 8
lea ecx, [esp + 0x14]
add ebp, eax
call fcn.0061daa0
push 2
lea ecx, [esp + 0x14]
mov byte [esp + 0x82], al
call fcn.0061daa0
mov byte [esp + 0x7f], al
xor esi, esi
lea edi, [esp + 0x82]
lea ecx, [esi + 5]
push ecx
lea ecx, [esp + 0x14]
call fcn.0061daa0
mov byte [edi], al
inc esi
inc edi
cmp si, 6
jl 0x55264e
sub ebp, 6
mov eax, 0x92492493
movsx ecx, bp
imul ecx
add edx, ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, ecx
mov dword [esp + 0x18], edx
mov ecx, 7
cdq
idiv ecx
test edx, edx
je 0x552694
inc dword [esp + 0x18]
mov esi, dword [esp + 0x194]
xor eax, eax
mov al, byte [ebx + 0x1d]
lea edi, [esp + 0x34]
mov cl, byte [esi]
mov byte [esp + 0x32], al
mov dl, cl
mov byte [esp + 0x31], cl
add dl, 3
and ecx, 0xff
mov byte [esp + 0x30], dl
mov dl, byte [ebx + 0x1c]
mov eax, ecx
inc esi
shr ecx, 2
mov byte [esp + 0x33], dl
lea edx, [esp + 0x31]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
movzx cx, byte [esp + 0x30]
push ecx
push edx
lea ecx, [esp + 0x1c]
call fcn.0061dd00
lea ecx, [esp + 0x20]
call fcn.0062dac0
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x20]
push eax
call fcn.0062daa0
push ecx
lea edx, [esp + 0x18]
mov ecx, esp
mov dword [esp + 0x20], esp
push edx
call fcn.0061d790
lea ecx, [esp + 0x24]
call fcn.0062d730
sub esp, 0x24
lea ecx, [esp + 0x44]
mov eax, esp
mov dword [esp + 0x40], esp
push 0
push ecx
push eax
mov ecx, 0x72baa8
call fcn.00628090
lea ecx, [esp + 0x6c]
call fcn.0061ac40
lea ecx, [esp + 0x48]
call fcn.0061b070
test ax, ax
jle 0x55281a
push 0
lea ecx, [esp + 0x4c]
call fcn.0061b060
mov esi, eax
mov ecx, dword [esi + 4]
mov dl, byte [esi]
test ecx, ecx
mov byte [esp + 0x6c], dl
jne 0x55276d
xor eax, eax
jmp 0x552775
mov eax, dword [esi + 8]
sub eax, ecx
sar eax, 2
test eax, eax
jge 0x55277b
xor eax, eax
shl eax, 2
push eax
call fcn.006a6832
mov ebx, eax
mov eax, dword [esi + 8]
mov esi, dword [esi + 4]
add esp, 4
mov edi, ebx
cmp esi, eax
mov dword [esp + 0x70], ebx
mov dword [esp + 0x44], eax
mov dword [esp + 0x1c], edi
je 0x5527cb
mov dword [esp + 0x40], edi
test edi, edi
mov byte [esp + 0x184], 4
je 0x5527bd
push esi
mov ecx, edi
call fcn.0061d790
mov eax, dword [esp + 0x44]
add esi, 4
add edi, 4
cmp esi, eax
mov dword [esp + 0x1c], edi
jne 0x5527a1
mov dword [esp + 0x74], edi
mov dword [esp + 0x78], edi
test ebx, ebx
mov byte [esp + 0x184], 5
jne 0x5527e3
xor eax, eax
jmp 0x5527ea
mov eax, edi
sub eax, ebx
sar eax, 2
cmp ax, word [esp + 0x18]
jge 0x55287f
cmp ebx, edi
mov byte [esp + 0x184], 3
mov esi, ebx
je 0x552811
mov ecx, esi
call fcn.0061d8c0
add esi, 4
cmp esi, edi
jne 0x552803
push ebx
call fcn.006a64d0
add esp, 4
lea ecx, [esp + 0x10]
mov byte [esp + 0x184], 2
call fcn.0061d8c0
lea ecx, [esp + 0x20]
mov byte [esp + 0x184], 1
call fcn.0062d500
lea ecx, [esp + 0x48]
mov byte [esp + 0x184], 0
call fcn.0061ab90
lea ecx, [esp + 0x14]
mov dword [esp + 0x184], 0xffffffff
call fcn.0061d8c0
xor ax, ax
mov ecx, dword [esp + 0x17c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x178
ret 0xc
test bp, bp
jle 0x5528f6
movsx eax, bp
xor esi, esi
mov dword [esp + 0x18], eax
mov eax, 0x92492493
imul esi
add edx, esi
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
lea ecx, [esp + 0x48]
movsx edx, dx
push edx
push 0
call fcn.0061b060
mov ecx, eax
call fcn.00690c60
push ecx
mov ecx, esp
mov dword [esp + 0x44], esp
push eax
call fcn.0061d790
lea ecx, [esp + 0x14]
call fcn.0061dab0
mov eax, esi
mov ecx, 7
cdq
idiv ecx
lea ecx, [esp + 0x10]
add edx, 4
push edx
call fcn.0061daa0
mov byte [esp + esi + 0x88], al
mov eax, dword [esp + 0x18]
inc esi
dec eax
mov dword [esp + 0x18], eax
jne 0x55288d
add ebp, 0xa
movsx ecx, bp
mov eax, ecx
cdq
and edx, 0xff
add eax, edx
sar eax, 8
and ecx, 0x800000ff
mov byte [esp + 0x7c], al
jns 0x55291e
dec ecx
or ecx, 0xffffff00
inc ecx
add ebp, 2
lea edx, [esp + 0x7c]
mov byte [esp + 0x7d], cl
mov ecx, dword [esp + 0x190]
push ebp
push edx
call fcn.0061dd00
cmp ebx, edi
mov byte [esp + 0x184], 3
mov esi, ebx
je 0x552953
mov ecx, esi
call fcn.0061d8c0
add esi, 4
cmp esi, edi
jne 0x552945
push ebx
call fcn.006a64d0
add esp, 4
jmp 0x552a11
call fcn.0061daa0
xor bx, bx
push 3
mov bl, al
lea ecx, [esp + 0x14]
add ebx, 4
mov byte [esp + 0x80], 0
call fcn.0061daa0
add al, 4
push 1
lea ecx, [esp + 0x14]
mov byte [esp + 0x81], al
call fcn.0061daa0
push 2
lea ecx, [esp + 0x14]
mov byte [esp + 0x82], al
call fcn.0061daa0
push 3
lea ecx, [esp + 0x14]
mov byte [esp + 0x83], al
mov byte [esp + 0x84], 0
xor esi, esi
call fcn.0061daa0
and eax, 0xff
inc eax
test eax, eax
jle 0x5529fc
xor edi, edi
lea eax, [esi + 3]
lea ecx, [esp + 0x10]
push eax
call fcn.0061daa0
inc esi
mov byte [esp + edi + 0x81], al
push 3
lea ecx, [esp + 0x14]
movsx edi, si
call fcn.0061daa0
and eax, 0xff
inc eax
cmp edi, eax
jl 0x5529cf
add ebx, 2
lea ecx, [esp + 0x7c]
push ebx
push ecx
mov ecx, dword [esp + 0x198]
call fcn.0061dd00
lea ecx, [esp + 0x10]
mov byte [esp + 0x184], 2
call fcn.0061d8c0
lea ecx, [esp + 0x20]
mov byte [esp + 0x184], 1
call fcn.0062d500
lea ecx, [esp + 0x48]
mov byte [esp + 0x184], 0
call fcn.0061ab90
lea ecx, [esp + 0x14]
mov dword [esp + 0x184], 0xffffffff
call fcn.0061d8c0
mov ax, 1
jmp 0x552864