Function at 0x40d060
Capabilities:
Encode data using xor

Disassembly:
and al, 0x8d
or al, 0x8a
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ecx + edx*4]
inc dword [esp + esi*4 + 0x30]
inc edx
cmp eax, edx
jne 0x40d070
cmp ebx, 2
jl 0x40d1b5
mov edx, dword [esp + 0x15cc]
cmp edx, 0x20
jge 0x40d100
mov eax, dword [esp + edx*4 + 0x30]
mov esi, edx
neg edx
mov ecx, esi
and edx, 3
je 0x40d0bc
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x34]
inc ecx
mov dword [esp + esi*4 + 0x30], eax
dec edx
jne 0x40d0b0
lea edx, [esi - 0x1d]
cmp edx, 3
mov edx, esi
jb 0x40d0f8
nop
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 0x40d0d0
test edx, edx
jle 0x40d1a5
inc edx
xor ecx, ecx
xor eax, eax
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 0x40d110
mov edx, 1
mov ecx, dword [esp + 0x15cc]
shl edx, cl
cmp eax, edx
jne 0x40d427
jmp 0x40d1b5
mov ecx, edx
mov edx, 1
shl edx, cl
xor eax, eax
jmp 0x40d427
shl ebp, 5
mov esi, dword [esp + 0x10]
lea eax, [esi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.0040d600
add esp, 0xc
mov eax, dword [esp + 0x24]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.0040d600
add esp, 0xc
cmp dword [esp + 0x15cc], 0
mov esi, dword [esp]
jle 0x40d2cf
add esi, 0xfffffffe
mov eax, 1
add ebp, dword [esp + 0x10]
mov dword [esp], esi
jmp 0x40d232
lea ecx, [eax + 1]
cmp eax, dword [esp + 0x15cc]
mov eax, ecx
je 0x40d2cf
mov ecx, dword [esp + eax*4 + 0x30]
test ecx, ecx
jle 0x40d220
mov edx, ecx
and edx, 3
je 0x40d280
mov dword [esp + 0x14], 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 0x40d250
mov ebx, dword [esp + 0x14]
sub ebx, esi
mov edx, ecx
sub edx, esi
mov esi, dword [esp]
cmp ecx, 4
jb 0x40d220
jmp 0x40d287
mov edx, ecx
cmp ecx, 4
jb 0x40d220
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 0x40d290
jmp 0x40d220
mov ecx, dword [esp + 0x15c8]
mov dword [esp + 0x938], 0
mov eax, dword [esp + 0x15cc]
cmp eax, 2
jl 0x40d34d
lea ecx, [eax - 1]
cmp eax, 2
jne 0x40d2fe
xor eax, eax
mov edx, 2
jmp 0x40d334
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + edx*4 + 0x34]
add eax, eax
mov dword [esp + edx*4 + 0x93c], eax
add eax, dword [esp + edx*4 + 0x38]
add eax, eax
mov dword [esp + edx*4 + 0x940], eax
add edx, 2
cmp ebx, edx
jne 0x40d310
add edx, 2
test cl, 1
mov ecx, dword [esp + 0x15c8]
je 0x40d34d
add eax, dword [esp + edx*4 + 0x2c]
add eax, eax
mov dword [esp + edx*4 + 0x934], eax
test ecx, ecx
jle 0x40d41c
xor eax, eax
mov edx, dword [esp + 0x28]
lea esi, [edx + edx*8]
mov edi, esi
shl edi, 5
mov edx, dword [esp + 0x10]
add edi, edx
mov dword [esp + 4], edi
shl esi, 6
add esi, edx
mov dword [esp + 8], esi
jmp 0x40d39c
mov ecx, dword [esp + 8]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c8]
inc eax
cmp eax, ecx
je 0x40d41c
mov edx, dword [esp + 4]
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x40d393
mov edx, dword [esp + ebx*4 + 0x934]
lea ecx, [edx + 1]
mov dword [esp + ebx*4 + 0x934], ecx
xor edi, edi
cmp ebx, 1
je 0x40d400
mov ebp, ebx
and ebp, 0xfffffffe
xor ecx, ecx
nop
nop
nop
nop
nop
mov edi, edx
xor edi, 0x7ffffffe
mov esi, edx
or esi, 1
and esi, edi
mov edi, edx
shr edi, 1
shl ecx, 2
add esi, esi
or esi, ecx
mov ecx, edi
xor ecx, 0xfffffffe
or edi, 1
and edi, ecx
or edi, esi
shr edx, 2
mov ecx, edi
add ebp, 0xfffffffe
jne 0x40d3d0
test bl, 1
je 0x40d380
add edi, edi
mov ecx, edx
xor ecx, 0xfffffffe
or edx, 1
and edx, ecx
or edi, edx
jmp 0x40d380
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
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x40d458
mov esi, dword [esp + ecx*4 + 0x2c]
dec ecx
test esi, esi
je 0x40d440
dec esi
mov dword [esp + ecx*4 + 0x30], esi
add dword [esp + ecx*4 + 0x34], 2
dec eax
cmp eax, edx
jne 0x40d427
jmp 0x40d1b5