Function at 0x3009efc0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x78
push ebx
push ebp
push esi
push edi
mov esi, ecx
mov byte [esp + 0x17], 0
xor ebx, ebx
mov ecx, esi
call fcn.3009ef00
add ebx, eax
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x3009efef
inc eax
cmp eax, 8
mov dword [esi + 0x1c], eax
jl 0x3009efd6
mov eax, dword [esi + 0x1c]
test eax, eax
mov dword [esp + 0x20], ebx
je 0x3009f001
mov dword [esi + 0x1c], 1
push ebx
call fcn.3007a1f0
mov edx, eax
mov ecx, ebx
mov ebp, ecx
shr ecx, 2
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov ecx, ebp
and ecx, 3
add esp, 4
test edx, edx
mov dword [esp + 0x38], edx
rep stosb byte es:[edi], al
jne 0x3009f032
xor al, al
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, 0xe
lea edi, [esp + 0x50]
rep stosd dword es:[edi], eax
mov byte [esp + 0x15], al
mov byte [esp + 0x16], al
lea eax, [esp + 0x34]
push eax
mov ecx, esi
xor ebp, ebp
call fcn.3009eb40
mov ecx, eax
test ecx, ecx
jl 0x3009f7cf
nop
mov edi, dword [esi + 0x10]
test edi, edi
je 0x3009f078
mov eax, dword [esi + 8]
lea edx, [eax + ecx]
cmp edx, dword [esi + 0xc]
jae 0x3009f078
lea ebp, [eax + edi]
mov dword [esi + 8], edx
mov eax, dword [esp + 0x34]
cmp eax, 0x49444154
jne 0x3009f0f0
mov eax, dword [esp + 0x64]
mov dword [esp + 0x54], ecx
mov ecx, dword [esp + 0x38]
lea edx, [eax + ecx]
mov ecx, ebx
sub ecx, eax
mov al, byte [esp + 0x15]
test al, al
mov dword [esp + 0x50], ebp
mov dword [esp + 0x5c], edx
mov dword [esp + 0x60], ecx
jne 0x3009f0cb
push 0x38
lea edx, [esp + 0x54]
push 0x3029a670
push edx
mov byte [esp + 0x21], 1
call fcn.30124940
add esp, 0xc
test eax, eax
jne 0x3009f7dc
lea eax, [esp + 0x50]
push 2
push eax
call fcn.30124a80
add esp, 8
cmp eax, 1
je 0x3009f343
test eax, eax
jne 0x3009f7d4
jmp 0x3009f343
cmp eax, 0x504c5445
jne 0x3009f167
mov eax, ecx
cdq
mov edi, 3
idiv edi
test edx, edx
mov dword [esp + 0x48], eax
jne 0x3009f7d4
cmp ecx, 0x300
jg 0x3009f7d4
lea edi, [esi + 0x3c]
lea ecx, [ebp + 2]
nop
cmp edx, dword [esp + 0x48]
jge 0x3009f148
movzx eax, byte [ecx - 2]
movzx ebx, byte [ecx - 1]
or eax, 0xffffff00
shl eax, 8
or eax, ebx
movzx ebx, byte [ecx]
shl eax, 8
or eax, ebx
mov ebx, dword [esp + 0x20]
mov dword [edi], eax
jmp 0x3009f14e
mov dword [edi], 0
inc edx
add edi, 4
add ecx, 3
cmp edx, 0x100
jl 0x3009f120
mov byte [esp + 0x16], 1
jmp 0x3009f343
cmp eax, 0x74524e53
jne 0x3009f29d
mov eax, dword [esi + 0x28]
cmp eax, 3
mov dword [esi + 0x18], 1
jne 0x3009f1c4
cmp ecx, 0x100
jg 0x3009f7d4
xor eax, eax
test ecx, ecx
jle 0x3009f343
lea edx, [esi + 0x3c]
lea ebx, [ebx]
movzx edi, byte [eax + ebp]
mov ebx, dword [edx]
shl edi, 0x18
and ebx, 0xffffff
or edi, ebx
mov dword [edx], edi
inc eax
add edx, 4
cmp eax, ecx
jl 0x3009f1a0
mov ebx, dword [esp + 0x20]
jmp 0x3009f343
test eax, eax
jne 0x3009f234
cmp ecx, 2
jne 0x3009f7d4
mov ah, byte [ebp]
mov ecx, dword [esi + 0x2c]
dec ecx
cmp ecx, 0xf
mov al, byte [ebp + 1]
ja case.0x3009f1e7.3
movzx ecx, byte [ecx + 0x3009f818]
jmp dword [ecx*4 + 0x3009f804]
neg eax
sbb eax, eax
and eax, 0xff
jmp case.0x3009f1e7.3
lea edx, [eax*4]
or edx, eax
shl edx, 2
or edx, eax
shl edx, 2
or eax, edx
jmp case.0x3009f1e7.3
mov ecx, eax
shl ecx, 4
or eax, ecx
jmp case.0x3009f1e7.3
shr eax, 8
mov edx, eax
or edx, 0xffffff00
shl edx, 8
or edx, eax
shl edx, 8
or edx, eax
mov dword [esi + 0x14], edx
jmp 0x3009f343
cmp eax, 2
jne 0x3009f343
cmp ecx, 6
jne 0x3009f7d4
mov eax, dword [esi + 0x2c]
cmp eax, 8
je 0x3009f27a
cmp eax, 0x10
jne 0x3009f343
movzx eax, byte [ebp]
movzx ecx, byte [ebp + 2]
movzx edx, byte [ebp + 4]
or eax, 0xffffff00
shl eax, 8
or eax, ecx
shl eax, 8
or eax, edx
mov dword [esi + 0x14], eax
jmp 0x3009f343
movzx eax, byte [ebp + 1]
movzx ecx, byte [ebp + 3]
movzx edx, byte [ebp + 5]
or eax, 0xffffff00
shl eax, 8
or eax, ecx
shl eax, 8
or eax, edx
mov dword [esi + 0x14], eax
jmp 0x3009f343
cmp eax, 0x67414d41
jne 0x3009f343
cmp ecx, 4
jne 0x3009f7d4
movzx ecx, byte [ebp + 2]
movzx edx, byte [ebp + 3]
xor eax, eax
mov ah, byte [ebp]
mov al, byte [ebp + 1]
shl eax, 8
or eax, ecx
shl eax, 8
or eax, edx
test eax, eax
mov dword [esp + 0x48], eax
fild dword [esp + 0x48]
jge 0x3009f2dd
fadd qword [0x30294540]
fmul qword [0x3029a668]
xor edi, edi
fmul qword [0x3029a660]
fdivr qword [0x30294f50]
fstp qword [esp + 0x40]
fld qword [0x30293678]
fstp qword [esp + 0x48]
nop
fld qword [esp + 0x40]
sub esp, 0x10
fstp qword [esp + 8]
fld qword [esp + 0x58]
fstp qword [esp]
call fcn.3002e3d0
fmul qword [0x302967c8]
add esp, 0x10
call fcn.3002ddb0
fld qword [esp + 0x48]
fadd qword [0x302968d0]
mov byte [esi + edi + 0x83c], al
inc edi
cmp edi, 0x100
fstp qword [esp + 0x48]
jl 0x3009f300
mov edx, dword [esi + 8]
lea eax, [esp + 0x34]
add edx, 4
push eax
mov ecx, esi
mov dword [esi + 8], edx
call fcn.3009eb40
mov ecx, eax
test ecx, ecx
jge 0x3009f060
mov al, byte [esp + 0x15]
test al, al
je 0x3009f7cf
cmp dword [esi + 0x28], 3
jne 0x3009f380
mov al, byte [esp + 0x16]
test al, al
je 0x3009f7d4
mov ecx, dword [esi + 4]
mov al, byte [ecx + 0x29]
test al, al
jne 0x3009f7cf
cmp dword [ecx], 0
jne 0x3009f7cf
mov edx, dword [esi + 0x24]
mov eax, dword [esi + 0x20]
push 0
push 0
push 0
push edx
push eax
push 5
call fcn.300b9090
mov ecx, dword [esi + 0x18]
mov edx, dword [esi + 4]
test ecx, ecx
setne cl
mov byte [edx + 0x20], cl
mov ecx, dword [esi + 4]
mov al, byte [ecx + 0x29]
test al, al
jne 0x3009f3cd
cmp dword [ecx], 0
je 0x3009f7cf
call fcn.300b9020
mov ebx, dword [esp + 0x38]
mov dword [esp + 0x48], ebx
lea ebx, [ebx]
mov ecx, esi
call fcn.3009ef00
test eax, eax
je 0x3009f7b3
mov eax, dword [esi + 0x34]
test eax, eax
mov dword [esp + 0x18], 0
jle 0x3009f7b3
movzx eax, byte [ebx]
mov edx, dword [esi + 0x38]
mov dword [esp + 0x3c], eax
xor eax, eax
mov ebp, ebx
sub ebp, edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x30], eax
mov eax, dword [esi + 0x30]
add ebp, 2
mov edi, 1
cmp eax, edi
mov dword [esp + 0x34], ebp
jle 0x3009f796
mov eax, dword [esp + 0x3c]
test eax, eax
jle case.default.0x3009f43f
dec eax
cmp eax, 3
ja case.default.0x3009f43f
jmp dword [eax*4 + 0x3009f828]
mov eax, dword [esi + 0x38]
xor ecx, ecx
cmp edi, eax
jle 0x3009f457
mov ecx, edi
sub ecx, eax
movzx ecx, byte [ecx + ebx]
add byte [edi + ebx], cl
mov eax, dword [esp + 0x30]
mov ecx, dword [esi + 0x38]
inc eax
cmp eax, ecx
mov dword [esp + 0x30], eax
jne 0x3009f785
mov ecx, dword [esi + 0x28]
cmp ecx, 6
mov dword [esp + 0x30], 0
mov eax, 0xff000000
ja case.0x3009f487.1
jmp dword [ecx*4 + 0x3009f838]
mov ecx, dword [esp + 0x18]
xor eax, eax
test ecx, ecx
jle 0x3009f4a3
mov eax, dword [esi + 0x30]
mov edx, edi
sub edx, eax
movzx eax, byte [edx + ebx]
add byte [edi + ebx], al
jmp case.default.0x3009f43f
mov eax, dword [esi + 0x38]
xor edx, edx
xor ecx, ecx
cmp edi, eax
jle 0x3009f4bb
mov edx, edi
sub edx, eax
movzx edx, byte [edx + ebx]
mov eax, dword [esp + 0x18]
test eax, eax
jle 0x3009f4ce
mov ecx, dword [esi + 0x30]
mov eax, edi
sub eax, ecx
movzx ecx, byte [eax + ebx]
lea eax, [ecx + edx]
mov cl, byte [edi + ebx]
cdq
sub eax, edx
sar eax, 1
add cl, al
mov byte [edi + ebx], cl
jmp case.default.0x3009f43f
mov eax, dword [esi + 0x38]
xor ecx, ecx
cmp edi, eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x40], ecx
jle 0x3009f504
mov edx, edi
sub edx, eax
movzx edx, byte [edx + ebx]
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x18]
test edx, edx
jle 0x3009f52f
mov ecx, dword [esi + 0x30]
mov edx, edi
sub edx, ecx
cmp edi, eax
movzx edx, byte [edx + ebx]
mov dword [esp + 0x2c], edx
jle 0x3009f52b
mov edx, edi
sub edx, ecx
sub edx, eax
movzx ecx, byte [edx + ebx]
jmp 0x3009f52f
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x2c]
mov eax, edx
sub eax, ecx
jns 0x3009f53b
neg eax
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x20]
sub eax, ecx
jns 0x3009f549
neg eax
mov dword [esp + 0x28], eax
lea eax, [ecx + ecx]
mov dword [esp + 0x24], eax
mov eax, edx
mov edx, dword [esp + 0x24]
sub eax, edx
add eax, dword [esp + 0x20]
jns 0x3009f564
neg eax
mov edx, dword [esp + 0x28]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x40]
cmp eax, edx
jg 0x3009f583
cmp eax, dword [esp + 0x24]
jg 0x3009f583
mov cl, byte [esp + 0x20]
jmp 0x3009f457
mov edx, dword [esp + 0x24]
cmp dword [esp + 0x28], edx
jg 0x3009f457
mov cl, byte [edi + ebx]
mov al, byte [esp + 0x2c]
add cl, al
mov byte [edi + ebx], cl
jmp case.default.0x3009f43f
cmp dword [esi + 0x2c], 0x10
jne case.0x3009f487.3
movzx eax, byte [ebp]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
push ecx
mov ecx, eax
or ecx, 0xffffff00
shl ecx, 8
or ecx, eax
shl ecx, 8
push edx
or ecx, eax
push ecx
jmp 0x3009f771
mov ecx, dword [esi + 0x2c]
dec ecx
mov eax, 1
mov dword [esp + 0x20], eax
je 0x3009f5f3
dec ecx
je 0x3009f5ec
sub ecx, 2
jne 0x3009f5fc
mov eax, 2
jmp 0x3009f5f8
mov eax, 4
jmp 0x3009f5f8
mov eax, 8
mov dword [esp + 0x20], eax
xor ebx, ebx
test eax, eax
jle case.0x3009f487.1
imul eax, dword [esp + 0x1c]
mov dword [esp + 0x40], eax
nop
mov edx, dword [esi + 0x2c]
mov al, bl
inc al
imul dl
xor ecx, ecx
mov cl, 8
sub cl, al
movzx eax, byte [ebp]
shr eax, cl
mov ecx, edx
mov ebp, 1
shl ebp, cl
mov ecx, dword [esi + 0x28]
dec ebp
and eax, ebp
test ecx, ecx
jne 0x3009f68b
dec edx
je 0x3009f661
dec edx
je 0x3009f64c
sub edx, 2
jne 0x3009f66a
mov edx, eax
shl edx, 4
or eax, edx
jmp 0x3009f66a
lea ecx, [eax*4]
or ecx, eax
shl ecx, 2
or ecx, eax
shl ecx, 2
or eax, ecx
jmp 0x3009f66a
neg eax
sbb eax, eax
and eax, 0xff
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x40]
push edx
mov edx, eax
or edx, 0xffffff00
shl edx, 8
or edx, eax
add ecx, ebx
shl edx, 8
push ecx
or edx, eax
push edx
jmp 0x3009f69c
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x40]
mov eax, dword [esi + eax*4 + 0x3c]
push ecx
add edx, ebx
push edx
push eax
mov ecx, esi
call fcn.3009ede0
mov eax, dword [esp + 0x20]
mov ebp, dword [esp + 0x34]
inc ebx
cmp ebx, eax
jl 0x3009f610
jmp case.0x3009f487.1
mov ecx, dword [esi + 0x2c]
cmp ecx, 8
je 0x3009f6cc
cmp ecx, 0x10
jne case.0x3009f487.2
movzx eax, byte [ebp + 6]
jmp 0x3009f6d0
movzx eax, byte [ebp + 3]
shl eax, 0x18
mov ecx, dword [esi + 0x2c]
cmp ecx, 8
je 0x3009f703
cmp ecx, 0x10
jne case.0x3009f487.1
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
push ecx
movzx ecx, byte [ebp + 2]
mov ch, byte [ebp]
push edx
movzx edx, byte [ebp + 4]
shl ecx, 8
or ecx, edx
or ecx, eax
push ecx
jmp 0x3009f771
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
push ecx
movzx ecx, byte [ebp + 1]
mov ch, byte [ebp]
push edx
movzx edx, byte [ebp + 2]
shl ecx, 8
or ecx, edx
or ecx, eax
push ecx
jmp 0x3009f771
mov eax, dword [esi + 0x2c]
cmp eax, 8
je 0x3009f751
cmp eax, 0x10
jne case.0x3009f487.1
mov ecx, dword [esp + 0x18]
movzx eax, byte [ebp]
mov edx, dword [esp + 0x1c]
push ecx
xor ecx, ecx
mov ch, byte [ebp + 2]
push edx
or ecx, eax
shl ecx, 8
or ecx, eax
shl ecx, 8
or ecx, eax
push ecx
jmp 0x3009f771
mov edx, dword [esp + 0x18]
movzx eax, byte [ebp]
mov ecx, dword [esp + 0x1c]
push edx
xor edx, edx
mov dh, byte [ebp + 1]
push ecx
or edx, eax
shl edx, 8
or edx, eax
shl edx, 8
or edx, eax
push edx
mov ecx, esi
call fcn.3009ede0
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x48]
inc eax
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x30]
inc ebp
inc edi
cmp edi, eax
mov dword [esp + 0x34], ebp
jl 0x3009f431
mov eax, dword [esp + 0x18]
mov edx, dword [esi + 0x30]
mov ecx, dword [esi + 0x34]
inc eax
add ebx, edx
cmp eax, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x48], ebx
jl 0x3009f402
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x3009f7c7
inc eax
cmp eax, 8
mov dword [esi + 0x1c], eax
jl 0x3009f3e0
mov ecx, dword [esi + 4]
call fcn.300b9040
mov byte [esp + 0x17], 1
mov al, byte [esp + 0x15]
test al, al
je 0x3009f7e9
lea eax, [esp + 0x50]
push eax
call fcn.301260c0
add esp, 4
mov ecx, dword [esp + 0x38]
push ecx
call fcn.30208320
mov al, byte [esp + 0x1b]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret