Function at 0x408460
Capabilities:
Encode data using xor

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x444a18
push eax
mov eax, 0x3714
mov dword fs:[0], esp
call fcn.00412600
push ebx
push ebp
push esi
push edi
mov eax, dword [esp + 0x3734]
xor ebx, ebx
xor edi, edi
mov dword [esp + 0x372c], ebx
mov eax, dword [eax - 8]
cdq
sub eax, edx
mov esi, eax
sar esi, 1
cmp esi, ebx
jle 0x4084ce
push ecx
mov ecx, esp
mov dword [esp + 0x14], esp
push 2
push ebx
push ecx
lea ecx, [esp + 0x3744]
call fcn.00423732
call fcn.00406630
add esp, 4
mov byte [esp + edi + 0x14], al
inc edi
add ebx, 2
cmp edi, esi
jl 0x4084a3
cmp esi, 0x17d
jge 0x4084e4
push ecx
mov ecx, esp
mov dword [esp + 0x14], esp
push str.Decrypt_CAS_data_failed_0x0101__
jmp 0x40850e
lea edx, [esi - 0x21]
lea eax, [esp + 0x14]
push edx
push eax
push 0xff
call fcn.00406810
mov cl, byte [esp + esi - 1]
add esp, 0xc
cmp cl, al
je 0x408539
push ecx
mov ecx, esp
mov dword [esp + 0x14], esp
push str.Decrypt_CAS_data_failed_0x0102__
call fcn.004260b2
call fcn.00407600
add esp, 4
lea ecx, [esp + 0x3734]
mov dword [esp + 0x372c], 0xffffffff
call fcn.00426044
xor eax, eax
jmp 0x4086c8
mov cl, byte [esp + 0x1c]
lea ebp, [esi - 0x6b]
xor cl, 0x66
mov byte [esp + 0x10], cl
mov eax, dword [esp + 0x10]
and eax, 0xff
mov dl, byte [esp + eax + 0x3d]
sub dl, 6
test cl, cl
jbe 0x408576
mov ecx, eax
lea esi, [esp + 0x3d]
mov ebx, ecx
lea edi, [esp + 0x1014]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
sub ecx, eax
je 0x408595
lea esi, [esp + eax + 0x3e]
lea edi, [esp + eax + 0x1014]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor eax, eax
test ebp, ebp
jle 0x4085b0
mov bl, byte [esp + eax + 0x1014]
xor bl, dl
mov byte [esp + eax + 0x1014], bl
inc eax
cmp eax, ebp
jl 0x40859b
mov ecx, dword [esp + 0x1014]
mov edx, dword [esp + 0x1015]
mov ebp, dword [esp + 0x3738]
mov esi, dword [esp + 0x1016]
and ecx, 0xff
and edx, 0xff
shl ecx, 8
add ecx, edx
push 0x45e1d0
mov dword [ebp], ecx
lea ecx, [ebp + 4]
and esi, 0xff
mov ebx, 3
call fcn.004261cd
test esi, esi
jle 0x408616
xor edi, edi
lea ebx, [esi + 3]
mov al, byte [esp + edi + 0x1017]
lea ecx, [ebp + 4]
push eax
call fcn.004263d3
inc edi
cmp edi, esi
jl 0x408601
lea esi, [esp + ebx + 0x1014]
lea edi, [ebp + 8]
mov ecx, 0x40
add ebx, 0x100
rep movsd dword es:[edi], dword [esi]
mov cl, byte [ebp + 0xa]
xor eax, eax
mov al, byte [esp + ebx + 0x1014]
mov byte [0x45831c], cl
mov dl, byte [ebp + 0xb]
inc ebx
xor ecx, ecx
mov byte [0x45831d], dl
mov cl, byte [esp + ebx + 0x1014]
inc ebx
xor edx, edx
mov dword [ebp + 0x108], eax
mov dl, byte [esp + ebx + 0x1014]
inc ebx
xor eax, eax
mov dword [ebp + 0x10c], ecx
mov al, byte [esp + ebx + 0x1014]
inc ebx
xor ecx, ecx
mov dword [ebp + 0x110], edx
mov cl, byte [esp + ebx + 0x1014]
inc ebx
xor edx, edx
mov dword [ebp + 0x114], eax
mov dl, byte [esp + ebx + 0x1014]
xor eax, eax
mov al, byte [esp + ebx + 0x1015]
mov dword [ebp + 0x118], ecx
shl edx, 8
add edx, eax
lea ecx, [esp + 0x3734]
mov dword [ebp + 0x11c], edx
mov dword [esp + 0x372c], 0xffffffff
call fcn.00426044
mov eax, 1
mov ecx, dword [esp + 0x3724]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x3720
ret