Function at 0x406aa0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xfc
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, eax
xor eax, eax
mov ebx, ecx
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov edx, dword [ecx]
inc dword [ebp + edx*4 - 0x80]
lea edx, [ebp + edx*4 - 0x80]
add ecx, 4
dec esi
jne 0x406ae5
mov ecx, dword [ebp + 8]
cmp dword [ebp - 0x80], ecx
jne 0x406b0d
mov edx, dword [ebp + 0x18]
mov dword [edx], eax
mov dword [edi], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [edi]
mov dword [ebp - 4], edx
mov ecx, 1
cmp dword [ebp + ecx*4 - 0x80], eax
jne 0x406b23
inc ecx
cmp ecx, 0xf
jbe 0x406b17
mov dword [ebp - 8], ecx
cmp edx, ecx
jae 0x406b2f
mov dword [ebp - 4], ecx
mov edx, ecx
mov esi, 0xf
cmp dword [ebp + esi*4 - 0x80], eax
jne 0x406b3d
dec esi
jne 0x406b34
mov dword [ebp - 0x1c], esi
cmp edx, esi
jbe 0x406b49
mov dword [ebp - 4], esi
mov edx, esi
mov dword [edi], edx
mov edi, 1
shl edi, cl
cmp ecx, esi
jae 0x406b67
sub edi, dword [ebp + ecx*4 - 0x80]
js 0x406c29
inc ecx
add edi, edi
cmp ecx, esi
jb 0x406b56
lea ecx, [esi*4]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp + ecx - 0x80]
sub edi, ecx
mov dword [ebp - 0x40], edi
js 0x406c29
add ecx, edi
mov edi, dword [ebp - 0xc]
mov dword [ebp + edi - 0x80], ecx
xor ecx, ecx
dec esi
mov dword [ebp - 0xbc], eax
je 0x406ba7
xor edi, edi
add ecx, dword [ebp + edi - 0x7c]
add edi, 4
dec esi
mov dword [ebp + edi - 0xbc], ecx
jne 0x406b96
mov esi, ebx
xor edi, edi
jmp 0x406bb0
mov ecx, dword [esi]
add esi, 4
mov dword [ebp - 0x10], esi
cmp ecx, eax
je 0x406bd6
mov esi, dword [ebp + ecx*4 - 0xc0]
mov ebx, dword [ebp + 0x24]
lea ecx, [ebp + ecx*4 - 0xc0]
mov dword [ebx + esi*4], edi
inc esi
mov dword [ecx], esi
mov esi, dword [ebp - 0x10]
inc edi
cmp edi, dword [ebp + 8]
jb 0x406bb0
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ebp + ecx - 0xc0]
mov dword [ebp + 8], ecx
mov ecx, dword [ebp + 0x24]
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 8]
mov ebx, edx
xor edi, edi
neg ebx
mov dword [ebp - 0x24], edi
mov dword [ebp - 0xc0], eax
mov dword [ebp - 0x18], 0xffffffff
mov dword [ebp - 0xfc], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x34], eax
cmp ecx, dword [ebp - 0x1c]
jg 0x406e4f
mov esi, dword [ebp - 0x28]
lea ecx, [ebp + ecx*4 - 0x80]
mov dword [ebp - 0xc], ecx
jmp 0x406c37
mov eax, 0xfffffffd
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx]
mov dword [ebp - 0x14], ecx
cmp ecx, eax
je 0x406e39
dec dword [ebp - 0x14]
lea eax, [ebx + edx]
cmp dword [ebp - 8], eax
jle 0x406d49
mov ecx, dword [ebp - 0x14]
inc ecx
sub ebx, edx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x30], ebx
jmp 0x406c67
mov edx, dword [ebp - 4]
add dword [ebp - 0x30], edx
mov edx, dword [ebp - 0x1c]
inc dword [ebp - 0x18]
mov ebx, eax
mov eax, dword [ebp - 4]
sub edx, ebx
cmp edx, eax
jbe 0x406c7d
mov edx, eax
mov ecx, dword [ebp - 8]
sub ecx, ebx
mov eax, 1
shl eax, cl
cmp eax, dword [ebp - 0x38]
jbe 0x406cbc
or edi, 0xffffffff
sub edi, dword [ebp - 0x14]
add eax, edi
mov edi, dword [ebp - 0xc]
cmp ecx, edx
jae 0x406cbc
inc ecx
cmp ecx, edx
jae 0x406cbc
jmp 0x406ca7
mov edi, dword [ebp - 0x20]
add edi, 4
mov dword [ebp - 0x20], edi
mov edi, dword [edi]
add eax, eax
cmp eax, edi
jbe 0x406cbc
inc ecx
sub eax, edi
cmp ecx, edx
jb 0x406ca4
mov eax, dword [ebp + 0x20]
mov eax, dword [eax]
mov edx, 1
shl edx, cl
mov dword [ebp - 0x34], edx
add edx, eax
cmp edx, 0x5a0
ja 0x406c29
mov edi, dword [ebp + 0x1c]
lea edi, [edi + eax*8]
mov eax, dword [ebp - 0x18]
lea eax, [ebp + eax*4 - 0xfc]
mov dword [ebp - 0x3c], eax
mov dword [eax], edi
mov eax, dword [ebp + 0x20]
mov dword [eax], edx
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x20], edi
test eax, eax
je 0x406d32
mov esi, dword [ebp - 0x24]
mov dl, byte [ebp - 4]
mov dword [ebp + eax*4 - 0xc0], esi
mov byte [ebp - 0x2c], cl
mov ecx, dword [ebp - 0x30]
mov eax, esi
shr eax, cl
mov ecx, dword [ebp - 0x3c]
mov ecx, dword [ecx - 4]
mov esi, edi
sub esi, ecx
mov byte [ebp - 0x2b], dl
mov edx, dword [ebp - 0x2c]
sar esi, 3
sub esi, eax
mov dword [ecx + eax*8], edx
mov dword [ecx + eax*8 + 4], esi
jmp 0x406d37
mov eax, dword [ebp + 0x18]
mov dword [eax], edi
mov ecx, dword [ebp - 4]
lea eax, [ebx + ecx]
cmp dword [ebp - 8], eax
jg 0x406c64
mov edi, dword [ebp - 0x24]
mov ecx, dword [ebp - 8]
mov eax, dword [ebp + 0x24]
mov dl, cl
sub dl, bl
mov byte [ebp - 0x2b], dl
mov edx, dword [ebp + 8]
lea edx, [eax + edx*4]
mov eax, dword [ebp - 0x10]
cmp eax, edx
jb 0x406d69
mov byte [ebp - 0x2c], 0xc0
jmp 0x406da2
mov eax, dword [eax]
mov edx, dword [ebp + 0xc]
cmp eax, edx
jae 0x406d86
cmp eax, 0x100
sbb dl, dl
and dl, 0xa0
add dl, 0x60
mov byte [ebp - 0x2c], dl
mov esi, eax
jmp 0x406d9e
sub eax, edx
mov edx, dword [ebp + 0x14]
add eax, eax
add eax, eax
mov dl, byte [eax + edx]
add dl, 0x50
mov byte [ebp - 0x2c], dl
mov edx, dword [ebp + 0x10]
mov esi, dword [eax + edx]
add dword [ebp - 0x10], 4
sub ecx, ebx
mov edx, 1
shl edx, cl
mov eax, edi
mov ecx, ebx
shr eax, cl
cmp eax, dword [ebp - 0x34]
jae 0x406dd7
mov ecx, dword [ebp - 0x20]
lea ecx, [ecx + eax*8]
mov edi, dword [ebp - 0x2c]
mov dword [ecx], edi
lea edi, [edx*8]
mov dword [ecx + 4], esi
add eax, edx
add ecx, edi
cmp eax, dword [ebp - 0x34]
jb 0x406dbc
mov edi, dword [ebp - 0x24]
mov ecx, dword [ebp - 8]
dec ecx
mov eax, 1
shl eax, cl
test edi, eax
je 0x406dee
xor edi, eax
shr eax, 1
test edi, eax
jne 0x406de6
mov edx, 1
mov ecx, ebx
shl edx, cl
xor edi, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x24], edi
dec edx
and edx, edi
cmp edx, dword [ebp + eax*4 - 0xc0]
je 0x406e2c
jmp 0x406e10
sub ebx, dword [ebp - 4]
mov edx, 1
mov ecx, ebx
shl edx, cl
dec eax
dec edx
and edx, edi
cmp edx, dword [ebp + eax*4 - 0xc0]
jne 0x406e10
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x14], 0
mov edx, dword [ebp - 4]
jne 0x406c47
mov eax, dword [ebp - 8]
add dword [ebp - 0xc], 4
inc eax
mov dword [ebp - 8], eax
cmp eax, dword [ebp - 0x1c]
jle 0x406c35
xor eax, eax
cmp dword [ebp - 0x40], eax
je 0x406e5f
cmp dword [ebp - 0x1c], 1
je 0x406e5f
mov eax, 0xfffffffb
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret