Function at 0x4a1660
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
mov eax, ecx
push ebx
push esi
push edi
mov ecx, dword [eax + 0x8c]
mov dword [esp + 0x1c], ecx
mov ecx, dword [eax + 0x94]
mov dword [esp + 0x24], ecx
mov ecx, eax
mov dword [esp + 0x14], eax
call fcn.0049fc50
mov edx, dword [ebp + 8]
mov edi, eax
mov esi, dword [ebp + 0xc]
mov ebx, edx
mov eax, dword [esp + 0x14]
xor ebx, esi
and ebx, 1
mov dword [esp + 0x18], edi
movd xmm2, edx
movd xmm0, esi
cvtdq2ps xmm2, xmm2
shl ebx, 8
lea ecx, [eax + 0x64]
cmp byte [eax + 0x9c], 2
mov dword [esp + 0x2c], ecx
cvtdq2ps xmm0, xmm0
movss dword [esp + 0x10], xmm2
movss dword [esp + 0x28], xmm0
je 0x4a19b0
addss xmm0, dword [0x5e2e50]
addss xmm2, dword [0x5e2e50]
lea eax, [esp + 0x30]
push eax
sub esp, 8
movss dword [esp + 4], xmm0
movss dword [esp], xmm2
push ecx
call dword [esp + 0x2c]
movss xmm0, dword [esp + 0x40]
add esp, 0x10
movss xmm2, dword [0x5e3054]
mov ecx, dword [esp + 0x14]
mulss xmm0, xmm2
cmp byte [ecx + 0x9c], 1
cvttss2si esi, xmm0
movss xmm0, dword [esp + 0x34]
mulss xmm0, xmm2
cvttss2si edi, xmm0
jne 0x4a1754
movss xmm1, dword [esp + 0x28]
lea eax, [esp + 0x20]
mov ecx, dword [esp + 0x2c]
push eax
lea eax, [esp + 0x20]
push eax
call fcn.0049ee20
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
jmp 0x4a176e
movss xmm0, dword [ecx + 0x64]
mulss xmm0, xmm2
cvttss2si eax, xmm0
movss xmm0, dword [ecx + 0x70]
mulss xmm0, xmm2
cvttss2si ecx, xmm0
mov edx, dword [esp + 0x24]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
cmp edx, 0x49f250
jne 0x4a18dc
sar eax, 1
sar esi, 1
sar edi, 1
sar ecx, 1
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
jne 0x4a1835
mov eax, 0x7fff
cmp edi, 0xffff8000
jge 0x4a17b0
mov edi, 0xffff8000
jmp 0x4a17b5
cmp edi, eax
cmovg edi, eax
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x1c], ecx
mov ecx, dword [ebp + 0x10]
imul edi, edi
mov dword [esp + 0x14], ecx
cmp esi, 0xffff8000
jge 0x4a17d5
mov edx, 0xffff8000
jmp 0x4a17e0
cmp esi, 0x7fff
mov edx, esi
cmovg edx, eax
imul edx, edx
mov ecx, 0x7ff
add esi, dword [esp + 0x10]
add edx, edi
shr edx, 0x13
sub ecx, edx
mov eax, ecx
sar eax, 0x1f
and eax, ecx
mov ecx, dword [esp + 0x18]
movzx eax, byte [eax + edx + 0x5c4238]
add eax, ebx
xor ebx, 0x100
mov ax, word [ecx + eax*2]
mov ecx, dword [esp + 0x14]
mov word [ecx], ax
add ecx, 2
sub dword [esp + 0x1c], 1
mov eax, 0x7fff
mov dword [esp + 0x14], ecx
jne 0x4a17c6
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp + 0x14]
mov ecx, 0x7fff
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x1c], eax
cmp esi, 0xffff8000
jge 0x4a1857
mov eax, 0xffff8000
jmp 0x4a1862
cmp esi, 0x7fff
mov eax, esi
cmovg eax, ecx
cmp edi, 0xffff8000
jge 0x4a1871
mov edx, 0xffff8000
jmp 0x4a187c
cmp edi, 0x7fff
mov edx, edi
cmovg edx, ecx
imul eax, eax
mov ecx, 0x7ff
imul edx, edx
add esi, dword [esp + 0x10]
add edi, dword [esp + 0x14]
add edx, eax
shr edx, 0x13
sub ecx, edx
mov eax, ecx
sar eax, 0x1f
and eax, ecx
mov ecx, dword [esp + 0x18]
movzx eax, byte [eax + edx + 0x5c4238]
mov edx, dword [esp + 0x1c]
add eax, ebx
xor ebx, 0x100
mov ax, word [ecx + eax*2]
mov ecx, 0x7fff
mov word [edx], ax
add edx, 2
sub dword [esp + 0x24], 1
mov dword [esp + 0x1c], edx
jne 0x4a1848
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x24], eax
cmp edx, 0x49f280
jne 0x4a1956
mov eax, edi
imul edi
mov ecx, eax
mov eax, esi
shrd ecx, edx, 0x10
imul esi
shrd eax, edx, 0x10
mov edx, 0x17
add ecx, eax
call fcn.004a6060
add esi, dword [esp + 0x10]
mov ecx, eax
add edi, dword [esp + 0x14]
shl ecx, 0xf
sar ecx, 0x1f
xor ecx, eax
shr ecx, 8
movzx eax, cl
mov ecx, dword [esp + 0x18]
add eax, ebx
xor ebx, 0x100
mov ax, word [ecx + eax*2]
mov ecx, dword [esp + 0x24]
mov word [ecx], ax
add ecx, 2
sub dword [esp + 0x1c], 1
mov dword [esp + 0x24], ecx
jne 0x4a18f2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, edi
imul edi
mov ecx, eax
mov eax, esi
shrd ecx, edx, 0x10
imul esi
shrd eax, edx, 0x10
mov edx, 0x17
add ecx, eax
call fcn.004a6060
mov ecx, dword [esp + 0x18]
add esi, dword [esp + 0x10]
add edi, dword [esp + 0x14]
movzx eax, ax
shr eax, 8
add eax, ebx
xor ebx, 0x100
mov ax, word [ecx + eax*2]
mov ecx, dword [esp + 0x24]
mov word [ecx], ax
add ecx, 2
sub dword [esp + 0x1c], 1
mov dword [esp + 0x24], ecx
jne 0x4a1956
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp + 0x14]
mov esi, dword [esp + 0x24]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x30]
push eax
sub esp, 8
movss dword [esp + 4], xmm0
movss dword [esp], xmm2
push ecx
call dword [esp + 0x2c]
movss xmm1, dword [esp + 0x44]
movss xmm0, dword [esp + 0x40]
mulss xmm0, xmm0
mulss xmm1, xmm1
addss xmm1, xmm0
cvtps2pd xmm0, xmm1
call fcn.00596cc0
cvtsd2ss xmm0, xmm0
mulss xmm0, dword [0x5e3054]
cvttss2si eax, xmm0
push eax
call esi
mov ecx, dword [esp + 0x2c]
add esp, 0x14
movss xmm2, dword [esp + 0x10]
addss xmm2, dword [0x5e2e78]
movss xmm0, dword [esp + 0x28]
shr eax, 8
add eax, ebx
xor ebx, 0x100
movss dword [esp + 0x10], xmm2
mov ax, word [edi + eax*2]
mov word [ecx], ax
add ecx, 2
sub dword [esp + 0x14], 1
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x2c]
jne 0x4a19c2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10