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

Disassembly:
push ebx
push esi
push edi
lea esp, [esp - 0x4c]
mov dword [esp + 0x1c], eax
mov word [esp + 0x14], dx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], 0
cmp byte [0x612b60], 0
je 0x5e9ecb
mov eax, dword [esp + 0x18]
call fcn.005e9b40
mov eax, dword [esp + 0x18]
mov dword [eax + 0x24], 0
jmp 0x5e9edb
mov eax, dword [esp + 0x18]
xor cl, cl
mov edx, 0x10c8
call fcn.004037d0
cmp word [esp + 0x14], 0x80
je 0x5e9f04
cmp word [esp + 0x14], 0xc0
je 0x5e9f04
cmp word [esp + 0x14], 0x100
je 0x5e9f04
mov dword [esp + 0x10], 0xffffffff
jmp 0x5ea7a8
movzx eax, word [esp + 0x14]
mov edx, eax
sar edx, 0x1f
and edx, 0x3f
add eax, edx
sar eax, 6
sub eax, 1
mov ebx, eax
test ebx, ebx
jl 0x5e9f5c
mov dword [esp + 0x20], 0xffffffff
nop
mov edx, dword [esp + 0x20]
lea eax, [edx + 1]
mov dword [esp + 0x20], eax
shl eax, 1
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + eax*4 + 4]
mov eax, dword [esp + 0x20]
shl eax, 1
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + eax*4]
call fcn.005e9e50
mov edx, dword [esp + 0x20]
mov dword [esp + edx*4], eax
cmp ebx, dword [esp + 0x20]
jg 0x5e9f28
cmp word [esp + 0x14], 0x80
jne 0x5ea041
mov edi, 0xffffffff
mov esi, esi
add edi, 1
mov ebx, 0x612b70
mov ecx, esp
mov al, byte [ebx + edi]
mov dl, byte [ecx]
xor dl, al
movzx eax, dl
mov al, byte [ebx + eax]
mov dl, byte [ecx + 4]
xor dl, al
movzx eax, dl
mov eax, dword [eax*4 + 0x612d70]
mov edx, dword [esp + 0x18]
mov dword [edx + edi*4 + 0xc8], eax
mov ecx, esp
mov al, byte [edi + 0x612c70]
mov dl, byte [ecx + 1]
xor dl, al
movzx eax, dl
mov al, byte [eax + 0x612b70]
mov dl, byte [ecx + 5]
xor dl, al
movzx eax, dl
mov edx, dword [eax*4 + 0x613170]
mov eax, dword [esp + 0x18]
mov dword [eax + edi*4 + 0x4c8], edx
mov ecx, esp
mov al, byte [edi + 0x612b70]
mov dl, byte [ecx + 2]
xor dl, al
movzx eax, dl
mov al, byte [eax + 0x612c70]
mov dl, byte [ecx + 6]
xor dl, al
movzx eax, dl
mov eax, dword [eax*4 + 0x613570]
mov edx, dword [esp + 0x18]
mov dword [edx + edi*4 + 0x8c8], eax
mov ebx, 0x612c70
mov ecx, esp
mov al, byte [ebx + edi]
mov dl, byte [ecx + 3]
xor dl, al
movzx eax, dl
mov al, byte [ebx + eax]
mov dl, byte [ecx + 7]
xor dl, al
movzx eax, dl
mov eax, dword [eax*4 + 0x613970]
mov edx, dword [esp + 0x18]
mov dword [edx + edi*4 + 0xcc8], eax
cmp edi, 0xff
jl 0x5e9f70
jmp 0x5ea29a
cmp word [esp + 0x14], 0xc0
jne 0x5ea15f
mov edi, 0xffffffff
lea esi, [esi]
nop
add edi, 1
mov ebx, 0x612b70
mov edx, esp
mov al, byte [edi + 0x612c70]
mov cl, byte [edx]
xor cl, al
movzx eax, cl
mov al, byte [ebx + eax]
mov cl, byte [edx + 4]
xor cl, al
movzx eax, cl
mov al, byte [ebx + eax]
mov dl, byte [edx + 8]
xor dl, al
movzx eax, dl
mov eax, dword [eax*4 + 0x612d70]
mov edx, dword [esp + 0x18]
mov dword [edx + edi*4 + 0xc8], eax
mov ebx, 0x612c70
mov edx, esp
mov al, byte [ebx + edi]
mov cl, byte [edx + 1]
xor cl, al
movzx eax, cl
mov al, byte [ebx + eax]
mov cl, byte [edx + 5]
xor cl, al
movzx eax, cl
mov al, byte [eax + 0x612b70]
mov dl, byte [edx + 9]
xor dl, al
movzx eax, dl
mov eax, dword [eax*4 + 0x613170]
mov edx, dword [esp + 0x18]
mov dword [edx + edi*4 + 0x4c8], eax
mov ebx, 0x612b70
mov edx, esp
mov al, byte [ebx + edi]
mov cl, byte [edx + 2]
xor cl, al
movzx eax, cl
mov al, byte [ebx + eax]
mov cl, byte [edx + 6]
xor cl, al
movzx eax, cl
mov al, byte [eax + 0x612c70]
mov dl, byte [edx + 0xa]
xor dl, al
movzx eax, dl
mov eax, dword [eax*4 + 0x613570]
mov edx, dword [esp + 0x18]
mov dword [edx + edi*4 + 0x8c8], eax
mov ebx, 0x612c70
mov edx, esp
mov al, byte [edi + 0x612b70]
mov cl, byte [edx + 3]
xor cl, al
movzx eax, cl
mov al, byte [ebx + eax]
mov cl, byte [edx + 7]
xor cl, al
movzx eax, cl
mov al, byte [ebx + eax]
mov dl, byte [edx + 0xb]
xor dl, al
movzx eax, dl
mov eax, dword [eax*4 + 0x613970]
mov edx, dword [esp + 0x18]
mov dword [edx + edi*4 + 0xcc8], eax
cmp edi, 0xff
jl 0x5ea058
jmp 0x5ea29a
mov edi, 0xffffffff
lea esi, [esi]
add edi, 1
mov ebx, 0x612b70
mov esi, 0x612c70
mov edx, esp
mov al, byte [esi + edi]
mov cl, byte [edx]
xor cl, al
movzx eax, cl
mov al, byte [esi + eax]
mov cl, byte [edx + 4]
xor cl, al
movzx eax, cl
mov al, byte [ebx + eax]
mov cl, byte [edx + 8]
xor cl, al
movzx eax, cl
mov al, byte [ebx + eax]
mov dl, byte [edx + 0xc]
xor dl, al
movzx eax, dl
mov edx, dword [eax*4 + 0x612d70]
mov eax, dword [esp + 0x18]
mov dword [eax + edi*4 + 0xc8], edx
mov esi, 0x612b70
mov edx, 0x612c70
mov ebx, esp
mov al, byte [esi + edi]
mov cl, byte [ebx + 1]
xor cl, al
movzx eax, cl
mov al, byte [edx + eax]
mov cl, byte [ebx + 5]
xor cl, al
movzx eax, cl
mov al, byte [edx + eax]
mov dl, byte [ebx + 9]
xor dl, al
movzx eax, dl
mov al, byte [esi + eax]
mov dl, byte [ebx + 0xd]
xor dl, al
movzx eax, dl
mov eax, dword [eax*4 + 0x613170]
mov edx, dword [esp + 0x18]
mov dword [edx + edi*4 + 0x4c8], eax
mov edx, 0x612b70
mov ebx, esp
mov al, byte [edx + edi]
mov cl, byte [ebx + 2]
xor cl, al
movzx eax, cl
mov al, byte [edx + eax]
mov cl, byte [ebx + 6]
xor cl, al
movzx eax, cl
mov al, byte [edx + eax]
mov dl, byte [ebx + 0xa]
xor dl, al
movzx eax, dl
mov al, byte [eax + 0x612c70]
mov dl, byte [ebx + 0xe]
xor dl, al
movzx eax, dl
mov eax, dword [eax*4 + 0x613570]
mov edx, dword [esp + 0x18]
mov dword [edx + edi*4 + 0x8c8], eax
mov ebx, 0x612c70
mov edx, esp
mov al, byte [ebx + edi]
mov cl, byte [edx + 3]
xor cl, al
movzx eax, cl
mov al, byte [eax + 0x612b70]
mov cl, byte [edx + 7]
xor cl, al
movzx eax, cl
mov al, byte [ebx + eax]
mov cl, byte [edx + 0xb]
xor cl, al
movzx eax, cl
mov al, byte [ebx + eax]
mov dl, byte [edx + 0xf]
xor dl, al
movzx eax, dl
mov edx, dword [eax*4 + 0x613970]
mov eax, dword [esp + 0x18]
mov dword [eax + edi*4 + 0xcc8], edx
cmp edi, 0xff
jl 0x5ea168
xor ebx, ebx
jmp 0x5ea79f
lea eax, [ebx + 1]
mov dword [esp + 0x20], eax
cmp word [esp + 0x14], 0x80
jne 0x5ea369
mov al, byte [ebx + 0x612b70]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 8]
xor dl, al
mov byte [esp + 0x34], dl
mov al, byte [ebx + 0x612c70]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 9]
xor dl, al
mov byte [esp + 0x38], dl
mov al, byte [ebx + 0x612b70]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0xa]
xor dl, al
mov byte [esp + 0x3c], dl
mov al, byte [ebx + 0x612c70]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0xb]
xor dl, al
mov byte [esp + 0x40], dl
mov edx, dword [esp + 0x20]
mov al, byte [edx + 0x612b70]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0xc]
xor dl, al
mov byte [esp + 0x24], dl
mov edx, dword [esp + 0x20]
mov al, byte [edx + 0x612c70]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0xd]
xor dl, al
mov byte [esp + 0x28], dl
mov edx, dword [esp + 0x20]
mov al, byte [edx + 0x612b70]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0xe]
xor dl, al
mov byte [esp + 0x2c], dl
mov edx, dword [esp + 0x20]
mov al, byte [edx + 0x612c70]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0xf]
xor dl, al
mov byte [esp + 0x30], dl
jmp 0x5ea669
cmp word [esp + 0x14], 0xc0
jne 0x5ea4af
mov al, byte [ebx + 0x612c70]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0x10]
xor dl, al
movzx eax, dl
mov al, byte [eax + 0x612b70]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 8]
xor dl, al
mov byte [esp + 0x34], dl
mov ecx, 0x612c70
mov al, byte [ecx + ebx]
mov esi, dword [esp + 0x1c]
mov dl, byte [esi + 0x11]
xor dl, al
movzx eax, dl
mov al, byte [ecx + eax]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 9]
xor dl, al
mov byte [esp + 0x38], dl
mov ecx, 0x612b70
mov al, byte [ecx + ebx]
mov esi, dword [esp + 0x1c]
mov dl, byte [esi + 0x12]
xor dl, al
movzx eax, dl
mov al, byte [ecx + eax]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0xa]
xor dl, al
mov byte [esp + 0x3c], dl
mov al, byte [ebx + 0x612b70]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0x13]
xor dl, al
movzx eax, dl
mov al, byte [eax + 0x612c70]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0xb]
xor dl, al
mov byte [esp + 0x40], dl
mov edx, dword [esp + 0x20]
mov al, byte [edx + 0x612c70]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0x14]
xor dl, al
movzx eax, dl
mov al, byte [eax + 0x612b70]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0xc]
xor dl, al
mov byte [esp + 0x24], dl
mov ecx, 0x612c70
mov edx, dword [esp + 0x20]
mov al, byte [ecx + edx]
mov esi, dword [esp + 0x1c]
mov dl, byte [esi + 0x15]
xor dl, al
movzx eax, dl
mov al, byte [ecx + eax]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0xd]
xor dl, al
mov byte [esp + 0x28], dl
mov ecx, 0x612b70
mov edx, dword [esp + 0x20]
mov al, byte [ecx + edx]
mov esi, dword [esp + 0x1c]
mov dl, byte [esi + 0x16]
xor dl, al
movzx eax, dl
mov al, byte [ecx + eax]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0xe]
xor dl, al
mov byte [esp + 0x2c], dl
mov edx, dword [esp + 0x20]
mov al, byte [edx + 0x612b70]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0x17]
xor dl, al
movzx eax, dl
mov al, byte [eax + 0x612c70]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0xf]
xor dl, al
mov byte [esp + 0x30], dl
jmp 0x5ea669
mov ecx, 0x612c70
mov al, byte [ecx + ebx]
mov esi, dword [esp + 0x1c]
mov dl, byte [esi + 0x18]
xor dl, al
movzx eax, dl
mov al, byte [ecx + eax]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0x10]
xor dl, al
movzx eax, dl
mov al, byte [eax + 0x612b70]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 8]
xor dl, al
mov byte [esp + 0x34], dl
mov edx, 0x612c70
mov al, byte [ebx + 0x612b70]
mov esi, dword [esp + 0x1c]
mov cl, byte [esi + 0x19]
xor cl, al
movzx eax, cl
mov al, byte [edx + eax]
mov esi, dword [esp + 0x1c]
mov cl, byte [esi + 0x11]
xor cl, al
movzx eax, cl
mov al, byte [edx + eax]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 9]
xor dl, al
mov byte [esp + 0x38], dl
mov edx, 0x612b70
mov al, byte [edx + ebx]
mov esi, dword [esp + 0x1c]
mov cl, byte [esi + 0x1a]
xor cl, al
movzx eax, cl
mov al, byte [edx + eax]
mov esi, dword [esp + 0x1c]
mov cl, byte [esi + 0x12]
xor cl, al
movzx eax, cl
mov al, byte [edx + eax]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0xa]
xor dl, al
mov byte [esp + 0x3c], dl
mov edx, 0x612c70
mov al, byte [edx + ebx]
mov esi, dword [esp + 0x1c]
mov cl, byte [esi + 0x1b]
xor cl, al
movzx eax, cl
mov al, byte [eax + 0x612b70]
mov esi, dword [esp + 0x1c]
mov cl, byte [esi + 0x13]
xor cl, al
movzx eax, cl
mov al, byte [edx + eax]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0xb]
xor dl, al
mov byte [esp + 0x40], dl
mov ecx, 0x612c70
mov edx, dword [esp + 0x20]
mov al, byte [ecx + edx]
mov esi, dword [esp + 0x1c]
mov dl, byte [esi + 0x1c]
xor dl, al
movzx eax, dl
mov al, byte [ecx + eax]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0x14]
xor dl, al
movzx eax, dl
mov al, byte [eax + 0x612b70]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0xc]
xor dl, al
mov byte [esp + 0x24], dl
mov edx, 0x612c70
mov ecx, dword [esp + 0x20]
mov al, byte [ecx + 0x612b70]
mov esi, dword [esp + 0x1c]
mov cl, byte [esi + 0x1d]
xor cl, al
movzx eax, cl
mov al, byte [edx + eax]
mov esi, dword [esp + 0x1c]
mov cl, byte [esi + 0x15]
xor cl, al
movzx eax, cl
mov al, byte [edx + eax]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0xd]
xor dl, al
mov byte [esp + 0x28], dl
mov edx, 0x612b70
mov ecx, dword [esp + 0x20]
mov al, byte [edx + ecx]
mov esi, dword [esp + 0x1c]
mov cl, byte [esi + 0x1e]
xor cl, al
movzx eax, cl
mov al, byte [edx + eax]
mov esi, dword [esp + 0x1c]
mov cl, byte [esi + 0x16]
xor cl, al
movzx eax, cl
mov al, byte [edx + eax]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0xe]
xor dl, al
mov byte [esp + 0x2c], dl
mov edx, 0x612c70
mov ecx, dword [esp + 0x20]
mov al, byte [edx + ecx]
mov esi, dword [esp + 0x1c]
mov cl, byte [esi + 0x1f]
xor cl, al
movzx eax, cl
mov al, byte [eax + 0x612b70]
mov esi, dword [esp + 0x1c]
mov cl, byte [esi + 0x17]
xor cl, al
movzx eax, cl
mov al, byte [edx + eax]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 0xf]
xor dl, al
mov byte [esp + 0x30], dl
mov ecx, 0x612b70
movzx eax, byte [esp + 0x34]
mov al, byte [ecx + eax]
mov esi, dword [esp + 0x1c]
mov dl, byte [esi]
xor dl, al
movzx esi, dl
movzx eax, byte [esp + 0x38]
mov al, byte [ecx + eax]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 1]
xor dl, al
movzx eax, dl
mov edx, dword [esi*4 + 0x612d70]
mov ecx, dword [eax*4 + 0x613170]
xor ecx, edx
mov esi, 0x612c70
movzx eax, byte [esp + 0x3c]
mov dl, byte [esi + eax]
mov edi, dword [esp + 0x1c]
mov al, byte [edi + 2]
xor al, dl
and eax, 0xff
xor ecx, dword [eax*4 + 0x613570]
movzx eax, byte [esp + 0x40]
mov al, byte [esi + eax]
mov esi, dword [esp + 0x1c]
mov dl, byte [esi + 3]
xor dl, al
movzx eax, dl
xor ecx, dword [eax*4 + 0x613970]
mov dword [esp + 0x44], ecx
mov ecx, 0x612b70
movzx eax, byte [esp + 0x24]
mov al, byte [ecx + eax]
mov esi, dword [esp + 0x1c]
mov dl, byte [esi + 4]
xor dl, al
movzx esi, dl
movzx eax, byte [esp + 0x28]
mov al, byte [ecx + eax]
mov ecx, dword [esp + 0x1c]
mov dl, byte [ecx + 5]
xor dl, al
movzx eax, dl
mov edx, dword [esi*4 + 0x612d70]
mov ecx, dword [eax*4 + 0x613170]
xor ecx, edx
mov esi, 0x612c70
movzx eax, byte [esp + 0x2c]
mov dl, byte [esi + eax]
mov edi, dword [esp + 0x1c]
mov al, byte [edi + 6]
xor al, dl
and eax, 0xff
xor ecx, dword [eax*4 + 0x613570]
movzx eax, byte [esp + 0x30]
mov al, byte [esi + eax]
mov esi, dword [esp + 0x1c]
mov dl, byte [esi + 7]
xor dl, al
movzx eax, dl
xor ecx, dword [eax*4 + 0x613970]
mov dword [esp + 0x48], ecx
mov eax, ecx
rol eax, 8
mov dword [esp + 0x48], eax
add dword [esp + 0x44], eax
mov eax, dword [esp + 0x48]
add eax, dword [esp + 0x44]
mov dword [esp + 0x48], eax
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x18]
mov dword [eax + ebx*4 + 0x28], edx
mov eax, dword [esp + 0x48]
rol eax, 9
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
mov dword [ecx + edx*4 + 0x28], eax
add ebx, 2
cmp ebx, 0x28
jl 0x5ea2a8
mov eax, dword [esp + 0x10]
lea esp, [esp + 0x4c]
pop edi
pop esi
pop ebx
ret