Function at 0x406eca
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x880
mov eax, dword [0x443620]
xor eax, esp
mov dword [esp + 0x87c], eax
mov eax, dword [esp + 0x88c]
mov edx, dword [esp + 0x888]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x890]
push ebx
mov dword [esp + 4], eax
xor ebx, ebx
cmp dword [esp + 0x89c], 0x18
mov eax, dword [esp + 0x898]
push esi
mov esi, dword [esp + 0x8a8]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x8a4]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], esi
jbe 0x406f5b
test eax, eax
je 0x406f42
push 0x20
push ebx
push eax
call fcn.00421ea0
add esp, 0xc
test esi, esi
je 0x407153
push 8
push ebx
push esi
call fcn.00421ea0
add esp, 0xc
jmp 0x407153
push ebp
push edi
mov ebp, ebx
lea edi, [ecx + 0xf4]
push edx
mov ecx, edi
call fcn.00410f67
test al, al
je 0x406f93
mov eax, dword [esp + 0x8a8]
lea ecx, [edi + 0x10]
cmp dword [ecx + 0x30], eax
jne 0x406f93
push 0x10
push dword [esp + 0x14]
push ecx
call fcn.00422432
add esp, 0xc
test eax, eax
je 0x406fa5
inc ebp
add edi, 0x84
cmp ebp, 4
jae 0x406ff0
mov edx, dword [esp + 0x14]
jmp 0x406f65
push 0x20
pop ebp
push ebp
lea eax, [edi + 0x20]
push eax
lea eax, [esp + 0x34]
push eax
call fcn.00423ab0
add esp, 0xc
lea eax, [esp + 0x2c]
push ebx
push ebx
push ebp
push eax
call fcn.004110bb
push ebp
lea eax, [edi + 0x44]
push eax
lea eax, [esp + 0x54]
push eax
call fcn.00423ab0
push ebp
lea eax, [edi + 0x64]
push eax
lea eax, [esp + 0x80]
push eax
call fcn.00423ab0
add esp, 0x18
jmp 0x4070da
mov edi, 0x800
lea eax, [esp + 0x8c]
push edi
push eax
push dword [esp + 0x24]
call fcn.00413d0d
mov ebp, dword [esp + 0x8a8]
xor eax, eax
mov esi, dword [esp + 0x10]
inc eax
mov ecx, ebp
shl eax, cl
push eax
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x38]
push eax
push 0x10
lea eax, [esp + 0xa0]
push esi
push eax
call fcn.00429db0
pop ecx
push eax
lea eax, [esp + 0xa8]
push eax
call fcn.00407435
push edi
lea eax, [esp + 0x90]
push eax
call fcn.004111aa
mov edx, dword [esp + 0x18]
push dword [esp + 0x14]
mov ecx, dword [edx + 0x304]
lea edi, [edx + 0xf4]
mov eax, ecx
and eax, 3
imul eax, eax, 0x84
add edi, eax
lea eax, [ecx + 1]
mov dword [edx + 0x304], eax
mov ecx, edi
mov dword [edi + 0x40], ebp
call fcn.004069b9
push 0x10
lea eax, [edi + 0x10]
push esi
push eax
call fcn.00423ab0
push 0x20
pop ebp
push ebp
lea eax, [esp + 0x3c]
push eax
lea esi, [edi + 0x20]
push esi
call fcn.00423ab0
push ebp
lea eax, [esp + 0x68]
push eax
lea eax, [edi + 0x44]
push eax
call fcn.00423ab0
push ebp
lea eax, [esp + 0x94]
push eax
lea eax, [edi + 0x64]
push eax
call fcn.00423ab0
add esp, 0x30
push ebx
push 1
push ebp
push esi
call fcn.004110bb
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4070f1
push ebp
lea ecx, [esp + 0x70]
push ecx
push eax
call fcn.00423ab0
add esp, 0xc
test esi, esi
je 0x40711d
push 8
push ebx
push esi
call fcn.00421ea0
add esp, 0xc
mov al, byte [esp + ebx + 0x4c]
mov ecx, ebx
and ecx, 7
xor byte [ecx + esi], al
inc ebx
cmp ebx, ebp
jb 0x407101
push ebp
lea eax, [esp + 0x50]
push eax
call fcn.004111aa
mov eax, dword [esp + 0x28]
test eax, eax
je 0x407146
mov ecx, dword [esp + 0x18]
push eax
push 0x100
lea eax, [esp + 0x34]
add ecx, 0x30c
push eax
push dword [esp + 0x8a0]
call fcn.00410560
push ebp
lea eax, [esp + 0x30]
push eax
call fcn.004111aa
pop edi
pop ebp
mov ecx, dword [esp + 0x884]
pop esi
pop ebx
xor ecx, esp
call fcn.00420983
add esp, 0x880
ret 0x20