Function at 0x408a90
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x138
push ebx
mov ebx, dword [esp + 0x158]
push ebp
push esi
mov eax, dword [ebx]
push edi
add eax, 0x44
push eax
call fcn.00422840
mov edx, dword [esp + 0x16c]
add esp, 4
test edx, edx
mov ebp, eax
je 0x408b01
mov eax, dword [edx]
cmp eax, 0x20
jge 0x408af7
mov esi, dword [edx + 4]
mov ecx, eax
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x20
lea edi, [eax + ebp]
sub ecx, eax
mov esi, 0x45c420
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]
jmp 0x408b0f
mov esi, dword [edx + 4]
mov ecx, 8
jmp 0x408b0b
mov ecx, 8
mov esi, 0x45c420
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov edx, dword [esp + 0x158]
mov eax, dword [esp + 0x160]
lea edi, [ebp + 0x20]
mov ecx, 8
mov esi, dword [edx + 4]
mov edx, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov byte [ebp + 0x40], al
sar ecx, 8
sar edx, 0x10
sar eax, 0x18
mov byte [ebp + 0x41], cl
mov byte [ebp + 0x42], dl
mov byte [ebp + 0x43], al
mov ecx, dword [ebx]
mov esi, dword [ebx + 4]
mov eax, ecx
lea edi, [ebp + 0x44]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx]
mov esi, dword [esp + 0x16c]
add ecx, 0x44
push esi
push ecx
push ebp
call fcn.00408e30
mov eax, dword [esp + 0x15c]
add esp, 0xc
cmp eax, 3
jne 0x408bba
mov edi, 0x32
push esi
push 0x10
push esi
call fcn.00408e30
add esp, 0xc
dec edi
jne 0x408b81
mov edx, dword [esp + 0x15c]
mov ebx, dword [esp + 0x154]
mov ecx, 8
lea edi, [esp + 0x18]
mov esi, dword [edx + 4]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x13
mov dword [esp + 0x14], ecx
jmp 0x408c3e
cmp eax, 2
jne 0x408cf8
mov eax, dword [esp + 0x154]
lea edx, [esp + 0x48]
push edx
push eax
push esi
call fcn.00408d10
mov edi, dword [esp + 0x168]
add esp, 0xc
mov byte [esp + 0x12], 0
mov byte [esp + 0x13], 0
xor esi, esi
mov ecx, dword [edi + 4]
mov dl, byte [ecx + esi]
lea ecx, [esp + 0x12]
mov byte [esp + 0x14], dl
lea edx, [esp + 0x13]
mov eax, dword [esp + 0x14]
push eax
push ecx
lea eax, [esp + 0x50]
push edx
push eax
call fcn.00408d90
add esp, 0x10
mov byte [esp + esi + 0x18], al
inc esi
cmp esi, 0x20
jl 0x408bec
mov ecx, 8
mov edi, 0x45c420
lea esi, [esp + 0x18]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
mov eax, edx
sete al
mov esi, eax
jmp 0x408cfa
mov ecx, dword [esp + 0x14]
xor eax, eax
test ebx, ebx
jle 0x408c61
mov edi, dword [esp + 0x16c]
lea edx, [esp + 0x38]
sub edi, edx
lea esi, [esp + eax + 0x38]
mov dl, byte [edi + esi]
xor dl, cl
inc eax
cmp eax, ebx
mov byte [esi], dl
jl 0x408c51
lea eax, [esp + 0x48]
lea ecx, [esp + 0x38]
push eax
push ebx
push ecx
call fcn.00408d10
add esp, 0xc
mov byte [esp + 0x12], 0
mov byte [esp + 0x13], 0
xor esi, esi
mov dl, byte [esp + esi + 0x18]
lea eax, [esp + 0x12]
push edx
lea ecx, [esp + 0x17]
push eax
lea edx, [esp + 0x50]
push ecx
push edx
call fcn.00408d90
add esp, 0x10
mov byte [esp + esi + 0x18], al
inc esi
cmp esi, 0x20
jl 0x408c80
mov eax, dword [esp + 0x14]
dec eax
mov dword [esp + 0x14], eax
jns 0x408c3a
mov eax, dword [esp + 0x164]
mov ecx, 8
mov esi, 0x45c420
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [eax]
mov esi, dword [eax + 4]
mov edx, ecx
lea edi, [ebp + 0x20]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [eax]
add eax, 0x20
push eax
push ebp
call fcn.00408e30
add esp, 0xc
mov ecx, 4
mov edi, ebp
jmp 0x408c26
xor esi, esi
push ebp
call fcn.004228e0
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x138
ret