Function at 0x406e10
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x58
mov eax, dword [esp + 0xa0]
mov edi, dword [ecx + 0x48]
mov esi, dword [edi + 4]
mov dword [esp + 0x54], esi
test eax, eax
je 0x406e3e
cmp dword [edi + 0x34], 0
jne 0x406e3e
mov dword [ecx + 0x1c], 3
jmp 0x40735f
mov dword [esp + 0x44], edx
mov dword [esp + 0x50], eax
movzx eax, word [esp + 0x74]
mov edx, esi
movzx ebp, word [esp + 0x6c]
movzx ebx, ax
movzx eax, word [esp + 0x7c]
mov esi, ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 8], ebp
lea esi, [ebx + ebp]
mov ebx, eax
mov dword [esp + 0x40], eax
add esi, eax
mov eax, dword [esp + 0xac]
xor ebx, ebx
add esi, eax
setb bl
add esi, edx
adc ebx, 0
cmp esi, 0xffffffd1
sbb ebx, 0
jb 0x406e96
mov dword [ecx + 0x1c], 0xf
jmp 0x40735f
mov dword [esp + 0xc], edx
mov dword [esp + 4], edi
mov dword [esp], ecx
mov esi, dword [esp + 0x8c]
mov ebp, dword [esp + 0x84]
mov dword [esp + 0x16], 0
mov dword [esp + 0x1a], 0
mov dword [esp + 0x22], 0
mov dword [esp + 0x26], 0
mov dword [esp + 0x2a], 0
mov dword [esp + 0x2e], 0
mov dword [esp + 0x32], 0
mov word [esp + 0x36], 0
mov dword [esp + 0x1e], 0
mov dword [esp + 0x12], 0x2014b50
mov edx, dword [esp + 0x90]
movzx ecx, word [esp + 0x74]
add eax, ecx
mov dword [esp + 0x4c], eax
xor ecx, ecx
mov ebx, 0
cmp word [esp + 0x94], 0
je 0x406f24
mov bl, 0x14
mov byte [esp + 0x18], bl
movzx eax, word [esp + 0x98]
mov byte [esp + 0x1a], al
mov byte [esp + 0x1b], ah
movzx eax, word [esp + 0x94]
mov byte [esp + 0x1c], al
mov byte [esp + 0x1d], ah
mov byte [esp + 0x22], dl
mov byte [esp + 0x23], dh
mov ebx, edx
shr ebx, 0x10
mov byte [esp + 0x24], bl
shr edx, 0x18
neg esi
mov ebx, 0
sbb ebx, ebx
mov byte [esp + 0x25], dl
or ebx, dword [esp + 0x88]
mov byte [esp + 0x26], bl
mov byte [esp + 0x27], bh
mov edx, ebx
shr edx, 0x10
mov byte [esp + 0x28], dl
shr ebx, 0x18
neg ebp
mov edx, 0
sbb edx, edx
mov byte [esp + 0x29], bl
or edx, dword [esp + 0x80]
mov byte [esp + 0x2a], dl
mov byte [esp + 0x2b], dh
mov ebx, edx
shr ebx, 0x10
mov byte [esp + 0x2c], bl
shr edx, 0x18
mov byte [esp + 0x2d], dl
movzx eax, word [esp + 0x6c]
mov byte [esp + 0x2e], al
mov byte [esp + 0x2f], ah
mov eax, dword [esp + 0x4c]
mov byte [esp + 0x30], al
mov byte [esp + 0x31], ah
movzx eax, word [esp + 0x7c]
mov byte [esp + 0x32], al
mov byte [esp + 0x33], ah
mov eax, dword [esp + 0xa4]
mov byte [esp + 0x38], al
mov byte [esp + 0x39], ah
mov edx, eax
shr edx, 0x10
mov byte [esp + 0x3a], dl
shr eax, 0x18
neg dword [esp + 0x50]
sbb ecx, ecx
mov byte [esp + 0x3b], al
or ecx, dword [esp + 0x9c]
mov byte [esp + 0x3c], cl
mov byte [esp + 0x3d], ch
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x3e], al
shr ecx, 0x18
mov byte [esp + 0x3f], cl
mov eax, dword [esp + 0xc]
lea edi, [eax + 0x2e]
mov ebp, dword [esp + 4]
mov eax, dword [ebp + 8]
cmp eax, edi
jae 0x40705e
cmp eax, 1
adc eax, 0
cmp edi, 2
jb 0x407063
mov esi, eax
nop
nop
nop
nop
nop
nop
nop
mov ecx, eax
or ecx, 2
and esi, 2
imul ecx, esi
and eax, 0xfffffffd
xor esi, 2
imul esi, eax
add esi, ecx
mov eax, esi
cmp esi, edi
jb 0x407040
jmp 0x407065
mov eax, dword [ebp]
jmp 0x407087
mov esi, eax
push esi
push dword [ebp + 0xc]
push dword [ebp]
mov eax, dword [esp + 0xc]
push dword [eax + 0x34]
call dword [eax + 0x30]
add esp, 0x10
test eax, eax
je 0x40732f
mov dword [ebp], eax
mov dword [ebp + 8], esi
mov dword [ebp + 4], edi
mov ecx, dword [ebp + 0xc]
imul edx, ecx, 0x2e
imul ecx, dword [esp + 0xc]
add ecx, eax
lea eax, [esp + 0x12]
push edx
push eax
push ecx
call fcn.00409540
add esp, 0xc
mov edi, dword [ebp + 4]
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 8]
lea ebx, [edi + ecx]
cmp eax, ebx
jae 0x4070ee
cmp eax, 1
adc eax, 0
cmp ebx, 2
jb 0x4070fa
mov esi, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, eax
or ecx, 2
and esi, 2
imul ecx, esi
and eax, 0xfffffffd
xor esi, 2
imul esi, eax
add esi, ecx
mov eax, esi
cmp esi, ebx
jb 0x4070d0
jmp 0x4070fc
mov esi, eax
mov ecx, dword [esp + 0x44]
mov ebp, dword [esp + 4]
jmp 0x407126
mov esi, eax
push esi
mov ebp, dword [esp + 8]
push dword [ebp + 0xc]
push dword [ebp]
mov eax, dword [esp + 0xc]
push dword [eax + 0x34]
call dword [eax + 0x30]
add esp, 0x10
test eax, eax
je 0x40732f
mov dword [ebp], eax
mov dword [ebp + 8], esi
mov ecx, dword [esp + 0x44]
mov dword [ebp + 4], ebx
cmp word [esp + 0x6c], 0
je 0x407152
mov eax, dword [ebp + 0xc]
imul edi, eax
add edi, dword [ebp]
mov edx, dword [esp + 8]
imul edx, eax
push edx
push ecx
push edi
call fcn.00409540
add esp, 0xc
mov ebx, dword [ebp + 4]
mov esi, dword [ebp + 8]
mov eax, dword [esp + 0x48]
lea edx, [ebx + eax]
cmp esi, edx
jae 0x40718e
cmp esi, 1
adc esi, 0
cmp edx, 2
jb 0x40719b
mov edi, esi
nop
nop
nop
nop
nop
nop
mov eax, esi
or eax, 2
and edi, 2
imul eax, edi
and esi, 0xfffffffd
xor edi, 2
imul edi, esi
add edi, eax
mov esi, edi
cmp edi, edx
jb 0x407170
jmp 0x40719d
mov edi, esi
mov ebp, dword [esp + 4]
movzx eax, word [esp + 0x74]
jmp 0x4071cc
mov edi, esi
mov esi, edx
push edi
mov ebp, dword [esp + 8]
push dword [ebp + 0xc]
push dword [ebp]
mov eax, dword [esp + 0xc]
push dword [eax + 0x34]
call dword [eax + 0x30]
add esp, 0x10
test eax, eax
je 0x40732f
mov dword [ebp], eax
mov dword [ebp + 8], edi
movzx eax, word [esp + 0x74]
mov edx, esi
mov dword [ebp + 4], edx
test ax, ax
je 0x4071f8
mov eax, dword [ebp + 0xc]
imul ebx, eax
add ebx, dword [ebp]
mov ecx, dword [esp + 0x48]
imul ecx, eax
push ecx
push dword [esp + 0x74]
push ebx
call fcn.00409540
add esp, 0xc
mov edx, dword [ebp + 4]
mov edi, dword [ebp + 8]
mov eax, dword [esp + 0xac]
lea ebx, [edx + eax]
cmp edi, ebx
jae 0x40723e
cmp edi, 1
adc edi, 0
cmp ebx, 2
mov dword [esp + 8], edx
jb 0x407246
mov esi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, edi
or eax, 2
and esi, 2
imul eax, esi
and edi, 0xfffffffd
xor esi, 2
imul esi, edi
add esi, eax
mov edi, esi
cmp esi, ebx
jb 0x407220
jmp 0x407248
mov esi, edi
mov ebp, dword [esp + 4]
jmp 0x407279
mov esi, edi
push esi
mov ebp, dword [esp + 8]
push dword [ebp + 0xc]
push dword [ebp]
mov eax, dword [esp + 0xc]
push dword [eax + 0x34]
call dword [eax + 0x30]
add esp, 0x10
test eax, eax
je 0x40732f
mov dword [ebp], eax
mov dword [ebp + 8], esi
mov eax, dword [esp + 0xac]
mov edx, dword [esp + 8]
mov dword [ebp + 4], ebx
test eax, eax
je 0x4072a5
mov ecx, eax
mov eax, dword [ebp + 0xc]
imul edx, eax
add edx, dword [ebp]
imul ecx, eax
push ecx
push dword [esp + 0xac]
push edx
call fcn.00409540
add esp, 0xc
mov ebx, dword [ebp + 4]
mov esi, dword [ebp + 8]
mov eax, dword [esp + 0x40]
lea edi, [ebx + eax]
cmp esi, edi
jae 0x4072c4
mov ecx, dword [esp]
mov edx, ebp
push 1
push edi
call fcn.00409460
add esp, 8
test eax, eax
je 0x40732f
mov dword [ebp + 4], edi
cmp word [esp + 0x7c], 0
je 0x4072ed
mov eax, dword [ebp + 0xc]
imul ebx, eax
add ebx, dword [ebp]
mov ecx, dword [esp + 0x40]
imul ecx, eax
push ecx
push dword [esp + 0x7c]
push ebx
call fcn.00409540
add esp, 0xc
mov esi, dword [ebp + 0x14]
lea edi, [esi + 1]
cmp dword [ebp + 0x18], edi
jae 0x40730d
lea edx, [ebp + 0x10]
mov ecx, dword [esp]
push 1
push edi
call fcn.00409460
add esp, 8
test eax, eax
je 0x40732f
mov dword [ebp + 0x14], edi
mov eax, dword [ebp + 0x1c]
imul esi, eax
add esi, dword [ebp + 0x10]
lea ecx, [esp + 0x54]
push eax
push ecx
push esi
call fcn.00409540
add esp, 0xc
mov eax, 1
jmp 0x407361
mov edi, dword [esp + 0xc]
cmp dword [ebp + 8], edi
mov esi, dword [esp]
jae 0x407355
push edi
push dword [ebp + 0xc]
push dword [ebp]
push dword [esi + 0x34]
call dword [esi + 0x30]
add esp, 0x10
test eax, eax
je 0x407358
mov dword [ebp], eax
mov dword [ebp + 8], edi
mov dword [ebp + 4], edi
mov dword [esi + 0x1c], 0x10
xor eax, eax
add esp, 0x58
pop esi
pop edi
pop ebx
pop ebp
ret