Function at 0x40e339
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
cmp byte [ebp + 0x10], 0
push ebx
push esi
push edi
je 0x40e35a
push 0x40
push dword [ebp + 0xc]
mov ebx, 0x4228a0
push ebx
call fcn.0040ac4a
jmp 0x40e35d
mov ebx, dword [ebp + 0xc]
cmp byte [0x422898], 0
jne 0x40e3b2
xor ecx, ecx
mov esi, 0x42225c
lea eax, [ecx + 1]
cdq
push 5
pop edi
idiv edi
lea eax, [ecx + 2]
mov dword [esi - 4], ecx
mov dword [esi], edx
cdq
idiv edi
lea eax, [ecx + 3]
add esi, 0x14
mov dword [esi - 0x10], edx
cdq
idiv edi
lea eax, [ecx + 4]
mov dword [esi - 0xc], edx
cdq
idiv edi
mov dword [esi - 8], edx
test ecx, ecx
je 0x40e3a0
dec ecx
jmp 0x40e3a3
push 4
pop ecx
cmp esi, 0x42289c
jl 0x40e36d
mov byte [0x422898], 1
mov esi, dword [ebp + 8]
push 5
pop ecx
lea edi, [ebp - 0x24]
rep movsd dword es:[edi], dword [esi]
mov eax, 0x422264
mov dword [ebp + 0x10], ebx
mov esi, dword [ebp + 0x10]
mov edx, dword [esi]
mov ecx, edx
ror ecx, 8
and ecx, 0xff00ff00
rol edx, 8
and edx, 0xff00ff
or ecx, edx
mov dword [esi], ecx
mov esi, dword [eax - 8]
mov edx, dword [eax]
mov edx, dword [ebp + edx*4 - 0x24]
mov edi, dword [eax - 4]
mov edi, dword [ebp + edi*4 - 0x24]
add dword [ebp + 0x10], 4
lea esi, [ebp + esi*4 - 0x24]
mov dword [ebp + 0xc], esi
mov esi, dword [eax + 4]
lea esi, [ebp + esi*4 - 0x24]
xor edi, edx
mov dword [ebp - 8], esi
mov esi, dword [eax - 0xc]
mov esi, dword [ebp + esi*4 - 0x24]
mov dword [ebp - 4], edx
mov edx, dword [ebp + 0xc]
and edi, dword [edx]
rol esi, 5
xor edi, dword [ebp - 4]
add esi, ecx
mov ecx, dword [ebp - 8]
lea edx, [edi + esi + 0x5a827999]
add dword [ecx], edx
mov ecx, dword [ebp + 0xc]
ror dword [ecx], 2
add eax, 0x14
mov edx, 0x4223a4
cmp eax, edx
jl 0x40e3c5
mov dword [ebp + 0x10], 0x10
mov eax, dword [ebp + 0x10]
lea ecx, [eax - 3]
and eax, 0xf
lea esi, [ebx + eax*4]
lea eax, [ecx - 5]
and eax, 0xf
mov eax, dword [ebx + eax*4]
lea edi, [ecx + 5]
and edi, 0xf
xor eax, dword [ebx + edi*4]
and ecx, 0xf
xor eax, dword [ebx + ecx*4]
xor eax, dword [esi]
rol eax, 1
mov dword [esi], eax
mov esi, dword [edx - 8]
mov ecx, dword [edx]
mov ecx, dword [ebp + ecx*4 - 0x24]
mov edi, dword [edx - 4]
mov edi, dword [ebp + edi*4 - 0x24]
lea esi, [ebp + esi*4 - 0x24]
mov dword [ebp + 0xc], esi
mov esi, dword [edx + 4]
lea esi, [ebp + esi*4 - 0x24]
xor edi, ecx
mov dword [ebp - 4], esi
mov esi, dword [edx - 0xc]
mov esi, dword [ebp + esi*4 - 0x24]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp + 0xc]
and edi, dword [ecx]
rol esi, 5
xor edi, dword [ebp - 8]
add esi, eax
mov eax, dword [ebp - 4]
lea ecx, [edi + esi + 0x5a827999]
add dword [eax], ecx
mov eax, dword [ebp + 0xc]
ror dword [eax], 2
inc dword [ebp + 0x10]
add edx, 0x14
mov eax, 0x4223f4
cmp edx, eax
jl 0x40e445
mov dword [ebp + 0x10], 0x14
mov edx, eax
mov eax, dword [ebp + 0x10]
lea ecx, [eax - 3]
and eax, 0xf
lea esi, [ebx + eax*4]
lea eax, [ecx - 5]
lea edi, [ecx + 5]
and eax, 0xf
mov eax, dword [ebx + eax*4]
and ecx, 0xf
and edi, 0xf
xor eax, dword [ebx + edi*4]
xor eax, dword [ebx + ecx*4]
xor eax, dword [esi]
rol eax, 1
mov dword [esi], eax
mov ecx, dword [edx - 8]
mov edi, dword [edx]
lea ecx, [ebp + ecx*4 - 0x24]
mov dword [ebp + 0xc], ecx
mov ecx, dword [edx + 4]
lea ecx, [ebp + ecx*4 - 0x24]
mov dword [ebp - 4], ecx
mov ecx, dword [edx - 0xc]
mov esi, dword [ebp + ecx*4 - 0x24]
mov ecx, dword [edx - 4]
mov ecx, dword [ebp + ecx*4 - 0x24]
xor ecx, dword [ebp + edi*4 - 0x24]
rol esi, 5
mov edi, ecx
mov ecx, dword [ebp + 0xc]
xor edi, dword [ecx]
add esi, eax
mov eax, dword [ebp - 4]
lea esi, [edi + esi + 0x6ed9eba1]
add dword [eax], esi
ror dword [ecx], 2
inc dword [ebp + 0x10]
add edx, 0x14
cmp edx, 0x422584
jl 0x40e4d7
mov ecx, 0x422580
mov dword [ebp + 0x10], 0x28
mov dword [ebp + 0xc], ecx
mov eax, dword [ebp + 0x10]
lea edx, [eax - 3]
and eax, 0xf
lea esi, [ebx + eax*4]
lea eax, [edx - 5]
and eax, 0xf
mov eax, dword [ebx + eax*4]
lea edi, [edx + 5]
and edi, 0xf
xor eax, dword [ebx + edi*4]
and edx, 0xf
xor eax, dword [ebx + edx*4]
xor eax, dword [esi]
rol eax, 1
mov dword [esi], eax
mov edx, dword [ecx - 4]
mov edi, dword [ecx + 8]
mov esi, dword [ecx]
mov esi, dword [ebp + esi*4 - 0x24]
lea edx, [ebp + edx*4 - 0x24]
lea edi, [ebp + edi*4 - 0x24]
mov dword [ebp - 0x10], edx
mov edx, dword [edx]
mov dword [ebp - 0xc], edi
mov edi, dword [ecx - 8]
mov ecx, dword [ecx + 4]
mov ecx, dword [ebp + ecx*4 - 0x24]
mov edi, dword [ebp + edi*4 - 0x24]
mov dword [ebp - 8], edx
or edx, esi
and ecx, edx
mov edx, ecx
mov ecx, dword [ebp - 8]
and ecx, esi
or edx, ecx
rol edi, 5
add edi, eax
mov eax, dword [ebp - 0xc]
lea ecx, [edx + edi - 0x70e44324]
add dword [eax], ecx
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x10]
ror dword [eax], 2
inc dword [ebp + 0x10]
add ecx, 0x14
cmp ecx, 0x422710
mov dword [ebp + 0xc], ecx
jl 0x40e561
mov dword [ebp + 0x10], 0x3c
mov edx, 0x422714
mov eax, dword [ebp + 0x10]
lea ecx, [eax - 3]
and eax, 0xf
lea esi, [ebx + eax*4]
lea eax, [ecx - 5]
lea edi, [ecx + 5]
and eax, 0xf
mov eax, dword [ebx + eax*4]
and ecx, 0xf
and edi, 0xf
xor eax, dword [ebx + edi*4]
xor eax, dword [ebx + ecx*4]
xor eax, dword [esi]
rol eax, 1
mov dword [esi], eax
mov ecx, dword [edx - 8]
mov edi, dword [edx]
lea ecx, [ebp + ecx*4 - 0x24]
mov dword [ebp + 0xc], ecx
mov ecx, dword [edx + 4]
lea ecx, [ebp + ecx*4 - 0x24]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edx - 0xc]
mov esi, dword [ebp + ecx*4 - 0x24]
mov ecx, dword [edx - 4]
mov ecx, dword [ebp + ecx*4 - 0x24]
xor ecx, dword [ebp + edi*4 - 0x24]
rol esi, 5
mov edi, ecx
mov ecx, dword [ebp + 0xc]
xor edi, dword [ecx]
add esi, eax
mov eax, dword [ebp - 0xc]
lea esi, [edi + esi - 0x359d3e2a]
add dword [eax], esi
ror dword [ecx], 2
inc dword [ebp + 0x10]
add edx, 0x14
cmp edx, 0x4228a4
jl 0x40e600
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x24]
push 5
sub ecx, eax
pop edx
mov esi, dword [ecx + eax]
add dword [eax], esi
add eax, 4
dec edx
jne 0x40e686
pop edi
pop esi
pop ebx
leave
ret 0xc