Function at 0x66fb40
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x18], 1
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
mov cl, dl
shl dword [ebp - 0x18], cl
mov dword [esi], edx
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x18]
shr eax, 0x1f
add eax, ecx
sar eax, 1
shl eax, 3
mov dword [esp], eax
call fcn.0045e7c0
mov edx, dword [ebp + 8]
test eax, eax
mov dword [edx + 0xc], eax
je 0x66fcab
mov edi, dword [ebp - 0x18]
add edi, edi
mov dword [esp], edi
call fcn.0045e7c0
mov ecx, dword [ebp + 8]
test eax, eax
mov dword [ecx + 8], eax
je 0x66fcab
mov dword [ecx + 4], ebx
test ebx, ebx
fld1
je 0x66fc9e
mov eax, dword [ebp - 0x18]
xor esi, esi
mov ebx, dword [ebp - 0x18]
shr eax, 0x1f
add eax, ebx
sar eax, 1
cmp eax, 0
jle 0x66fda9
fild dword [ebp - 0x18]
fxch st(1)
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp + 8]
fstp qword [ebp - 0x40]
mov edi, dword [ecx + 0xc]
fstp dword [ebp - 0x34]
lea esi, [esi]
push esi
fild dword [esp]
add esp, 4
fld qword [0x6f15d8]
fmulp st(1)
fdiv dword [ebp - 0x34]
fstp dword [ebp - 0x1c]
fld dword [ebp - 0x1c]
fstp qword [esp]
call fcn.006741b0
fld dword [ebp - 0x1c]
fxch st(1)
fstp dword [ebp - 0x14]
mov ebx, dword [ebp - 0x14]
fstp qword [esp]
call fcn.006742e0
fmul qword [ebp - 0x40]
mov dword [edi + esi*8], ebx
fstp dword [edi + esi*8 + 4]
inc esi
cmp dword [ebp - 0x20], esi
jg 0x66fbe0
mov eax, dword [ebp + 8]
mov dword [eax + 0x14], 0x66fde0
mov dword [eax + 0x10], 0
call fcn.0060d410
and eax, 0x3c
mov dword [ebp - 0x24], eax
jne 0x66fce2
xor esi, esi
cmp esi, dword [ebp - 0x18]
jge 0x66fc94
mov eax, dword [ebp + 8]
mov edi, dword [eax + 8]
lea esi, [esi]
lea edi, [edi]
xor ebx, ebx
xor edx, edx
cmp ebx, dword [ebp + 0xc]
jge 0x66fc8a
mov ecx, dword [ebp + 0xc]
dec ecx
mov dword [ebp - 0x44], ecx
mov cl, dl
mov eax, esi
sar eax, cl
movzx ecx, byte [ebp - 0x44]
and eax, 1
inc edx
dec dword [ebp - 0x44]
shl eax, cl
or ebx, eax
cmp edx, dword [ebp + 0xc]
jl 0x66fc70
mov word [edi + esi*2], bx
inc esi
cmp esi, dword [ebp - 0x18]
jl 0x66fc60
add esp, 0x4c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
fstp st(0)
fld dword [0x6f15d0]
jmp 0x66fbae
mov ebx, dword [ebp + 8]
add ebx, 8
mov dword [esp], ebx
call fcn.0045c590
mov edx, dword [ebp + 8]
add edx, 0xc
mov dword [esp], edx
call fcn.0045c590
mov edi, dword [ebp + 8]
add edi, 0x10
mov dword [esp], edi
call fcn.0045c590
add esp, 0x4c
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
movzx ecx, byte [ebp + 0xc]
mov esi, 1
shl esi, cl
mov ecx, esi
mov edi, esi
sar ecx, 3
mov dword [ebp - 0x28], ecx
sar edi, 1
shl esi, 4
mov dword [ebp - 0x2c], edi
mov dword [esp], esi
call fcn.0045e7c0
mov edx, dword [ebp + 8]
test eax, eax
mov dword [edx + 0x10], eax
je 0x66fcab
mov ebx, eax
xor edi, edi
cmp edi, dword [ebp - 0x2c]
jge 0x66fd81
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x28]
mov esi, dword [edx + 0xc]
add eax, eax
mov dword [ebp - 0x30], eax
nop
lea esi, [esi]
mov ecx, dword [esi + edi*8 + 4]
mov edx, dword [esi + edi*8]
mov dword [ebx + 4], ecx
mov ecx, dword [ebp - 0x28]
mov dword [ebx], edx
add ecx, edi
mov eax, dword [esi + ecx*8]
mov edx, dword [esi + ecx*8 + 4]
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], edx
mov edx, dword [esi + edi*8 + 4]
xor edx, 0x80000000
mov dword [ebx + 0x10], edx
mov eax, dword [esi + edi*8]
mov dword [ebx + 0x14], eax
mov edx, dword [esi + ecx*8 + 4]
xor edx, 0x80000000
mov dword [ebx + 0x18], edx
mov eax, dword [esi + ecx*8]
mov ecx, dword [ebp - 0x30]
mov dword [ebx + 0x1c], eax
add edi, ecx
add ebx, 0x20
cmp edi, dword [ebp - 0x2c]
jl 0x66fd30
sar dword [ebp - 0x28], 1
jne 0x66fd13
mov ebx, dword [ebp + 8]
add ebx, 0xc
mov dword [esp], ebx
call fcn.0045c590
test byte [ebp - 0x24], 0x10
je 0x66fdb0
mov esi, dword [ebp + 8]
mov dword [esi + 0x14], 0x670d40
jmp 0x66fc45
fstp st(0)
jmp 0x66fc23
test byte [ebp - 0x24], 8
je 0x66fc45
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x14], 0x66fde0
jne 0x66fc45
mov dword [ecx + 0x14], 0x670d40
jmp 0x66fc45