Function at 0x54c6c2
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov eax, 0x5e9596
call 0x60799c
push ecx
mov eax, dword [ebp + 0xc]
push ebx
xor ebx, ebx
push esi
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
push edi
mov edi, ecx
mov dword [eax], ebx
mov eax, dword [ebp + 0x1c]
and eax, 2
push 0x4a8
cmp al, 2
push 0x40
mov dword [ebp - 0x10], edi
mov dword [edi], ebx
sete byte [ebp + 0x1f]
call dword [0x5ec408]
mov esi, eax
cmp esi, ebx
jne 0x54c70d
mov dword [edi], 1
jmp 0x54ca00
lea eax, [esi + 4]
push 0x400
push ebx
push eax
call 0x607d80
lea ebx, [esi + 0x428]
push ebx
push dword [ebp + 8]
call fcn.005647f3
add esp, 0x14
test eax, eax
je 0x54c9f3
push ebx
call fcn.00564aa2
movzx eax, ax
push ebx
mov dword [esi + 0x41c], eax
call fcn.00564aba
movsx edx, byte [esi + 0x42b]
pop ecx
pop ecx
movzx ecx, ax
movsx eax, byte [esi + 0x469]
imul eax, edx
test eax, eax
mov dword [esi + 0x420], ecx
mov dword [esi + 0x404], eax
je 0x54c9f3
cmp eax, 0x20
jg 0x54c9f3
cmp dword [esi + 0x41c], 0
je 0x54c9f3
test ecx, ecx
je 0x54c9f3
cmp byte [ebp + 0x1f], 0
mov edx, dword [ebp + 0x18]
jne 0x54c7b6
mov eax, dword [edx]
dec eax
je 0x54c7b8
sub eax, 7
je 0x54c7b8
sub eax, 0x10
je 0x54c7b8
mov dword [edi], 5
jmp 0x54ca00
mov dword [edx], eax
mov eax, dword [edx]
mov ecx, dword [esi + 0x404]
mov dword [esi], eax
cmp ecx, dword [edx]
jbe 0x54c7d1
mov dword [edi], 0x1c
jmp 0x54ca00
xor edi, edi
cmp ecx, 0x18
jl 0x54c7de
and dword [ebp + 0x18], edi
inc edi
jmp 0x54c7e6
inc edi
mov eax, edi
shl eax, cl
mov dword [ebp + 0x18], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [esi + 0x41c]
push ebx
mov dword [ecx], eax
mov ecx, dword [ebp + 0x10]
mov eax, dword [esi + 0x420]
mov dword [ecx], eax
call fcn.00564ad2
test eax, eax
pop ecx
je 0x54c81b
lea eax, [esi + 4]
push eax
push ebx
push dword [ebp + 8]
call fcn.00564998
add esp, 0xc
test eax, eax
jne 0x54c834
xor ecx, ecx
lea eax, [esi + 5]
mov byte [eax + 1], cl
mov byte [eax], cl
mov byte [eax - 1], cl
inc ecx
add eax, 4
cmp ecx, 0x100
jl 0x54c820
cmp dword [esi + 0x404], 8
jge 0x54c8ce
cmp byte [esi + 0x469], 1
jne 0x54c870
cmp byte [esi + 0x42b], 1
jne 0x54c870
and byte [esi + 4], 0
and byte [esi + 5], 0
and byte [esi + 6], 0
or byte [esi + 8], 0xff
or byte [esi + 9], 0xff
or byte [esi + 0xa], 0xff
push 2
pop edx
jmp 0x54c8aa
mov edi, dword [ebp + 0x18]
xor edx, edx
test edi, edi
jle 0x54c8aa
lea ecx, [esi + 5]
lea eax, [esi + 0x439]
mov dword [ebp + 0x18], edi
mov edx, edi
mov bl, byte [eax + 1]
mov byte [ecx + 1], bl
mov bl, byte [eax]
mov byte [ecx], bl
mov bl, byte [eax - 1]
mov byte [ecx - 1], bl
add eax, 3
add ecx, 4
dec dword [ebp + 0x18]
jne 0x54c887
cmp edi, 0x100
jge 0x54c8cb
mov edi, 0x100
lea ebx, [esi + edx*4 + 4]
sub edi, edx
lea eax, [esi + 4]
push 4
push eax
push ebx
call dword [0x66bd5c]
add esp, 0xc
add ebx, 4
dec edi
jne 0x54c8b5
xor edi, edi
inc edi
cmp dword [esi], 8
ja 0x54c8e8
lea eax, [esi + 4]
push 0x400
push eax
push dword [ebp + 0x14]
call dword [0x66bd5c]
add esp, 0xc
mov eax, dword [esi + 0x41c]
lea eax, [eax + eax*2]
push eax
call 0x620929
test eax, eax
pop ecx
mov dword [esi + 0x418], eax
jne 0x54c909
mov eax, dword [ebp - 0x10]
mov dword [eax], edi
jmp 0x54c963
lea eax, [esi + 0x428]
push eax
call fcn.00564cf5
push eax
call 0x620929
pop ecx
mov dword [esi + 0x414], eax
test eax, eax
pop ecx
jne 0x54c939
mov eax, dword [ebp - 0x10]
mov dword [eax], edi
push dword [esi + 0x418]
call 0x620952
jmp 0x54c962
push dword [ebp + 8]
call fcn.00564afc
test eax, eax
pop ecx
jne 0x54c96f
mov eax, dword [ebp - 0x10]
mov dword [eax], edi
push dword [esi + 0x418]
call 0x620952
push dword [esi + 0x414]
call 0x620952
pop ecx
pop ecx
push esi
call dword [0x5ec3f8]
jmp 0x54ca00
mov ecx, dword [esi + 0x404]
push 8
pop eax
and dword [esi + 0x424], 0
cdq
idiv ecx
cmp ecx, 0x18
mov dword [esi + 0x408], edi
mov dword [esi + 0x40c], eax
je 0x54c9a9
lea edx, [ecx - 1]
test edx, edx
jle 0x54c9a9
mov eax, edi
dec edx
lea eax, [eax + eax + 1]
jne 0x54c99c
mov dword [esi + 0x408], eax
cmp ecx, edi
jne 0x54c9c5
and byte [esi + 4], 0
and byte [esi + 5], 0
and byte [esi + 6], 0
or byte [esi + 8], 0xff
or byte [esi + 9], 0xff
or byte [esi + 0xa], 0xff
push 0x15c
call 0x620929
pop ecx
mov dword [ebp + 0x18], eax
and dword [ebp - 4], 0
test eax, eax
je 0x54c9e7
push dword [ebp + 8]
mov ecx, eax
call fcn.00545120
jmp 0x54c9e9
xor eax, eax
mov dword [esi + 0x410], eax
mov eax, esi
jmp 0x54ca02
push esi
call dword [0x5ec3f8]
mov dword [edi], 0x16
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x18