Function at 0x40c120
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
mov eax, dword [0x6466d0]
mov ecx, dword [esp + 0x48]
push ebx
mov bx, word [0x646690]
mov eax, dword [eax + 0x66c0]
mov dword [esp + 8], eax
movzx eax, word [0x646664]
push ebp
mov ebp, dword [esp + 0x44]
push esi
mov esi, 0xffff
add word [0x6466a0], si
inc bx
mov word [0x646690], bx
movzx edx, bx
add bx, si
mov esi, dword [0x6466a4]
push edi
mov edi, dword [0x6466b0]
xor eax, dword [ecx + edx*8]
add edx, edx
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x18], eax
mov eax, dword [0x646658]
mov ecx, dword [ecx]
mov eax, dword [eax + edx*8 + 0x1c]
xor edx, edx
div dword [ebp + ecx*4]
mov cl, byte [0x646682]
movzx edx, cl
dec cl
mov byte [0x646682], cl
mov dword [esp + 0x24], eax
mov word [0x646690], bx
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x44]
mov ecx, dword [edx]
add edx, 4
mov dword [esp + 0x44], edx
mov al, byte [ebp + ecx*4]
mov ecx, 0xffff
xor al, byte [0x646666]
mov byte [esp + 0x13], al
mov eax, dword [edi + esi*4 + 0x24]
mov dword [esp + 0x2c], eax
mov eax, dword [0x6466b8]
mov eax, dword [eax + esi*4]
mov dword [esp + 0x1c], eax
mov ax, word [0x64669c]
add ax, cx
movzx ecx, bx
mov word [0x64669c], ax
add ecx, ecx
movzx eax, ax
mov ecx, dword [edx + ecx*8]
and ecx, eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x28], ecx
mov ecx, dword [edx]
xor edx, edx
mov eax, dword [eax + ecx*4]
div dword [edi + esi*4]
mov eax, 0xe0c
mov ecx, dword [0x6466bc]
mov bl, dl
mov esi, dword [0x646654]
cdq
idiv dword [0x646674]
movzx edi, word [esi + ecx*2]
mov dword [esp + 0x30], eax
mov al, byte [0x646682]
movzx ecx, al
inc al
movzx ecx, byte [ecx + ecx + 0x1a2d]
mov byte [0x646682], al
cmp ecx, dword [esp + 0x18]
jge 0x40c2ef
movzx eax, byte [0x646662]
mov ecx, 0x860
mov esi, dword [esp + 0x20]
sub ecx, dword [0x6466a4]
movzx edx, byte [esi + eax*2]
mov eax, dword [esp + 0x24]
or edx, dword [0x6466a4]
movzx eax, byte [eax + 0x1c43]
push eax
push ecx
push edx
push 0xeef
call fcn.0041b47f
mov ecx, dword [esp + 0x54]
mov edi, 0x1b17
mov word [0x646690], ax
add esp, 0x10
mov eax, dword [ecx]
lea ecx, [eax*4]
mov eax, dword [ebp + 0x262c]
or eax, dword [0x6466d4]
xor eax, 0x16b3
cdq
idiv dword [ecx + ebp]
mov dword [ecx + ebp], edx
xor edx, edx
movzx eax, word [0x646694]
imul eax, eax, 0x1c74
mov ecx, dword [0x6466bc]
div edi
mov eax, dword [esp + 0x54]
add byte [ecx + esi], dl
movzx ecx, bl
mov eax, dword [eax + 0x4c20]
sub eax, ecx
jmp 0x40c543
push dword [esp + 0x28]
mov ebp, dword [esp + 0x44]
push dword [0x64665c]
mov bh, byte [esp + 0x1b]
movzx esi, bl
movzx eax, bh
push 0x1969
add eax, dword [ebp + esi*4]
push eax
call fcn.0041b47f
mov dword [0x646688], eax
xor edx, edx
mov eax, dword [esp + 0x60]
push 0x1b5
movzx eax, byte [esi + eax]
div dword [0x646678]
inc bl
mov byte [0x646662], al
movzx eax, byte [edi + 0x1516]
push eax
call fcn.00408ca0
movzx esi, bl
add esp, 0x18
mov word [0x6466a0], ax
mov edi, esi
mov dword [esp + 0x28], esi
cmp esi, 0x188f
jb 0x40c3ad
mov eax, dword [esp + 0x48]
mov dx, word [0x646664]
movzx esi, al
lea eax, [esi + 3]
imul ecx, eax, 0xc
mov dword [esp + 0x38], ecx
mov eax, dword [esp + 0x4c]
mov al, byte [ecx + eax]
and al, bh
movzx ecx, dx
xor al, byte [ebp + esi*8]
dec bh
mov byte [0x646662], al
mov eax, dword [0x64665c]
cdq
idiv ecx
mov ecx, dword [esp + 0x38]
inc edi
mov word [0x646664], dx
cmp edi, 0x188f
jge 0x40c376
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [0x646650]
movzx eax, word [ecx + eax*2 + 0x3c]
cmp eax, dword [esp + 0x48]
je 0x40c3d5
mov eax, dword [esp + 0x50]
movzx eax, byte [esi + eax]
cmp eax, 0xc0c
jb 0x40c3db
cmp dword [ebp + edx*8], esi
jbe 0x40c430
mov ecx, dword [esp + 0x44]
add esi, esi
mov eax, dword [0x6466c4]
mov ecx, dword [ecx + 0x47a8]
xor ecx, dword [0x646670]
or ecx, 0x15d6
mov dword [eax + edx*4], ecx
mov eax, dword [0x64666c]
add dword [eax + esi*8], 0x6e2
inc bl
mov eax, dword [0x64666c]
movzx edx, byte [0x646667]
movzx ecx, byte [0x646662]
add edx, 2
add edx, edx
mov eax, dword [eax + 0x3750]
add eax, ecx
mov ecx, dword [esp + 0x2c]
or dword [ecx + edx*8], eax
mov esi, dword [esp + 0x3c]
xor edx, edx
movzx edi, bl
mov eax, 0x266
movzx ecx, word [esi + edi*2]
div ecx
dec dword [esp + 0x14]
mov word [esi + edi*2], ax
mov eax, dword [esp + 0x48]
movzx edx, al
mov eax, dword [esp + 0x44]
mov ecx, dword [eax]
mov eax, dword [0x6466b0]
lea esi, [eax + ecx*4]
mov ecx, dword [esp + 0x1c]
movzx eax, word [ecx + edx*2 + 0x20]
movzx ecx, word [ecx + edx*2]
or eax, dword [esp + 0x14]
cdq
idiv ecx
cdq
idiv dword [esi]
mov edx, dword [esp + 0x58]
mov dword [esi], eax
mov eax, dword [esp + 0x44]
mov esi, dword [esp + 0x54]
mov ecx, dword [eax]
mov eax, dword [0x6466c0]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x6466b8]
imul ecx, dword [eax + 0x35a0]
mov eax, dword [esp + 0x30]
movzx eax, byte [edi + eax]
add ecx, 0x1d2f
or ecx, eax
imul ecx, dword [0x646678]
mov dword [0x646678], ecx
mov eax, dword [edx + edi*4]
movzx ecx, byte [0x646662]
add eax, 0xe6c
or eax, 0x1ac1
sub eax, dword [edx + ecx*4]
mov dword [edx + ecx*4], eax
mov eax, dword [esp + 0x48]
movzx ecx, word [0x646680]
dec al
movzx edx, al
movzx eax, byte [0x646662]
xor ecx, eax
imul eax, edx, 0xc
add ecx, dword [esp + 0x18]
imul ecx, dword [esp + 0x14]
mov dword [eax + esi], ecx
mov ecx, dword [esp + 0x4c]
dec byte [0x646662]
inc bl
mov eax, dword [ecx]
mov dword [ecx + eax*4], edx
movzx edi, byte [0x646682]
movzx edx, bl
mov ax, word [ebp + edx*8]
add ax, word [0x646650]
mov word [0x6466b4], ax
cmp dword [0x6466ac], edi
je 0x40c53b
mov ecx, dword [0x6466b0]
mov eax, dword [0x646684]
mov eax, dword [esi + 0x4c20]
sub eax, edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret