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

Disassembly:
sub esp, 0x258
mov eax, dword [0x5808f0]
xor eax, esp
mov dword [esp + 0x254], eax
push ebx
push ebp
push esi
mov esi, ecx
mov eax, dword [esi]
mov edx, dword [eax + 4]
push edi
call edx
push eax
mov eax, dword [esi + 4]
push eax
lea ecx, [esp + 0x4c]
push ecx
call fcn.00468d50
mov edx, dword [esi]
mov eax, dword [edx + 4]
add esp, 0xc
mov ecx, esi
call eax
cdq
and edx, 7
add eax, edx
mov ebx, eax
sar ebx, 3
sub ebx, 1
mov edi, 0
js 0x404576
lea ebp, [esp + ebx*4 + 0x10]
mov ecx, dword [esp + edi*8 + 0x44]
mov eax, dword [esp + edi*8 + 0x48]
push ecx
mov dword [esp + edi*4 + 0x38], ecx
mov dword [esp + edi*4 + 0x28], eax
call fcn.00403ea0
mov dword [ebp], eax
inc edi
sub ebp, 4
cmp edi, ebx
jle 0x404555
xor edi, edi
lea ebx, [esi + 0x1014]
mov dword [esp + 0x20], 0x14
mov edx, dword [esi]
mov eax, dword [edx + 4]
mov ecx, esi
call eax
add eax, eax
add eax, eax
add eax, eax
push eax
push esi
lea eax, [esp + 0x3c]
mov edx, edi
call fcn.00403f60
mov edx, dword [esi]
mov ebp, eax
mov eax, dword [edx + 4]
mov ecx, esi
call eax
add eax, eax
add eax, eax
add eax, eax
push eax
lea edx, [edi + 0x1010101]
push esi
lea eax, [esp + 0x2c]
call fcn.00403f60
rol eax, 8
lea edx, [ebp + eax*2]
rol edx, 9
lea ecx, [eax + ebp]
mov dword [ebx - 4], ecx
mov dword [ebx], edx
add edi, 0x2020202
add ebx, 8
sub dword [esp + 0x20], 1
jne 0x404586
mov eax, dword [esi]
mov edx, dword [eax + 4]
mov ecx, esi
call edx
cmp eax, 0x10
je 0x404b53
cmp eax, 0x18
je 0x404943
cmp eax, 0x20
jne 0x404d4c
mov cl, byte [esp + 0x1c]
lea eax, [esp + 0x164]
push eax
mov eax, 0x51d210
call fcn.004040b0
xor eax, eax
jmp 0x404630
movzx ecx, byte [esp + eax + 0x164]
movzx edx, byte [ecx + 0x51d210]
movzx ecx, byte [esp + eax + 0x165]
mov byte [esp + eax + 0x64], dl
movzx edx, byte [ecx + 0x51d210]
mov byte [esp + eax + 0x65], dl
add eax, 2
cmp eax, 0x100
jl 0x404630
mov cl, byte [esp + 0x18]
lea eax, [esp + 0x64]
push eax
call fcn.004040b0
mov ebx, dword [esp + 0x10]
movzx edi, byte [esp + 0x14]
movzx edx, bl
xor eax, eax
lea ecx, [esi + 0x10b8]
movzx ebp, byte [esp + eax + 0x64]
movzx ebp, byte [ebp + 0x51d110]
xor ebp, edi
movzx ebp, byte [ebp + 0x51d110]
xor ebp, edx
mov ebp, dword [esi + ebp*4 + 0x10]
mov dword [ecx - 8], ebp
movzx ebp, byte [esp + eax + 0x65]
movzx ebp, byte [ebp + 0x51d110]
xor ebp, edi
movzx ebp, byte [ebp + 0x51d110]
xor ebp, edx
mov ebp, dword [esi + ebp*4 + 0x10]
mov dword [ecx], ebp
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x404682
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x164]
shr ecx, 8
push edx
mov eax, 0x51d110
call fcn.004040b0
xor eax, eax
jmp 0x4046f0
movzx ecx, byte [esp + eax + 0x164]
movzx edx, byte [ecx + 0x51d210]
movzx ecx, byte [esp + eax + 0x165]
mov byte [esp + eax + 0x64], dl
movzx edx, byte [ecx + 0x51d210]
mov byte [esp + eax + 0x65], dl
add eax, 2
cmp eax, 0x100
jl 0x4046f0
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x64]
shr ecx, 8
push eax
call fcn.004040b0
mov ecx, dword [esp + 0x14]
mov eax, ebx
shr eax, 8
shr ecx, 8
and eax, 0xff
and ecx, 0xff
xor edx, edx
lea edi, [esi + 0x10bc]
movzx ebp, byte [esp + edx + 0x64]
movzx ebp, byte [ebp + 0x51d210]
xor ebp, ecx
movzx ebp, byte [ebp + 0x51d110]
xor ebp, eax
mov ebp, dword [esi + ebp*4 + 0x410]
mov dword [edi - 8], ebp
movzx ebp, byte [esp + edx + 0x65]
movzx ebp, byte [ebp + 0x51d210]
xor ebp, ecx
movzx ebp, byte [ebp + 0x51d110]
xor ebp, eax
mov ebp, dword [esi + ebp*4 + 0x410]
mov dword [edi], ebp
add edx, 2
add edi, 0x10
cmp edx, 0x100
jl 0x404750
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x164]
shr ecx, 0x10
push edx
mov eax, 0x51d110
call fcn.004040b0
xor eax, eax
lea ebx, [ebx]
movzx ecx, byte [esp + eax + 0x164]
movzx edx, byte [ecx + 0x51d110]
movzx ecx, byte [esp + eax + 0x165]
mov byte [esp + eax + 0x64], dl
movzx edx, byte [ecx + 0x51d110]
mov byte [esp + eax + 0x65], dl
add eax, 2
cmp eax, 0x100
jl 0x4047c0
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x64]
shr ecx, 0x10
push eax
call fcn.004040b0
mov ecx, dword [esp + 0x14]
mov eax, ebx
shr eax, 0x10
shr ecx, 0x10
and eax, 0xff
and ecx, 0xff
xor edx, edx
lea edi, [esi + 0x18b8]
movzx ebp, byte [esp + edx + 0x64]
movzx ebp, byte [ebp + 0x51d110]
xor ebp, ecx
movzx ebp, byte [ebp + 0x51d210]
xor ebp, eax
mov ebp, dword [esi + ebp*4 + 0x810]
mov dword [edi - 8], ebp
movzx ebp, byte [esp + edx + 0x65]
movzx ebp, byte [ebp + 0x51d110]
xor ebp, ecx
movzx ebp, byte [ebp + 0x51d210]
xor ebp, eax
mov ebp, dword [esi + ebp*4 + 0x810]
mov dword [edi], ebp
add edx, 2
add edi, 0x10
cmp edx, 0x100
jl 0x404820
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x164]
shr ecx, 0x18
push edx
mov eax, 0x51d210
call fcn.004040b0
xor eax, eax
lea ebx, [ebx]
movzx ecx, byte [esp + eax + 0x164]
movzx edx, byte [ecx + 0x51d110]
movzx ecx, byte [esp + eax + 0x165]
mov byte [esp + eax + 0x64], dl
movzx edx, byte [ecx + 0x51d110]
mov byte [esp + eax + 0x65], dl
add eax, 2
cmp eax, 0x100
jl 0x404890
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x64]
shr ecx, 0x18
push eax
call fcn.004040b0
mov edi, dword [esp + 0x14]
shr ebx, 0x18
shr edi, 0x18
mov edx, ebx
xor eax, eax
lea ecx, [esi + 0x18bc]
jmp 0x4048f0
movzx ebx, byte [esp + eax + 0x64]
movzx ebx, byte [ebx + 0x51d210]
xor ebx, edi
movzx ebx, byte [ebx + 0x51d210]
xor ebx, edx
mov ebx, dword [esi + ebx*4 + 0xc10]
mov dword [ecx - 8], ebx
movzx ebx, byte [esp + eax + 0x65]
movzx ebx, byte [ebx + 0x51d210]
xor ebx, edi
movzx ebx, byte [ebx + 0x51d210]
xor ebx, edx
mov ebx, dword [esi + ebx*4 + 0xc10]
mov dword [ecx], ebx
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x4048f0
jmp 0x404d4c
lea ecx, [esp + 0x64]
push ecx
mov cl, byte [esp + 0x1c]
mov eax, 0x51d210
call fcn.004040b0
mov ebx, dword [esp + 0x10]
movzx edi, byte [esp + 0x14]
movzx edx, bl
xor eax, eax
lea ecx, [esi + 0x10b8]
lea ebx, [ebx]
movzx ebp, byte [esp + eax + 0x64]
movzx ebp, byte [ebp + 0x51d110]
xor ebp, edi
movzx ebp, byte [ebp + 0x51d110]
xor ebp, edx
mov ebp, dword [esi + ebp*4 + 0x10]
mov dword [ecx - 8], ebp
movzx ebp, byte [esp + eax + 0x65]
movzx ebp, byte [ebp + 0x51d110]
xor ebp, edi
movzx ebp, byte [ebp + 0x51d110]
xor ebp, edx
mov ebp, dword [esi + ebp*4 + 0x10]
mov dword [ecx], ebp
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x404970
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x64]
shr ecx, 8
push edx
mov eax, 0x51d210
call fcn.004040b0
mov ecx, dword [esp + 0x14]
mov eax, ebx
shr eax, 8
shr ecx, 8
and eax, 0xff
and ecx, 0xff
xor edx, edx
lea edi, [esi + 0x10bc]
lea ecx, [ecx]
movzx ebp, byte [esp + edx + 0x64]
movzx ebp, byte [ebp + 0x51d210]
xor ebp, ecx
movzx ebp, byte [ebp + 0x51d110]
xor ebp, eax
mov ebp, dword [esi + ebp*4 + 0x410]
mov dword [edi - 8], ebp
movzx ebp, byte [esp + edx + 0x65]
movzx ebp, byte [ebp + 0x51d210]
xor ebp, ecx
movzx ebp, byte [ebp + 0x51d110]
xor ebp, eax
mov ebp, dword [esi + ebp*4 + 0x410]
mov dword [edi], ebp
add edx, 2
add edi, 0x10
cmp edx, 0x100
jl 0x4049f0
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x64]
push eax
shr ecx, 0x10
mov eax, 0x51d110
call fcn.004040b0
mov ecx, dword [esp + 0x14]
mov eax, ebx
shr eax, 0x10
shr ecx, 0x10
and eax, 0xff
and ecx, 0xff
xor edx, edx
lea edi, [esi + 0x18b8]
jmp 0x404a80
movzx ebp, byte [esp + edx + 0x64]
movzx ebp, byte [ebp + 0x51d110]
xor ebp, ecx
movzx ebp, byte [ebp + 0x51d210]
xor ebp, eax
mov ebp, dword [esi + ebp*4 + 0x810]
mov dword [edi - 8], ebp
movzx ebp, byte [esp + edx + 0x65]
movzx ebp, byte [ebp + 0x51d110]
xor ebp, ecx
movzx ebp, byte [ebp + 0x51d210]
xor ebp, eax
mov ebp, dword [esi + ebp*4 + 0x810]
mov dword [edi], ebp
add edx, 2
add edi, 0x10
cmp edx, 0x100
jl 0x404a80
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x64]
shr ecx, 0x18
push edx
mov eax, 0x51d110
call fcn.004040b0
mov edi, dword [esp + 0x14]
shr ebx, 0x18
shr edi, 0x18
mov edx, ebx
xor eax, eax
lea ecx, [esi + 0x18bc]
lea esp, [esp]
movzx ebx, byte [esp + eax + 0x64]
movzx ebx, byte [ebx + 0x51d210]
xor ebx, edi
movzx ebx, byte [ebx + 0x51d210]
xor ebx, edx
mov ebx, dword [esi + ebx*4 + 0xc10]
mov dword [ecx - 8], ebx
movzx ebx, byte [esp + eax + 0x65]
movzx ebx, byte [ebx + 0x51d210]
xor ebx, edi
movzx ebx, byte [ebx + 0x51d210]
xor ebx, edx
mov ebx, dword [esi + ebx*4 + 0xc10]
mov dword [ecx], ebx
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x404b00
jmp 0x404d4c
movzx ecx, byte [esp + 0x14]
imul ecx, ecx, 0x1010101
xor eax, eax
mov edx, dword [eax + 0x51d110]
xor edx, ecx
mov dword [esp + eax + 0x64], edx
mov edx, dword [eax + 0x51d114]
xor edx, ecx
mov dword [esp + eax + 0x68], edx
mov edx, dword [eax + 0x51d118]
xor edx, ecx
mov dword [esp + eax + 0x6c], edx
mov edx, dword [eax + 0x51d11c]
xor edx, ecx
mov dword [esp + eax + 0x70], edx
add eax, 0x10
cmp eax, 0x100
jb 0x404b60
mov ebx, dword [esp + 0x10]
movzx edx, bl
xor eax, eax
lea ecx, [esi + 0x10b8]
lea esp, [esp]
movzx edi, byte [esp + eax + 0x64]
movzx edi, byte [edi + 0x51d110]
xor edi, edx
mov edi, dword [esi + edi*4 + 0x10]
mov dword [ecx - 8], edi
movzx edi, byte [esp + eax + 0x65]
movzx edi, byte [edi + 0x51d110]
xor edi, edx
mov edi, dword [esi + edi*4 + 0x10]
mov dword [ecx], edi
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x404bb0
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x64]
push eax
shr ecx, 8
mov eax, 0x51d210
call fcn.004040b0
mov eax, ebx
shr eax, 8
and eax, 0xff
xor ecx, ecx
lea edx, [esi + 0x10bc]
mov edi, edi
movzx edi, byte [esp + ecx + 0x64]
movzx edi, byte [edi + 0x51d110]
xor edi, eax
mov edi, dword [esi + edi*4 + 0x410]
mov dword [edx - 8], edi
movzx edi, byte [esp + ecx + 0x65]
movzx edi, byte [edi + 0x51d110]
xor edi, eax
mov edi, dword [esi + edi*4 + 0x410]
mov dword [edx], edi
add ecx, 2
add edx, 0x10
cmp ecx, 0x100
jl 0x404c10
mov ecx, dword [esp + 0x14]
shr ecx, 0x10
movzx ecx, cl
imul ecx, ecx, 0x1010101
xor eax, eax
nop
mov edx, dword [eax + 0x51d110]
xor edx, ecx
mov dword [esp + eax + 0x64], edx
mov edx, dword [eax + 0x51d114]
xor edx, ecx
mov dword [esp + eax + 0x68], edx
mov edx, dword [eax + 0x51d118]
xor edx, ecx
mov dword [esp + eax + 0x6c], edx
mov edx, dword [eax + 0x51d11c]
xor edx, ecx
mov dword [esp + eax + 0x70], edx
add eax, 0x10
cmp eax, 0x100
jb 0x404c60
mov eax, ebx
shr eax, 0x10
and eax, 0xff
xor ecx, ecx
lea edx, [esi + 0x18b8]
lea esp, [esp]
movzx edi, byte [esp + ecx + 0x64]
movzx edi, byte [edi + 0x51d210]
xor edi, eax
mov edi, dword [esi + edi*4 + 0x810]
mov dword [edx - 8], edi
movzx edi, byte [esp + ecx + 0x65]
movzx edi, byte [edi + 0x51d210]
xor edi, eax
mov edi, dword [esi + edi*4 + 0x810]
mov dword [edx], edi
add ecx, 2
add edx, 0x10
cmp ecx, 0x100
jl 0x404cb0
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x64]
push eax
shr ecx, 0x18
mov eax, 0x51d210
call fcn.004040b0
shr ebx, 0x18
mov edx, ebx
xor eax, eax
lea ecx, [esi + 0x18bc]
movzx edi, byte [esp + eax + 0x64]
movzx edi, byte [edi + 0x51d210]
xor edi, edx
mov edi, dword [esi + edi*4 + 0xc10]
mov dword [ecx - 8], edi
movzx edi, byte [esp + eax + 0x65]
movzx edi, byte [edi + 0x51d210]
xor edi, edx
mov edi, dword [esi + edi*4 + 0xc10]
mov dword [ecx], edi
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x404d10
mov ecx, dword [esp + 0x264]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004690b5
add esp, 0x258
ret 4