Function at 0x406d66
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 0xc]
cmp ebx, 0x10
je 0x406d87
cmp ebx, 0x18
je 0x406d87
cmp ebx, 0x20
je 0x406d87
xor ax, ax
jmp 0x40724f
mov al, byte [ebp + 0x10]
push esi
mov esi, dword [ebp + 0x14]
push edi
and al, 3
or byte [esi + 0x208], al
push 4
shr ebx, 2
pop edx
cmp ebx, edx
mov dword [esi], ebx
jbe 0x406da5
mov edx, ebx
mov ecx, dword [ebp + 8]
add edx, 6
mov dword [esi + 4], edx
mov edi, dword [ecx]
lea eax, [esi + 8]
mov dword [eax], edi
mov edi, dword [ecx + 4]
mov dword [esi + 0xc], edi
mov edi, dword [ecx + 8]
lea edx, [edx*4 + 4]
mov dword [esi + 0x10], edi
mov edi, dword [ecx + 0xc]
sub edx, ebx
sub ebx, 4
lea edx, [eax + edx*4]
mov dword [esi + 0x14], edi
mov dword [ebp - 8], edx
mov edi, 0x41c320
je 0x406f5c
dec ebx
dec ebx
je 0x406ed2
dec ebx
dec ebx
jne 0x406fc5
mov edx, dword [ecx + 0x10]
mov dword [esi + 0x18], edx
mov edx, dword [ecx + 0x14]
mov dword [esi + 0x1c], edx
mov edx, dword [ecx + 0x18]
mov dword [esi + 0x20], edx
mov ecx, dword [ecx + 0x1c]
mov dword [esi + 0x24], ecx
mov ecx, dword [eax + 0x1c]
rol ecx, 0x18
mov ebx, ecx
shr ebx, 0x10
movzx ebx, bl
lea edx, [eax + 0x20]
mov dword [ebp + 0xc], edx
mov edx, ecx
shr edx, 0x18
mov edx, dword [edx*4 + 0x41ef98]
xor edx, dword [ebx*4 + 0x41eb98]
mov ebx, ecx
shr ebx, 8
movzx ecx, cl
movzx ebx, bl
xor edx, dword [ebx*4 + 0x41e798]
xor edx, dword [ecx*4 + str.cwko0]
mov ecx, dword [eax + 4]
xor edx, dword [eax]
xor edx, dword [edi]
add edi, 4
mov ebx, edx
mov edx, dword [ebp + 0xc]
xor ecx, ebx
mov dword [edx], ebx
mov ebx, dword [eax + 8]
mov edx, dword [eax + 0xc]
xor ebx, ecx
xor edx, ebx
mov dword [eax + 0x24], ecx
mov dword [eax + 0x28], ebx
mov dword [eax + 0x2c], edx
mov ebx, edx
mov ecx, edx
shr ecx, 0x18
mov ecx, dword [ecx*4 + 0x41ef98]
shr ebx, 0x10
shr edx, 8
movzx ebx, bl
xor ecx, dword [ebx*4 + 0x41eb98]
movzx edx, dl
xor ecx, dword [edx*4 + 0x41e798]
movzx edx, byte [eax + 0x2c]
xor ecx, dword [edx*4 + str.cwko0]
mov edx, dword [eax + 0x14]
xor ecx, dword [eax + 0x10]
xor edx, ecx
mov dword [eax + 0x30], ecx
mov ecx, dword [eax + 0x18]
xor ecx, edx
mov dword [eax + 0x38], ecx
xor ecx, dword [eax + 0x1c]
mov dword [eax + 0x34], edx
mov dword [eax + 0x3c], ecx
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 8]
jb 0x406e0c
jmp 0x406fc5
mov edx, dword [ecx + 0x10]
mov dword [esi + 0x18], edx
mov ecx, dword [ecx + 0x14]
mov dword [esi + 0x1c], ecx
mov ecx, dword [eax + 0x14]
rol ecx, 0x18
mov ebx, ecx
shr ebx, 0x10
lea edx, [eax + 0x18]
mov dword [ebp + 0xc], edx
mov edx, ecx
shr edx, 0x18
mov edx, dword [edx*4 + 0x41ef98]
movzx ebx, bl
xor edx, dword [ebx*4 + 0x41eb98]
mov ebx, ecx
shr ebx, 8
movzx ebx, bl
xor edx, dword [ebx*4 + 0x41e798]
movzx ecx, cl
xor edx, dword [ecx*4 + str.cwko0]
mov ecx, dword [eax + 4]
xor edx, dword [eax]
xor edx, dword [edi]
add edi, 4
mov ebx, edx
mov edx, dword [ebp + 0xc]
xor ecx, ebx
mov dword [edx], ebx
mov edx, dword [eax + 8]
mov ebx, dword [eax + 0xc]
xor edx, ecx
mov dword [eax + 0x1c], ecx
mov ecx, dword [eax + 0x10]
xor ebx, edx
xor ecx, ebx
mov dword [eax + 0x28], ecx
xor ecx, dword [eax + 0x14]
mov dword [eax + 0x20], edx
mov dword [eax + 0x24], ebx
mov dword [eax + 0x2c], ecx
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 8]
jb 0x406ede
jmp 0x406fc5
mov ecx, dword [eax + 0xc]
rol ecx, 0x18
mov ebx, ecx
lea edx, [eax + 0x10]
mov dword [ebp + 0xc], edx
shr ebx, 0x10
mov edx, ecx
shr edx, 0x18
mov edx, dword [edx*4 + 0x41ef98]
movzx ebx, bl
xor edx, dword [ebx*4 + 0x41eb98]
mov ebx, ecx
shr ebx, 8
movzx ebx, bl
xor edx, dword [ebx*4 + 0x41e798]
mov ebx, dword [ebp + 0xc]
movzx ecx, cl
xor edx, dword [ecx*4 + str.cwko0]
mov ecx, dword [eax + 8]
xor edx, dword [eax]
xor edx, dword [edi]
add edi, 4
mov dword [ebx], edx
mov edx, dword [eax + 4]
xor edx, dword [ebx]
xor ecx, edx
mov dword [eax + 0x18], ecx
xor ecx, dword [eax + 0xc]
mov dword [eax + 0x14], edx
mov dword [eax + 0x1c], ecx
mov eax, ebx
cmp eax, dword [ebp - 8]
jb 0x406f5c
xor edx, edx
inc edx
cmp byte [esi + 0x208], dl
je 0x407249
lea edi, [esi + 8]
mov ecx, dword [edi]
lea eax, [esi + 0x108]
mov dword [eax], ecx
push 4
pop ecx
add edi, ecx
mov ebx, dword [edi]
add eax, ecx
mov dword [eax], ebx
add edi, ecx
mov ebx, dword [edi]
add eax, ecx
mov dword [eax], ebx
add edi, ecx
mov ebx, dword [edi]
add eax, ecx
mov dword [eax], ebx
add eax, ecx
add edi, ecx
cmp dword [esi + 4], edx
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x14], edx
jbe 0x40722c
mov esi, 0x80808080
mov edx, 0x1b1b1b1b
mov ecx, 0xff7f7f7f
mov ebx, dword [edi]
add edi, 4
mov dword [ebp - 8], edi
mov eax, ebx
and eax, esi
mov edi, eax
shr edi, 7
sub eax, edi
and eax, edx
mov edi, ebx
and edi, ecx
shl edi, 1
xor eax, edi
mov edi, eax
mov dword [ebp - 4], eax
and edi, esi
mov eax, edi
shr eax, 7
sub edi, eax
mov eax, dword [ebp - 4]
and eax, ecx
shl eax, 1
and edi, edx
xor edi, eax
mov eax, edi
and eax, esi
mov dword [ebp + 0xc], edi
mov edi, eax
shr edi, 7
sub eax, edi
mov edi, dword [ebp + 0xc]
and eax, edx
and edi, ecx
shl edi, 1
xor eax, edi
mov edi, dword [ebp - 4]
xor ebx, eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
xor eax, ebx
rol eax, 0x10
xor edi, ebx
rol edi, 0x18
xor eax, edi
mov edi, dword [ebp - 0xc]
rol ebx, 8
xor eax, ebx
xor eax, dword [ebp - 0x10]
add dword [ebp - 0xc], 4
xor eax, dword [ebp + 0xc]
xor eax, dword [ebp - 4]
mov dword [edi], eax
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
mov eax, ebx
and eax, esi
mov edi, eax
shr edi, 7
sub eax, edi
and eax, edx
add dword [ebp - 8], 4
mov edi, ebx
and edi, ecx
shl edi, 1
xor eax, edi
mov edi, eax
mov dword [ebp - 4], eax
and edi, esi
mov eax, edi
shr eax, 7
sub edi, eax
mov eax, dword [ebp - 4]
and eax, ecx
shl eax, 1
and edi, edx
xor edi, eax
mov eax, edi
and eax, esi
mov dword [ebp + 0xc], edi
mov edi, eax
shr edi, 7
sub eax, edi
and eax, edx
mov edi, dword [ebp + 0xc]
and edi, ecx
shl edi, 1
xor eax, edi
xor ebx, eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
xor eax, ebx
mov edi, dword [ebp - 4]
rol eax, 0x10
xor edi, ebx
rol edi, 0x18
xor eax, edi
mov edi, dword [ebp - 0xc]
rol ebx, 8
xor eax, ebx
xor eax, dword [ebp - 0x10]
add dword [ebp - 0xc], 4
xor eax, dword [ebp + 0xc]
xor eax, dword [ebp - 4]
mov dword [edi], eax
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
mov eax, ebx
and eax, esi
mov edi, eax
shr edi, 7
sub eax, edi
and eax, edx
mov edi, ebx
and edi, ecx
shl edi, 1
xor eax, edi
mov edi, eax
mov dword [ebp - 4], eax
and edi, esi
mov eax, edi
shr eax, 7
sub edi, eax
mov eax, dword [ebp - 4]
and eax, ecx
shl eax, 1
and edi, edx
xor edi, eax
add dword [ebp - 8], 4
mov eax, edi
and eax, esi
mov dword [ebp + 0xc], edi
mov edi, eax
shr edi, 7
sub eax, edi
mov edi, dword [ebp + 0xc]
and eax, edx
and edi, ecx
shl edi, 1
xor eax, edi
mov edi, dword [ebp - 4]
xor ebx, eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
xor eax, ebx
rol eax, 0x10
xor edi, ebx
rol edi, 0x18
xor eax, edi
mov edi, dword [ebp - 0xc]
add dword [ebp - 0xc], 4
rol ebx, 8
xor eax, ebx
xor eax, dword [ebp - 0x10]
xor eax, dword [ebp + 0xc]
xor eax, dword [ebp - 4]
mov dword [edi], eax
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
add dword [ebp - 8], 4
mov eax, ebx
and eax, esi
mov edi, eax
shr edi, 7
sub eax, edi
and eax, edx
mov edi, ebx
and edi, ecx
shl edi, 1
xor eax, edi
mov edi, eax
and edi, esi
mov dword [ebp - 4], eax
mov eax, edi
shr eax, 7
sub edi, eax
mov eax, dword [ebp - 4]
and edi, edx
and eax, ecx
shl eax, 1
xor edi, eax
mov eax, edi
mov dword [ebp + 0xc], edi
and eax, esi
mov edi, eax
shr edi, 7
sub eax, edi
mov edi, dword [ebp + 0xc]
and edi, ecx
shl edi, 1
and eax, edx
xor eax, edi
mov edi, dword [ebp + 0xc]
xor ebx, eax
xor edi, ebx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 4]
rol edi, 0x10
xor eax, ebx
rol eax, 0x18
xor edi, eax
mov eax, dword [ebp - 0xc]
rol ebx, 8
xor edi, ebx
xor edi, dword [ebp - 0x10]
xor edi, dword [ebp + 0xc]
xor edi, dword [ebp - 4]
mov dword [eax], edi
mov edi, dword [ebp + 0x14]
add eax, 4
inc dword [ebp - 0x14]
mov ebx, dword [ebp - 0x14]
cmp ebx, dword [edi + 4]
mov edi, dword [ebp - 8]
mov dword [ebp - 0xc], eax
jb 0x40701e
mov ecx, dword [edi]
mov dword [eax], ecx
push 4
pop ecx
add edi, ecx
mov edx, dword [edi]
add eax, ecx
mov dword [eax], edx
add eax, ecx
add edi, ecx
mov ecx, dword [edi]
mov dword [eax], ecx
mov ecx, dword [edi + 4]
mov dword [eax + 4], ecx
pop edi
mov ax, 1
pop esi
pop ebx
leave
ret