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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5f9688
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x6baac0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x60], ecx
mov eax, dword [ebp + 0x10]
lea ecx, [ebp - 0x54]
mov edi, dword [ebp + 0x14]
xorps xmm0, xmm0
mov esi, dword [ebp + 0xc]
push 0x652548
push edi
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x68], eax
movq qword [ebp - 0x54], xmm0
mov dword [ebp - 0x4c], 0
call fcn.00430cc0
mov eax, dword [esi + 0xc]
lea ecx, [esi + 0x10]
cdq
and edx, 7
mov dword [ebp - 4], 0
lea ebx, [edx + eax]
sar ebx, 3
call fcn.00414910
lea ecx, [esi + 0x10]
mov dword [ebp - 0x58], eax
call fcn.00401c90
cmp eax, ebx
jae 0x4d9238
mov eax, dword [edi]
mov ecx, edi
push str.Not_enough_key_material_for_twofish.
call dword [eax + 0x14]
xor bl, bl
jmp 0x4d9769
mov eax, ebx
cdq
and edx, 7
lea edi, [edx + eax]
sar edi, 3
mov dword [ebp - 0x64], edi
test ebx, ebx
jle 0x4d925b
push ebx
push dword [ebp - 0x58]
lea eax, [ebp - 0x44]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
test edi, edi
jle 0x4d92f1
lea esi, [ebp - 0x22]
lea eax, [ebp - 0x3e]
nop dword [eax]
movzx ecx, byte [eax + 1]
lea esi, [esi + 4]
movzx edx, byte [eax - 1]
lea eax, [eax + 8]
mov ebx, dword [ecx*4 + 0x652148]
xor ebx, dword [edx*4 + 0x651948]
movzx ecx, byte [eax - 0xa]
xor ebx, dword [ecx*4 + 0x651548]
movzx ecx, byte [eax - 0xb]
xor ebx, dword [ecx*4 + 0x651148]
movzx ecx, byte [eax - 0xc]
xor ebx, dword [ecx*4 + 0x650d48]
movzx ecx, byte [eax - 0xd]
xor ebx, dword [ecx*4 + 0x650948]
movzx ecx, byte [eax - 0xe]
xor ebx, dword [ecx*4 + 0x650548]
movzx ecx, byte [eax - 8]
xor ebx, dword [ecx*4 + 0x651d48]
mov ecx, ebx
mov byte [esi - 6], bl
shr ecx, 0x18
mov byte [esi - 3], cl
mov ecx, ebx
shr ecx, 0x10
mov byte [esi - 4], cl
mov ecx, ebx
shr ecx, 8
mov byte [esi - 5], cl
sub edi, 1
jne 0x4d9270
mov edi, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x60]
xor eax, eax
add ecx, 0x108c
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x58], ecx
mov bl, al
lea eax, [ebp - 0x44]
push 0
push edi
push eax
lea eax, [ebp - 0x5c]
add bl, bl
push eax
lea eax, [ebp - 0x48]
mov byte [ebp - 0x48], bl
push eax
mov byte [ebp - 0x47], bl
mov byte [ebp - 0x46], bl
mov byte [ebp - 0x45], bl
call fcn.004d9ce0
movzx esi, byte [ebp - 0x59]
inc bl
movzx eax, byte [ebp - 0x5a]
shl esi, 8
or esi, eax
mov byte [ebp - 0x48], bl
mov eax, dword [ebp - 0x5c]
movzx ecx, ah
shl esi, 8
or esi, ecx
movzx eax, al
push 1
shl esi, 8
or esi, eax
mov byte [ebp - 0x47], bl
push edi
lea eax, [ebp - 0x44]
mov byte [ebp - 0x46], bl
push eax
lea eax, [ebp - 0x5c]
mov byte [ebp - 0x45], bl
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.004d9ce0
movzx edx, byte [ebp - 0x59]
add esp, 0x28
movzx eax, byte [ebp - 0x5a]
shl edx, 8
or edx, eax
mov eax, dword [ebp - 0x5c]
movzx ecx, ah
shl edx, 8
or edx, ecx
movzx eax, al
mov ecx, dword [ebp - 0x58]
shl edx, 8
or edx, eax
rol edx, 8
lea eax, [edx + esi]
mov dword [ecx - 4], eax
lea eax, [esi + edx*2]
rol eax, 9
mov dword [ecx], eax
add ecx, 8
mov eax, dword [ebp - 0x64]
inc eax
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x64], eax
cmp eax, 0x14
jl 0x4d9302
mov dh, byte [ebp - 0x24]
xor eax, eax
mov dword [ebp - 0x58], eax
cmp edi, 2
jne 0x4d94ab
mov edi, dword [ebp - 0x60]
lea esi, [edi + 0x488]
nop
movzx eax, al
lea esi, [esi + 4]
movzx ecx, dh
mov dl, byte [eax + 0x64f348]
mov bl, byte [eax + 0x64f448]
movzx eax, dl
xor ecx, eax
mov eax, dword [ebp - 0x20]
movzx eax, al
movzx ecx, byte [ecx + 0x64f348]
xor ecx, eax
movzx eax, byte [ecx + 0x64f448]
mov eax, dword [eax*4 + 0x64f548]
mov dword [esi - 0x404], eax
mov eax, dword [ebp - 0x23]
movzx ecx, al
movzx eax, bl
xor ecx, eax
mov eax, dword [ebp - 0x1f]
movzx eax, al
movzx ecx, byte [ecx + 0x64f348]
xor ecx, eax
movzx eax, byte [ecx + 0x64f348]
mov eax, dword [eax*4 + 0x64f948]
mov dword [esi - 4], eax
mov eax, dword [ebp - 0x22]
movzx ecx, al
movzx eax, dl
xor ecx, eax
mov eax, dword [ebp - 0x1e]
movzx eax, al
movzx ecx, byte [ecx + 0x64f448]
xor ecx, eax
movzx eax, byte [ecx + 0x64f448]
mov eax, dword [eax*4 + 0x64fd48]
mov dword [esi + 0x3fc], eax
mov eax, dword [ebp - 0x21]
movzx ecx, al
movzx eax, bl
xor ecx, eax
mov eax, dword [ebp - 0x1d]
movzx eax, al
movzx ecx, byte [ecx + 0x64f448]
xor ecx, eax
movzx eax, byte [ecx + 0x64f348]
mov eax, dword [eax*4 + 0x650148]
mov dword [esi + 0x7fc], eax
mov eax, dword [ebp - 0x58]
inc eax
mov dword [ebp - 0x58], eax
cmp eax, 0x100
jl 0x4d93d0
jmp 0x4d972d
cmp edi, 3
mov edi, dword [ebp - 0x60]
lea esi, [edi + 0x488]
jne 0x4d95e0
nop dword [eax]
movzx eax, al
lea esi, [esi + 4]
movzx ecx, dh
mov dl, byte [eax + 0x64f448]
mov bl, byte [eax + 0x64f348]
movzx eax, dl
xor ecx, eax
mov eax, dword [ebp - 0x20]
movzx eax, al
movzx ecx, byte [ecx + 0x64f348]
xor ecx, eax
mov eax, dword [ebp - 0x1c]
movzx eax, al
movzx ecx, byte [ecx + 0x64f348]
xor ecx, eax
movzx eax, byte [ecx + 0x64f448]
mov eax, dword [eax*4 + 0x64f548]
mov dword [esi - 0x404], eax
mov eax, dword [ebp - 0x23]
movzx ecx, al
movzx eax, dl
xor ecx, eax
mov eax, dword [ebp - 0x1f]
movzx eax, al
movzx ecx, byte [ecx + 0x64f448]
xor ecx, eax
mov eax, dword [ebp - 0x1b]
movzx eax, al
movzx ecx, byte [ecx + 0x64f348]
xor ecx, eax
movzx eax, byte [ecx + 0x64f348]
mov eax, dword [eax*4 + 0x64f948]
mov dword [esi - 4], eax
mov eax, dword [ebp - 0x22]
movzx ecx, al
movzx eax, bl
xor ecx, eax
mov eax, dword [ebp - 0x1e]
movzx eax, al
movzx ecx, byte [ecx + 0x64f348]
xor ecx, eax
mov eax, dword [ebp - 0x1a]
movzx eax, al
movzx ecx, byte [ecx + 0x64f448]
xor ecx, eax
movzx eax, byte [ecx + 0x64f448]
mov eax, dword [eax*4 + 0x64fd48]
mov dword [esi + 0x3fc], eax
mov eax, dword [ebp - 0x21]
movzx ecx, al
movzx eax, bl
xor ecx, eax
mov eax, dword [ebp - 0x1d]
movzx eax, al
movzx ecx, byte [ecx + 0x64f448]
xor ecx, eax
mov eax, dword [ebp - 0x19]
movzx eax, al
movzx ecx, byte [ecx + 0x64f448]
xor ecx, eax
movzx eax, byte [ecx + 0x64f348]
mov eax, dword [eax*4 + 0x650148]
mov dword [esi + 0x7fc], eax
mov eax, dword [ebp - 0x58]
inc eax
mov dword [ebp - 0x58], eax
cmp eax, 0x100
jl 0x4d94c0
jmp 0x4d972d
movzx eax, al
movzx ecx, dh
mov bl, byte [eax + 0x64f448]
mov dl, byte [eax + 0x64f348]
movzx eax, bl
xor ecx, eax
mov eax, dword [ebp - 0x20]
movzx eax, al
movzx ecx, byte [ecx + 0x64f448]
xor ecx, eax
mov eax, dword [ebp - 0x1c]
movzx eax, al
movzx ecx, byte [ecx + 0x64f348]
xor ecx, eax
mov eax, dword [ebp - 0x18]
movzx eax, al
movzx ecx, byte [ecx + 0x64f348]
xor ecx, eax
movzx eax, byte [ecx + 0x64f448]
mov eax, dword [eax*4 + 0x64f548]
mov dword [esi - 0x400], eax
mov eax, dword [ebp - 0x23]
movzx ecx, al
movzx eax, dl
xor ecx, eax
mov eax, dword [ebp - 0x1f]
movzx eax, al
movzx ecx, byte [ecx + 0x64f448]
xor ecx, eax
mov eax, dword [ebp - 0x1b]
movzx eax, al
movzx ecx, byte [ecx + 0x64f448]
xor ecx, eax
mov eax, dword [ebp - 0x17]
movzx eax, al
movzx ecx, byte [ecx + 0x64f348]
xor ecx, eax
movzx eax, byte [ecx + 0x64f348]
mov eax, dword [eax*4 + 0x64f948]
mov dword [esi], eax
mov eax, dword [ebp - 0x22]
movzx ecx, al
movzx eax, dl
xor ecx, eax
mov eax, dword [ebp - 0x1e]
movzx eax, al
movzx ecx, byte [ecx + 0x64f348]
xor ecx, eax
mov eax, dword [ebp - 0x1a]
movzx eax, al
movzx ecx, byte [ecx + 0x64f348]
xor ecx, eax
mov eax, dword [ebp - 0x16]
movzx eax, al
movzx ecx, byte [ecx + 0x64f448]
xor ecx, eax
movzx eax, byte [ecx + 0x64f448]
mov eax, dword [eax*4 + 0x64fd48]
mov dword [esi + 0x400], eax
mov eax, dword [ebp - 0x21]
movzx ecx, al
movzx eax, bl
xor ecx, eax
mov eax, dword [ebp - 0x1d]
movzx eax, al
movzx ecx, byte [ecx + 0x64f348]
xor ecx, eax
mov eax, dword [ebp - 0x19]
movzx eax, al
movzx ecx, byte [ecx + 0x64f448]
xor ecx, eax
mov eax, dword [ebp - 0x15]
movzx eax, al
movzx ecx, byte [ecx + 0x64f448]
xor ecx, eax
movzx eax, byte [ecx + 0x64f348]
mov eax, dword [eax*4 + 0x650148]
mov dword [esi + 0x800], eax
mov eax, dword [ebp - 0x58]
inc eax
mov dword [ebp - 0x58], eax
lea esi, [esi + 4]
cmp eax, 0x100
jl 0x4d95e0
mov ebx, dword [ebp - 0x68]
test ebx, ebx
je 0x4d9767
mov esi, dword [ebp - 0x6c]
mov eax, dword [esi + 4]
cmp eax, 3
je 0x4d9744
cmp eax, 4
jne 0x4d9767
push dword [edi + 0x80]
lea ecx, [esi + 0x30]
call fcn.00401c90
push eax
lea ecx, [esi + 0x30]
call fcn.00414910
push eax
lea ecx, [ebx + 0x484]
call fcn.004d5ce0
mov bl, 1
lea ecx, [ebp - 0x54]
call fcn.00430db0
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005ebe04
mov esp, ebp
pop ebp
ret 0x10