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

Disassembly:
sub esp, 0x250
mov eax, dword [0x536400]
xor eax, esp
mov dword [esp + 0x24c], eax
push ebx
mov ebx, dword [esp + 0x258]
push esi
push edi
xor esi, esi
xor edi, edi
cmp dword [0x535798], esi
mov dword [esp + 0x10], ebx
je 0x4598f3
call fcn.00458ff0
mov eax, dword [ebx + 0xc]
mov ebx, dword [ebx + 4]
lea ecx, [eax + eax + 8]
lea eax, [ebx + 0x3f]
cdq
and edx, 0x3f
add eax, edx
sar eax, 6
mov dword [esp + 0x54], ebx
xor ebx, ebx
test eax, eax
push ebp
mov dword [esp + 0x34], ecx
mov dword [esp + 0x10], eax
jle 0x459971
mov ebp, dword [esp + 0x14]
lea edx, [esp + eax*4 + 0x14]
lea eax, [ebp + eax*4 + 0x2c]
mov dword [esp + 0x30], edx
mov dword [esp + 0x2c], eax
add ebp, 0x14
mov ecx, dword [ebp]
mov eax, dword [ebp - 4]
push ecx
push eax
mov dword [esp + ebx*4 + 0x40], eax
mov dword [esp + ebx*4 + 0x50], ecx
call fcn.00458e90
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov dword [ecx], eax
mov dword [edx], eax
add ebx, 1
sub ecx, 4
sub edx, 4
add esp, 8
add ebp, 8
cmp ebx, dword [esp + 0x10]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], edx
jl 0x459933
mov eax, dword [esp + 0x34]
cdq
sub eax, edx
xor ebx, ebx
sar eax, 1
test eax, eax
mov dword [esp + 0x2c], ebx
jle 0x459c70
mov ecx, dword [esp + 0x10]
mov ebp, dword [esp + 0x14]
and ecx, 3
mov dword [esp + 0x30], ecx
add ebp, 0x44
mov dword [esp + 0x34], eax
mov edi, edi
mov eax, ecx
sub eax, 0
mov dword [esp + 0x10], ebx
je 0x4599ff
sub eax, 2
je 0x459a3b
sub eax, 1
jne 0x459aeb
mov al, byte [esp + 0x13]
mov cl, byte [esp + 0x12]
mov dl, byte [esp + 0x11]
movzx edi, bl
mov bl, byte [edi + 0x535698]
xor bl, byte [esp + 0x40]
movzx edx, dl
mov dl, byte [edx + 0x535698]
xor dl, byte [esp + 0x41]
movzx ecx, cl
mov cl, byte [ecx + 0x535598]
xor cl, byte [esp + 0x42]
movzx eax, al
mov al, byte [eax + 0x535598]
xor al, byte [esp + 0x43]
jmp 0x459a4b
movzx eax, byte [esp + 0x12]
movzx edx, byte [esp + 0x11]
mov dl, byte [edx + 0x535598]
xor dl, byte [esp + 0x45]
movzx ecx, bl
mov bl, byte [ecx + 0x535698]
mov cl, byte [eax + 0x535598]
movzx eax, byte [esp + 0x13]
mov al, byte [eax + 0x535698]
xor bl, byte [esp + 0x44]
xor cl, byte [esp + 0x46]
xor al, byte [esp + 0x47]
jmp 0x4599c9
mov al, byte [esp + 0x13]
mov cl, byte [esp + 0x12]
mov dl, byte [esp + 0x11]
mov bl, byte [esp + 0x10]
movzx edi, byte [esp + 0x3f]
movzx eax, al
movzx eax, byte [eax + 0x535698]
xor eax, edi
movzx eax, byte [eax + 0x535698]
movzx edi, byte [esp + 0x3b]
movzx ecx, cl
movzx ecx, byte [ecx + 0x535598]
xor eax, edi
movzx edi, byte [esp + 0x3e]
xor ecx, edi
movzx ecx, byte [ecx + 0x535698]
movzx edi, byte [esp + 0x3a]
xor ecx, edi
mov edi, dword [eax*4 + 0x539c28]
xor edi, dword [ecx*4 + 0x539828]
movzx ecx, byte [esp + 0x3d]
movzx edx, dl
movzx eax, byte [edx + 0x535698]
xor eax, ecx
movzx edx, byte [eax + 0x535598]
movzx eax, byte [esp + 0x39]
xor edx, eax
xor edi, dword [edx*4 + 0x539428]
movzx eax, byte [esp + 0x3c]
movzx ecx, bl
movzx edx, byte [ecx + 0x535598]
mov ebx, dword [esp + 0x2c]
xor edx, eax
movzx ecx, byte [edx + 0x535598]
movzx edx, byte [esp + 0x38]
xor ecx, edx
xor edi, dword [ecx*4 + 0x539028]
mov ecx, dword [esp + 0x30]
lea eax, [ebx + 0x1010101]
mov dword [esp + 0x10], eax
mov eax, ecx
sub eax, 0
je 0x459b5c
sub eax, 2
je 0x459b9a
sub eax, 1
jne 0x459c44
mov bl, byte [esp + 0x13]
mov cl, byte [esp + 0x12]
mov dl, byte [esp + 0x11]
mov al, byte [esp + 0x10]
movzx eax, al
mov al, byte [eax + 0x535698]
xor al, byte [esp + 0x50]
movzx edx, dl
mov dl, byte [edx + 0x535698]
xor dl, byte [esp + 0x51]
mov byte [esp + 0x10], al
movzx eax, cl
mov cl, byte [eax + 0x535598]
xor cl, byte [esp + 0x52]
movzx eax, bl
mov al, byte [eax + 0x535598]
xor al, byte [esp + 0x53]
mov ebx, dword [esp + 0x2c]
jmp 0x459ba6
movzx ecx, byte [esp + 0x10]
mov al, byte [ecx + 0x535698]
movzx edx, byte [esp + 0x11]
movzx ecx, byte [esp + 0x12]
movzx esi, byte [esp + 0x13]
mov dl, byte [edx + 0x535598]
mov cl, byte [ecx + 0x535598]
mov bl, byte [esi + 0x535698]
xor al, byte [esp + 0x54]
xor dl, byte [esp + 0x55]
xor cl, byte [esp + 0x56]
xor bl, byte [esp + 0x57]
jmp 0x459b1e
mov al, byte [esp + 0x13]
mov cl, byte [esp + 0x12]
mov dl, byte [esp + 0x11]
movzx esi, byte [esp + 0x4f]
movzx eax, al
movzx eax, byte [eax + 0x535698]
xor eax, esi
movzx eax, byte [eax + 0x535698]
movzx esi, byte [esp + 0x4b]
movzx ecx, cl
movzx ecx, byte [ecx + 0x535598]
xor eax, esi
movzx esi, byte [esp + 0x4e]
xor ecx, esi
movzx ecx, byte [ecx + 0x535698]
movzx esi, byte [esp + 0x4a]
xor ecx, esi
mov esi, dword [eax*4 + 0x539c28]
xor esi, dword [ecx*4 + 0x539828]
movzx ecx, byte [esp + 0x4d]
movzx edx, dl
movzx eax, byte [edx + 0x535698]
xor eax, ecx
movzx edx, byte [eax + 0x535598]
movzx eax, byte [esp + 0x49]
movzx ecx, byte [esp + 0x10]
xor edx, eax
xor esi, dword [edx*4 + 0x539428]
movzx edx, byte [ecx + 0x535598]
movzx eax, byte [esp + 0x4c]
xor edx, eax
movzx ecx, byte [edx + 0x535598]
movzx edx, byte [esp + 0x48]
xor ecx, edx
xor esi, dword [ecx*4 + 0x539028]
mov ecx, dword [esp + 0x30]
rol esi, 8
lea eax, [esi + edi]
lea esi, [edi + esi*2]
mov edx, esi
rol edx, 9
mov dword [ebp - 4], eax
mov dword [ebp], edx
add ebx, 0x2020202
add ebp, 8
sub dword [esp + 0x34], 1
mov dword [esp + 0x2c], ebx
jne 0x4599a0
mov eax, dword [esp + 0x58]
sub eax, 0x80
pop ebp
je 0x45a223
sub eax, 0x40
je 0x45a023
sub eax, 0x40
jne 0x459fce
mov eax, dword [esp + 0x20]
push eax
lea ecx, [esp + 0x15c]
push 0x535698
push ecx
call fcn.004595e0
add esp, 0xc
xor eax, eax
mov edi, edi
movzx edx, byte [esp + eax + 0x158]
movzx ecx, byte [edx + 0x535698]
movzx edx, byte [esp + eax + 0x159]
mov byte [esp + eax + 0x58], cl
movzx ecx, byte [edx + 0x535698]
mov byte [esp + eax + 0x59], cl
add eax, 2
cmp eax, 0x100
jl 0x459cb0
mov edx, dword [esp + 0x1c]
push edx
lea eax, [esp + 0x5c]
push eax
mov ecx, eax
push ecx
call fcn.004595e0
mov edi, dword [esp + 0x1c]
movzx edx, byte [esp + 0x20]
movzx esi, byte [esp + 0x24]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0xe8]
jmp 0x459d10
movzx ebx, byte [esp + eax + 0x58]
movzx ebx, byte [ebx + 0x535598]
xor ebx, esi
movzx ebx, byte [ebx + 0x535598]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x539028]
mov dword [ecx - 8], ebx
movzx ebx, byte [esp + eax + 0x59]
movzx ebx, byte [ebx + 0x535598]
xor ebx, esi
movzx ebx, byte [ebx + 0x535598]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x539028]
mov dword [ecx], ebx
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x459d10
mov edx, dword [esp + 0x21]
push edx
lea eax, [esp + 0x15c]
push 0x535598
push eax
call fcn.004595e0
add esp, 0xc
xor eax, eax
lea ebx, [ebx]
movzx ecx, byte [esp + eax + 0x158]
movzx edx, byte [ecx + 0x535698]
movzx ecx, byte [esp + eax + 0x159]
mov byte [esp + eax + 0x58], dl
movzx edx, byte [ecx + 0x535698]
mov byte [esp + eax + 0x59], dl
add eax, 2
cmp eax, 0x100
jl 0x459d80
mov eax, dword [esp + 0x1d]
push eax
lea ecx, [esp + 0x5c]
push ecx
mov edx, ecx
push edx
call fcn.004595e0
movzx edx, byte [esp + 0x21]
movzx esi, byte [esp + 0x25]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0xec]
jmp 0x459de0
movzx ebx, byte [esp + eax + 0x58]
movzx ebx, byte [ebx + 0x535698]
xor ebx, esi
movzx ebx, byte [ebx + 0x535598]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x539428]
mov dword [ecx - 8], ebx
movzx ebx, byte [esp + eax + 0x59]
movzx ebx, byte [ebx + 0x535698]
xor ebx, esi
movzx ebx, byte [ebx + 0x535598]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x539428]
mov dword [ecx], ebx
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x459de0
mov eax, dword [esp + 0x22]
push eax
lea ecx, [esp + 0x15c]
push 0x535598
push ecx
call fcn.004595e0
add esp, 0xc
xor eax, eax
lea ebx, [ebx]
movzx edx, byte [esp + eax + 0x158]
movzx ecx, byte [edx + 0x535598]
movzx edx, byte [esp + eax + 0x159]
mov byte [esp + eax + 0x58], cl
movzx ecx, byte [edx + 0x535598]
mov byte [esp + eax + 0x59], cl
add eax, 2
cmp eax, 0x100
jl 0x459e50
mov edx, dword [esp + 0x1e]
push edx
lea eax, [esp + 0x5c]
push eax
mov ecx, eax
push ecx
call fcn.004595e0
movzx edx, byte [esp + 0x22]
movzx esi, byte [esp + 0x26]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0x8e8]
jmp 0x459eb0
movzx ebx, byte [esp + eax + 0x58]
movzx ebx, byte [ebx + 0x535598]
xor ebx, esi
movzx ebx, byte [ebx + 0x535698]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x539828]
mov dword [ecx - 8], ebx
movzx ebx, byte [esp + eax + 0x59]
movzx ebx, byte [ebx + 0x535598]
xor ebx, esi
movzx ebx, byte [ebx + 0x535698]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x539828]
mov dword [ecx], ebx
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x459eb0
mov edx, dword [esp + 0x23]
push edx
lea eax, [esp + 0x15c]
push 0x535698
push eax
call fcn.004595e0
add esp, 0xc
xor eax, eax
lea ebx, [ebx]
movzx ecx, byte [esp + eax + 0x158]
movzx edx, byte [ecx + 0x535598]
movzx ecx, byte [esp + eax + 0x159]
mov byte [esp + eax + 0x58], dl
movzx edx, byte [ecx + 0x535598]
mov byte [esp + eax + 0x59], dl
add eax, 2
cmp eax, 0x100
jl 0x459f20
mov eax, dword [esp + 0x1f]
push eax
lea ecx, [esp + 0x5c]
push ecx
mov edx, ecx
push edx
call fcn.004595e0
movzx edx, byte [esp + 0x23]
movzx esi, byte [esp + 0x27]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0x8ec]
jmp 0x459f80
movzx edi, byte [esp + eax + 0x58]
movzx edi, byte [edi + 0x535698]
xor edi, esi
movzx edi, byte [edi + 0x535698]
xor edi, edx
mov edi, dword [edi*4 + 0x539c28]
mov dword [ecx - 8], edi
movzx edi, byte [esp + eax + 0x59]
movzx edi, byte [edi + 0x535698]
xor edi, esi
movzx edi, byte [edi + 0x535698]
xor edi, edx
mov edi, dword [edi*4 + 0x539c28]
mov dword [ecx], edi
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x459f80
mov edi, dword [esp + 0x10]
cmp byte [edi], 0
jne 0x45a006
mov ecx, dword [edi + 0xc]
lea eax, [edi + 0x60]
lea ecx, [eax + ecx*8 - 8]
cmp eax, ecx
jae 0x45a003
mov ebx, dword [ecx]
mov edx, dword [eax]
mov esi, dword [eax + 4]
mov dword [eax], ebx
mov ebx, dword [ecx + 4]
mov dword [eax + 4], ebx
mov dword [ecx], edx
mov dword [ecx + 4], esi
add eax, 8
sub ecx, 8
cmp eax, ecx
jb 0x459fe5
mov byte [edi], 0
mov ecx, dword [esp + 0x258]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.0046255c
add esp, 0x250
ret
mov eax, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x5c]
push 0x535698
push ecx
call fcn.004595e0
mov edi, dword [esp + 0x1c]
movzx edx, byte [esp + 0x20]
movzx esi, byte [esp + 0x24]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0xe8]
movzx ebx, byte [esp + eax + 0x58]
movzx ebx, byte [ebx + 0x535598]
xor ebx, esi
movzx ebx, byte [ebx + 0x535598]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x539028]
mov dword [ecx - 8], ebx
movzx ebx, byte [esp + eax + 0x59]
movzx ebx, byte [ebx + 0x535598]
xor ebx, esi
movzx ebx, byte [ebx + 0x535598]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x539028]
mov dword [ecx], ebx
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x45a050
mov edx, dword [esp + 0x1d]
push edx
lea eax, [esp + 0x5c]
push 0x535698
push eax
call fcn.004595e0
movzx edx, byte [esp + 0x21]
movzx esi, byte [esp + 0x25]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0xec]
jmp 0x45a0d0
movzx ebx, byte [esp + eax + 0x58]
movzx ebx, byte [ebx + 0x535698]
xor ebx, esi
movzx ebx, byte [ebx + 0x535598]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x539428]
mov dword [ecx - 8], ebx
movzx ebx, byte [esp + eax + 0x59]
movzx ebx, byte [ebx + 0x535698]
xor ebx, esi
movzx ebx, byte [ebx + 0x535598]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x539428]
mov dword [ecx], ebx
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x45a0d0
mov ecx, dword [esp + 0x1e]
push ecx
lea edx, [esp + 0x5c]
push 0x535598
push edx
call fcn.004595e0
movzx edx, byte [esp + 0x22]
movzx esi, byte [esp + 0x26]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0x8e8]
jmp 0x45a150
movzx ebx, byte [esp + eax + 0x58]
movzx ebx, byte [ebx + 0x535598]
xor ebx, esi
movzx ebx, byte [ebx + 0x535698]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x539828]
mov dword [ecx - 8], ebx
movzx ebx, byte [esp + eax + 0x59]
movzx ebx, byte [ebx + 0x535598]
xor ebx, esi
movzx ebx, byte [ebx + 0x535698]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x539828]
mov dword [ecx], ebx
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x45a150
mov eax, dword [esp + 0x1f]
push eax
lea ecx, [esp + 0x5c]
push 0x535598
push ecx
call fcn.004595e0
movzx edx, byte [esp + 0x23]
movzx esi, byte [esp + 0x27]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0x8ec]
jmp 0x45a1d0
movzx edi, byte [esp + eax + 0x58]
movzx edi, byte [edi + 0x535698]
xor edi, esi
movzx edi, byte [edi + 0x535698]
xor edi, edx
mov edi, dword [edi*4 + 0x539c28]
mov dword [ecx - 8], edi
movzx edi, byte [esp + eax + 0x59]
movzx edi, byte [edi + 0x535698]
xor edi, esi
movzx edi, byte [edi + 0x535698]
xor edi, edx
mov edi, dword [edi*4 + 0x539c28]
mov dword [ecx], edi
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x45a1d0
jmp 0x459fce
mov edx, dword [esp + 0x18]
push edx
lea eax, [esp + 0x5c]
push 0x535598
push eax
call fcn.004595e0
mov edi, dword [esp + 0x1c]
movzx edx, byte [esp + 0x20]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0xe8]
jmp 0x45a250
movzx esi, byte [esp + eax + 0x58]
movzx esi, byte [esi + 0x535598]
xor esi, edx
mov esi, dword [esi*4 + 0x539028]
mov dword [ecx - 8], esi
movzx esi, byte [esp + eax + 0x59]
movzx esi, byte [esi + 0x535598]
xor esi, edx
mov esi, dword [esi*4 + 0x539028]
mov dword [ecx], esi
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x45a250
mov ecx, dword [esp + 0x19]
push ecx
lea edx, [esp + 0x5c]
push 0x535698
push edx
call fcn.004595e0
movzx edx, byte [esp + 0x21]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0xec]
movzx esi, byte [esp + eax + 0x58]
movzx esi, byte [esi + 0x535598]
xor esi, edx
mov esi, dword [esi*4 + 0x539428]
mov dword [ecx - 8], esi
movzx esi, byte [esp + eax + 0x59]
movzx esi, byte [esi + 0x535598]
xor esi, edx
mov esi, dword [esi*4 + 0x539428]
mov dword [ecx], esi
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x45a2b0
mov eax, dword [esp + 0x1a]
push eax
lea ecx, [esp + 0x5c]
push 0x535598
push ecx
call fcn.004595e0
movzx edx, byte [esp + 0x22]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0x8e8]
movzx esi, byte [esp + eax + 0x58]
movzx esi, byte [esi + 0x535698]
xor esi, edx
mov esi, dword [esi*4 + 0x539828]
mov dword [ecx - 8], esi
movzx esi, byte [esp + eax + 0x59]
movzx esi, byte [esi + 0x535698]
xor esi, edx
mov esi, dword [esi*4 + 0x539828]
mov dword [ecx], esi
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x45a310
mov edx, dword [esp + 0x1b]
push edx
lea eax, [esp + 0x5c]
push 0x535698
push eax
call fcn.004595e0
movzx edx, byte [esp + 0x23]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0x8ec]
movzx esi, byte [esp + eax + 0x58]
movzx esi, byte [esi + 0x535698]
xor esi, edx
mov esi, dword [esi*4 + 0x539c28]
mov dword [ecx - 8], esi
movzx esi, byte [esp + eax + 0x59]
movzx esi, byte [esi + 0x535698]
xor esi, edx
mov esi, dword [esi*4 + 0x539c28]
mov dword [ecx], esi
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x45a370
jmp 0x459fd2