Function at 0x40d694
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffb0
mov dword [esp + 4], edx
mov dword [esp], eax
mov ebx, dword [esp]
mov ebx, dword [ebx]
mov esi, dword [esp]
mov esi, dword [esi + 4]
mov edi, dword [esp]
mov edi, dword [edi + 8]
mov ebp, dword [esp]
mov ebp, dword [ebp + 0xc]
lea edx, [esp + 0x10]
mov eax, dword [esp + 4]
mov ecx, 0x40
call fcn.00402c04
mov dword [esp + 8], 4
lea eax, [esp + 0x10]
mov dword [esp + 0xc], eax
mov eax, edi
xor eax, ebp
and eax, esi
xor eax, ebp
add eax, ebx
mov edx, dword [esp + 0xc]
add eax, dword [edx]
mov dl, 3
call fcn.0040d678
mov ebx, eax
mov eax, esi
xor eax, edi
and eax, ebx
xor eax, edi
add eax, ebp
mov edx, dword [esp + 0xc]
add eax, dword [edx + 4]
mov dl, 7
call fcn.0040d678
mov ebp, eax
mov eax, ebx
xor eax, esi
and eax, ebp
xor eax, esi
add eax, edi
mov edx, dword [esp + 0xc]
add eax, dword [edx + 8]
mov dl, 0xb
call fcn.0040d678
mov edi, eax
mov eax, ebp
xor eax, ebx
and eax, edi
xor eax, ebx
add eax, esi
mov edx, dword [esp + 0xc]
add eax, dword [edx + 0xc]
mov dl, 0x13
call fcn.0040d678
mov esi, eax
add dword [esp + 0xc], 0x10
dec dword [esp + 8]
jne 0x40d6db
xor eax, eax
mov dword [esp + 8], eax
mov eax, edi
and eax, esi
mov edx, edi
or edx, esi
and edx, ebp
or eax, edx
add eax, ebx
mov edx, dword [esp + 8]
add eax, dword [esp + edx*4 + 0x10]
add eax, 0x5a827999
mov dl, 3
call fcn.0040d678
mov ebx, eax
mov eax, esi
and eax, ebx
mov edx, esi
or edx, ebx
and edx, edi
or eax, edx
add eax, ebp
mov edx, dword [esp + 8]
add edx, 4
add eax, dword [esp + edx*4 + 0x10]
add eax, 0x5a827999
mov dl, 5
call fcn.0040d678
mov ebp, eax
mov eax, ebx
and eax, ebp
mov edx, ebx
or edx, ebp
and edx, esi
or eax, edx
add eax, edi
mov edx, dword [esp + 8]
add edx, 8
add eax, dword [esp + edx*4 + 0x10]
add eax, 0x5a827999
mov dl, 9
call fcn.0040d678
mov edi, eax
mov eax, ebp
and eax, edi
mov edx, ebp
or edx, edi
and edx, ebx
or eax, edx
add eax, esi
mov edx, dword [esp + 8]
add edx, 0xc
add eax, dword [esp + edx*4 + 0x10]
add eax, 0x5a827999
mov dl, 0xd
call fcn.0040d678
mov esi, eax
inc dword [esp + 8]
cmp dword [esp + 8], 4
jne 0x40d753
mov eax, edi
xor eax, esi
xor eax, ebp
add eax, ebx
add eax, dword [esp + 0x10]
add eax, 0x6ed9eba1
mov dl, 3
call fcn.0040d678
mov ebx, eax
mov eax, esi
xor eax, ebx
xor eax, edi
add eax, ebp
add eax, dword [esp + 0x30]
add eax, 0x6ed9eba1
mov dl, 9
call fcn.0040d678
mov ebp, eax
mov eax, ebx
xor eax, ebp
xor eax, esi
add eax, edi
add eax, dword [esp + 0x20]
add eax, 0x6ed9eba1
mov dl, 0xb
call fcn.0040d678
mov edi, eax
mov eax, ebp
xor eax, edi
xor eax, ebx
add eax, esi
add eax, dword [esp + 0x40]
add eax, 0x6ed9eba1
mov dl, 0xf
call fcn.0040d678
mov esi, eax
mov eax, edi
xor eax, esi
xor eax, ebp
add eax, ebx
add eax, dword [esp + 0x18]
add eax, 0x6ed9eba1
mov dl, 3
call fcn.0040d678
mov ebx, eax
mov eax, esi
xor eax, ebx
xor eax, edi
add eax, ebp
add eax, dword [esp + 0x38]
add eax, 0x6ed9eba1
mov dl, 9
call fcn.0040d678
mov ebp, eax
mov eax, ebx
xor eax, ebp
xor eax, esi
add eax, edi
add eax, dword [esp + 0x28]
add eax, 0x6ed9eba1
mov dl, 0xb
call fcn.0040d678
mov edi, eax
mov eax, ebp
xor eax, edi
xor eax, ebx
add eax, esi
add eax, dword [esp + 0x48]
add eax, 0x6ed9eba1
mov dl, 0xf
call fcn.0040d678
mov esi, eax
mov eax, edi
xor eax, esi
xor eax, ebp
add eax, ebx
add eax, dword [esp + 0x14]
add eax, 0x6ed9eba1
mov dl, 3
call fcn.0040d678
mov ebx, eax
mov eax, esi
xor eax, ebx
xor eax, edi
add eax, ebp
add eax, dword [esp + 0x34]
add eax, 0x6ed9eba1
mov dl, 9
call fcn.0040d678
mov ebp, eax
mov eax, ebx
xor eax, ebp
xor eax, esi
add eax, edi
add eax, dword [esp + 0x24]
add eax, 0x6ed9eba1
mov dl, 0xb
call fcn.0040d678
mov edi, eax
mov eax, ebp
xor eax, edi
xor eax, ebx
add eax, esi
add eax, dword [esp + 0x44]
add eax, 0x6ed9eba1
mov dl, 0xf
call fcn.0040d678
mov esi, eax
mov eax, edi
xor eax, esi
xor eax, ebp
add eax, ebx
add eax, dword [esp + 0x1c]
add eax, 0x6ed9eba1
mov dl, 3
call fcn.0040d678
mov ebx, eax
mov eax, esi
xor eax, ebx
xor eax, edi
add eax, ebp
add eax, dword [esp + 0x3c]
add eax, 0x6ed9eba1
mov dl, 9
call fcn.0040d678
mov ebp, eax
mov eax, ebx
xor eax, ebp
xor eax, esi
add eax, edi
add eax, dword [esp + 0x2c]
add eax, 0x6ed9eba1
mov dl, 0xb
call fcn.0040d678
mov edi, eax
mov eax, ebp
xor eax, edi
xor eax, ebx
add eax, esi
add eax, dword [esp + 0x4c]
add eax, 0x6ed9eba1
mov dl, 0xf
call fcn.0040d678
mov esi, eax
mov eax, dword [esp]
add dword [eax], ebx
mov eax, dword [esp]
add dword [eax + 4], esi
mov eax, dword [esp]
add dword [eax + 8], edi
mov eax, dword [esp]
add dword [eax + 0xc], ebp
add esp, 0x50
pop ebp
pop edi
pop esi
pop ebx
ret