Function at 0x1000f530
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 0x24]
sub esp, 0x30
and eax, 7
push ebx
push esi
cmp eax, 1
sbb ecx, ecx
push edi
neg ecx
push ebp
test ecx, ecx
je 0x1000f558
test byte [esp + 0x68], 7
mov dword [esp + 0x34], 1
je 0x1000f560
mov dword [esp + 0x34], 0
mov eax, dword [esp + 0x70]
mov edx, dword [esp + 0x6c]
mov ebp, dword [esp + 0x74]
xor ebx, ebx
mov dword [eax], 0xbf800000
test ebp, ebp
mov dword [edx], 0xbf800000
jne 0x1000f837
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x64]
imul eax, dword [esp + 0x68]
add edx, edx
mov dword [esp + 0x30], eax
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x5c]
imul edx, dword [esp + 0x4c]
add edx, dword [esp + 0x60]
add dword [esp + 0x54], edx
test ecx, ecx
je 0x1000f6b0
mov eax, dword [esp + 0x54]
xor ebp, ebp
sub eax, dword [esp + 0x4c]
mov dword [esp + 0x28], eax
add eax, dword [esp + 0x4c]
mov dword [esp + 0x24], eax
add eax, dword [esp + 0x4c]
mov dword [esp + 0x2c], eax
cmp dword [esp + 0x64], ebx
jle 0x1000f640
mov eax, dword [esp + 0x64]
inc eax
shr eax, 1
mov dword [esp + 0x38], eax
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
cmp dword [esp + 0x68], 0
mov edi, dword [esp + 0x2c]
jle 0x1000f62a
mov eax, dword [esp + 0x68]
mov dword [esp + 0x20], eax
xor eax, eax
xor edx, edx
mov al, byte [edi]
mov dl, byte [ecx]
add eax, edx
inc esi
sar eax, 1
xor edx, edx
mov dl, byte [esi - 1]
inc edi
sub eax, edx
inc ecx
mov edx, dword [0x1004e6f0]
add ebp, dword [edx + eax*4]
cdq
xor eax, edx
sub ebx, edx
add ebx, eax
dec dword [esp + 0x20]
jne 0x1000f5fd
mov eax, dword [esp + 0x18]
add dword [esp + 0x28], eax
add dword [esp + 0x24], eax
add dword [esp + 0x2c], eax
dec dword [esp + 0x38]
jne 0x1000f5e2
mov eax, dword [esp + 0x30]
mov dword [esp + 0x38], eax
xor eax, eax
mov dword [esp + 0x3c], eax
fild qword [esp + 0x38]
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], eax
fild qword [esp + 0x38]
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], eax
pushfd
cmp dword [0x100539f0], 0
jne 0x1000f674
fdiv st(1)
jmp 0x1000f67d
push eax
mov al, 8
call fcn.10012667
pop eax
popfd
fmul st(0), st(0)
fild qword [esp + 0x38]
mov ecx, dword [esp + 0x6c]
pushfd
cmp dword [0x100539f0], 0
jne 0x1000f696
fdiv st(2)
jmp 0x1000f69f
push eax
mov al, 0x10
call fcn.10012667
pop eax
popfd
fsub st(1)
fmul qword [0x1003c1c8]
faddp st(1)
fsqrt
fstp dword [ecx]
fstp st(0)
xor ecx, ecx
cmp dword [esp + 0x34], ecx
je 0x1000f837
mov eax, dword [esp + 0x54]
mov dword [esp + 0x20], ecx
sub eax, dword [esp + 0x4c]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x28], eax
add eax, dword [esp + 0x4c]
mov dword [esp + 0x24], eax
add eax, dword [esp + 0x4c]
mov dword [esp + 0x2c], eax
cmp dword [esp + 0x64], ecx
jle 0x1000f7bf
mov eax, dword [esp + 0x64]
inc eax
shr eax, 1
mov dword [esp + 0x38], eax
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
cmp dword [esp + 0x68], 0
mov ebp, dword [esp + 0x2c]
mov dword [esp + 0x10], ebp
jle 0x1000f7a5
mov eax, dword [esp + 0x68]
inc eax
shr eax, 1
mov dword [esp + 0x1c], eax
xor ecx, ecx
inc edi
xor eax, eax
inc edi
xor ebx, ebx
mov ebp, dword [esp + 0x10]
mov cl, byte [edi - 2]
mov al, byte [edi - 1]
mov bl, byte [ebp]
xor edx, edx
inc esi
inc dword [esp + 0x10]
mov ebp, dword [esp + 0x10]
inc esi
inc dword [esp + 0x10]
mov dl, byte [ebp]
mov dword [esp + 0x14], edx
lea ebp, [ebx + edx]
sar ebp, 1
xor edx, edx
mov dl, byte [esi - 2]
sub ebx, dword [esp + 0x14]
add edx, ebp
sar edx, 1
sub ecx, edx
xor edx, edx
mov dl, byte [esi - 1]
add edx, ebp
sar edx, 1
sub eax, edx
mov edx, dword [0x1004e6f0]
mov ebp, dword [edx + eax*4]
add ebp, dword [edx + ecx*4]
add ebp, dword [edx + ebx*4]
cdq
xor eax, edx
add dword [esp + 0x20], ebp
sub eax, edx
mov ebp, eax
mov eax, ecx
cdq
xor eax, edx
sub ebp, edx
add ebp, eax
mov eax, ebx
cdq
xor eax, edx
sub ebp, edx
add ebp, eax
add dword [esp + 0x34], ebp
dec dword [esp + 0x1c]
jne 0x1000f71d
mov eax, dword [esp + 0x18]
add dword [esp + 0x28], eax
add dword [esp + 0x24], eax
add dword [esp + 0x2c], eax
dec dword [esp + 0x38]
jne 0x1000f6f6
mov eax, dword [esp + 0x30]
xor ecx, ecx
mov edx, dword [esp + 0x34]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
mov eax, dword [esp + 0x20]
fild qword [esp + 0x38]
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], ecx
fild qword [esp + 0x38]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], ecx
pushfd
cmp dword [0x100539f0], 0
jne 0x1000f7fb
fdiv st(1)
jmp 0x1000f804
push eax
mov al, 8
call fcn.10012667
pop eax
popfd
fmul st(0), st(0)
fild qword [esp + 0x38]
mov ecx, dword [esp + 0x70]
pushfd
cmp dword [0x100539f0], 0
jne 0x1000f81d
fdiv st(2)
jmp 0x1000f826
push eax
mov al, 0x10
call fcn.10012667
pop eax
popfd
fsub st(1)
fmul qword [0x1003c1c8]
faddp st(1)
fsqrt
fstp dword [ecx]
fstp st(0)
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x30
ret