Function at 0x40bf3f
Capabilities:
Encode data using xor
Encrypt data using twofish

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x240
push ebx
push esi
push edi
call fcn.0040ba99
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x30]
mov dword [ebp - 4], eax
lea eax, [esi + 0xc]
mov dword [ebp - 8], eax
xor ebx, ebx
mov ecx, dword [edi + 4]
mov eax, dword [edi]
push ecx
push eax
mov dword [ebp + ebx - 0x18], eax
mov dword [ebp + ebx - 0x28], ecx
call fcn.0040bbec
pop ecx
pop ecx
mov ecx, dword [ebp - 8]
sub dword [ebp - 8], 4
mov dword [ecx], eax
mov ecx, dword [ebp - 4]
sub dword [ebp - 4], 4
add ebx, 4
add edi, 8
cmp ebx, 0x10
mov dword [ecx], eax
jl 0x40bf64
and dword [ebp - 8], 0
add esi, 0x14
mov dword [ebp - 0x40], 0x14
mov eax, dword [ebp - 8]
mov dword [ebp - 4], eax
movzx edi, byte [ebp - 1]
mov bl, byte [edi + 0x421928]
movzx eax, al
mov al, byte [eax + 0x421928]
xor al, byte [ebp - 0xc]
xor bl, byte [ebp - 9]
movzx ecx, byte [ebp - 3]
mov cl, byte [ecx + 0x421828]
xor cl, byte [ebp - 0xb]
movzx eax, al
mov al, byte [eax + 0x421928]
xor al, byte [ebp - 0x10]
movzx edx, byte [ebp - 2]
mov dl, byte [edx + 0x421828]
xor dl, byte [ebp - 0xa]
movzx eax, al
movzx edi, bl
mov bl, byte [edi + 0x421828]
movzx edi, byte [eax + 0x421828]
movzx eax, byte [ebp - 0x14]
xor edi, eax
movzx edi, byte [edi + 0x421828]
movzx eax, byte [ebp - 0x18]
xor edi, eax
movzx ecx, cl
mov cl, byte [ecx + 0x421928]
xor cl, byte [ebp - 0xf]
xor bl, byte [ebp - 0xd]
movzx eax, cl
movzx ecx, byte [eax + 0x421928]
movzx eax, byte [ebp - 0x13]
xor ecx, eax
movzx eax, byte [ecx + 0x421828]
mov ecx, eax
movzx eax, byte [ebp - 0x17]
movzx edx, dl
mov dl, byte [edx + 0x421828]
xor dl, byte [ebp - 0xe]
xor ecx, eax
movzx eax, dl
movzx edx, byte [eax + 0x421828]
movzx eax, byte [ebp - 0x12]
xor edx, eax
movzx edx, byte [edx + 0x421928]
movzx eax, byte [ebp - 0x16]
xor edx, eax
mov dword [ebp - 4], ecx
mov ecx, dword [edi*4 + 0x421a90]
mov edi, dword [ebp - 4]
xor ecx, dword [edi*4 + 0x421e90]
movzx eax, bl
xor ecx, dword [edx*4 + 0x422290]
movzx edx, byte [eax + 0x421928]
movzx eax, byte [ebp - 0x11]
xor edx, eax
movzx edx, byte [edx + 0x421928]
movzx eax, byte [ebp - 0x15]
xor edx, eax
mov eax, dword [ebp - 8]
xor ecx, dword [edx*4 + 0x422690]
add eax, 0x1010101
mov dword [ebp - 4], eax
movzx edi, byte [ebp - 2]
mov bl, byte [edi + 0x421828]
xor bl, byte [ebp - 0x1a]
movzx edx, byte [ebp - 3]
movzx edi, byte [ebp - 1]
mov dl, byte [edx + 0x421828]
xor dl, byte [ebp - 0x1b]
movzx eax, al
mov al, byte [eax + 0x421928]
xor al, byte [ebp - 0x1c]
mov byte [ebp - 2], bl
mov bl, byte [edi + 0x421928]
xor bl, byte [ebp - 0x19]
movzx eax, al
mov al, byte [eax + 0x421928]
xor al, byte [ebp - 0x20]
movzx edi, bl
mov bl, byte [edi + 0x421828]
xor bl, byte [ebp - 0x1d]
movzx eax, al
movzx edi, bl
movzx ebx, byte [edi + 0x421928]
movzx edi, byte [ebp - 0x21]
xor ebx, edi
movzx ebx, byte [ebx + 0x421928]
movzx edi, byte [ebp - 0x25]
xor ebx, edi
movzx edi, byte [eax + 0x421828]
movzx eax, byte [ebp - 0x24]
xor edi, eax
movzx edi, byte [edi + 0x421828]
movzx eax, byte [ebp - 0x28]
movzx edx, dl
mov dl, byte [edx + 0x421928]
xor dl, byte [ebp - 0x1f]
xor edi, eax
mov eax, dword [ebx*4 + 0x422690]
xor eax, dword [edi*4 + 0x421a90]
mov byte [ebp - 3], dl
movzx edi, byte [ebp - 3]
movzx ebx, byte [edi + 0x421928]
movzx edx, byte [ebp - 2]
mov dl, byte [edx + 0x421828]
xor dl, byte [ebp - 0x1e]
movzx edi, byte [ebp - 0x23]
xor ebx, edi
movzx ebx, byte [ebx + 0x421828]
movzx edi, byte [ebp - 0x27]
movzx edx, dl
xor ebx, edi
movzx edi, byte [edx + 0x421828]
movzx edx, byte [ebp - 0x22]
xor eax, dword [ebx*4 + 0x421e90]
xor edi, edx
movzx edi, byte [edi + 0x421928]
movzx edx, byte [ebp - 0x26]
add dword [ebp - 8], 0x2020202
xor edi, edx
xor eax, dword [edi*4 + 0x422290]
mov edx, eax
shl eax, 8
shr edx, 0x18
or edx, eax
lea eax, [edx + ecx]
mov dword [esi - 4], eax
lea eax, [ecx + edx*2]
mov ecx, eax
shr ecx, 0x17
shl eax, 9
or ecx, eax
mov dword [esi], ecx
add esi, 8
dec dword [ebp - 0x40]
jne 0x40bfa5
push dword [ebp - 0x30]
lea eax, [ebp - 0x240]
push 0x421928
push eax
call fcn.0040bc6a
add esp, 0xc
xor eax, eax
mov esi, 0x100
movzx ecx, byte [ebp + eax - 0x240]
mov cl, byte [ecx + 0x421928]
mov byte [ebp + eax - 0x140], cl
movzx ecx, byte [ebp + eax - 0x23f]
mov cl, byte [ecx + 0x421928]
mov byte [ebp + eax - 0x13f], cl
inc eax
inc eax
cmp eax, esi
jl 0x40c1fc
push dword [ebp - 0x34]
lea eax, [ebp - 0x140]
push eax
push eax
call fcn.0040bc6a
mov eax, dword [ebp + 0xc]
movzx edx, byte [ebp - 0x3c]
movzx edi, byte [ebp - 0x38]
add esp, 0xc
xor ecx, ecx
add eax, 0xb8
movzx ebx, byte [ebp + ecx - 0x140]
movzx ebx, byte [ebx + 0x421828]
xor ebx, edi
movzx ebx, byte [ebx + 0x421828]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x421a90]
mov dword [eax - 8], ebx
movzx ebx, byte [ebp + ecx - 0x13f]
movzx ebx, byte [ebx + 0x421828]
xor ebx, edi
movzx ebx, byte [ebx + 0x421828]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x421a90]
inc ecx
mov dword [eax], ebx
inc ecx
add eax, 0x10
cmp ecx, esi
jl 0x40c251
push dword [ebp - 0x2f]
lea eax, [ebp - 0x240]
push 0x421828
push eax
call fcn.0040bc6a
add esp, 0xc
xor eax, eax
movzx ecx, byte [ebp + eax - 0x240]
mov cl, byte [ecx + 0x421928]
mov byte [ebp + eax - 0x140], cl
movzx ecx, byte [ebp + eax - 0x23f]
mov cl, byte [ecx + 0x421928]
mov byte [ebp + eax - 0x13f], cl
inc eax
inc eax
cmp eax, esi
jl 0x40c2ba
push dword [ebp - 0x33]
lea eax, [ebp - 0x140]
push eax
push eax
call fcn.0040bc6a
mov eax, dword [ebp + 0xc]
movzx edx, byte [ebp - 0x3b]
movzx edi, byte [ebp - 0x37]
add esp, 0xc
xor ecx, ecx
add eax, 0xbc
movzx ebx, byte [ebp + ecx - 0x140]
movzx ebx, byte [ebx + 0x421928]
xor ebx, edi
movzx ebx, byte [ebx + 0x421828]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x421e90]
mov dword [eax - 8], ebx
movzx ebx, byte [ebp + ecx - 0x13f]
movzx ebx, byte [ebx + 0x421928]
xor ebx, edi
movzx ebx, byte [ebx + 0x421828]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x421e90]
inc ecx
mov dword [eax], ebx
inc ecx
add eax, 0x10
cmp ecx, esi
jl 0x40c30f
push dword [ebp - 0x2e]
lea eax, [ebp - 0x240]
push 0x421828
push eax
call fcn.0040bc6a
add esp, 0xc
xor eax, eax
movzx ecx, byte [ebp + eax - 0x240]
mov cl, byte [ecx + 0x421828]
mov byte [ebp + eax - 0x140], cl
movzx ecx, byte [ebp + eax - 0x23f]
mov cl, byte [ecx + 0x421828]
mov byte [ebp + eax - 0x13f], cl
inc eax
inc eax
cmp eax, esi
jl 0x40c378
push dword [ebp - 0x32]
lea eax, [ebp - 0x140]
push eax
push eax
call fcn.0040bc6a
mov eax, dword [ebp + 0xc]
movzx edx, byte [ebp - 0x3a]
movzx edi, byte [ebp - 0x36]
add esp, 0xc
xor ecx, ecx
add eax, 0x8b8
movzx ebx, byte [ebp + ecx - 0x140]
movzx ebx, byte [ebx + 0x421828]
xor ebx, edi
movzx ebx, byte [ebx + 0x421928]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x422290]
mov dword [eax - 8], ebx
movzx ebx, byte [ebp + ecx - 0x13f]
movzx ebx, byte [ebx + 0x421828]
xor ebx, edi
movzx ebx, byte [ebx + 0x421928]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x422290]
inc ecx
mov dword [eax], ebx
inc ecx
add eax, 0x10
cmp ecx, esi
jl 0x40c3cd
push dword [ebp - 0x2d]
lea eax, [ebp - 0x240]
push 0x421928
push eax
call fcn.0040bc6a
add esp, 0xc
xor eax, eax
movzx ecx, byte [ebp + eax - 0x240]
mov cl, byte [ecx + 0x421828]
mov byte [ebp + eax - 0x140], cl
movzx ecx, byte [ebp + eax - 0x23f]
mov cl, byte [ecx + 0x421828]
mov byte [ebp + eax - 0x13f], cl
inc eax
inc eax
cmp eax, esi
jl 0x40c436
push dword [ebp - 0x31]
lea eax, [ebp - 0x140]
push eax
push eax
call fcn.0040bc6a
mov eax, dword [ebp + 0xc]
movzx edx, byte [ebp - 0x39]
movzx edi, byte [ebp - 0x35]
add esp, 0xc
xor ecx, ecx
add eax, 0x8bc
movzx ebx, byte [ebp + ecx - 0x140]
movzx ebx, byte [ebx + 0x421928]
xor ebx, edi
movzx ebx, byte [ebx + 0x421928]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x422690]
mov dword [eax - 8], ebx
movzx ebx, byte [ebp + ecx - 0x13f]
movzx ebx, byte [ebx + 0x421928]
xor ebx, edi
movzx ebx, byte [ebx + 0x421928]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x422690]
inc ecx
mov dword [eax], ebx
inc ecx
add eax, 0x10
cmp ecx, esi
jl 0x40c48b
pop edi
xor eax, eax
pop esi
inc eax
pop ebx
leave
ret