Function at 0x5a1570
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x34
push ebx
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx]
mov edx, dword [eax + 0x120]
push esi
push edi
mov edi, ecx
mov ecx, ebx
call edx
cmp dword [edi + 0x30], eax
jne 0x5a15f4
mov eax, dword [ebx]
mov edx, dword [eax + 0x128]
mov ecx, ebx
call edx
cmp dword [edi + 0x34], eax
jne 0x5a15f4
mov eax, dword [edi]
mov edx, dword [eax + 0xf8]
mov ecx, edi
call edx
test al, al
jne 0x5a15cb
push 0x640c98
call fcn.00422d30
add esp, 4
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov eax, dword [ebx]
mov edx, dword [eax + 0xf8]
mov ecx, ebx
call edx
test al, al
jne 0x5a15ff
push 0x640cc0
call fcn.00422d30
mov eax, dword [edi]
mov edx, dword [eax + 0xfc]
add esp, 4
mov ecx, edi
call edx
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov eax, dword [edi + 0x30]
mov edx, dword [ebx]
mov esi, dword [ebx + 0x18]
mov dword [esp + 0x2c], eax
mov eax, dword [edx + 0x12c]
mov ecx, ebx
call eax
mov edx, dword [esp + 0x2c]
mov ecx, dword [edi + 0x18]
sub eax, edx
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0x2c]
sub eax, edx
cmp dword [edi + 0x34], 0
mov dword [esp + 0x1c], 0
jle 0x5a1688
mov edx, dword [edi + 0x30]
add eax, eax
add eax, eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
add eax, eax
add eax, eax
mov dword [esp + 0x20], eax
lea esp, [esp]
xor eax, eax
test edx, edx
jle 0x5a1672
mov edx, dword [ecx]
xor edx, dword [esi]
inc eax
and edx, 0xffffff
xor edx, dword [ecx]
add ecx, 4
mov dword [esi], edx
mov edx, dword [edi + 0x30]
add esi, 4
cmp eax, edx
jl 0x5a1656
mov eax, dword [esp + 0x1c]
add ecx, dword [esp + 0x24]
add esi, dword [esp + 0x20]
inc eax
mov dword [esp + 0x1c], eax
cmp eax, dword [edi + 0x34]
jl 0x5a1650
mov eax, dword [edi]
mov edx, dword [eax + 0xfc]
mov ecx, edi
call edx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
mov edx, dword [eax + 0xf8]
call edx
test al, al
jne 0x5a16c9
push 0x640ce8
call fcn.00422d30
mov eax, dword [ebx]
mov edx, dword [eax + 0xfc]
add esp, 4
mov ecx, ebx
call edx
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov eax, dword [ebp + 0x18]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x30], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x34], edx
mov edx, dword [eax + 0xc]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], edx
lea edx, [ebx + 0x1c]
lea ecx, [esp + 0x30]
lea edi, [ebp + 0x14]
lea esi, [ebp + 0x10]
call fcn.005a0210
test al, al
je 0x5a18e2
fld dword [esp + 0x38]
fsub dword [esp + 0x30]
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
call fcn.0052e550
fld dword [esp + 0x3c]
fsub dword [esp + 0x34]
mov edi, eax
mov dword [esp + 0x1c], edi
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
call fcn.0052e550
mov esi, dword [ebx + 0x18]
mov dword [esp + 0x24], eax
mov eax, dword [ebx]
mov edx, dword [eax + 0x12c]
mov ecx, ebx
call edx
fld dword [ebp + 0x14]
sub esp, 8
fstp qword [esp]
mov ebx, eax
call fcn.0040e600
fld dword [ebp + 0x10]
imul ebx, eax
fstp qword [esp]
call fcn.0040e600
mov ecx, dword [ebp + 0xc]
add ebx, eax
mov eax, dword [ecx]
mov edx, dword [eax + 0x12c]
add esp, 8
lea ebx, [esi + ebx*4]
call edx
sub eax, edi
mov edi, dword [ebp + 8]
mov edx, dword [edi]
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0x18]
mov dword [esp + 0x2c], eax
mov eax, dword [edx + 0x12c]
mov ecx, edi
call eax
fld dword [esp + 0x34]
sub esp, 8
fstp qword [esp]
mov esi, eax
call fcn.0040e600
fld dword [esp + 0x38]
imul esi, eax
fstp qword [esp]
call fcn.0040e600
mov ecx, dword [esp + 0x34]
mov edx, dword [edi]
add esi, eax
mov eax, dword [edx + 0x12c]
lea esi, [ecx + esi*4]
add esp, 8
mov ecx, edi
mov dword [esp + 0x28], 1
call eax
mov edi, eax
sub edi, dword [esp + 0x1c]
test dword [ebp + 0x1c], 0x10000000
je 0x5a181c
mov eax, dword [ebp + 0x18]
fld dword [eax + 8]
sub esp, 8
fld dword [esp + 0x38]
fld st(0)
fsub dword [eax]
fsubp st(2)
fxch st(1)
fsub qword [0x648f10]
fsubrp st(1)
fstp qword [esp]
call fcn.0040e600
mov ecx, dword [esp + 0x24]
add esp, 8
lea esi, [esi + eax*4]
mov dword [esp + 0x28], 0xffffffff
lea edi, [edi + ecx*2]
test dword [ebp + 0x1c], 0x20000000
je 0x5a1879
mov eax, dword [ebp + 0x18]
fld dword [eax + 0xc]
sub esp, 8
fld dword [esp + 0x3c]
fld st(0)
fsub dword [eax + 4]
fsubp st(2)
fxch st(1)
fsub qword [0x648f10]
fsubrp st(1)
fstp qword [esp]
call fcn.0040e600
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
mov dword [esp + 0x34], eax
mov eax, dword [edx + 0x12c]
add esp, 8
call eax
imul eax, dword [esp + 0x2c]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
lea esi, [esi + eax*4]
mov eax, dword [edx + 0x12c]
call eax
neg eax
lea edi, [edi + eax*2]
mov eax, dword [esp + 0x24]
test eax, eax
jle 0x5a18df
mov edx, dword [esp + 0x20]
lea ecx, [edi*4]
mov dword [esp + 0x24], ecx
lea ecx, [edx*4]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x2c], eax
test ecx, ecx
jle 0x5a18d1
mov edi, dword [esp + 0x28]
add edi, edi
add edi, edi
nop
mov eax, dword [esi]
and eax, 0xff000000
je 0x5a18c5
mov edx, dword [ebx]
and edx, 0xffffff
or edx, eax
mov dword [ebx], edx
add esi, edi
add ebx, 4
dec ecx
jne 0x5a18b0
mov ecx, dword [esp + 0x1c]
add esi, dword [esp + 0x24]
add ebx, dword [esp + 0x20]
dec dword [esp + 0x2c]
jne 0x5a18a3
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
mov edx, dword [eax + 0xfc]
call edx
mov eax, dword [ebx]
mov edx, dword [eax + 0xfc]
mov ecx, ebx
call edx
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 0x18