Function at 0x40a200
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x1c]
fild dword [eax + 0x37f6c]
fmul qword [0x5baf98]
fadd qword [0x5bab28]
fimul dword [eax + 0xa0]
call fcn.00556a00
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x54]
fld dword [esi + eax*4 + 0x98]
fcomp dword [0x5bb234]
lea edi, [esi + eax*4 + 0x98]
fnstsw ax
test ah, 1
je 0x40a25b
mov dword [esi + 0x1220], 0xf
pop edi
pop esi
pop ebp
add esp, 0x24
ret
fld dword [esi + 0x74]
call fcn.00556a00
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
fmul qword [0x5baf90]
fidiv dword [esp + 0x24]
call fcn.00556a00
mov ebp, eax
cmp ebp, 0x32
jl 0x40a52c
cmp ebp, 0x3cf
jg 0x40a52c
fild dword [esp + 0x24]
push ebx
fstp dword [esp + 0x28]
fld dword [edi]
fadd dword [0x5bb230]
fmul dword [0x5bb22c]
fdiv dword [esp + 0x28]
fmul dword [0x5bb1c0]
call fcn.00556a00
fld dword [edi]
fsub dword [0x5bb230]
mov ebx, eax
mov dword [esp + 0x1c], 0x1e3ce508
mov dword [esp + 0x30], ebx
mov dword [esp + 0x18], 0x1e3ce508
fmul dword [0x5bb22c]
fdiv dword [esp + 0x28]
fmul dword [0x5bb1c0]
call fcn.00556a00
cmp eax, ebx
mov dword [esp + 0x20], eax
jge 0x40a3b2
lea ecx, [eax + ebp - 2]
mov dword [esp + 0x24], ecx
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
mov edi, 0xfffffffe
mov eax, edi
mov ecx, dword [esp + 0x20]
cdq
xor eax, edx
sub eax, edx
mov edx, edi
inc eax
sub edx, ecx
mov ecx, dword [esi + 0x1c]
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
add edx, ebp
push edx
fstp dword [esp + 0x30]
call fcn.004c7b00
fdiv dword [esp + 0x2c]
mov ecx, dword [esi + 0x1c]
push ebx
fadd dword [esp + 0x14]
fstp dword [esp + 0x14]
call fcn.004c7b00
fdiv dword [esp + 0x2c]
inc edi
inc ebx
cmp edi, 2
fadd dword [esp + 0x14]
fstp dword [esp + 0x14]
jle 0x40a317
fld dword [esp + 0x10]
fcomp dword [esp + 0x18]
fnstsw ax
test ah, 0x41
jne 0x40a37d
mov eax, dword [esp + 0x10]
mov dword [esp + 0x18], eax
fld dword [esp + 0x14]
fcomp dword [esp + 0x1c]
fnstsw ax
test ah, 0x41
jne 0x40a394
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x1c], ecx
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
inc eax
inc edx
cmp eax, ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
jl 0x40a2fe
mov edx, dword [esi + 0x54]
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
fld dword [esi + edx*4 + 0x98]
fadd dword [0x5bb228]
fmul dword [0x5bb22c]
fdiv dword [esp + 0x28]
fmul dword [0x5bb1c0]
call fcn.00556a00
mov dword [esp + 0x28], eax
mov edi, 0xfffffffd
lea ebx, [eax + ebp - 3]
mov eax, edi
mov ecx, dword [esi + 0x1c]
cdq
xor eax, edx
sub eax, edx
inc eax
mov dword [esp + 0x30], eax
lea eax, [edi + ebp]
fild dword [esp + 0x30]
push eax
fstp dword [esp + 0x30]
call fcn.004c7b00
fdiv dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
mov ecx, edi
sub ecx, edx
add ecx, ebp
push ecx
mov ecx, dword [esi + 0x1c]
fadd dword [esp + 0x24]
fstp dword [esp + 0x24]
call fcn.004c7b00
fstp dword [esp + 0x30]
mov ecx, dword [esi + 0x1c]
push ebx
call fcn.004c7b00
fadd dword [esp + 0x30]
inc edi
inc ebx
cmp edi, 3
fdiv dword [esp + 0x2c]
fmul dword [0x5bb1c0]
fadd dword [esp + 0x24]
fstp dword [esp + 0x24]
jle 0x40a3f4
fld dword [esp + 0x18]
fcomp dword [esp + 0x1c]
pop ebx
fnstsw ax
test ah, 0x41
jne 0x40a473
fld dword [esp + 0x14]
jmp 0x40a477
fld dword [esp + 0x18]
call fcn.00556a00
mov dword [esp + 0x2c], eax
fild dword [esp + 0x2c]
fstp dword [esp + 0x28]
fild dword [esi + 0x1224]
fld dword [esp + 0x28]
fsub dword [esp + 0x20]
fsub st(1)
fmul dword [0x5bb224]
fadd st(1)
call fcn.00556a00
mov ecx, eax
mov eax, 0x55555556
imul ecx
fstp st(0)
mov edi, dword [esi]
mov eax, edx
shr eax, 0x1f
push 0
add edx, eax
push 0
mov dword [esi + 0x1224], ecx
push edx
push 0x45
mov ecx, esi
call dword [edi + 8]
mov edi, dword [esi + 0x1220]
mov dword [esp + 0x2c], edi
fild dword [esp + 0x2c]
fld dword [esp + 0x28]
fsub dword [esp + 0x1c]
fsubp st(1)
call fcn.00556a00
mov ecx, eax
mov eax, 0x66666667
imul ecx
sar edx, 1
mov ecx, edx
mov eax, edi
shr ecx, 0x1f
add edx, ecx
sub eax, edx
mov dword [esi + 0x1220], eax
jns 0x40a510
mov dword [esi + 0x1220], 0
mov ecx, dword [esi + 0x1220]
mov eax, 0x1f
cmp ecx, eax
jle 0x40a536
mov dword [esi + 0x1220], eax
pop edi
pop esi
pop ebp
add esp, 0x24
ret
mov dword [esi + 0x1220], 0
pop edi
pop esi
pop ebp
add esp, 0x24
ret