Function at 0x408ba0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 4], ecx
mov dword [ebp - 8], 0
mov eax, dword [ebp - 4]
mov dword [eax + 0x54], 2
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x64], 0
je 0x408e6a
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x50]
shl eax, 5
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x58]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x34]
movzx edx, byte [ecx + edx + 2]
xor eax, edx
and eax, 0x1fff
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x50], eax
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x38]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x50]
movzx eax, word [eax + edx*2 + 0x10000]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x58]
and edx, 0x7fff
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x38]
mov ax, word [ebp - 0xc]
mov word [ecx + edx*2], ax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x38]
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x50]
mov eax, dword [ebp - 4]
mov ax, word [eax + 0x58]
mov word [edx + ecx*2 + 0x10000], ax
cmp dword [ebp - 0xc], 0
je 0x408c74
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x58]
sub edx, dword [ebp - 0xc]
cmp edx, 0x7efa
ja 0x408c74
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 4]
call fcn.00409210
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
cmp edx, dword [ecx + 0x64]
jbe 0x408c74
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x64]
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 3
jb 0x408dbc
mov edx, dword [ebp - 8]
sub edx, 3
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 4]
mov edx, dword [eax + 0x58]
sub edx, dword [ecx + 0x5c]
push edx
mov ecx, dword [ebp - 4]
call fcn.0040c2e0
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x64]
sub ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov dword [edx + 0x64], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
cmp ecx, dword [eax + 0x6c]
ja 0x408d66
mov edx, dword [ebp - 8]
sub edx, 1
mov dword [ebp - 8], edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x58]
add ecx, 1
mov edx, dword [ebp - 4]
mov dword [edx + 0x58], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x50]
shl ecx, 5
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x58]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x34]
movzx eax, byte [edx + eax + 2]
xor ecx, eax
and ecx, 0x1fff
mov edx, dword [ebp - 4]
mov dword [edx + 0x50], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x38]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x50]
movzx ecx, word [ecx + eax*2 + 0x10000]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x58]
and eax, 0x7fff
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x38]
mov cx, word [ebp - 0xc]
mov word [edx + eax*2], cx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x38]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x50]
mov ecx, dword [ebp - 4]
mov cx, word [ecx + 0x58]
mov word [eax + edx*2 + 0x10000], cx
mov edx, dword [ebp - 8]
sub edx, 1
mov dword [ebp - 8], edx
jne 0x408cc4
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x58]
add ecx, 1
mov edx, dword [ebp - 4]
mov dword [edx + 0x58], ecx
jmp 0x408dba
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x58]
add ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov dword [edx + 0x58], ecx
mov dword [ebp - 8], 0
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x58]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x34]
movzx ecx, byte [eax + ecx]
mov edx, dword [ebp - 4]
mov dword [edx + 0x50], ecx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x50]
shl ecx, 5
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x58]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x34]
movzx eax, byte [edx + eax + 1]
xor ecx, eax
and ecx, 0x1fff
mov edx, dword [ebp - 4]
mov dword [edx + 0x50], ecx
jmp 0x408df8
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x58]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x34]
movzx ecx, byte [eax + ecx]
push ecx
push 0
mov ecx, dword [ebp - 4]
call fcn.0040c2e0
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x64]
sub eax, 1
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x64], eax
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x58]
add eax, 1
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x58], eax
cmp dword [ebp - 0x10], 0
je 0x408e46
mov edx, dword [ebp - 4]
cmp dword [edx + 0x4c], 0
jl 0x408e18
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x34]
mov edx, dword [ebp - 4]
add ecx, dword [edx + 0x4c]
mov dword [ebp - 0x14], ecx
jmp 0x408e1f
mov dword [ebp - 0x14], 0
push 0
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 4]
mov edx, dword [eax + 0x58]
sub edx, dword [ecx + 0x4c]
push edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 4]
call fcn.0040c590
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x58]
mov dword [ecx + 0x4c], eax
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0x64], 0x106
jae 0x408e65
mov edx, dword [ebp - 4]
cmp dword [edx + 0x60], 0
jne 0x408e65
mov ecx, dword [ebp - 4]
call fcn.00408eb0
jmp 0x408e46
jmp 0x408bba
mov eax, dword [ebp - 4]
cmp dword [eax + 0x4c], 0
jl 0x408e84
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x34]
mov eax, dword [ebp - 4]
add edx, dword [eax + 0x4c]
mov dword [ebp - 0x18], edx
jmp 0x408e8b
mov dword [ebp - 0x18], 0
push 1
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 4]
mov eax, dword [ecx + 0x58]
sub eax, dword [edx + 0x4c]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov ecx, dword [ebp - 4]
call fcn.0040c590
mov esp, ebp
pop ebp
ret