Function at 0x40ed40
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52b7c1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ebx
sub esp, 0x288
push esi
mov esi, ecx
xorps xmm0, xmm0
mov dword [ebp - 0x84], esi
mov dword [ebp - 0x34], 0
push edi
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
mov byte [esi], 0
push 0x104
lea eax, [ebp - 0x190]
mov dword [ebp - 4], 0
push 0
push eax
mov dword [ebp - 0x34], 1
call fcn.00506f10
add esp, 0xc
lea eax, [ebp - 0x190]
push 0x104
push eax
call dword [0x5380c4]
test eax, eax
je 0x40f2f0
xorps xmm0, xmm0
mov word [ebp - 0x50], 0x8aec
mov byte [ebp - 0x4e], 0xed
xor ecx, ecx
movups xmmword [ebp - 0x4d], xmm0
mov dword [ebp - 0x3d], 0
mov word [ebp - 0x39], 0
mov byte [ebp - 0x37], 0
nop word [eax + eax]
lea eax, [ecx - 0x51]
xor byte [ebp + ecx - 0x50], al
inc ecx
cmp ecx, 3
jb 0x40ee10
mov dword [0x565590], ecx
xorps xmm0, xmm0
lea ecx, [ebp - 0x50]
mov byte [ebp - 0x4d], 0
movups xmmword [ebp - 0x30], xmm0
mov dword [ebp - 0x20], 0
lea edx, [ecx + 1]
mov dword [ebp - 0x1c], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ee42
sub ecx, edx
lea eax, [ebp - 0x50]
push ecx
push eax
lea ecx, [ebp - 0x30]
call fcn.00402c40
mov dword [ebp - 0x34], 3
mov dword [ebp - 4], 1
lea edx, [ebp - 0x30]
cmp dword [ebp - 0x1c], 0x10
xorps xmm0, xmm0
movups xmmword [ebp - 0x74], xmm0
cmovae edx, dword [ebp - 0x30]
mov ecx, edx
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0
lea edi, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ee90
sub ecx, edi
push ecx
push edx
lea ecx, [ebp - 0x74]
call fcn.00402c40
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x1c]
cmp ecx, 0x10
jb 0x40eedb
mov edx, dword [ebp - 0x30]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40eed1
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f30f
push ecx
push edx
call fcn.00504f31
add esp, 8
xorps xmm0, xmm0
mov byte [ebp - 0x2f], 0x95
movups xmmword [ebp - 0x2e], xmm0
mov dword [ebp - 0x1e], 0
xor ecx, ecx
mov word [ebp - 0x1a], 0
mov byte [ebp - 0x18], 0
nop dword [eax]
lea eax, [ecx - 0x51]
xor byte [ebp + ecx - 0x2f], al
inc ecx
cmp ecx, 1
jb 0x40ef00
mov dword [0x565620], ecx
xorps xmm0, xmm0
lea ecx, [ebp - 0x2f]
mov byte [ebp - 0x2e], 0
movups xmmword [ebp - 0x50], xmm0
mov dword [ebp - 0x40], 0
lea edx, [ecx + 1]
mov dword [ebp - 0x3c], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ef32
sub ecx, edx
lea eax, [ebp - 0x2f]
push ecx
push eax
lea ecx, [ebp - 0x50]
call fcn.00402c40
mov edi, 7
mov dword [ebp - 0x34], edi
mov byte [ebp - 4], 4
lea edx, [ebp - 0x50]
cmp dword [ebp - 0x3c], 0x10
xorps xmm0, xmm0
cmovae edx, dword [ebp - 0x50]
sub esp, 0x18
mov eax, esp
mov dword [ebp - 0x5c], esp
mov ecx, edx
mov dword [ebp - 0x14], eax
movups xmmword [eax], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0
lea eax, [ecx + 1]
mov dword [ebp - 0x54], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ef86
sub ecx, dword [ebp - 0x54]
push ecx
mov ecx, dword [ebp - 0x14]
push edx
call fcn.00402c40
sub esp, 0x18
mov byte [ebp - 4], 5
mov edx, esp
lea ecx, [ebp - 0x190]
xorps xmm0, xmm0
lea eax, [ecx + 1]
mov dword [ebp - 0x14], eax
movups xmmword [edx], xmm0
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40efc3
sub ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x190]
push ecx
push eax
mov ecx, edx
call fcn.00402c40
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], 4
call fcn.0040e4f0
add esp, 0x30
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x3c]
cmp ecx, 0x10
jb 0x40f023
mov edx, dword [ebp - 0x50]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40f019
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f30f
push ecx
push edx
call fcn.00504f31
add esp, 8
mov ecx, dword [ebp - 0x7c]
mov eax, 0x2aaaaaab
sub ecx, dword [ebp - 0x80]
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x40f189
xorps xmm0, xmm0
mov word [ebp - 0x30], 0xec95
movups xmmword [ebp - 0x2e], xmm0
mov dword [ebp - 0x1e], 0
xor ecx, ecx
mov word [ebp - 0x1a], 0
mov byte [ebp - 0x18], 0
lea eax, [ecx - 0x51]
xor byte [ebp + ecx - 0x30], al
inc ecx
cmp ecx, 2
jb 0x40f060
mov dword [0x565598], ecx
xorps xmm0, xmm0
lea ecx, [ebp - 0x30]
mov byte [ebp - 0x2e], 0
movups xmmword [ebp - 0x50], xmm0
mov dword [ebp - 0x40], 0
lea edx, [ecx + 1]
mov dword [ebp - 0x3c], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40f092
sub ecx, edx
lea eax, [ebp - 0x30]
push ecx
push eax
lea ecx, [ebp - 0x50]
call fcn.00402c40
mov dword [ebp - 0x34], 0xf
mov byte [ebp - 4], 8
lea edi, [ebp - 0x50]
cmp dword [ebp - 0x3c], 0x10
mov edx, dword [ebp - 0x80]
cmovae edi, dword [ebp - 0x50]
mov ecx, edi
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x54], eax
lea eax, [ecx + 1]
mov dword [ebp - 0x14], eax
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40f0d0
sub ecx, dword [ebp - 0x14]
mov eax, 0x7fffffff
sub eax, dword [ebp - 0x54]
cmp eax, ecx
jb 0x40f305
cmp dword [edx + 0x14], 0x10
jb 0x40f0f2
mov edx, dword [edx]
push ecx
push edi
push dword [ebp - 0x54]
push edx
push ecx
push dword [ebp - 0x5c]
lea ecx, [ebp - 0x30]
call fcn.004946d0
mov ecx, dword [ebp - 0x60]
mov edi, 0x1f
mov dword [ebp - 0x34], edi
cmp ecx, 0x10
jb 0x40f13f
mov edx, dword [ebp - 0x74]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40f135
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, edi
ja 0x40f30f
push ecx
push edx
call fcn.00504f31
add esp, 8
movups xmm0, xmmword [ebp - 0x30]
movups xmmword [ebp - 0x74], xmm0
movq xmm0, qword [ebp - 0x20]
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x3c]
movq qword [ebp - 0x64], xmm0
cmp ecx, 0x10
jb 0x40f189
mov edx, dword [ebp - 0x50]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40f17f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f30f
push ecx
push edx
call fcn.00504f31
add esp, 8
cmp dword [ebp - 0x60], 0x10
lea ecx, [ebp - 0x58]
push 0
push 0
push 0
push 0
push ecx
push 0
lea eax, [ebp - 0x74]
mov dword [ebp - 0x58], 0
cmovae eax, dword [ebp - 0x74]
push 0
push eax
call dword [0x538050]
test eax, eax
je 0x40f2b8
push 0x104
lea eax, [ebp - 0x298]
push 0
push eax
call fcn.00506f10
mov eax, dword [ebp - 0x58]
xorps xmm0, xmm0
add esp, 0xc
mov dword [ebp - 0x14], eax
mov word [ebp - 0x30], 0xe88a
xor ecx, ecx
movups xmmword [ebp - 0x2e], xmm0
mov dword [ebp - 0x1e], 0
mov word [ebp - 0x1a], 0
mov byte [ebp - 0x18], 0
lea eax, [ecx - 0x51]
xor byte [ebp + ecx - 0x30], al
inc ecx
cmp ecx, 2
jb 0x40f1f6
mov dword [0x565598], ecx
xorps xmm0, xmm0
lea ecx, [ebp - 0x30]
mov byte [ebp - 0x2e], 0
movups xmmword [ebp - 0x50], xmm0
mov dword [ebp - 0x40], 0
lea edx, [ecx + 1]
mov dword [ebp - 0x3c], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40f228
sub ecx, edx
lea eax, [ebp - 0x30]
push ecx
push eax
lea ecx, [ebp - 0x50]
call fcn.00402c40
push dword [ebp - 0x14]
or edi, 0x20
lea eax, [ebp - 0x50]
cmp dword [ebp - 0x3c], 0x10
mov dword [ebp - 0x34], edi
cmovae eax, dword [ebp - 0x50]
push eax
lea eax, [ebp - 0x298]
push eax
call fcn.00403150
mov ecx, dword [ebp - 0x3c]
add esp, 0xc
cmp ecx, 0x10
jb 0x40f296
mov edx, dword [ebp - 0x50]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40f28c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f30a
push ecx
push edx
call fcn.00504f31
add esp, 8
lea ecx, [ebp - 0x298]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40f2a0
sub ecx, edx
lea eax, [ebp - 0x298]
push ecx
push eax
mov ecx, esi
call fcn.0048c8a0
lea ecx, [ebp - 0x80]
call fcn.0048eeb0
mov ecx, dword [ebp - 0x60]
cmp ecx, 0x10
jb 0x40f2f0
mov edx, dword [ebp - 0x74]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40f2e6
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f30f
push ecx
push edx
call fcn.00504f31
add esp, 8
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.004024b0
call fcn.0050a1d0
call fcn.0050a1d0
int3