Function at 0x10018af6
Capabilities:
Encrypt data using twofish

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [ebp + 0xc]
cdq
push ebx
and edx, 7
add eax, edx
mov ebx, eax
xor eax, eax
push esi
push edi
xor esi, esi
mov dword [ebp - 0x3c], esi
lea edi, [ebp - 0x38]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov dword [ebp - 0x2c], esi
lea edi, [ebp - 0x28]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
sar ebx, 3
xor eax, eax
mov dword [ebp - 0x1c], esi
lea edi, [ebp - 0x18]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov edi, dword [ebp + 8]
lea eax, [ebp + ebx*4 - 0x20]
mov dword [ebp - 8], eax
mov dword [ebp - 4], esi
cmp esi, dword [ebp + 0xc]
jge 0x10018bc9
movzx ecx, byte [edi + esi + 3]
movzx edx, byte [edi + esi + 2]
mov eax, dword [ebp - 4]
shl ecx, 8
xor ecx, edx
movzx edx, byte [edi + esi + 1]
shl ecx, 8
xor ecx, edx
movzx edx, byte [esi + edi]
shl ecx, 8
xor ecx, edx
movzx edx, byte [edi + esi + 7]
lea eax, [ebp + eax - 0x3c]
mov dword [eax], ecx
mov ecx, dword [ebp - 4]
add esi, 4
lea ecx, [ebp + ecx - 0x2c]
mov dword [ebp - 0xc], ecx
movzx ecx, byte [edi + esi + 2]
shl edx, 8
xor edx, ecx
movzx ecx, byte [edi + esi + 1]
shl edx, 8
xor edx, ecx
movzx ecx, byte [esi + edi]
shl edx, 8
xor edx, ecx
mov ecx, dword [ebp - 0xc]
push edx
push dword [eax]
mov dword [ecx], edx
add esi, 4
call fcn.100188ef
add dword [ebp - 4], 4
pop ecx
pop ecx
mov ecx, dword [ebp - 8]
sub dword [ebp - 8], 4
cmp dword [ebp - 4], 0x10
mov dword [ecx], eax
jl 0x10018b3d
and dword [ebp + 0xc], 0
and dword [ebp - 4], 0
mov edi, dword [ebp + 0x10]
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 4]
add eax, 0x1010101
push eax
push ebx
call fcn.10018914
mov esi, eax
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 4]
rol esi, 8
push ebx
call fcn.10018914
mov ecx, dword [ebp + 0xc]
add dword [ebp - 4], 0x2020202
add eax, esi
shl ecx, 3
add esp, 0x18
add esi, eax
inc dword [ebp + 0xc]
rol esi, 9
cmp dword [ebp + 0xc], 0x14
mov dword [ecx + edi], eax
mov dword [ecx + edi + 4], esi
jl 0x10018bd4
mov ecx, dword [ebp + 0x14]
xor edx, edx
mov dword [ebp - 0xc], ebx
and dword [ebp - 0xc], 3
mov dword [ebp + 0xc], edx
add ecx, 0x800
mov eax, 0xff
mov edi, dword [ebp - 0xc]
sub edi, 0
mov dword [ebp - 8], edx
mov esi, edx
mov dword [ebp - 4], edx
je 0x10018cd0
dec edi
je 0x10018c64
dec edi
je 0x10018d50
dec edi
je 0x10018d08
jmp 0x10018e01
mov edi, dword [ebp - 0x1c]
lea esi, [edx + 0x10046608]
movzx ebx, byte [esi]
xor ebx, edi
and ebx, eax
mov ebx, dword [ebx*4 + 0x10046808]
mov dword [ecx - 0x800], ebx
movzx esi, byte [esi]
mov ebx, edi
shr ebx, 8
xor ebx, esi
and ebx, eax
mov esi, dword [ebx*4 + 0x10046c08]
mov dword [ecx - 0x7fc], esi
movzx ebx, byte [edx + 0x10046708]
mov esi, edi
shr esi, 0x10
xor esi, ebx
and esi, eax
mov esi, dword [esi*4 + 0x10047008]
mov dword [ecx], esi
movzx esi, byte [edx + 0x10046708]
shr edi, 0x18
xor edi, esi
and edi, eax
mov esi, dword [edi*4 + str.9g]
mov dword [ecx + 4], esi
jmp 0x10018e01
movzx ebx, byte [edx + 0x10046708]
movzx edi, byte [edx + 0x10046608]
mov esi, ebx
xor esi, dword [ebp - 0x10]
and esi, eax
mov dword [ebp - 4], esi
mov esi, dword [ebp - 0x10]
mov edx, esi
shr edx, 8
xor edx, edi
shr esi, 0x10
xor esi, edi
mov edi, dword [ebp - 0x10]
shr edi, 0x18
xor edi, ebx
and edx, eax
and esi, eax
and edi, eax
mov dword [ebp - 8], edi
mov edi, dword [ebp - 4]
movzx ebx, byte [edi + 0x10046708]
mov edi, dword [ebp - 0x14]
movzx edx, byte [edx + 0x10046708]
movzx esi, byte [esi + 0x10046608]
xor ebx, edi
and ebx, eax
mov dword [ebp - 4], ebx
mov ebx, edi
shr ebx, 8
xor edx, ebx
mov ebx, edi
shr ebx, 0x10
xor esi, ebx
mov ebx, dword [ebp - 8]
movzx ebx, byte [ebx + 0x10046608]
shr edi, 0x18
xor ebx, edi
and edx, eax
and esi, eax
and ebx, eax
mov dword [ebp - 8], ebx
mov edi, dword [ebp - 4]
movzx edi, byte [edi + 0x10046608]
xor edi, dword [ebp - 0x18]
and edi, eax
movzx ebx, byte [edi + 0x10046608]
mov edi, dword [ebp - 0x1c]
xor ebx, edi
and ebx, eax
mov ebx, dword [ebx*4 + 0x10046808]
mov dword [ecx - 0x800], ebx
movzx edx, byte [edx + 0x10046708]
mov ebx, dword [ebp - 0x18]
shr ebx, 8
xor edx, ebx
and edx, eax
movzx edx, byte [edx + 0x10046608]
mov ebx, edi
shr ebx, 8
xor edx, ebx
and edx, eax
mov edx, dword [edx*4 + 0x10046c08]
mov dword [ecx - 0x7fc], edx
movzx edx, byte [esi + 0x10046608]
mov esi, dword [ebp - 0x18]
shr esi, 0x10
xor edx, esi
and edx, eax
movzx edx, byte [edx + 0x10046708]
mov esi, edi
shr esi, 0x10
xor edx, esi
mov esi, dword [ebp - 0x18]
and edx, eax
mov edx, dword [edx*4 + 0x10047008]
mov dword [ecx], edx
mov edx, dword [ebp - 8]
movzx edx, byte [edx + 0x10046708]
shr esi, 0x18
xor edx, esi
and edx, eax
movzx edx, byte [edx + 0x10046708]
shr edi, 0x18
xor edx, edi
and edx, eax
mov edx, dword [edx*4 + str.9g]
mov dword [ecx + 4], edx
mov edx, dword [ebp + 0xc]
inc edx
add ecx, 8
cmp edx, 0x100
mov dword [ebp + 0xc], edx
jl 0x10018c3a
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret