Function at 0x6d4924
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffbc
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
cmp dword [ebp - 0xc], 0
jne 0x6d49b2
mov ebx, 0x1000
xor ecx, ecx
xor edx, edx
mov eax, dword [ebp - 4]
call fcn.006d29e4
mov dword [ebp - 0x10], eax
xor ecx, ecx
xor edx, edx
mov eax, dword [ebp - 8]
call fcn.006d28ec
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
movzx eax, byte [eax]
mov edx, dword [ebp - 0x10]
movzx edx, byte [edx + 3]
imul edx
mov ecx, 0xff
xor edx, edx
div ecx
mov edx, dword [ebp - 0x10]
mov byte [edx + 3], al
dec ebx
add dword [ebp - 0x10], 4
inc dword [ebp - 0x14]
test ebx, ebx
jg 0x6d4965
mov eax, dword [ebp - 8]
mov edx, dword [eax]
call dword [edx + 4]
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 4]
mov eax, dword [ebp - 4]
mov byte [eax + 0xe], 1
mov eax, dword [ebp - 4]
mov byte [eax + 0xf], 1
jmp 0x6d4b53
mov eax, dword [ebp - 0xc]
cmp byte [eax + 0x28], 0
jne 0x6d49c8
mov eax, dword [ebp - 0xc]
cmp byte [eax + 0x58], 0
je 0x6d4b53
push 0x40
lea eax, [ebp - 0x34]
push eax
mov ecx, 0x40
xor edx, edx
xor eax, eax
call fcn.0041c2f4
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
mov edx, dword [ebp - 4]
sub eax, dword [edx + 4]
add ebx, eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
mov edx, dword [ebp - 4]
sub eax, dword [edx + 8]
add esi, eax
lea eax, [esi + 0x40]
push eax
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebx + 0x40]
mov edx, esi
mov eax, ebx
call fcn.0041c2f4
lea ecx, [ebp - 0x44]
lea edx, [ebp - 0x34]
lea eax, [ebp - 0x34]
call fcn.004de568
lea eax, [ebp - 0x34]
call fcn.00407acc
test al, al
jne 0x6d4b53
push esi
lea esi, [ebp - 0x34]
lea edi, [ebp - 0x44]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop esi
mov ecx, esi
neg ecx
mov edx, ebx
neg edx
lea eax, [ebp - 0x44]
call fcn.004dd9b0
lea eax, [ebp - 0x34]
call fcn.004dd99c
dec eax
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x34]
call fcn.004dd9a4
mov ebx, eax
dec ebx
mov byte [ebp - 0x19], 0
mov dl, 1
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx]
xor edx, edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
call dword [ecx]
xor edx, edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx]
test ebx, ebx
jl 0x6d4b27
inc ebx
mov dword [ebp - 0x24], ebx
xor esi, esi
mov ecx, dword [ebp - 0x30]
add ecx, esi
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 4]
call fcn.006d289c
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x30]
add ecx, esi
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 8]
call fcn.006d2870
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x40]
add ecx, esi
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp - 0xc]
call fcn.006d2870
mov dword [ebp - 0x18], eax
mov ebx, dword [ebp - 0x20]
test ebx, ebx
jl 0x6d4b1d
inc ebx
mov eax, dword [ebp - 0x18]
mov cl, byte [eax]
test cl, cl
je 0x6d4afe
mov eax, dword [ebp - 0x14]
movzx eax, byte [eax]
xor edx, edx
mov dl, cl
imul edx
mov edx, dword [ebp - 0x10]
movzx edx, byte [edx + 3]
imul edx
mov ecx, 0xfe01
xor edx, edx
div ecx
mov edx, dword [ebp - 0x10]
mov byte [edx + 3], al
mov byte [ebp - 0x19], 1
jmp 0x6d4b10
push 0
mov cl, 0xff
mov dl, 0xff
mov al, 0xff
call fcn.004dd51c
mov edx, dword [ebp - 0x10]
mov dword [edx], eax
add dword [ebp - 0x10], 4
inc dword [ebp - 0x14]
inc dword [ebp - 0x18]
dec ebx
jne 0x6d4acb
inc esi
dec dword [ebp - 0x24]
jne 0x6d4a8a
mov eax, dword [ebp - 0xc]
mov edx, dword [eax]
call dword [edx + 4]
mov eax, dword [ebp - 8]
mov edx, dword [eax]
call dword [edx + 4]
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 4]
cmp byte [ebp - 0x19], 0
je 0x6d4b53
mov eax, dword [ebp - 4]
mov byte [eax + 0xe], 1
mov eax, dword [ebp - 4]
mov byte [eax + 0xf], 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8