Function at 0x40d62b
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
cmp dword [ebp + 0x10], 0x10
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0x18]
jne 0x40d6d2
cmp dword [ebp + 0x14], 0
lea eax, [ebp - 0x28]
jne 0x40d66e
cmp dword [ebx + 0x1104], 0
je 0x40d66e
xor ecx, ecx
mov dl, byte [esi + ecx]
xor dl, byte [ebx + ecx + 0x10d4]
mov byte [ebp + ecx - 0x28], dl
inc ecx
cmp ecx, 0x10
jne 0x40d658
jmp 0x40d677
mov ecx, 4
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp + 0x14]
mov dword [esp + 0xc], ebx
mov dword [esp], eax
mov dword [esp + 8], edi
mov edi, dword [ebp + 0xc]
mov dword [esp + 4], edi
call sym.__TwoFish_BlockCrypt16
cmp dword [ebp + 0x14], 0
jne 0x40d6b2
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
lea eax, [ebp - 0x28]
mov dword [esp], eax
call sym.__TwoFish_qBlockPush
jmp 0x40d85c
cmp dword [ebx + 0x1104], 0
je 0x40d697
xor eax, eax
mov esi, dword [ebp + 0xc]
mov dl, byte [ebx + eax + 0x10c4]
xor byte [esi + eax], dl
inc eax
cmp eax, 0x10
jne 0x40d6bd
jmp 0x40d697
cmp dword [ebp + 0x14], 0
mov dword [esp + 8], ebx
lea eax, [ebp - 0x58]
je 0x40d7b8
mov dword [esp + 4], eax
lea eax, [ebp - 0x48]
lea edi, [ebp - 0x38]
mov dword [esp], eax
call sym.__TwoFish_qBlockPop
mov eax, dword [ebp + 0x14]
mov dword [esp + 0xc], ebx
mov dword [esp + 4], edi
mov dword [esp + 8], eax
lea eax, [ebp - 0x48]
mov dword [esp], eax
call sym.__TwoFish_BlockCrypt16
xor eax, eax
cmp eax, dword [ebp + 0x10]
je 0x40d725
mov ecx, dword [ebp + 0xc]
mov dl, byte [esi + eax]
xor dl, byte [edi + eax]
mov byte [ecx + eax], dl
inc eax
jmp 0x40d711
lea eax, [ebp - 0x48]
mov ecx, dword [ebp + 0x10]
mov edi, eax
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x10
sub ecx, dword [ebp + 0x10]
mov edx, edi
mov edi, dword [ebp + 0x10]
lea esi, [ebp + edi - 0x38]
mov edi, edx
lea edx, [ebp - 0x58]
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp + 0x14]
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
call sym.__TwoFish_BlockCrypt16
xor edx, edx
lea eax, [ebp - 0x48]
mov cl, byte [ebp + edx - 0x58]
xor cl, byte [ebx + edx + 0x10e4]
lea esi, [ebp - 0x58]
mov byte [ebp + edx - 0x58], cl
inc edx
cmp edx, 0x10
jne 0x40d763
mov dword [esp], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
call sym.__TwoFish_qBlockPush
lea eax, [ebx + 0x10d4]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], 0x10
call sym.__TwoFish_FlushOutput
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
jmp 0x40d84a
lea edi, [ebp - 0x48]
mov dword [esp], eax
lea edx, [ebp - 0x28]
mov dword [esp + 4], edi
mov edi, edx
call sym.__TwoFish_qBlockPop
mov eax, dword [ebp + 0x14]
mov ecx, 4
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x10]
mov edi, edx
xor eax, eax
rep movsb byte es:[edi], byte [esi]
mov dl, byte [ebp + eax - 0x28]
xor dl, byte [ebp + eax - 0x48]
lea esi, [ebp - 0x28]
mov byte [ebp + eax - 0x28], dl
inc eax
cmp eax, 0x10
jne 0x40d7df
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], esi
call sym.__TwoFish_BlockCrypt16
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], ebx
mov dword [esp], esi
mov dword [esp + 4], eax
call sym.__TwoFish_qBlockPush
lea eax, [ebx + 0x10d4]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], 0x10
call sym.__TwoFish_FlushOutput
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
lea eax, [ebp - 0x48]
mov dword [esp], eax
call sym.__TwoFish_FlushOutput
mov dword [ebx + 0x1104], 0
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret