Function at 0x401a20
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x38
push esi
mov esi, ecx
mov eax, edx
mov edx, dword [ebx + 8]
mov ecx, edx
sar ecx, 2
mov dword [ebp - 0x14], ecx
mov ecx, edx
sar ecx, 3
mov dword [ebp - 0x10], ecx
mov ecx, edx
sar ecx, 1
push edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x24], esi
lea edi, [ecx*4]
mov dword [ebp - 0x20], ecx
add dword [esi + 8], edi
cmp dword [esi + 0x4d], 0
je 0x401a82
mov ecx, dword [esi + 0x55]
lea edx, [ecx + edi]
cmp edx, dword [esi + 0x59]
jg 0x401a96
add ecx, dword [esi + 0x4d]
mov dword [esi + 0x55], edx
jmp 0x401a98
test edi, edi
je 0x401a96
push edi
call fcn.00501e08
mov ecx, eax
add esp, 4
mov eax, dword [ebp - 4]
jmp 0x401a98
xor ecx, ecx
mov dword [esi + eax*4 + 0x429], ecx
add dword [esi + 8], edi
mov ecx, dword [esi + 0x4d]
test ecx, ecx
je 0x401aba
mov edx, dword [esi + 0x55]
add edi, edx
cmp edi, dword [esi + 0x59]
jg 0x401ace
mov dword [esi + 0x55], edi
add ecx, edx
jmp 0x401ad0
test edi, edi
je 0x401ace
push edi
call fcn.00501e08
mov ecx, eax
add esp, 4
mov eax, dword [ebp - 4]
jmp 0x401ad0
xor ecx, ecx
mov edx, dword [ebp - 0x14]
mov dword [esi + eax*4 + 0x431], ecx
lea ecx, [edx*4]
add dword [esi + 8], ecx
cmp dword [esi + 0x4d], 0
je 0x401afc
mov edi, dword [esi + 0x55]
add ecx, edi
cmp ecx, dword [esi + 0x59]
jg 0x401b13
add edi, dword [esi + 0x4d]
mov dword [esi + 0x55], ecx
jmp 0x401b15
test ecx, ecx
je 0x401b13
push ecx
call fcn.00501e08
mov edx, dword [ebp - 0x14]
mov edi, eax
mov eax, dword [ebp - 4]
add esp, 4
jmp 0x401b15
xor edi, edi
mov ecx, dword [esi + eax*4 + 0x429]
mov dword [ebp - 0xc], edi
mov dword [esi + eax*4 + 0x439], edi
mov dword [ebp - 0x2c], ecx
test ecx, ecx
je 0x401ecd
mov eax, dword [esi + eax*4 + 0x431]
test eax, eax
je 0x401ecd
test edi, edi
je 0x401ecd
movsd xmm1, qword [0x545510]
test edx, edx
jle 0x401c63
movd xmm2, dword [ebx + 8]
lea ecx, [eax + 4]
mov edi, dword [ebp - 0x2c]
xor edx, edx
mov esi, dword [ebp - 0x14]
cvtdq2pd xmm2, xmm2
mov dword [ebp - 8], ecx
mov ecx, edi
sub ecx, eax
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x2c], ecx
movsd qword [ebp - 0x38], xmm2
nop word [eax + eax]
movd xmm0, edx
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
divsd xmm0, xmm2
movsd qword [ebp - 0x18], xmm0
call fcn.00521e10
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd xmm0, qword [ebp - 0x18]
movss dword [edi], xmm1
call fcn.00523090
xorps xmm0, xmmword [0x545970]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x2c]
cvtsd2ss xmm0, xmm0
movss dword [ecx + eax], xmm0
movd xmm0, dword [ebp - 0x1c]
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [0x545510]
divsd xmm0, qword [ebp - 0x38]
mulsd xmm0, qword [0x5454d0]
movsd qword [ebp - 0x18], xmm0
call fcn.00521e10
mov eax, dword [ebp - 8]
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd xmm0, qword [ebp - 0x18]
mulss xmm1, dword [0x545480]
movss dword [eax - 4], xmm1
call fcn.00523090
mov eax, dword [ebp - 8]
lea edi, [edi + 8]
mov edx, dword [ebp - 0x28]
add dword [ebp - 0x1c], 2
add edx, 4
movsd xmm1, qword [0x545510]
movsd xmm2, qword [ebp - 0x38]
cvtsd2ss xmm0, xmm0
mov dword [ebp - 0x28], edx
mulss xmm0, dword [0x545480]
movss dword [eax], xmm0
add eax, 8
mov dword [ebp - 8], eax
sub esi, 1
jne 0x401b90
mov esi, dword [ebp - 0x24]
mov edi, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
test eax, eax
jle 0x401cdb
movd xmm2, dword [ebx + 8]
mov esi, 2
cvtdq2pd xmm2, xmm2
mov dword [ebp - 0x28], eax
movsd qword [ebp - 0x30], xmm2
movd xmm0, esi
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
divsd xmm0, xmm2
movsd qword [ebp - 0x38], xmm0
call fcn.00521e10
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movsd xmm0, qword [ebp - 0x38]
movss dword [edi], xmm1
call fcn.00523090
xorps xmm0, xmmword [0x545970]
lea edi, [edi + 8]
movsd xmm1, qword [0x545510]
add esi, 4
sub dword [ebp - 0x28], 1
movsd xmm2, qword [ebp - 0x30]
cvtsd2ss xmm0, xmm0
movss dword [edi - 4], xmm0
jne 0x401c80
mov esi, dword [ebp - 0x24]
mov edx, dword [ebp - 0x20]
mov ecx, dword [esi + 0x4d]
lea eax, [edx*4]
add dword [esi + 8], eax
test ecx, ecx
je 0x401d04
mov edi, dword [esi + 0x55]
add eax, edi
cmp eax, dword [esi + 0x59]
jg 0x401ebf
mov dword [esi + 0x55], eax
add ecx, edi
jmp 0x401d1a
test eax, eax
je 0x401ebf
push eax
call fcn.00501e08
mov edx, dword [ebp - 0x20]
add esp, 4
mov ecx, eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0x28], ecx
mov dword [esi + eax*4 + 0x441], ecx
test ecx, ecx
je 0x401ecd
xor edi, edi
test edx, edx
jle 0x401dab
movd xmm2, edx
mov esi, ecx
cvtdq2pd xmm2, xmm2
movsd qword [ebp - 0x38], xmm2
nop dword [eax]
nop dword [eax + eax]
xorps xmm0, xmm0
cvtsi2sd xmm0, edi
addsd xmm0, qword [0x5454d0]
divsd xmm0, xmm2
mulsd xmm0, qword [0x5454d0]
mulsd xmm0, qword [0x545510]
call fcn.00523090
cvtsd2ss xmm0, xmm0
mulss xmm0, xmm0
cvtss2sd xmm0, xmm0
mulsd xmm0, qword [0x5454f0]
call fcn.00523090
movsd xmm2, qword [ebp - 0x38]
cvtsd2ss xmm0, xmm0
movss dword [esi + edi*4], xmm0
inc edi
cmp edi, dword [ebp - 0x20]
jl 0x401d50
mov esi, dword [ebp - 0x24]
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x10]
lea ecx, [edx*2 + 3]
and ecx, 0xfffffffc
add dword [esi + 8], ecx
cmp dword [esi + 0x4d], 0
je 0x401dd7
mov edi, dword [esi + 0x55]
add ecx, edi
cmp ecx, dword [esi + 0x59]
jg 0x401ea2
add edi, dword [esi + 0x4d]
mov dword [esi + 0x55], ecx
jmp 0x401ded
test ecx, ecx
je 0x401ea2
push ecx
call fcn.00501e08
mov edx, dword [ebp - 0x10]
add esp, 4
mov edi, eax
mov eax, dword [ebp - 4]
mov dword [esi + eax*4 + 0x449], edi
test edi, edi
je 0x401ecd
mov ecx, dword [ebx + 8]
call fcn.00401460
xor esi, esi
mov ecx, eax
test edx, edx
jle 0x401e94
mov eax, 0x24
sub eax, ecx
mov dword [ebp - 0x2c], eax
nop dword [eax]
mov ecx, esi
lea eax, [esi + esi]
shr ecx, 1
xor ecx, eax
lea eax, [esi + esi]
and ecx, 0x55555555
xor ecx, eax
mov edx, ecx
shr edx, 2
lea eax, [ecx*4]
xor edx, eax
lea eax, [ecx*4]
and edx, 0x33333333
xor edx, eax
mov ecx, edx
mov eax, edx
shr ecx, 4
shl edx, 4
shl eax, 4
xor ecx, eax
and ecx, 0xf0f0f0f
xor ecx, edx
mov edx, ecx
mov eax, ecx
shr edx, 8
shl eax, 8
xor edx, eax
shl ecx, 8
and edx, 0xff00ff
xor edx, ecx
mov ecx, dword [ebp - 0x2c]
rol edx, 0x10
shr edx, cl
shl edx, 2
mov word [edi + esi*2], dx
inc esi
cmp esi, dword [ebp - 0x10]
jl 0x401e20
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
mov dword [esi + eax*4 + 0x449], 0
xor eax, eax
mov dword [esi + 0x61], 3
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
mov eax, dword [ebp - 4]
mov dword [esi + eax*4 + 0x441], 0
pop edi
mov dword [esi + 0x61], 3
xor eax, eax
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret