Function at 0x1002d210
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [ecx + 0x1c]
xorps xmm2, xmm2
mov dword [ebp - 0x48], eax
mov eax, dword [ecx + 0x20]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebx + 8]
push esi
mov esi, edx
mov dword [ebp - 8], ecx
push edi
movss xmm4, dword [eax]
mov eax, pe_nt_image_headers32
comiss xmm4, xmm2
mov dword [ebp - 4], esi
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x1c], 1
movss dword [ebp - 0x24], xmm2
jbe 0x1002d2b4
mov edi, dword [esi + 4]
mov edx, dword [esi + 0x1c]
cwde
movzx ecx, byte [edx + edi + 4]
movsx ecx, cx
imul ecx, eax
movzx eax, byte [edx + edi + 5]
movzx edx, byte [edx + edi + 7]
add cx, ax
movsx esi, cx
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + 0x1c]
movzx ecx, byte [eax + edi + 6]
mov eax, pe_nt_image_headers32
cwde
movsx ecx, cx
imul ecx, eax
add dx, cx
movsx eax, dx
sub esi, eax
movd xmm0, esi
cvtdq2ps xmm0, xmm0
divss xmm4, xmm0
jmp 0x1002d2db
mov edx, dword [esi + 0x14]
mov eax, dword [esi + 4]
movzx ecx, byte [edx + eax + 0x12]
movzx eax, byte [edx + eax + 0x13]
shl ecx, 8
add ecx, eax
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
divss xmm4, xmm0
xorps xmm4, xmmword [0x100a2960]
mov edx, dword [ebx + 8]
xorps xmm0, xmm0
movaps xmmword [ebp - 0x60], xmm0
movss xmm5, dword [0x100a2280]
movss dword [ebp - 0x14], xmm4
mov al, byte [edx + 0x15]
mov cl, byte [edx + 0x14]
mov byte [ebp - 0x5f], al
mov byte [ebp - 0x60], cl
movaps xmm1, xmmword [ebp - 0x60]
punpcklbw xmm1, xmm0
punpcklwd xmm1, xmm0
movd edi, xmm1
psrldq xmm1, 4
movd esi, xmm1
movaps xmm1, xmm5
mov eax, edi
mov ecx, dword [ebp - 8]
shr eax, 0x1f
movd xmm0, edi
cvtdq2pd xmm0, xmm0
mov dword [ecx + 0x1c], edi
mov dword [ecx + 0x20], esi
addsd xmm0, qword [eax*8 + 0x100a2920]
mov eax, esi
shr eax, 0x1f
cvtpd2ps xmm0, xmm0
divss xmm1, xmm0
movd xmm0, esi
movss dword [ebp - 0x3c], xmm1
movss xmm1, dword [0x100a2234]
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x100a2920]
mov eax, 1
cvtpd2ps xmm0, xmm0
divss xmm5, xmm0
movss dword [ebp - 0x44], xmm5
test edi, edi
jne 0x1002d381
movss dword [ebp - 0x20], xmm2
jmp 0x1002d3a6
movd xmm0, edi
movaps xmm3, xmm1
cvtdq2ps xmm0, xmm0
sub eax, edi
divss xmm3, xmm0
movd xmm0, eax
mov eax, 1
cvtdq2ps xmm0, xmm0
mulss xmm3, xmm0
movss dword [ebp - 0x20], xmm3
test esi, esi
je 0x1002d3ca
movd xmm0, esi
movaps xmm2, xmm1
cvtdq2ps xmm0, xmm0
sub eax, esi
divss xmm2, xmm0
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mulss xmm2, xmm0
movss dword [ebp - 0x24], xmm2
xor esi, esi
mov dword [ebp - 0x28], esi
cmp dword [edx + 0xc], esi
jle 0x1002d71c
mov edi, dword [ebx + 0x10]
add edi, 0xc
nop
mov eax, dword [edi + 8]
test eax, eax
je 0x1002d6b2
cmp dword [edi - 8], 0
je 0x1002d6b2
cmp dword [edi - 4], 0
je 0x1002d6b2
lea eax, [esi*8]
sub eax, esi
mov dword [ebp - 0x34], eax
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [edx + 8]
test eax, eax
jne 0x1002d41f
mov edx, dword [edx + 4]
add edx, esi
jmp 0x1002d422
mov edx, dword [eax + esi*4]
mov ecx, dword [ebp - 4]
call fcn.10027d00
mov esi, dword [ebp - 8]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 4]
mov ecx, dword [esi + 0x14]
add dword [edi], ecx
add dword [edi + 4], ecx
sub dword [edi - 8], ecx
sub dword [edi - 4], ecx
mov edx, dword [eax + 4]
mov eax, dword [eax + 0x1c]
movzx ecx, byte [eax + edx + 0x22]
movzx eax, byte [eax + edx + 0x23]
shl ecx, 8
add ecx, eax
mov eax, dword [ebp - 4]
cmp dword [ebp - 0xc], ecx
jge 0x1002d485
mov edx, dword [eax + 0x20]
mov ecx, dword [ebp - 0xc]
lea edx, [edx + ecx*4]
add edx, dword [eax + 4]
mov eax, pe_nt_image_headers32
cwde
movzx ecx, byte [edx]
movsx ecx, cx
imul ecx, eax
movzx eax, byte [edx + 1]
add cx, ax
movzx eax, cx
jmp 0x1002d4b0
mov eax, dword [eax + 0x20]
mov esi, dword [ebp - 4]
lea eax, [eax + ecx*4]
mov ecx, dword [esi + 4]
movzx edx, byte [eax + edx - 3]
mov esi, dword [ebp - 8]
movzx ecx, byte [eax + ecx - 4]
mov eax, pe_nt_image_headers32
cwde
movsx ecx, cx
imul ecx, eax
add dx, cx
movzx eax, dx
cwde
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x50]
mov edx, dword [ebp - 0xc]
push eax
lea eax, [ebp - 0x40]
mov ecx, dword [ebp - 4]
push eax
lea eax, [ebp - 0x38]
push eax
mov eax, dword [esi + 0x20]
sub esp, 8
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x100a2920]
mov eax, dword [esi + 0x1c]
cvtpd2ps xmm3, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
mulss xmm3, xmm4
addsd xmm0, qword [eax*8 + 0x100a2920]
cvtpd2ps xmm2, xmm0
mulss xmm2, xmm4
call fcn.1002a2a0
mov ecx, dword [esi + 0x20]
add esp, 0x18
mov edx, dword [esi + 0x1c]
mov eax, ecx
shr eax, 0x1f
mov esi, dword [esi + 0x10]
push dword [ebp - 0xc]
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
sub esp, 8
sub esp, 8
addsd xmm0, qword [eax*8 + 0x100a2920]
mov eax, edx
shr eax, 0x1f
cvtpd2ps xmm0, xmm0
mulss xmm0, dword [ebp - 0x14]
movss dword [esp + 4], xmm0
movd xmm0, edx
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x100a2920]
mov eax, dword [edi - 4]
sub eax, ecx
mov ecx, dword [ebp - 4]
inc eax
cvtpd2ps xmm0, xmm0
mulss xmm0, dword [ebp - 0x14]
movss dword [esp], xmm0
push esi
push eax
mov eax, dword [edi - 8]
sub eax, edx
mov edx, dword [edi + 4]
imul edx, esi
inc eax
mov esi, dword [ebp - 8]
push eax
add edx, dword [edi]
add edx, dword [esi + 0x24]
call fcn.1002c890
mov ecx, dword [esi + 0x1c]
add esp, 0x20
cmp ecx, 1
jbe 0x1002d5bc
mov eax, dword [esi + 0x10]
mov edx, dword [edi - 8]
push ecx
mov ecx, dword [edi + 4]
imul ecx, eax
push eax
push dword [edi - 4]
add ecx, dword [edi]
add ecx, dword [esi + 0x24]
call fcn.1002cda0
add esp, 0xc
mov ecx, dword [esi + 0x20]
cmp ecx, 1
jbe 0x1002d5e2
mov eax, dword [esi + 0x10]
mov edx, dword [edi - 8]
push ecx
mov ecx, dword [edi + 4]
imul ecx, eax
push eax
push dword [edi - 4]
add ecx, dword [edi]
add ecx, dword [esi + 0x24]
call fcn.1002cfe0
add esp, 0xc
mov esi, dword [ebp - 0x34]
movzx eax, word [edi]
mov edx, dword [ebp - 0x18]
movd xmm0, dword [ebp - 0x30]
movss xmm4, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x38]
cvtdq2ps xmm0, xmm0
mov word [edx + esi*4], ax
movzx eax, word [edi + 4]
mov word [edx + esi*4 + 2], ax
movzx eax, word [edi]
add ax, word [edi - 8]
mulss xmm0, xmm4
mov word [edx + esi*4 + 4], ax
movzx eax, word [edi + 4]
add ax, word [edi - 4]
movss dword [edx + esi*4 + 0x10], xmm0
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
mov word [edx + esi*4 + 6], ax
mov eax, dword [ebp - 0x18]
mulss xmm0, dword [ebp - 0x3c]
addss xmm0, dword [ebp - 0x20]
movss dword [edx + esi*4 + 8], xmm0
mov edx, dword [ebp - 0x40]
movd xmm0, edx
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [ebp - 0x44]
addss xmm0, dword [ebp - 0x24]
movss dword [eax + esi*4 + 0xc], xmm0
mov eax, dword [edi - 8]
add eax, ecx
mov ecx, dword [ebp - 0x18]
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [ebp - 0x3c]
addss xmm0, dword [ebp - 0x20]
movss dword [ecx + esi*4 + 0x14], xmm0
mov eax, dword [edi - 4]
add eax, edx
cmp dword [ebp - 0xc], 0
mov edx, dword [ebx + 8]
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [ebp - 0x44]
addss xmm0, dword [ebp - 0x24]
movss dword [ecx + esi*4 + 0x18], xmm0
mov esi, dword [ebp - 0x28]
mov eax, esi
cmovne eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x10], eax
jmp 0x1002d70c
cmp dword [ecx + 0x18], 0
jne 0x1002d705
test eax, eax
je 0x1002d705
cmp dword [edi - 8], 0
jne 0x1002d705
cmp dword [edi - 4], 0
jne 0x1002d705
mov eax, dword [ebp - 0x10]
test eax, eax
js 0x1002d705
mov edx, dword [edx + 0x10]
lea ecx, [esi*8]
shl eax, 3
sub eax, dword [ebp - 0x10]
sub ecx, esi
movups xmm0, xmmword [edx + eax*4]
movups xmmword [edx + ecx*4], xmm0
movq xmm0, qword [edx + eax*4 + 0x10]
movq qword [edx + ecx*4 + 0x10], xmm0
mov eax, dword [edx + eax*4 + 0x18]
mov dword [edx + ecx*4 + 0x18], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebx + 8]
jmp 0x1002d70c
mov dword [ebp - 0x1c], 0
inc esi
add edi, 0x18
mov dword [ebp - 0x28], esi
cmp esi, dword [edx + 0xc]
jl 0x1002d3e0
mov eax, dword [ebp - 0x48]
mov dword [ecx + 0x1c], eax
mov eax, dword [ebp - 0x4c]
pop edi
mov dword [ecx + 0x20], eax
mov eax, dword [ebp - 0x1c]
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret