Function at 0x654774
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x75f510]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0xc]
push ebx
push esi
push edi
mov eax, dword [ecx]
push 8
push edx
mov dword [ebp - 0x54], ecx
call dword [eax]
push 8
xor ebx, ebx
lea eax, [ebp - 0xc]
push ebx
push eax
call fcn.006664fb
add esp, 0xc
test eax, eax
je 0x6547b3
xor eax, eax
jmp 0x654c4f
push ebx
push ebx
push ebx
push 0x6fde38
call fcn.00667f28
push eax
mov dword [ebp - 0x10], eax
call fcn.0066595b
push 0x40
push 0x661d20
push dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
call fcn.00664602
push ebx
push eax
call fcn.00661de0
add esp, 0x28
test eax, eax
je 0x6547f0
mov edi, ebx
jmp 0x654c3c
push 0x654c60
push dword [ebp - 0x54]
push dword [ebp - 0x10]
call fcn.0066df66
push 8
push dword [ebp - 0x10]
call fcn.006664c9
mov ecx, dword [ebp - 0x10]
add esp, 0x14
cmp byte [ecx + 0x13c], 8
jb 0x65482b
cmp byte [ecx + 0x13b], 3
je 0x65482b
mov eax, dword [ebp - 0x14]
test byte [eax + 8], 0x10
je 0x654835
push ecx
call fcn.0066cde6
pop ecx
mov ecx, dword [ebp - 0x10]
push 1
push 0xff
push ecx
call fcn.0066dd92
push dword [ebp - 0x10]
call fcn.0066de1f
push dword [ebp - 0x10]
call fcn.0066ceaa
push dword [ebp - 0x10]
call fcn.0066d83c
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.00668722
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.0066901c
mov eax, dword [ebp - 0x10]
push 0x18
mov ebx, dword [eax + 0xe4]
mov esi, dword [eax + 0xe8]
shl ebx, 2
imul esi, ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x20], esi
call fcn.00612e79
push 0x18
mov edi, eax
push 0
push edi
mov dword [ebp - 0x38], edi
call fcn.00614800
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + 0xe4]
mov dword [edi + 8], ecx
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xe8]
mov dword [edi + 0xc], eax
imul eax, ebx
push eax
call fcn.00612e79
push esi
push 0
push eax
mov dword [ebp - 0x2c], eax
call fcn.00614800
mov esi, dword [edi + 0xc]
add esp, 0x48
mov ecx, esi
shl ecx, 2
push ecx
call fcn.00612e79
pop ecx
xor ecx, ecx
mov dword [ebp - 0x34], eax
test esi, esi
mov esi, dword [ebp - 0x2c]
jle 0x6548f9
mov edx, esi
mov dword [eax + ecx*4], edx
inc ecx
add edx, ebx
cmp ecx, dword [edi + 0xc]
jl 0x6548ee
push 0x10000
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.0066efcb
add esp, 0xc
test eax, eax
jne 0x654929
push dword [ebp - 0x34]
push dword [ebp - 0x10]
call fcn.00668686
mov dword [edi], esi
mov dword [edi + 0x10], 1
jmp 0x654c22
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.0066e940
mov esi, dword [ebp - 0x20]
mov dword [edi + 0x10], eax
imul eax, esi
push eax
call fcn.00612e79
push esi
mov dword [ebp - 0x44], eax
call fcn.00612e79
push esi
push 0
push eax
mov dword [ebp - 0x28], eax
call fcn.00614800
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.0066e95c
mov esi, dword [edi + 0x10]
mov dword [edi + 0x14], eax
lea eax, [esi + esi]
push eax
call fcn.00612e79
and dword [ebp - 0x18], 0
add esp, 0x28
mov dword [edi + 4], eax
test esi, esi
jle 0x654c0d
mov eax, dword [ebp - 0x44]
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x3c], eax
sub eax, dword [ebp - 0x20]
push 0xa
mov dword [ebp - 0x30], eax
pop esi
push edx
push dword [ebp - 0x10]
call fcn.0066858e
push 0x20000
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.0066efcb
add esp, 0x14
test eax, eax
je 0x654a08
mov eax, dword [ebp - 0x14]
movzx ecx, word [eax + 0x106]
movzx edx, word [eax + 0x104]
test cx, cx
je 0x654a0a
cmp ecx, 0x64
je 0x654a0a
cmp cx, si
jne 0x6549e5
mov eax, dword [edi + 4]
imul ecx, edx, 0xa
mov edx, dword [ebp - 0x18]
mov word [eax + edx*2], cx
jmp 0x654a14
mov eax, 0x3e8
cmp cx, ax
mov eax, edx
jne 0x654a00
cdq
idiv esi
mov ecx, dword [edi + 4]
mov edx, dword [ebp - 0x18]
mov word [ecx + edx*2], ax
jmp 0x654a14
imul eax, eax, 0x64
cdq
idiv ecx
jmp 0x6549f4
xor edx, edx
mov ecx, dword [ebp - 0x18]
mov eax, dword [edi + 4]
mov word [eax + ecx*2], dx
push dword [ebp - 0x34]
push dword [ebp - 0x10]
call fcn.00668686
mov edx, dword [ebp - 0x14]
pop ecx
pop ecx
mov ecx, dword [edx + 0x100]
mov eax, dword [edx + 0xfc]
imul ecx, ebx
add ecx, dword [ebp - 0x28]
lea esi, [ecx + eax*4]
movzx eax, byte [edx + 0x109]
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x24], ecx
sub eax, 0
je 0x654b2b
dec eax
jne 0x654b68
mov dword [ebp - 0x40], eax
cmp dword [edx + 0xf8], eax
jbe 0x654b68
mov edi, dword [edx + 0xf4]
mov dword [ebp - 0x50], edi
and dword [ebp - 0x48], 0
mov edi, esi
cmp dword [ebp - 0x50], 0
mov dword [ebp - 0x1c], ecx
jbe 0x654b0f
mov ebx, ecx
movzx esi, byte [ebx + 3]
mov edx, 0xff
movzx ecx, byte [edi]
sub edx, esi
movzx eax, byte [ebx]
lea ebx, [ebx + 4]
imul ecx, edx
imul eax, esi
add ecx, eax
sar ecx, 8
mov byte [edi], cl
lea edi, [edi + 4]
movzx ecx, byte [edi - 3]
movzx eax, byte [ebx - 3]
imul ecx, edx
imul eax, esi
add ecx, eax
sar ecx, 8
mov byte [edi - 3], cl
movzx ecx, byte [edi - 2]
movzx eax, byte [ebx - 2]
imul ecx, edx
imul eax, esi
add ecx, eax
sar ecx, 8
mov byte [edi - 2], cl
movzx ecx, byte [edi - 1]
movzx eax, byte [ebx - 1]
imul ecx, edx
imul eax, esi
add ecx, eax
sar ecx, 8
mov byte [edi - 1], cl
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x48]
inc ecx
mov dword [ebp - 0x48], ecx
mov eax, dword [edx + 0xf4]
mov dword [ebp - 0x50], eax
cmp ecx, eax
jb 0x654a86
mov ebx, dword [ebp - 0x58]
mov esi, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x40]
add esi, ebx
add ecx, ebx
inc eax
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x40], eax
cmp eax, dword [edx + 0xf8]
jb 0x654a71
jmp 0x654b65
and dword [ebp - 0x1c], 0
cmp dword [edx + 0xf8], 0
jbe 0x654b68
mov edi, dword [ebp - 0x1c]
mov eax, dword [edx + 0xf4]
shl eax, 2
push eax
push ecx
push esi
call fcn.00613b70
mov ecx, dword [ebp - 0x24]
add esp, 0xc
mov edx, dword [ebp - 0x14]
add ecx, ebx
add esi, ebx
mov dword [ebp - 0x24], ecx
inc edi
cmp edi, dword [edx + 0xf8]
jb 0x654b3b
mov edi, dword [ebp - 0x38]
push dword [ebp - 0x20]
mov esi, dword [ebp - 0x28]
push esi
push dword [ebp - 0x3c]
call fcn.00613b70
mov edx, dword [ebp - 0x14]
add esp, 0xc
mov ecx, dword [edx + 0x100]
mov eax, dword [edx + 0xfc]
imul ecx, ebx
add ecx, esi
lea eax, [ecx + eax*4]
mov dword [ebp - 0x1c], eax
movzx eax, byte [edx + 0x108]
dec eax
je 0x654bbe
mov esi, dword [ebp - 0x18]
dec eax
jne 0x654bf4
test esi, esi
jle 0x654bf4
push dword [ebp - 0x20]
push dword [ebp - 0x30]
push dword [ebp - 0x28]
call fcn.00613b70
mov edx, dword [ebp - 0x14]
add esp, 0xc
jmp 0x654bf4
xor esi, esi
cmp dword [edx + 0xf8], esi
jbe 0x654bf1
mov edi, dword [ebp - 0x1c]
mov eax, dword [edx + 0xf4]
shl eax, 2
push eax
push 0
push edi
call fcn.00614800
mov edx, dword [ebp - 0x14]
add esp, 0xc
add edi, ebx
inc esi
cmp esi, dword [edx + 0xf8]
jb 0x654bcb
mov edi, dword [ebp - 0x38]
mov esi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x20]
inc esi
add dword [ebp - 0x3c], eax
add dword [ebp - 0x30], eax
cmp esi, dword [edi + 0x10]
push 0xa
mov dword [ebp - 0x18], esi
pop esi
jl 0x654996
push dword [ebp - 0x28]
call fcn.00613270
push dword [ebp - 0x2c]
call fcn.00613270
mov eax, dword [ebp - 0x44]
mov dword [edi], eax
pop ecx
pop ecx
push dword [ebp - 0x34]
call fcn.00613270
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.00668346
add esp, 0xc
xor ebx, ebx
push ebx
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.0066811d
add esp, 0xc
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00611cfa
mov esp, ebp
pop ebp
ret