Function at 0x40da40
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd4
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, edx
push edi
mov dword [ebp - 0x4c], esi
xor edi, edi
movsx edx, di
inc edi
mov eax, dword [ecx + edx*4]
mov dword [ebp + edx*4 - 0x14], eax
cmp di, 4
jb 0x40da60
xor edx, edx
xor ecx, ecx
movsx eax, cx
inc ecx
or edx, dword [ebp + eax*4 - 0x14]
cmp cx, 4
jb 0x40da75
test edx, edx
jne 0x40dac6
xor ecx, ecx
nop dword [eax]
movsx eax, cx
inc ecx
mov dword [esi + eax*4], 0
cmp cx, 4
jb 0x40da90
xor ecx, ecx
movsx eax, cx
inc ecx
mov dword [esi + eax*4 + 0x10], 0
cmp cx, 4
jb 0x40daa3
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00413dc9
mov esp, ebp
pop ebp
ret
xor edi, edi
mov dword [ebp - 0x48], edi
nop dword [eax + eax]
mov edx, dword [ebp - 8]
movzx eax, di
movsx edi, di
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x54], edi
test dl, 1
je 0x40db15
mov al, dl
mov cl, 2
and al, 3
sub cl, al
mov byte [ebp + edi - 0xd0], cl
jns 0x40db26
mov eax, 3
nop word [eax + eax]
movzx ecx, ax
add dword [ebp + ecx*4 - 0x14], 1
jne 0x40db10
dec eax
test ax, ax
jns 0x40db00
mov edx, dword [ebp - 8]
jmp 0x40db26
cmp edi, 0x72
jae 0x40dc9d
mov byte [ebp + edi - 0xd0], 0
and edx, 0xfffffffe
xor esi, esi
mov dword [ebp - 8], edx
xor edi, edi
movsx eax, di
lea edx, [ebp - 0x14]
mov ecx, dword [edx + eax*4]
lea edx, [edx + eax*4]
shr ecx, 1
inc edi
or ecx, esi
mov esi, dword [edx]
shl esi, 0x1f
mov dword [edx], ecx
cmp di, 4
jb 0x40db30
mov edi, dword [ebp - 0x48]
xor edx, edx
and dword [ebp - 0x14], 0x1ffff
inc edi
mov esi, dword [ebp - 0x4c]
xor ecx, ecx
mov dword [ebp - 0x48], edi
movsx eax, cx
inc ecx
or edx, dword [ebp + eax*4 - 0x14]
cmp cx, 4
jb 0x40db63
test edx, edx
jne 0x40dad0
mov eax, dword [ebp - 0x50]
movzx edi, ax
nop
movsx ecx, dx
inc edx
mov eax, dword [ebx + ecx*4]
mov dword [esi + ecx*4], eax
cmp dx, 4
jb 0x40db80
xor edx, edx
movsx eax, dx
inc edx
lea ecx, [eax*4 + 0x10]
mov eax, dword [ecx + ebx]
mov dword [ecx + esi], eax
cmp dx, 4
jb 0x40db92
test di, di
jle 0x40dab5
mov eax, dword [ebp - 0x54]
lea eax, [ebp + eax - 0xd0]
mov dword [ebp - 0x48], eax
nop
push dword [ebp + 0xc]
lea edx, [ebp - 0x24]
mov ecx, esi
call fcn.0040d8a0
mov eax, dword [ebp - 0x48]
add esp, 4
dec eax
dec edi
mov dword [ebp - 0x48], eax
mov al, byte [eax]
cmp al, 0xff
je 0x40dc24
test al, al
je 0x40dbf4
cmp al, 1
jne 0x40dc83
lea edx, [ebp - 0x24]
mov ecx, ebx
jmp 0x40dc76
xor edx, edx
movsx ecx, dx
inc edx
mov eax, dword [ebp + ecx*4 - 0x24]
mov dword [esi + ecx*4], eax
cmp dx, 4
jb 0x40dbf6
xor edx, edx
nop dword [eax]
movsx ecx, dx
inc edx
mov eax, dword [ebp + ecx*4 - 0x14]
mov dword [esi + ecx*4 + 0x10], eax
cmp dx, 4
jb 0x40dc10
jmp 0x40dc83
xor edx, edx
movsx ecx, dx
inc edx
mov eax, dword [ebx + ecx*4]
mov dword [ebp + ecx*4 - 0x44], eax
cmp dx, 4
jb 0x40dc26
xor ecx, ecx
nop dword [eax]
movsx eax, cx
inc ecx
mov dword [ebp + eax*4 - 0x34], 0
cmp cx, 4
jb 0x40dc40
xor edx, edx
movsx eax, dx
inc edx
lea ecx, [eax*4]
mov eax, dword [ebx + eax*4 + 0x10]
xor eax, dword [ecx + ebx]
mov dword [ebp + ecx - 0x34], eax
cmp dx, 4
jb 0x40dc54
lea edx, [ebp - 0x44]
lea ecx, [ebp - 0x24]
mov eax, dword [ebp + 0xc]
push eax
push esi
call fcn.0040d700
add esp, 8
test di, di
jg 0x40dbc0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00413dc9
mov esp, ebp
pop ebp
ret
call fcn.00413ef9
int3