Function at 0x52b010
Capabilities:
Encrypt data using twofish

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5506f8
mov eax, dword fs:[0]
push eax
sub esp, 0x74
mov eax, dword [0x5f5618]
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 0x5ccac0
mov eax, dword [ebp + 0x14]
push eax
lea ecx, [ebp - 0x48]
call fcn.004618a0
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.00516320
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp + 0xc]
add ecx, 0x10
call fcn.004ebc40
cmp eax, dword [ebp - 0x70]
jae 0x52b0b7
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.00461950
mov al, byte [ebp - 0x79]
jmp 0x52b7af
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 0x52b0d8
mov eax, dword [ebp - 0x38]
add eax, 1
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x38]
cmp ecx, dword [ebp - 0x70]
jge 0x52b0f7
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 0x52b0cf
mov dword [ebp - 0x38], 0
jmp 0x52b109
mov edx, dword [ebp - 0x38]
add edx, 1
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 0x74]
jge 0x52b12b
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.0052b7d0
add esp, 8
jmp 0x52b100
mov dword [ebp - 0x38], 0
jmp 0x52b13d
mov edx, dword [ebp - 0x38]
add edx, 1
mov dword [ebp - 0x38], edx
cmp dword [ebp - 0x38], 0x14
jge 0x52b29d
mov dword [ebp - 0x34], 0
jmp 0x52b159
mov eax, dword [ebp - 0x34]
add eax, 1
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 4
jge 0x52b16e
mov ecx, dword [ebp - 0x38]
add ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
mov byte [ebp + edx - 0x64], cl
jmp 0x52b150
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.0052b8a0
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 0x52b188
mov dword [ebp - 0x34], 0
jmp 0x52b1d7
mov ecx, dword [ebp - 0x34]
add ecx, 1
mov dword [ebp - 0x34], ecx
cmp dword [ebp - 0x34], 4
jge 0x52b1f0
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 0x52b1ce
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.0052b8a0
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 0x52b20a
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 0x52b134
cmp dword [ebp - 0x74], 2
jne 0x52b3e8
mov dword [ebp - 0x38], 0
jmp 0x52b2b9
mov edx, dword [ebp - 0x38]
add edx, 1
mov dword [ebp - 0x38], edx
cmp dword [ebp - 0x38], 0x100
jge 0x52b3e3
mov eax, dword [ebp - 0x38]
and eax, 0xff
mov cl, byte [eax + 0x5c98c0]
mov byte [ebp - 0x3a], cl
mov edx, dword [ebp - 0x38]
and edx, 0xff
mov al, byte [edx + 0x5c99c0]
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 + 0x5c98c0]
movzx ecx, byte [ebp - 0x54]
xor eax, ecx
and eax, 0xff
movzx edx, byte [eax + 0x5c99c0]
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x80]
mov edx, dword [edx*4 + 0x5c9ac0]
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 + 0x5c98c0]
movzx eax, byte [ebp - 0x53]
xor edx, eax
and edx, 0xff
movzx ecx, byte [edx + 0x5c98c0]
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x80]
mov ecx, dword [ecx*4 + 0x5c9ec0]
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 + 0x5c99c0]
movzx edx, byte [ebp - 0x52]
xor ecx, edx
and ecx, 0xff
movzx eax, byte [ecx + 0x5c99c0]
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x80]
mov eax, dword [eax*4 + 0x5ca2c0]
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 + 0x5c99c0]
movzx ecx, byte [ebp - 0x51]
xor eax, ecx
and eax, 0xff
movzx edx, byte [eax + 0x5c98c0]
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x80]
mov edx, dword [edx*4 + 0x5ca6c0]
mov dword [ecx + eax*4 + 0xc84], edx
jmp 0x52b2b0
jmp 0x52b751
cmp dword [ebp - 0x74], 3
jne 0x52b57e
mov dword [ebp - 0x38], 0
jmp 0x52b404
mov eax, dword [ebp - 0x38]
add eax, 1
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0x100
jge 0x52b579
mov ecx, dword [ebp - 0x38]
and ecx, 0xff
mov dl, byte [ecx + 0x5c98c0]
mov byte [ebp - 0x3a], dl
mov eax, dword [ebp - 0x38]
and eax, 0xff
mov cl, byte [eax + 0x5c99c0]
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 + 0x5c98c0]
movzx edx, byte [ebp - 0x54]
xor ecx, edx
and ecx, 0xff
movzx eax, byte [ecx + 0x5c98c0]
movzx ecx, byte [ebp - 0x50]
xor eax, ecx
and eax, 0xff
movzx edx, byte [eax + 0x5c99c0]
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x80]
mov edx, dword [edx*4 + 0x5c9ac0]
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 + 0x5c99c0]
movzx eax, byte [ebp - 0x53]
xor edx, eax
and edx, 0xff
movzx ecx, byte [edx + 0x5c98c0]
movzx edx, byte [ebp - 0x4f]
xor ecx, edx
and ecx, 0xff
movzx eax, byte [ecx + 0x5c98c0]
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x80]
mov eax, dword [eax*4 + 0x5c9ec0]
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 + 0x5c98c0]
movzx ecx, byte [ebp - 0x52]
xor eax, ecx
and eax, 0xff
movzx edx, byte [eax + 0x5c99c0]
movzx eax, byte [ebp - 0x4e]
xor edx, eax
and edx, 0xff
movzx ecx, byte [edx + 0x5c99c0]
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x80]
mov ecx, dword [ecx*4 + 0x5ca2c0]
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 + 0x5c99c0]
movzx edx, byte [ebp - 0x51]
xor ecx, edx
and ecx, 0xff
movzx eax, byte [ecx + 0x5c99c0]
movzx ecx, byte [ebp - 0x4d]
xor eax, ecx
and eax, 0xff
movzx edx, byte [eax + 0x5c98c0]
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x80]
mov edx, dword [edx*4 + 0x5ca6c0]
mov dword [ecx + eax*4 + 0xc84], edx
jmp 0x52b3fb
jmp 0x52b751
mov dword [ebp - 0x38], 0
jmp 0x52b590
mov eax, dword [ebp - 0x38]
add eax, 1
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0x100
jge 0x52b751
mov ecx, dword [ebp - 0x38]
and ecx, 0xff
mov dl, byte [ecx + 0x5c98c0]
mov byte [ebp - 0x3a], dl
mov eax, dword [ebp - 0x38]
and eax, 0xff
mov cl, byte [eax + 0x5c99c0]
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 + 0x5c99c0]
movzx edx, byte [ebp - 0x54]
xor ecx, edx
and ecx, 0xff
movzx eax, byte [ecx + 0x5c98c0]
movzx ecx, byte [ebp - 0x50]
xor eax, ecx
and eax, 0xff
movzx edx, byte [eax + 0x5c98c0]
movzx eax, byte [ebp - 0x4c]
xor edx, eax
and edx, 0xff
movzx ecx, byte [edx + 0x5c99c0]
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x80]
mov ecx, dword [ecx*4 + 0x5c9ac0]
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 + 0x5c99c0]
movzx edx, byte [ebp - 0x53]
xor ecx, edx
and ecx, 0xff
movzx eax, byte [ecx + 0x5c99c0]
movzx ecx, byte [ebp - 0x4f]
xor eax, ecx
and eax, 0xff
movzx edx, byte [eax + 0x5c98c0]
movzx eax, byte [ebp - 0x4b]
xor edx, eax
and edx, 0xff
movzx ecx, byte [edx + 0x5c98c0]
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x80]
mov ecx, dword [ecx*4 + 0x5c9ec0]
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 + 0x5c98c0]
movzx edx, byte [ebp - 0x52]
xor ecx, edx
and ecx, 0xff
movzx eax, byte [ecx + 0x5c98c0]
movzx ecx, byte [ebp - 0x4e]
xor eax, ecx
and eax, 0xff
movzx edx, byte [eax + 0x5c99c0]
movzx eax, byte [ebp - 0x4a]
xor edx, eax
and edx, 0xff
movzx ecx, byte [edx + 0x5c99c0]
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x80]
mov ecx, dword [ecx*4 + 0x5ca2c0]
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 + 0x5c98c0]
movzx edx, byte [ebp - 0x51]
xor ecx, edx
and ecx, 0xff
movzx eax, byte [ecx + 0x5c99c0]
movzx ecx, byte [ebp - 0x4d]
xor eax, ecx
and eax, 0xff
movzx edx, byte [eax + 0x5c99c0]
movzx eax, byte [ebp - 0x49]
xor edx, eax
and edx, 0xff
movzx ecx, byte [edx + 0x5c98c0]
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x80]
mov ecx, dword [ecx*4 + 0x5ca6c0]
mov dword [eax + edx*4 + 0xc84], ecx
jmp 0x52b587
cmp dword [ebp + 0x10], 0
je 0x52b799
mov edx, dword [ebp + 0xc]
cmp dword [edx + 4], 3
je 0x52b769
mov eax, dword [ebp + 0xc]
cmp dword [eax + 4], 4
jne 0x52b799
mov ecx, dword [ebp - 0x80]
mov edx, dword [ecx + 0x80]
push edx
mov ecx, dword [ebp + 0xc]
add ecx, 0x30
call fcn.004ebc40
push eax
mov ecx, dword [ebp + 0xc]
add ecx, 0x30
call fcn.00516320
push eax
mov ecx, dword [ebp + 0x10]
add ecx, 0x484
call fcn.005075e0
mov byte [ebp - 0x7a], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x48]
call fcn.00461950
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.00541cc8
mov esp, ebp
pop ebp
ret 0x10