Function at 0x40f6a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, edx
mov dword [ebp - 0x20], eax
mov ebx, ecx
mov dword [ebp - 0x28], edi
push 0x10
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
call fcn.00416e66
mov esi, eax
add esp, 4
mov eax, dword [ebp + 0xc]
mov dword [esi + 4], 0
mov dword [esi], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
cmp eax, 2
jne 0x40f7fd
movups xmm0, xmmword [ebp - 0x3c]
xor edi, edi
movups xmmword [ebp - 0x4c], xmm0
nop dword [eax]
lea eax, [edi + 2]
mov edx, ebx
push eax
lea ecx, [ebp - 0x14]
call fcn.0040f530
movups xmm1, xmmword [ebp - 0x4c]
inc edi
add esp, 4
movups xmm0, xmmword [ebp - 0x14]
pxor xmm1, xmm0
movups xmmword [ebp - 0x4c], xmm1
movups xmmword [ebp - 0x3c], xmm1
cmp edi, 4
jl 0x40f720
push 0x10
call fcn.00416e66
mov ebx, eax
push 0x10
mov dword [ebx + 4], 0
mov dword [ebx], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
call fcn.00416e66
add esp, 8
mov dword [ebp - 0x18], eax
xor edi, edi
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
nop dword [eax]
push ebx
mov edx, 0x20
mov ecx, esi
call fcn.0040a040
mov edx, dword [ebp + edi*4 - 0x3c]
mov ecx, dword [ebp - 0x18]
call fcn.00408b70
mov edx, dword [ebp - 0x18]
mov ecx, ebx
push esi
call fcn.00408d80
inc edi
add esp, 8
cmp edi, 4
jl 0x40f7a0
mov eax, dword [ebp - 0x20]
mov ecx, esi
mov edx, dword [ebp - 0x28]
push dword [eax]
call fcn.0040a3c0
mov edi, dword [ebp - 0x18]
add esp, 4
mov eax, dword [edi + 0xc]
test eax, eax
je 0x40f7f2
push eax
call fcn.00416e4b
add esp, 4
push edi
call fcn.00416e4b
jmp 0x40f976
cmp eax, 1
jne 0x40f994
push 0x10
call fcn.00416e66
push 0x10
mov dword [ebp - 0x1c], eax
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
call fcn.00416e66
push 0x10
mov dword [ebp - 0x18], eax
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
call fcn.00416e66
mov ecx, dword [ebp - 0x24]
mov ebx, eax
add esp, 0xc
mov dword [ebp - 0x2c], ebx
mov edx, 1
mov dword [ebx + 4], 0
mov dword [ebx], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
call fcn.0040f390
mov edx, eax
mov ecx, esi
call fcn.00408b70
mov eax, dword [esi]
xor edi, edi
test eax, eax
cmovns edi, eax
mov eax, dword [ebx + 0xc]
cmp edi, dword [ebx + 4]
jge 0x40f8b1
push edi
push 0
push eax
mov dword [ebx], edi
call fcn.00414f00
add esp, 0xc
jmp 0x40f8d2
push eax
call fcn.00416e4b
push edi
mov dword [ebx + 4], edi
mov dword [ebx], edi
call fcn.00416e66
push dword [ebx]
mov dword [ebx + 0xc], eax
push 0
push eax
call fcn.00414f00
add esp, 0x14
mov eax, dword [esi + 8]
mov dword [ebx + 8], eax
push dword [esi]
push dword [esi + 0xc]
push dword [ebx + 0xc]
call fcn.00415980
xor edi, edi
add esp, 0xc
cmp dword [ebp + 0x10], edi
jle 0x40f92d
mov ebx, dword [ebp - 0x24]
push dword [ebp - 0x1c]
mov edx, 0x20
mov ecx, esi
call fcn.0040a040
lea edx, [edi + 2]
mov ecx, ebx
call fcn.0040f390
mov ecx, dword [ebp - 0x18]
mov edx, eax
call fcn.00408b70
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
push esi
call fcn.00408d80
inc edi
add esp, 8
cmp edi, dword [ebp + 0x10]
jl 0x40f8f2
mov ebx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x20]
mov edx, ebx
mov ecx, esi
push dword [eax]
push dword [ebp - 0x28]
call fcn.004099e0
mov eax, dword [ebx + 0xc]
add esp, 8
test eax, eax
je 0x40f951
push eax
call fcn.00416e4b
add esp, 4
push ebx
call fcn.00416e4b
mov ebx, dword [ebp - 0x18]
add esp, 4
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x40f96d
push eax
call fcn.00416e4b
add esp, 4
push ebx
call fcn.00416e4b
mov ebx, dword [ebp - 0x1c]
mov eax, dword [ebx + 0xc]
add esp, 4
test eax, eax
je 0x40f989
push eax
call fcn.00416e4b
add esp, 4
push ebx
call fcn.00416e4b
add esp, 4
jmp 0x40f9bb
mov edx, 1
mov ecx, ebx
call fcn.0040f390
mov edx, eax
mov ecx, esi
call fcn.00408b70
mov eax, dword [ebp - 0x20]
mov edx, esi
mov ecx, esi
push dword [eax]
push edi
call fcn.004099e0
add esp, 8
mov eax, dword [esi + 0xc]
test eax, eax
je 0x40f9cb
push eax
call fcn.00416e4b
add esp, 4
push esi
call fcn.00416e4b
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00413dc9
mov esp, ebp
pop ebp
ret