Function at 0x6a15b0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov eax, 0x21
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x6c
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0x14]
test edx, edx
je 0x6a16b4
mov eax, dword [ebp + 0xc]
mov esi, dword [edx]
mov dword [ebp - 0x10], 0
movzx edx, byte [eax + 0x12]
lea eax, [edx - 1]
cmp al, 5
ja 0x6a16bc
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 8]
imul eax, dword [edx]
mov edx, eax
sar edx, 0x1f
mov ebx, edx
xor ebx, eax
mov eax, dword [ebp + 0x10]
sub ebx, edx
mov byte [eax + 0x12], 2
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
mov edx, dword [ebp + 0x10]
mov dword [edx], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 4]
mov edx, dword [ebp + 0x10]
mov dword [edx + 4], eax
xor edx, edx
test ecx, ecx
jle 0x6a1632
mov eax, dword [ebp + 0xc]
mov edx, dword [eax + 4]
mov eax, edx
sar edx, 0x1f
idiv ecx
sub ecx, edx
test edx, edx
cmovne edx, ecx
mov ecx, dword [ebp + 0xc]
mov eax, edx
mov edx, dword [ebp + 0x10]
add eax, dword [ecx + 4]
mov ecx, dword [ebp + 0x10]
mov dword [edx + 8], eax
mov edx, eax
imul edx, dword [ecx]
cmp ebx, edx
jl 0x6a193a
mov ebx, dword [ebp + 0xc]
movzx edx, byte [ebx + 0x12]
cmp dl, 6
ja case.0x6a165f.0
movzx eax, dl
jmp dword [eax*4 + 0xb09124]
mov ebx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebx + 4]
mov esi, dword [edx + 0xc]
mov ecx, dword [eax + 8]
mov edi, dword [eax + 0xc]
mov dword [ebp - 0x44], ebx
mov ebx, dword [edx + 8]
mov word [edx + 0x10], 0x100
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], ebx
mov ebx, dword [eax]
test ebx, ebx
jle case.0x6a165f.0
mov eax, dword [ebp - 0x44]
mov dword [esp + 4], edi
mov dword [esp], esi
mov dword [esp + 8], eax
call sub.msvcrt.dll_memcpy
add edi, dword [ebp - 0x40]
add esi, dword [ebp - 0x3c]
sub ebx, 1
jne 0x6a1693
mov eax, dword [ebp - 0x10]
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x10], 6
jmp 0x6a1657
mov ecx, dword [ebp + 0xc]
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x10]
mov ecx, dword [ecx]
mov ebx, dword [ebx + 0xc]
mov eax, dword [eax + 0xc]
mov word [edx + 0x10], 0x10
test ecx, ecx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], ecx
jle case.0x6a165f.0
mov ebx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebx + 4]
mov edi, eax
sar edi, 1
test edi, edi
jle 0x6a1736
mov esi, edx
mov ebx, edi
movzx edx, byte [esi]
add esi, 1
mov eax, edx
and edx, 0xf
and eax, 0xf0
sar eax, 4
mov byte [ecx], al
mov byte [ecx + 1], dl
add ecx, 2
sub ebx, 1
jne 0x6a1704
mov ebx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
lea edx, [edi + ebx]
mov ebx, dword [ebp + 0xc]
lea ecx, [eax + edi*2]
mov eax, dword [ebx + 4]
test al, 1
je 0x6a1742
movzx eax, byte [edx]
shr eax, 4
mov byte [ecx], al
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
sub dword [ebp - 0x20], 1
mov eax, dword [edx + 8]
mov edx, dword [ecx + 8]
je case.0x6a165f.0
add dword [ebp - 0x28], eax
add dword [ebp - 0x24], edx
jmp 0x6a16ec
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x10]
mov eax, dword [eax]
mov edx, dword [edx + 0xc]
mov ecx, dword [ecx + 0xc]
mov word [ebx + 0x10], 4
test eax, eax
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], eax
jle case.0x6a165f.0
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x38]
mov edx, dword [ecx + 4]
mov ebx, edx
sar ebx, 2
mov dword [ebp - 0x2c], ebx
mov ecx, dword [ebp - 0x2c]
mov ebx, dword [ebp - 0x34]
test ecx, ecx
jle 0x6a17f6
mov esi, dword [ebp - 0x2c]
mov edi, eax
nop
lea esi, [esi]
movzx ecx, byte [edi]
add edi, 1
movzx edx, cl
and ecx, 3
mov eax, edx
shr eax, 6
mov byte [ebx], al
mov eax, edx
and edx, 0xc
and eax, 0x30
sar eax, 4
sar edx, 2
mov byte [ebx + 1], al
mov byte [ebx + 2], dl
mov byte [ebx + 3], cl
add ebx, 4
sub esi, 1
jne 0x6a17b0
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x38]
lea ebx, [edx + eax*4]
add eax, ecx
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 4]
mov ecx, edx
and ecx, 3
je 0x6a1819
movzx edx, byte [eax]
mov eax, edx
sub ecx, 1
and eax, 0xc0
sar eax, 6
mov byte [ebx], al
shl edx, 2
add ebx, 1
test ecx, ecx
jg 0x6a1800
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
sub dword [ebp - 0x30], 1
mov eax, dword [ebx + 8]
mov edx, dword [ecx + 8]
je case.0x6a165f.0
add dword [ebp - 0x38], eax
add dword [ebp - 0x34], edx
jmp 0x6a178b
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x10]
mov eax, dword [eax]
mov edx, dword [edx + 0xc]
mov ecx, dword [ecx + 0xc]
mov word [ebx + 0x10], 2
test eax, eax
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x4c], eax
jle case.0x6a165f.0
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x54]
mov edx, dword [ecx + 4]
mov ebx, edx
sar ebx, 3
mov dword [ebp - 0x48], ebx
mov esi, dword [ebp - 0x48]
mov ebx, dword [ebp - 0x50]
test esi, esi
jle 0x6a18f7
mov esi, dword [ebp - 0x48]
mov edi, eax
movzx ecx, byte [edi]
add edi, 1
movzx edx, cl
and ecx, 1
mov eax, edx
shr eax, 7
mov byte [ebx], al
mov eax, edx
and eax, 0x40
sar eax, 6
mov byte [ebx + 1], al
mov eax, edx
and eax, 0x20
sar eax, 5
mov byte [ebx + 2], al
mov eax, edx
and eax, 0x10
sar eax, 4
mov byte [ebx + 3], al
mov eax, edx
and eax, 8
sar eax, 3
mov byte [ebx + 4], al
mov eax, edx
and edx, 2
and eax, 4
sar eax, 2
sar edx, 1
mov byte [ebx + 5], al
mov byte [ebx + 6], dl
mov byte [ebx + 7], cl
add ebx, 8
sub esi, 1
jne 0x6a1885
mov edx, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x54]
lea eax, [edx + ecx]
mov ecx, dword [ebp - 0x50]
lea ebx, [ecx + edx*8]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 4]
mov ecx, edx
and ecx, 7
je 0x6a1919
movzx edx, byte [eax]
mov eax, edx
sub ecx, 1
and eax, 0x80
add edx, edx
sar eax, 7
mov byte [ebx], al
add ebx, 1
test ecx, ecx
jg 0x6a1901
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
sub dword [ebp - 0x4c], 1
mov edx, dword [ebx + 8]
mov eax, dword [ecx + 8]
je case.0x6a165f.0
add dword [ebp - 0x54], edx
add dword [ebp - 0x50], eax
jmp 0x6a1865
lea eax, [ebp - 0x10]
mov dword [esp + 0x14], eax
mov eax, dword [ecx + 0xc]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], edx
mov dword [esp + 4], 1
mov dword [esp + 0x10], eax
mov dword [esp], esi
call fcn.006949f0
mov ebx, dword [ebp + 0x10]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x10]
test eax, eax
jne 0x6a16b4
mov eax, dword [ebp + 0xc]
movzx edx, byte [eax + 0x12]
jmp 0x6a1657