Function at 0x54f9e0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0xc
push 0
push 0
dec ecx
jne 0x54f9e9
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov esi, ecx
mov edi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x54fc87
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebx + 0x2f8]
mov edx, dword [eax]
call dword [edx + 0xd4]
lea edx, [ebp - 0x10]
mov eax, dword [0x596274]
mov eax, dword [eax]
call fcn.004e2c6c
push dword [ebp - 0x10]
mov eax, esi
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x14]
call fcn.00409380
push dword [ebp - 0x14]
push 0x54fca0
lea eax, [ebp - 8]
mov edx, 3
call fcn.00404ce0
mov edx, 0x40
mov eax, dword [ebp - 8]
call fcn.00409498
mov esi, eax
lea eax, [ebp - 8]
call fcn.00404968
test esi, esi
jl 0x54fc57
mov ecx, 2
xor edx, edx
mov eax, esi
call fcn.00409578
mov ecx, eax
mov eax, ecx
mov ecx, 0x140
cdq
idiv ecx
mov dword [ebx + 0x310], eax
cmp edi, dword [ebx + 0x310]
jl 0x54faa0
mov eax, esi
call fcn.004095bc
jmp 0x54fc57
mov edx, edi
shl edx, 6
lea edx, [edx + edx*4]
xor ecx, ecx
mov eax, esi
call fcn.00409578
mov eax, dword [ebx + 0x310]
sub eax, edi
mov edi, eax
cmp edi, 0x3c
jle 0x54fac5
mov edi, 0x3c
mov ecx, edi
shl ecx, 6
lea ecx, [ecx + ecx*4]
lea edx, [ebx + 0x318]
mov eax, esi
call fcn.00409520
mov eax, esi
call fcn.004095bc
dec edi
test edi, edi
jl 0x54fc57
inc edi
mov dword [ebp - 0xc], edi
xor esi, esi
mov eax, dword [ebx + 0x2f8]
mov eax, dword [eax + 0x22c]
call fcn.0047e2d8
mov dword [ebp - 4], eax
mov eax, esi
and eax, 0xff
mov edi, eax
shl edi, 3
lea edi, [edi + edi*4]
push dword [ebx + edi*8 + 0x324]
push dword [ebx + edi*8 + 0x320]
lea edx, [ebp - 0x18]
mov eax, 0x54fcbc
call fcn.0040c138
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
call fcn.0047dd28
lea eax, [ebp - 0x1c]
lea edx, [ebx + edi*8 + 0x3c1]
call fcn.00404bc4
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea edx, [ebx + edi*8 + 0x331]
lea eax, [ebp - 0x48]
call fcn.00403018
mov edx, 0x54fcd4
lea eax, [ebp - 0x48]
mov cl, 0x20
call fcn.00402fe8
lea edx, [ebp - 0x48]
lea eax, [ebp - 0x24]
call fcn.00404bc4
push dword [ebp - 0x24]
movsx eax, byte [ebx + edi*8 + 0x330]
inc eax
lea edx, [ebp - 0x4c]
call fcn.00409350
push dword [ebp - 0x4c]
push 0x54fce0
lea eax, [ebp - 0x20]
mov edx, 3
call fcn.00404ce0
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
mov ecx, dword [eax]
call dword [ecx + 0x38]
xor eax, eax
mov al, byte [ebx + edi*8 + 0x350]
lea edx, [ebp - 0x54]
call fcn.00409350
push dword [ebp - 0x54]
push 0x54fcec
xor eax, eax
mov al, byte [ebx + edi*8 + 0x351]
lea edx, [ebp - 0x58]
call fcn.00409350
push dword [ebp - 0x58]
push 0x54fcec
xor eax, eax
mov al, byte [ebx + edi*8 + 0x352]
lea edx, [ebp - 0x5c]
call fcn.00409350
push dword [ebp - 0x5c]
push 0x54fcec
xor eax, eax
mov al, byte [ebx + edi*8 + 0x353]
lea edx, [ebp - 0x60]
call fcn.00409350
push dword [ebp - 0x60]
lea eax, [ebp - 0x50]
mov edx, 7
call fcn.00404ce0
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea eax, [ebp - 0x64]
lea edx, [ebx + edi*8 + 0x356]
call fcn.00404bc4
mov edx, dword [ebp - 0x64]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
mov ecx, dword [eax]
call dword [ecx + 0x38]
inc esi
dec dword [ebp - 0xc]
jne 0x54faf0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x54fc8e
lea eax, [ebp - 0x64]
mov edx, 7
call fcn.0040498c
lea eax, [ebp - 0x24]
mov edx, 6
call fcn.0040498c
lea eax, [ebp - 8]
call fcn.00404968
ret