Function at 0x5b7710
Capabilities:
Encrypt data using twofish

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d81f8
mov eax, dword fs:[0]
push eax
sub esp, 0x74
mov eax, dword [0x6a7c78]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x80], ecx
push 0x68aeb8
mov eax, dword [ebp + 0x14]
push eax
lea ecx, [ebp - 0x48]
call fcn.00505810
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + 0xc]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x60], 0x10
mov ecx, dword [ebp + 0xc]
add ecx, 0x10
call fcn.005a6d60
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp + 0xc]
add ecx, 0x10
call fcn.004eff70
cmp eax, dword [ebp - 0x70]
jae 0x5b77b7
push str.Not_enough_key_material_for_twofish.
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x14]
mov edx, dword [eax + 0x14]
call edx
mov byte [ebp - 0x79], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x48]
call fcn.005058c0
mov al, byte [ebp - 0x79]
jmp 0x5b7eaf
mov eax, dword [ebp - 0x70]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x38], 0
jmp 0x5b77d8
mov eax, dword [ebp - 0x38]
add eax, 1
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x38]
cmp ecx, dword [ebp - 0x70]
jge 0x5b77f7
mov edx, dword [ebp - 0x5c]
add edx, dword [ebp - 0x38]
movzx eax, byte [edx]
and eax, 0xff
mov ecx, dword [ebp - 0x38]
mov byte [ebp + ecx - 0x30], al
jmp 0x5b77cf
mov dword [ebp - 0x38], 0
jmp 0x5b7809
mov edx, dword [ebp - 0x38]
add edx, 1
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 0x74]
jge 0x5b782b
mov ecx, dword [ebp - 0x38]
lea edx, [ebp + ecx*4 - 0x58]
push edx
mov eax, dword [ebp - 0x38]
lea ecx, [ebp + eax*8 - 0x30]
push ecx
call fcn.005b7ed0
add esp, 8
jmp 0x5b7800
mov dword [ebp - 0x38], 0
jmp 0x5b783d
mov edx, dword [ebp - 0x38]
add edx, 1
mov dword [ebp - 0x38], edx
cmp dword [ebp - 0x38], 0x14
jge 0x5b799d
mov dword [ebp - 0x34], 0
jmp 0x5b7859
mov eax, dword [ebp - 0x34]
add eax, 1
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 4
jge 0x5b786e
mov ecx, dword [ebp - 0x38]
add ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
mov byte [ebp + edx - 0x64], cl
jmp 0x5b7850
push 0
mov eax, dword [ebp - 0x74]
push eax
lea ecx, [ebp - 0x30]
push ecx
lea edx, [ebp - 0x6c]
push edx
lea eax, [ebp - 0x64]
push eax
call fcn.005b7fa0
add esp, 0x14
movzx ecx, byte [ebp - 0x69]
and ecx, 0xff
shl ecx, 0x18
movzx edx, byte [ebp - 0x6a]
and edx, 0xff
shl edx, 0x10
or ecx, edx
movzx eax, byte [ebp - 0x6b]
and eax, 0xff
shl eax, 8
or ecx, eax
movzx edx, byte [ebp - 0x6c]
and edx, 0xff
or ecx, edx
mov dword [ebp - 0x78], ecx
xor eax, eax
jne 0x5b7888
mov dword [ebp - 0x34], 0
jmp 0x5b78d7
mov ecx, dword [ebp - 0x34]
add ecx, 1
mov dword [ebp - 0x34], ecx
cmp dword [ebp - 0x34], 4
jge 0x5b78f0
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x38]
lea ecx, [eax + edx + 1]
mov edx, dword [ebp - 0x34]
mov byte [ebp + edx - 0x64], cl
jmp 0x5b78ce
push 1
mov eax, dword [ebp - 0x74]
push eax
lea ecx, [ebp - 0x30]
push ecx
lea edx, [ebp - 0x6c]
push edx
lea eax, [ebp - 0x64]
push eax
call fcn.005b7fa0
add esp, 0x14
movzx ecx, byte [ebp - 0x69]
and ecx, 0xff
shl ecx, 0x18
movzx edx, byte [ebp - 0x6a]
and edx, 0xff
shl edx, 0x10
or ecx, edx
movzx eax, byte [ebp - 0x6b]
and eax, 0xff
shl eax, 8
or ecx, eax
movzx edx, byte [ebp - 0x6c]
and edx, 0xff
or ecx, edx
mov dword [ebp - 0x68], ecx
xor eax, eax
jne 0x5b790a
mov ecx, dword [ebp - 0x68]
shl ecx, 8
mov edx, dword [ebp - 0x68]
shr edx, 0x18
or ecx, edx
mov dword [ebp - 0x68], ecx
mov eax, dword [ebp - 0x78]
add eax, dword [ebp - 0x68]
mov ecx, dword [ebp - 0x38]
add ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x80]
mov dword [edx + ecx*4 + 0x1084], eax
mov eax, dword [ebp - 0x68]
add eax, dword [ebp - 0x68]
add eax, dword [ebp - 0x78]
shl eax, 9
mov ecx, dword [ebp - 0x68]
add ecx, dword [ebp - 0x68]
add ecx, dword [ebp - 0x78]
shr ecx, 0x17
or eax, ecx
mov edx, dword [ebp - 0x38]
add edx, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x80]
mov dword [ecx + edx*4 + 0x1088], eax
jmp 0x5b7834
cmp dword [ebp - 0x74], 2
jne 0x5b7ae8
mov dword [ebp - 0x38], 0
jmp 0x5b79b9
mov edx, dword [ebp - 0x38]
add edx, 1
mov dword [ebp - 0x38], edx
cmp dword [ebp - 0x38], 0x100
jge 0x5b7ae3
mov eax, dword [ebp - 0x38]
and eax, 0xff
mov cl, byte [eax + 0x687cb8]
mov byte [ebp - 0x3a], cl
mov edx, dword [ebp - 0x38]
and edx, 0xff
mov al, byte [edx + 0x687db8]
mov byte [ebp - 0x39], al
movzx ecx, byte [ebp - 0x3a]
movzx edx, byte [ebp - 0x58]
xor ecx, edx
and ecx, 0xff
movzx eax, byte [ecx + 0x687cb8]
movzx ecx, byte [ebp - 0x54]
xor eax, ecx
and eax, 0xff
movzx edx, byte [eax + 0x687db8]
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x80]
mov edx, dword [edx*4 + 0x687eb8]
mov dword [ecx + eax*4 + 0x84], edx
movzx eax, byte [ebp - 0x39]
movzx ecx, byte [ebp - 0x57]
xor eax, ecx
and eax, 0xff
movzx edx, byte [eax + 0x687cb8]
movzx eax, byte [ebp - 0x53]
xor edx, eax
and edx, 0xff
movzx ecx, byte [edx + 0x687cb8]
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x80]
mov ecx, dword [ecx*4 + 0x6882b8]
mov dword [eax + edx*4 + 0x484], ecx
movzx edx, byte [ebp - 0x3a]
movzx eax, byte [ebp - 0x56]
xor edx, eax
and edx, 0xff
movzx ecx, byte [edx + 0x687db8]
movzx edx, byte [ebp - 0x52]
xor ecx, edx
and ecx, 0xff
movzx eax, byte [ecx + 0x687db8]
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x80]
mov eax, dword [eax*4 + 0x6886b8]
mov dword [edx + ecx*4 + 0x884], eax
movzx ecx, byte [ebp - 0x39]
movzx edx, byte [ebp - 0x55]
xor ecx, edx
and ecx, 0xff
movzx eax, byte [ecx + 0x687db8]
movzx ecx, byte [ebp - 0x51]
xor eax, ecx
and eax, 0xff
movzx edx, byte [eax + 0x687cb8]
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x80]
mov edx, dword [edx*4 + 0x688ab8]
mov dword [ecx + eax*4 + 0xc84], edx
jmp 0x5b79b0
jmp 0x5b7e51
cmp dword [ebp - 0x74], 3
jne 0x5b7c7e
mov dword [ebp - 0x38], 0
jmp 0x5b7b04
mov eax, dword [ebp - 0x38]
add eax, 1
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0x100
jge 0x5b7c79
mov ecx, dword [ebp - 0x38]
and ecx, 0xff
mov dl, byte [ecx + 0x687cb8]
mov byte [ebp - 0x3a], dl
mov eax, dword [ebp - 0x38]
and eax, 0xff
mov cl, byte [eax + 0x687db8]
mov byte [ebp - 0x39], cl
movzx edx, byte [ebp - 0x39]
movzx eax, byte [ebp - 0x58]
xor edx, eax
and edx, 0xff
movzx ecx, byte [edx + 0x687cb8]
movzx edx, byte [ebp - 0x54]
xor ecx, edx
and ecx, 0xff
movzx eax, byte [ecx + 0x687cb8]
movzx ecx, byte [ebp - 0x50]
xor eax, ecx
and eax, 0xff
movzx edx, byte [eax + 0x687db8]
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x80]
mov edx, dword [edx*4 + 0x687eb8]
mov dword [ecx + eax*4 + 0x84], edx
movzx eax, byte [ebp - 0x39]
movzx ecx, byte [ebp - 0x57]
xor eax, ecx
and eax, 0xff
movzx edx, byte [eax + 0x687db8]
movzx eax, byte [ebp - 0x53]
xor edx, eax
and edx, 0xff
movzx ecx, byte [edx + 0x687cb8]
movzx edx, byte [ebp - 0x4f]
xor ecx, edx
and ecx, 0xff
movzx eax, byte [ecx + 0x687cb8]
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x80]
mov eax, dword [eax*4 + 0x6882b8]
mov dword [edx + ecx*4 + 0x484], eax
movzx ecx, byte [ebp - 0x3a]
movzx edx, byte [ebp - 0x56]
xor ecx, edx
and ecx, 0xff
movzx eax, byte [ecx + 0x687cb8]
movzx ecx, byte [ebp - 0x52]
xor eax, ecx
and eax, 0xff
movzx edx, byte [eax + 0x687db8]
movzx eax, byte [ebp - 0x4e]
xor edx, eax
and edx, 0xff
movzx ecx, byte [edx + 0x687db8]
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x80]
mov ecx, dword [ecx*4 + 0x6886b8]
mov dword [eax + edx*4 + 0x884], ecx
movzx edx, byte [ebp - 0x3a]
movzx eax, byte [ebp - 0x55]
xor edx, eax
and edx, 0xff
movzx ecx, byte [edx + 0x687db8]
movzx edx, byte [ebp - 0x51]
xor ecx, edx
and ecx, 0xff
movzx eax, byte [ecx + 0x687db8]
movzx ecx, byte [ebp - 0x4d]
xor eax, ecx
and eax, 0xff
movzx edx, byte [eax + 0x687cb8]
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x80]
mov edx, dword [edx*4 + 0x688ab8]
mov dword [ecx + eax*4 + 0xc84], edx
jmp 0x5b7afb
jmp 0x5b7e51
mov dword [ebp - 0x38], 0
jmp 0x5b7c90
mov eax, dword [ebp - 0x38]
add eax, 1
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0x100
jge 0x5b7e51
mov ecx, dword [ebp - 0x38]
and ecx, 0xff
mov dl, byte [ecx + 0x687cb8]
mov byte [ebp - 0x3a], dl
mov eax, dword [ebp - 0x38]
and eax, 0xff
mov cl, byte [eax + 0x687db8]
mov byte [ebp - 0x39], cl
movzx edx, byte [ebp - 0x39]
movzx eax, byte [ebp - 0x58]
xor edx, eax
and edx, 0xff
movzx ecx, byte [edx + 0x687db8]
movzx edx, byte [ebp - 0x54]
xor ecx, edx
and ecx, 0xff
movzx eax, byte [ecx + 0x687cb8]
movzx ecx, byte [ebp - 0x50]
xor eax, ecx
and eax, 0xff
movzx edx, byte [eax + 0x687cb8]
movzx eax, byte [ebp - 0x4c]
xor edx, eax
and edx, 0xff
movzx ecx, byte [edx + 0x687db8]
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x80]
mov ecx, dword [ecx*4 + 0x687eb8]
mov dword [eax + edx*4 + 0x84], ecx
movzx edx, byte [ebp - 0x3a]
movzx eax, byte [ebp - 0x57]
xor edx, eax
and edx, 0xff
movzx ecx, byte [edx + 0x687db8]
movzx edx, byte [ebp - 0x53]
xor ecx, edx
and ecx, 0xff
movzx eax, byte [ecx + 0x687db8]
movzx ecx, byte [ebp - 0x4f]
xor eax, ecx
and eax, 0xff
movzx edx, byte [eax + 0x687cb8]
movzx eax, byte [ebp - 0x4b]
xor edx, eax
and edx, 0xff
movzx ecx, byte [edx + 0x687cb8]
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x80]
mov ecx, dword [ecx*4 + 0x6882b8]
mov dword [eax + edx*4 + 0x484], ecx
movzx edx, byte [ebp - 0x3a]
movzx eax, byte [ebp - 0x56]
xor edx, eax
and edx, 0xff
movzx ecx, byte [edx + 0x687cb8]
movzx edx, byte [ebp - 0x52]
xor ecx, edx
and ecx, 0xff
movzx eax, byte [ecx + 0x687cb8]
movzx ecx, byte [ebp - 0x4e]
xor eax, ecx
and eax, 0xff
movzx edx, byte [eax + 0x687db8]
movzx eax, byte [ebp - 0x4a]
xor edx, eax
and edx, 0xff
movzx ecx, byte [edx + 0x687db8]
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x80]
mov ecx, dword [ecx*4 + 0x6886b8]
mov dword [eax + edx*4 + 0x884], ecx
movzx edx, byte [ebp - 0x39]
movzx eax, byte [ebp - 0x55]
xor edx, eax
and edx, 0xff
movzx ecx, byte [edx + 0x687cb8]
movzx edx, byte [ebp - 0x51]
xor ecx, edx
and ecx, 0xff
movzx eax, byte [ecx + 0x687db8]
movzx ecx, byte [ebp - 0x4d]
xor eax, ecx
and eax, 0xff
movzx edx, byte [eax + 0x687db8]
movzx eax, byte [ebp - 0x49]
xor edx, eax
and edx, 0xff
movzx ecx, byte [edx + 0x687cb8]
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x80]
mov ecx, dword [ecx*4 + 0x688ab8]
mov dword [eax + edx*4 + 0xc84], ecx
jmp 0x5b7c87
cmp dword [ebp + 0x10], 0
je 0x5b7e99
mov edx, dword [ebp + 0xc]
cmp dword [edx + 4], 3
je 0x5b7e69
mov eax, dword [ebp + 0xc]
cmp dword [eax + 4], 4
jne 0x5b7e99
mov ecx, dword [ebp - 0x80]
mov edx, dword [ecx + 0x80]
push edx
mov ecx, dword [ebp + 0xc]
add ecx, 0x30
call fcn.004eff70
push eax
mov ecx, dword [ebp + 0xc]
add ecx, 0x30
call fcn.005a6d60
push eax
mov ecx, dword [ebp + 0x10]
add ecx, 0x484
call fcn.0059dc80
mov byte [ebp - 0x7a], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x48]
call fcn.005058c0
mov al, byte [ebp - 0x7a]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004adf6a
mov esp, ebp
pop ebp
ret 0x10