Function at 0x422b30
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x30
push esi
push edi
mov edi, dword [esp + 0x40]
mov eax, edi
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [esp + 0x30], eax
lea ecx, [eax*4]
push ecx
call fcn.0043b08f
mov ecx, dword [esp + 0x34]
mov esi, eax
mov dword [esp + 0x24], esi
lea ecx, [ecx + edi]
shl ecx, 2
push ecx
call fcn.0043b08f
mov edi, eax
mov eax, dword [esp + 0x48]
mov ecx, eax
mov dword [esp + 0x34], edi
sar ecx, 1
mov dword [esp + 0x24], ecx
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movss dword [esp + 0x30], xmm0
cvtps2pd xmm0, xmm0
call fcn.0043d200
movsd qword [esp + 0x10], xmm0
movsd xmm0, qword [0x511ec8]
call fcn.0043d200
movsd xmm1, qword [esp + 0x10]
divsd xmm1, xmm0
addsd xmm1, qword [0x511ee0]
movsd qword [esp + 0x10], xmm1
fld qword [esp + 0x10]
fstp qword [esp]
call fcn.0043ca10
add esp, 8
call fcn.004337d0
mov ecx, dword [esp + 0x3c]
movss xmm1, dword [0x58ff48]
mov dword [esp + 0xc], eax
mov dword [ecx + 0xc], esi
xor esi, esi
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x40]
mov dword [ecx], eax
mov dword [ecx + 8], edi
cmp dword [esp + 0x30], esi
jle 0x422ce8
add eax, eax
mov ecx, dword [esp + 0x1c]
movaps xmm2, xmm1
mov dword [esp + 0x34], 1
divss xmm2, dword [esp + 0x28]
lea edi, [edi + ecx*4]
movd xmm0, eax
xor eax, eax
cvtdq2ps xmm0, xmm0
mov dword [esp + 0x24], eax
movss dword [esp + 0x10], xmm2
divss xmm1, xmm0
movss dword [esp + 0x14], xmm1
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mulss xmm0, xmm2
cvtps2pd xmm0, xmm0
movsd qword [esp + 0x18], xmm0
call fcn.0043e7d0
mov ecx, dword [esp + 0x2c]
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd xmm0, qword [esp + 0x18]
movss dword [ecx + esi*8], xmm1
call fcn.0043e990
xorps xmm0, xmmword [0x511f00]
mov eax, dword [esp + 0x2c]
cvtsd2ss xmm0, xmm0
movss dword [eax + esi*8 + 4], xmm0
movd xmm0, dword [esp + 0x34]
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [esp + 0x14]
cvtps2pd xmm0, xmm0
movsd qword [esp + 0x18], xmm0
call fcn.0043e7d0
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd xmm0, qword [esp + 0x18]
movss dword [edi], xmm1
call fcn.0043e990
mov eax, dword [esp + 0x24]
lea edi, [edi + 8]
add dword [esp + 0x34], 2
inc esi
movss xmm2, dword [esp + 0x10]
add eax, 4
cvtsd2ss xmm0, xmm0
mov dword [esp + 0x24], eax
movss dword [edi - 4], xmm0
cmp esi, dword [esp + 0x30]
jl 0x422c33
movss xmm1, dword [0x58ff48]
mov eax, dword [esp + 0x40]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [esp + 0x14], eax
test eax, eax
jle 0x422e19
divss xmm1, dword [esp + 0x28]
mov edx, dword [esp + 0x40]
mov edi, 2
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x40], eax
lea esi, [ecx + edx*4]
movss dword [esp + 0x10], xmm1
nop dword [eax]
xorps xmm0, xmm0
cvtsi2ss xmm0, edi
mulss xmm0, xmm1
cvtps2pd xmm0, xmm0
movsd qword [esp + 0x18], xmm0
call fcn.0043e7d0
mulsd xmm0, qword [0x511ee0]
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd xmm0, qword [esp + 0x18]
movss dword [esi], xmm1
call fcn.0043e990
xorps xmm0, xmmword [0x511f00]
lea esi, [esi + 8]
mulsd xmm0, qword [0x511ee0]
add edi, 4
sub dword [esp + 0x40], 1
movss xmm1, dword [esp + 0x10]
cvtsd2ss xmm0, xmm0
movss dword [esi - 4], xmm0
jne 0x422d20
mov eax, dword [esp + 0xc]
mov edi, 1
mov esi, edi
mov dword [esp + 0x2c], 0
lea ecx, [eax - 2]
shl esi, cl
lea ecx, [eax - 1]
shl edi, cl
mov eax, esi
mov dword [esp + 0x30], esi
dec edi
mov dword [esp + 0x40], eax
nop word [eax + eax]
xor ecx, ecx
xor edx, edx
mov dword [esp + 0x24], ecx
test eax, eax
je 0x422dee
mov eax, esi
nop
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x24]
test dword [esp + 0x2c], eax
je 0x422dd5
bts edx, ecx
inc ecx
mov eax, esi
sar eax, cl
mov dword [esp + 0x24], ecx
test eax, eax
jne 0x422dc0
mov eax, dword [esp + 0x40]
mov dword [esp + 0x40], eax
mov dword [esp + 0x30], esi
mov ecx, dword [esp + 0x2c]
mov eax, edx
mov esi, dword [esp + 0x20]
not eax
and eax, edi
dec eax
mov dword [esi + ecx*8], eax
mov eax, esi
mov esi, dword [esp + 0x30]
mov dword [eax + ecx*8 + 4], edx
inc ecx
mov eax, dword [esp + 0x40]
mov dword [esp + 0x2c], ecx
cmp ecx, dword [esp + 0x14]
jl 0x422db0
movss xmm0, dword [0x58ff4c]
divss xmm0, dword [esp + 0x28]
mov eax, dword [esp + 0x3c]
pop edi
pop esi
movss dword [eax + 0x10], xmm0
add esp, 0x30
ret