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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d02ad
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x692c00]
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 - 0x5c], ecx
mov eax, dword [ebp + 0x10]
lea ecx, [ebp - 0x50]
mov edi, dword [ebp + 0x14]
xorps xmm0, xmm0
mov esi, dword [ebp + 0xc]
push 0x65fcf8
push edi
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x64], eax
movq qword [ebp - 0x50], xmm0
mov dword [ebp - 0x48], 0
call fcn.004481f0
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x14]
cdq
and edx, 7
mov dword [ebp - 4], 0
lea ebx, [edx + eax]
sar ebx, 3
call fcn.00438ea0
lea ecx, [esi + 0x14]
mov dword [ebp - 0x54], eax
call fcn.00402fb0
cmp eax, ebx
jae 0x59b808
mov eax, dword [edi]
mov ecx, edi
push str.Not_enough_key_material_for_twofish.
call dword [eax + 0x14]
xor bl, bl
jmp 0x59bd35
mov eax, ebx
cdq
and edx, 7
lea edi, [edx + eax]
sar edi, 3
mov dword [ebp - 0x60], edi
test ebx, ebx
jle 0x59b82b
push ebx
push dword [ebp - 0x54]
lea eax, [ebp - 0x40]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
test edi, edi
jle 0x59b8c1
lea esi, [ebp - 0x1e]
lea eax, [ebp - 0x3a]
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 + 0x65f8f8]
xor ebx, dword [edx*4 + 0x65f0f8]
movzx ecx, byte [eax - 0xa]
xor ebx, dword [ecx*4 + 0x65ecf8]
movzx ecx, byte [eax - 0xb]
xor ebx, dword [ecx*4 + 0x65e8f8]
movzx ecx, byte [eax - 0xc]
xor ebx, dword [ecx*4 + 0x65e4f8]
movzx ecx, byte [eax - 0xd]
xor ebx, dword [ecx*4 + 0x65e0f8]
movzx ecx, byte [eax - 0xe]
xor ebx, dword [ecx*4 + 0x65dcf8]
movzx ecx, byte [eax - 8]
xor ebx, dword [ecx*4 + 0x65f4f8]
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 0x59b840
mov edi, dword [ebp - 0x60]
mov eax, dword [ebp - 0x5c]
add eax, 0x108c
xor ebx, ebx
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x54], ebx
push 0
push edi
lea eax, [ebp - 0x40]
add bl, bl
push eax
lea eax, [ebp - 0x58]
mov byte [ebp - 0x44], bl
push eax
lea eax, [ebp - 0x44]
mov byte [ebp - 0x43], bl
push eax
mov byte [ebp - 0x42], bl
mov byte [ebp - 0x41], bl
call fcn.0059c290
movzx esi, byte [ebp - 0x55]
inc bl
movzx eax, byte [ebp - 0x56]
shl esi, 8
or esi, eax
mov byte [ebp - 0x44], bl
mov eax, dword [ebp - 0x58]
movzx ecx, ah
shl esi, 8
or esi, ecx
movzx eax, al
push 1
shl esi, 8
or esi, eax
mov byte [ebp - 0x43], bl
push edi
lea eax, [ebp - 0x40]
mov byte [ebp - 0x42], bl
push eax
lea eax, [ebp - 0x58]
mov byte [ebp - 0x41], bl
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.0059c290
movzx edx, byte [ebp - 0x55]
add esp, 0x28
movzx eax, byte [ebp - 0x56]
mov ebx, dword [ebp - 0x54]
shl edx, 8
inc ebx
or edx, eax
mov dword [ebp - 0x54], ebx
mov eax, dword [ebp - 0x58]
movzx ecx, ah
shl edx, 8
or edx, ecx
movzx eax, al
mov ecx, dword [ebp - 0x60]
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 dword [ebp - 0x60], ecx
cmp ebx, 0x14
jl 0x59b8d1
xor eax, eax
mov dword [ebp - 0x54], eax
cmp edi, 2
jne 0x59ba7b
mov edi, dword [ebp - 0x5c]
mov dh, byte [ebp - 0x20]
lea esi, [edi + 0x488]
nop dword [eax]
movzx eax, al
lea esi, [esi + 4]
movzx ecx, dh
mov dl, byte [eax + 0x65caf8]
mov bl, byte [eax + 0x65cbf8]
movzx eax, dl
xor ecx, eax
mov eax, dword [ebp - 0x1c]
movzx eax, al
movzx ecx, byte [ecx + 0x65caf8]
xor ecx, eax
movzx eax, byte [ecx + 0x65cbf8]
mov eax, dword [eax*4 + 0x65ccf8]
mov dword [esi - 0x404], eax
mov eax, dword [ebp - 0x1f]
movzx ecx, al
movzx eax, bl
xor ecx, eax
mov eax, dword [ebp - 0x1b]
movzx eax, al
movzx ecx, byte [ecx + 0x65caf8]
xor ecx, eax
movzx eax, byte [ecx + 0x65caf8]
mov eax, dword [eax*4 + 0x65d0f8]
mov dword [esi - 4], eax
mov eax, dword [ebp - 0x1e]
movzx ecx, al
movzx eax, dl
xor ecx, eax
mov eax, dword [ebp - 0x1a]
movzx eax, al
movzx ecx, byte [ecx + 0x65cbf8]
xor ecx, eax
movzx eax, byte [ecx + 0x65cbf8]
mov eax, dword [eax*4 + 0x65d4f8]
mov dword [esi + 0x3fc], eax
mov eax, dword [ebp - 0x1d]
movzx ecx, al
movzx eax, bl
xor ecx, eax
mov eax, dword [ebp - 0x19]
movzx eax, al
movzx ecx, byte [ecx + 0x65cbf8]
xor ecx, eax
movzx eax, byte [ecx + 0x65caf8]
mov eax, dword [eax*4 + 0x65d8f8]
mov dword [esi + 0x7fc], eax
mov eax, dword [ebp - 0x54]
inc eax
mov dword [ebp - 0x54], eax
cmp eax, 0x100
jl 0x59b9a0
jmp 0x59bcf9
cmp edi, 3
mov edi, dword [ebp - 0x5c]
lea esi, [edi + 0x488]
jne 0x59bba7
mov dh, byte [ebp - 0x20]
movzx eax, al
lea esi, [esi + 4]
movzx ecx, dh
mov dl, byte [eax + 0x65cbf8]
mov bl, byte [eax + 0x65caf8]
movzx eax, dl
xor ecx, eax
mov eax, dword [ebp - 0x1c]
movzx eax, al
movzx ecx, byte [ecx + 0x65caf8]
xor ecx, eax
mov eax, dword [ebp - 0x18]
movzx eax, al
movzx ecx, byte [ecx + 0x65caf8]
xor ecx, eax
movzx eax, byte [ecx + 0x65cbf8]
mov eax, dword [eax*4 + 0x65ccf8]
mov dword [esi - 0x404], eax
mov eax, dword [ebp - 0x1f]
movzx ecx, al
movzx eax, dl
xor ecx, eax
mov eax, dword [ebp - 0x1b]
movzx eax, al
movzx ecx, byte [ecx + 0x65cbf8]
xor ecx, eax
mov eax, dword [ebp - 0x17]
movzx eax, al
movzx ecx, byte [ecx + 0x65caf8]
xor ecx, eax
movzx eax, byte [ecx + 0x65caf8]
mov eax, dword [eax*4 + 0x65d0f8]
mov dword [esi - 4], eax
mov eax, dword [ebp - 0x1e]
movzx ecx, al
movzx eax, bl
xor ecx, eax
mov eax, dword [ebp - 0x1a]
movzx eax, al
movzx ecx, byte [ecx + 0x65caf8]
xor ecx, eax
mov eax, dword [ebp - 0x16]
movzx eax, al
movzx ecx, byte [ecx + 0x65cbf8]
xor ecx, eax
movzx eax, byte [ecx + 0x65cbf8]
mov eax, dword [eax*4 + 0x65d4f8]
mov dword [esi + 0x3fc], eax
mov eax, dword [ebp - 0x1d]
movzx ecx, al
movzx eax, bl
xor ecx, eax
mov eax, dword [ebp - 0x19]
movzx eax, al
movzx ecx, byte [ecx + 0x65cbf8]
xor ecx, eax
mov eax, dword [ebp - 0x15]
movzx eax, al
movzx ecx, byte [ecx + 0x65cbf8]
xor ecx, eax
movzx eax, byte [ecx + 0x65caf8]
mov eax, dword [eax*4 + 0x65d8f8]
mov dword [esi + 0x7fc], eax
mov eax, dword [ebp - 0x54]
inc eax
mov dword [ebp - 0x54], eax
cmp eax, 0x100
jl 0x59ba90
jmp 0x59bcf9
mov dh, byte [ebp - 0x11]
mov bh, byte [ebp - 0x12]
nop dword [eax]
movzx eax, al
lea esi, [esi + 4]
movzx ecx, byte [ebp - 0x20]
mov bl, byte [eax + 0x65cbf8]
mov dl, byte [eax + 0x65caf8]
movzx eax, bl
xor ecx, eax
mov eax, dword [ebp - 0x1c]
movzx eax, al
movzx ecx, byte [ecx + 0x65cbf8]
xor ecx, eax
mov eax, dword [ebp - 0x18]
movzx eax, al
movzx ecx, byte [ecx + 0x65caf8]
xor ecx, eax
mov eax, dword [ebp - 0x14]
movzx eax, al
movzx ecx, byte [ecx + 0x65caf8]
xor ecx, eax
movzx eax, byte [ecx + 0x65cbf8]
mov eax, dword [eax*4 + 0x65ccf8]
mov dword [esi - 0x404], eax
mov eax, dword [ebp - 0x1f]
movzx ecx, al
movzx eax, dl
xor ecx, eax
mov eax, dword [ebp - 0x1b]
movzx eax, al
movzx ecx, byte [ecx + 0x65cbf8]
xor ecx, eax
mov eax, dword [ebp - 0x17]
movzx eax, al
movzx ecx, byte [ecx + 0x65cbf8]
xor ecx, eax
mov eax, dword [ebp - 0x14]
movzx eax, ah
movzx ecx, byte [ecx + 0x65caf8]
xor ecx, eax
movzx eax, byte [ecx + 0x65caf8]
mov eax, dword [eax*4 + 0x65d0f8]
mov dword [esi - 4], eax
mov eax, dword [ebp - 0x1e]
movzx ecx, al
movzx eax, dl
xor ecx, eax
mov eax, dword [ebp - 0x1a]
movzx eax, al
movzx ecx, byte [ecx + 0x65caf8]
xor ecx, eax
mov eax, dword [ebp - 0x16]
movzx eax, al
movzx ecx, byte [ecx + 0x65caf8]
xor ecx, eax
movzx eax, bh
movzx ecx, byte [ecx + 0x65cbf8]
xor ecx, eax
movzx eax, byte [ecx + 0x65cbf8]
mov eax, dword [eax*4 + 0x65d4f8]
mov dword [esi + 0x3fc], eax
mov eax, dword [ebp - 0x1d]
movzx ecx, al
movzx eax, bl
xor ecx, eax
mov eax, dword [ebp - 0x19]
movzx eax, al
movzx ecx, byte [ecx + 0x65caf8]
xor ecx, eax
mov eax, dword [ebp - 0x15]
movzx eax, al
movzx ecx, byte [ecx + 0x65cbf8]
xor ecx, eax
movzx eax, dh
movzx ecx, byte [ecx + 0x65cbf8]
xor ecx, eax
movzx eax, byte [ecx + 0x65caf8]
mov eax, dword [eax*4 + 0x65d8f8]
mov dword [esi + 0x7fc], eax
mov eax, dword [ebp - 0x54]
inc eax
mov dword [ebp - 0x54], eax
cmp eax, 0x100
jl 0x59bbb0
mov ebx, dword [ebp - 0x64]
test ebx, ebx
je 0x59bd33
mov esi, dword [ebp - 0x68]
mov eax, dword [esi + 8]
cmp eax, 3
je 0x59bd10
cmp eax, 4
jne 0x59bd33
push dword [edi + 0x80]
lea ecx, [esi + 0x34]
call fcn.00402fb0
push eax
lea ecx, [esi + 0x34]
call fcn.00438ea0
push eax
lea ecx, [ebx + 0x484]
call fcn.00597b60
mov bl, 1
lea ecx, [ebp - 0x50]
call fcn.004482f0
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.005b34c8
mov esp, ebp
pop ebp
ret 0x10