Function at 0x409cf0
Capabilities:
Encode data using xor

Disassembly:
cli
add ecx, dword [ecx - 0x6fcd8d0e]
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x34]
mov dword [esp + edx*4 + 0x30], eax
add eax, dword [esp + ecx*4 + 0x38]
mov dword [esp + edx*4 + 0x30], eax
add eax, dword [esp + ecx*4 + 0x3c]
mov dword [esp + edx*4 + 0x30], eax
add eax, dword [esp + ecx*4 + 0x40]
add ecx, 4
mov dword [esp + edx*4 + 0x30], eax
cmp ecx, 0x20
jne 0x409d00
test edx, edx
jle 0x409d67
inc edx
xor ecx, ecx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, dword [esp + edx*4 + 0x2c]
shl esi, cl
add eax, esi
dec edx
inc ecx
cmp edx, 1
ja 0x409d40
mov edx, 1
mov ecx, dword [esp + 0x15cc]
shl edx, cl
cmp eax, edx
jne 0x40a00d
jmp 0x409d77
mov ecx, edx
mov edx, 1
shl edx, cl
xor eax, eax
jmp 0x40a00d
shl ebp, 5
mov esi, dword [esp + 0x10]
lea eax, [esi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.0040a250
add esp, 0xc
mov eax, dword [esp + 0x28]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.0040a250
add esp, 0xc
cmp dword [esp + 0x15cc], 0
mov esi, dword [esp]
jle 0x409e8f
add esi, 0xfffffffe
mov eax, 1
add ebp, dword [esp + 0x10]
mov dword [esp], esi
jmp 0x409df2
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15cc]
mov eax, ecx
je 0x409e8f
mov ecx, dword [esp + eax*4 + 0x30]
test ecx, ecx
jle 0x409de0
mov edx, ecx
and edx, 3
je 0x409e40
mov dword [esp + 0xc], ebx
lea edi, [esi + ebx*4]
xor esi, esi
nop
nop
nop
nop
nop
nop
movzx ebx, word [edi]
mov byte [ebx + ebp + 0x8f12], al
inc esi
add edi, 0xfffffffc
cmp edx, esi
jne 0x409e10
mov ebx, dword [esp + 0xc]
sub ebx, esi
mov edx, ecx
sub edx, esi
mov edi, dword [esp + 0x14]
mov esi, dword [esp]
cmp ecx, 4
jb 0x409de0
jmp 0x409e47
mov edx, ecx
cmp ecx, 4
jb 0x409de0
dec edx
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, word [esi + ebx*4]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [esi + ebx*4 - 4]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [esi + ebx*4 - 8]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [esi + ebx*4 - 0xc]
add ebx, 0xfffffffc
mov byte [ecx + ebp + 0x8f12], al
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x409e50
jmp 0x409de0
mov ecx, dword [esp + 0x15c8]
mov dword [esp + 0x4b8], 0
mov eax, dword [esp + 0x15cc]
cmp eax, 2
jl 0x409f33
lea ecx, [eax - 1]
cmp eax, 2
jne 0x409ec2
xor edx, edx
mov eax, 2
jmp 0x409f0a
mov ebx, ecx
and ebx, 0xfffffffe
xor edx, edx
xor eax, eax
nop
nop
nop
nop
nop
mov edi, dword [esp + eax*4 + 0x34]
mov esi, dword [esp + eax*4 + 0x38]
mov ebp, edi
and ebp, edx
xor edi, edx
add edi, edi
lea edx, [edi + ebp*4]
mov dword [esp + eax*4 + 0x4bc], edx
mov edi, esi
and edi, edx
xor esi, edx
add esi, esi
lea edx, [esi + edi*4]
mov dword [esp + eax*4 + 0x4c0], edx
add eax, 2
cmp ebx, eax
jne 0x409ed0
add eax, 2
mov edi, dword [esp + 0x14]
test cl, 1
mov ecx, dword [esp + 0x15c8]
je 0x409f33
mov ecx, dword [esp + eax*4 + 0x2c]
mov esi, ecx
and esi, edx
xor ecx, edx
add ecx, ecx
lea ecx, [ecx + esi*4]
mov dword [esp + eax*4 + 0x4b4], ecx
mov ecx, dword [esp + 0x15c8]
test ecx, ecx
jle 0x40a002
xor eax, eax
lea edi, [edi + edi*8]
mov edx, edi
shl edx, 5
mov esi, dword [esp + 0x10]
add edx, esi
shl edi, 6
add edi, esi
mov dword [esp + 4], edi
jmp 0x409f7c
mov ecx, dword [esp + 4]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c8]
inc eax
cmp eax, ecx
je 0x40a002
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x409f73
mov ecx, dword [esp + ebx*4 + 0x4b4]
lea edi, [ecx + 1]
mov dword [esp + ebx*4 + 0x4b4], edi
xor edi, edi
cmp bl, 4
jb 0x409fdf
mov ebp, ebx
and ebp, 0xfffffffc
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, ecx
and esi, 1
shl esi, 2
lea esi, [esi + edi*8]
mov edi, ecx
and edi, 2
or edi, esi
mov esi, ecx
shr esi, 2
and esi, 1
or esi, edi
mov edi, ecx
shr edi, 3
and edi, 1
lea edi, [edi + esi*2]
shr ecx, 4
add ebp, 0xfffffffc
jne 0x409fb0
and ebx, 3
je 0x409f60
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, ecx
and esi, 1
lea edi, [esi + edi*2]
shr ecx, 1
dec ebx
jne 0x409ff0
jmp 0x409f60
add esp, 0x15b4
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [esp + 0x15cc]
dec dword [esp + ecx*4 + 0x30]
nop
nop
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x40a038
mov esi, dword [esp + ecx*4 + 0x2c]
dec ecx
test esi, esi
je 0x40a020
dec esi
mov dword [esp + ecx*4 + 0x30], esi
add dword [esp + ecx*4 + 0x34], 2
dec eax
cmp eax, edx
jne 0x40a00d
jmp 0x409d77