Function at 0x4084f8
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x64
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 8]
lea ecx, [esi + 1]
shr ecx, 1
mov eax, dword [edi]
mov dword [esp + 0x10], eax
call fcn.00403d5e
mov ebx, eax
movaps xmm0, xmmword [0x4ba420]
xor edx, edx
mov dword [esp + 0x14], ebx
mov eax, esi
movups xmmword [esp + 0x24], xmm0
lea ecx, [ebx + ebx]
div ecx
inc eax
mov dword [esp + 0x18], eax
lea ecx, [ebx + eax*2]
mov eax, dword [ebp + 0xc]
lea ebx, [esi + 0x20]
mov esi, dword [esp + 0x10]
add ebx, ecx
mov dword [esp + 0x20], esi
mov ecx, dword [eax + 8]
cmp ecx, 1
mov dword [esp + 0x1c], ecx
lea ecx, [esp + 0x20]
jl 0x408581
push 0
push 1
call fcn.00401cfa
push 0x4038e7
push 0
push ebx
push dword [ebp + 0xc]
lea edx, [esp + 0x38]
mov ecx, edx
call fcn.0040431d
add esp, 0x18
jmp 0x408588
mov edx, eax
call fcn.00401e56
movaps xmm0, xmmword [0x4ba420]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x34], esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x5c], esi
movups xmmword [esp + 0x38], xmm0
movaps xmm0, xmmword [0x4ba420]
movups xmmword [esp + 0x4c], xmm0
movaps xmm0, xmmword [0x4ba420]
movups xmmword [esp + 0x60], xmm0
test eax, eax
jle 0x40862c
mov esi, eax
push 0
lea eax, [esp + 0x24]
push ebx
push eax
mov edx, eax
lea ecx, [esp + 0x40]
call fcn.00403633
add esp, 0xc
lea edx, [esp + 0x34]
mov ecx, edx
push 0
push ebx
push 0
push 1
call fcn.004044ad
push 0
push ebx
lea edx, [esp + 0x4c]
lea ecx, [esp + 0x60]
call fcn.00404106
push 0
push ebx
lea edx, [esp + 0x68]
push 0
push 1
mov ecx, edx
call fcn.004044ad
push 0x4038e7
push 0
lea eax, [esp + 0x78]
lea edx, [esp + 0x50]
push ebx
push eax
mov ecx, edx
call fcn.0040431d
add esp, 0x38
sub esi, 1
jne 0x4085c2
xor esi, esi
lea eax, [esp + 0x20]
push esi
push ebx
push eax
mov edx, eax
lea ecx, [esp + 0x68]
call fcn.00403633
add esp, 0xc
mov ecx, edi
push esi
push esi
call fcn.00401cfa
mov esi, dword [esp + 0x20]
pop ecx
pop ecx
cmp esi, 1
jl 0x4086d2
lea eax, [esi*2 + 1]
mov dword [esp + 0x10], eax
push 0
push 1
lea ecx, [esp + 0x3c]
call fcn.00401cfa
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x50]
cdq
push edx
push eax
call fcn.00401cfa
push 0x4038e7
push 0
lea eax, [esp + 0x60]
lea edx, [esp + 0x4c]
push ebx
push eax
mov ecx, edx
call fcn.0040431d
xor dword [edi + 4], 1
lea eax, [esp + 0x54]
push 0x402b46
push 0
push ebx
push eax
mov edx, edi
mov ecx, edi
call fcn.0040431d
push 0
lea eax, [esp + 0x90]
mov edx, edi
push ebx
push eax
mov ecx, edi
call fcn.00403633
sub dword [esp + 0x4c], 2
add esp, 0x3c
sub esi, 1
jne 0x408662
xor dword [edi + 4], 1
xor esi, esi
push esi
push ebx
push esi
push 1
mov edx, edi
mov ecx, edi
call fcn.004044ad
push esi
lea eax, [esp + 0x34]
mov edx, edi
push ebx
push eax
mov ecx, edi
call fcn.00403633
mov edx, dword [esp + 0x30]
add esp, 0x1c
mov ecx, edi
push 1
push 0x3fffffff
call fcn.004037e0
pop ecx
pop ecx
lea ecx, [esp + 0x34]
call fcn.00401c6c
lea ecx, [esp + 0x48]
call fcn.00401c6c
lea ecx, [esp + 0x5c]
call fcn.00401c6c
cmp dword [esp + 0x1c], 1
mov esi, dword [ebp + 0x14]
jl 0x408741
mov eax, dword [ebp + 0xc]
xor dword [edi + 4], 1
mov eax, dword [eax + 4]
add eax, eax
sub esi, eax
inc esi
test esi, esi
je 0x40878b
push 6
mov edx, ebx
lea ecx, [esp + 0x24]
call fcn.00406e95
pop ecx
cmp esi, 2
je 0x40876d
push 1
push 0x3fffffff
or edx, 0xffffffff
lea ecx, [esp + 0x28]
call fcn.004037e0
pop ecx
pop ecx
push 0x402b46
push 0
push ebx
shr esi, 0x1f
lea edx, [esp + 0x2c]
push edi
mov ecx, edi
mov dword [esp + 0x34], esi
call fcn.0040431d
add esp, 0x10
lea ecx, [esp + 0x20]
call fcn.00401c6c
push 0x10
pop eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret