Function at 0x47c370
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x48
mov eax, dword [ecx + 0x8c]
push esi
mov dword [esp + 0x10], eax
mov eax, dword [ecx + 0x94]
push edi
mov dword [esp + 8], ecx
mov dword [esp + 0x10], eax
call fcn.0047b230
mov esi, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov edi, edx
mov ecx, dword [esp + 8]
xor edi, esi
and edi, 1
mov dword [esp + 0xc], eax
movd xmm0, esi
movd xmm2, edx
cvtdq2ps xmm2, xmm2
shl edi, 8
lea esi, [ecx + 0x64]
cmp byte [ecx + 0x9c], 2
cvtdq2ps xmm0, xmm0
movss dword [esp + 0x1c], xmm2
movss dword [esp + 0x24], xmm0
je 0x47c755
addss xmm0, dword [0x526968]
addss xmm2, dword [0x526968]
lea eax, [esp + 0x2c]
push eax
sub esp, 8
movss dword [esp + 4], xmm0
movss dword [esp], xmm2
push esi
call dword [esp + 0x24]
movss xmm0, dword [esp + 0x3c]
add esp, 0x10
movss xmm2, dword [0x526af0]
mov ecx, dword [esp + 8]
mulss xmm0, xmm2
cmp byte [ecx + 0x9c], 1
cvttss2si edx, xmm0
jne 0x47c49b
movss xmm0, dword [esi + 0x18]
movsd xmm1, qword [0x526c80]
movss xmm3, dword [0x526904]
cvtps2pd xmm0, xmm0
andps xmm0, xmm1
cvtpd2ps xmm0, xmm0
comiss xmm3, xmm0
jbe 0x47c495
movss xmm4, dword [esi + 0x1c]
cvtps2pd xmm0, xmm4
andps xmm0, xmm1
cvtpd2ps xmm0, xmm0
comiss xmm3, xmm0
jbe 0x47c47c
movss xmm0, dword [esi + 0x20]
subss xmm0, dword [0x526990]
cvtps2pd xmm0, xmm0
andps xmm0, xmm1
cvtpd2ps xmm0, xmm0
comiss xmm3, xmm0
ja 0x47c49b
movss xmm1, dword [esp + 0x24]
movss xmm0, dword [esi]
mulss xmm1, xmm4
addss xmm1, dword [esi + 0x20]
divss xmm0, xmm1
jmp 0x47c49f
mov esi, dword [esp + 0x28]
jmp 0x47c4a7
movss xmm0, dword [esi]
mulss xmm0, xmm2
cvttss2si esi, xmm0
mov ecx, esi
mov dword [esp + 8], esi
sar ecx, 0x1f
mov eax, ecx
xor eax, esi
sub eax, ecx
cmp eax, 0x10
jge 0x47c4f5
push edx
call dword [esp + 0x14]
mov esi, dword [esp + 0x10]
mov ecx, edi
xor ecx, 0x100
sar eax, 8
add ecx, eax
add esp, 4
add eax, edi
movzx ecx, word [esi + ecx*2]
push dword [ebp + 0x14]
mov dx, word [esi + eax*2]
push ecx
mov ecx, dword [ebp + 0x10]
call fcn.0047c310
add esp, 8
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [esp + 0x10]
cmp eax, 0x47a900
jne 0x47c6be
sub esp, 8
lea ecx, [esp + 0x3c]
push dword [ebp + 0x14]
push esi
push edx
call fcn.00490b50
mov eax, dword [esp + 0x34]
test eax, eax
jle 0x47c551
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0xc]
mov esi, dword [ebp + 0x10]
push eax
mov eax, edi
xor eax, 0x100
add eax, ecx
movzx eax, word [edx + eax*2]
push eax
lea eax, [ecx + edi]
mov ecx, esi
mov dx, word [edx + eax*2]
call fcn.0047c310
mov eax, dword [esp + 0x3c]
add esp, 8
lea ecx, [esi + eax*2]
jmp 0x47c554
mov ecx, dword [ebp + 0x10]
mov eax, dword [esp + 0x38]
test eax, eax
jle 0x47c684
mov edx, dword [esp + 0x40]
mov esi, eax
sar esi, 3
mov dword [esp + 0x10], esi
test esi, esi
mov esi, dword [esp + 0xc]
jle 0x47c659
nop dword [eax]
mov eax, edx
add edx, dword [esp + 8]
sar eax, 8
add eax, edi
xor edi, 0x100
movzx eax, word [esi + eax*2]
mov word [ecx], ax
mov eax, edx
add edx, dword [esp + 8]
sar eax, 8
add eax, edi
xor edi, 0x100
movzx eax, word [esi + eax*2]
mov word [ecx + 2], ax
mov eax, edx
add edx, dword [esp + 8]
sar eax, 8
add eax, edi
xor edi, 0x100
movzx eax, word [esi + eax*2]
mov word [ecx + 4], ax
mov eax, edx
add edx, dword [esp + 8]
sar eax, 8
add eax, edi
xor edi, 0x100
movzx eax, word [esi + eax*2]
mov word [ecx + 6], ax
mov eax, edx
add edx, dword [esp + 8]
sar eax, 8
add eax, edi
xor edi, 0x100
movzx eax, word [esi + eax*2]
mov word [ecx + 8], ax
mov eax, edx
add edx, dword [esp + 8]
sar eax, 8
add eax, edi
xor edi, 0x100
movzx eax, word [esi + eax*2]
mov word [ecx + 0xa], ax
mov eax, edx
add edx, dword [esp + 8]
sar eax, 8
add eax, edi
xor edi, 0x100
movzx eax, word [esi + eax*2]
mov word [ecx + 0xc], ax
mov eax, edx
add edx, dword [esp + 8]
sar eax, 8
add eax, edi
xor edi, 0x100
movzx eax, word [esi + eax*2]
mov word [ecx + 0xe], ax
add ecx, 0x10
sub dword [esp + 0x10], 1
jne 0x47c580
mov eax, dword [esp + 0x38]
and eax, 7
mov dword [esp + 0x10], eax
jbe 0x47c684
mov eax, edx
add edx, dword [esp + 8]
sar eax, 8
add eax, edi
xor edi, 0x100
mov ax, word [esi + eax*2]
mov word [ecx], ax
add ecx, 2
sub dword [esp + 0x10], 1
jne 0x47c662
mov eax, dword [esp + 0x3c]
test eax, eax
jle 0x47c7de
mov edx, dword [esp + 0x48]
mov esi, dword [esp + 0xc]
push eax
mov eax, edi
xor eax, 0x100
add eax, edx
movzx eax, word [esi + eax*2]
push eax
lea eax, [edx + edi]
mov dx, word [esi + eax*2]
call fcn.0047c310
add esp, 8
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
mov esi, dword [esp + 0xc]
cmp eax, 0x47a930
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x10], eax
jne 0x47c716
mov ecx, edx
add edx, dword [esp + 8]
sar ecx, 8
mov eax, ecx
shl eax, 0x17
sar eax, 0x1f
xor eax, ecx
mov ecx, dword [esp + 0x10]
movzx eax, al
add eax, edi
xor edi, 0x100
mov ax, word [esi + eax*2]
mov word [ecx], ax
add ecx, 2
sub dword [esp + 0x14], 1
mov dword [esp + 0x10], ecx
jne 0x47c6d7
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [esp + 8]
nop word [eax + eax]
mov eax, edx
add edx, ecx
mov ecx, dword [esp + 0x10]
add dword [esp + 0x10], 2
sar eax, 8
movzx eax, al
add eax, edi
xor edi, 0x100
sub dword [esp + 0x14], 1
mov ax, word [esi + eax*2]
mov word [ecx], ax
mov ecx, dword [esp + 8]
jne 0x47c720
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp + 0x14]
mov esi, dword [esp + 0xc]
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x2c]
push eax
sub esp, 8
lea eax, [ecx + 0x64]
movss dword [esp + 4], xmm0
movss dword [esp], xmm2
push eax
call dword [esp + 0x24]
movss xmm0, dword [esp + 0x3c]
mulss xmm0, dword [0x526af0]
cvttss2si eax, xmm0
push eax
call dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
add esp, 0x14
movss xmm2, dword [esp + 0x1c]
addss xmm2, dword [0x526990]
movss xmm0, dword [esp + 0x24]
shr eax, 8
add eax, edi
xor edi, 0x100
movss dword [esp + 0x1c], xmm2
mov ax, word [esi + eax*2]
mov word [ecx], ax
add ecx, 2
sub dword [esp + 0x20], 1
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 8]
jne 0x47c767
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10