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

Disassembly:
sub esp, 0x254
mov eax, dword [0x5e4ce0]
xor eax, esp
mov dword [esp + 0x250], eax
push ebx
mov ebx, dword [esp + 0x25c]
push esi
push edi
xor esi, esi
xor edi, edi
cmp dword [0x5e3f70], esi
mov dword [esp + 0x10], ebx
je 0x4c14c3
call fcn.004c0bd0
mov eax, dword [ebx + 0x50]
mov ebx, dword [ebx + 4]
lea ecx, [eax + eax + 8]
lea eax, [ebx + 0x3f]
cdq
and edx, 0x3f
add eax, edx
sar eax, 6
push ebp
xor ebp, ebp
test eax, eax
mov dword [esp + 0x58], ecx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x30], eax
jle 0x4c1549
mov ecx, dword [esp + 0x14]
lea edx, [esp + eax*4 + 0x14]
lea eax, [ecx + eax*4 + 0x70]
add ecx, 0x58
mov dword [esp + 0x34], edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx - 4]
mov ebx, dword [ecx]
push eax
mov dword [esp + ebp*4 + 0x3c], eax
mov dword [esp + ebp*4 + 0x4c], ebx
call fcn.004c0a80
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x38]
add dword [esp + 0x14], 8
mov dword [ecx], eax
mov dword [edx], eax
add ebp, 1
sub ecx, 4
sub edx, 4
add esp, 4
cmp ebp, dword [esp + 0x30]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x34], edx
jl 0x4c1507
mov eax, dword [esp + 0x58]
cdq
sub eax, edx
xor ebx, ebx
sar eax, 1
test eax, eax
mov dword [esp + 0x2c], ebx
jle 0x4c1850
mov ecx, dword [esp + 0x30]
mov ebp, dword [esp + 0x14]
and ecx, 3
mov dword [esp + 0x34], ecx
add ebp, 0x88
mov dword [esp + 0x30], eax
lea esp, [esp]
mov eax, ecx
sub eax, 0
mov dword [esp + 0x10], ebx
je 0x4c15df
sub eax, 2
je 0x4c161b
sub eax, 1
jne 0x4c16cb
mov al, byte [esp + 0x13]
mov cl, byte [esp + 0x12]
mov dl, byte [esp + 0x11]
movzx edi, bl
mov bl, byte [edi + 0x5e3e70]
xor bl, byte [esp + 0x40]
movzx edx, dl
mov dl, byte [edx + 0x5e3e70]
xor dl, byte [esp + 0x41]
movzx ecx, cl
mov cl, byte [ecx + 0x5e3d70]
xor cl, byte [esp + 0x42]
movzx eax, al
mov al, byte [eax + 0x5e3d70]
xor al, byte [esp + 0x43]
jmp 0x4c162b
movzx eax, byte [esp + 0x12]
movzx edx, byte [esp + 0x11]
mov dl, byte [edx + 0x5e3d70]
xor dl, byte [esp + 0x45]
movzx ecx, bl
mov bl, byte [ecx + 0x5e3e70]
mov cl, byte [eax + 0x5e3d70]
movzx eax, byte [esp + 0x13]
mov al, byte [eax + 0x5e3e70]
xor bl, byte [esp + 0x44]
xor cl, byte [esp + 0x46]
xor al, byte [esp + 0x47]
jmp 0x4c15a9
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 + 0x5e3e70]
xor eax, edi
movzx eax, byte [eax + 0x5e3e70]
movzx edi, byte [esp + 0x3b]
movzx ecx, cl
movzx ecx, byte [ecx + 0x5e3d70]
xor eax, edi
movzx edi, byte [esp + 0x3e]
xor ecx, edi
movzx ecx, byte [ecx + 0x5e3e70]
movzx edi, byte [esp + 0x3a]
xor ecx, edi
mov edi, dword [eax*4 + 0x5ec060]
xor edi, dword [ecx*4 + 0x5ebc60]
movzx ecx, byte [esp + 0x3d]
movzx edx, dl
movzx eax, byte [edx + 0x5e3e70]
xor eax, ecx
movzx edx, byte [eax + 0x5e3d70]
movzx eax, byte [esp + 0x39]
xor edx, eax
xor edi, dword [edx*4 + 0x5eb860]
movzx eax, byte [esp + 0x3c]
movzx ecx, bl
movzx edx, byte [ecx + 0x5e3d70]
mov ebx, dword [esp + 0x2c]
xor edx, eax
movzx ecx, byte [edx + 0x5e3d70]
movzx edx, byte [esp + 0x38]
xor ecx, edx
xor edi, dword [ecx*4 + 0x5eb460]
mov ecx, dword [esp + 0x34]
lea eax, [ebx + 0x1010101]
mov dword [esp + 0x10], eax
mov eax, ecx
sub eax, 0
je 0x4c173c
sub eax, 2
je 0x4c177a
sub eax, 1
jne 0x4c1824
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 + 0x5e3e70]
xor al, byte [esp + 0x50]
movzx edx, dl
mov dl, byte [edx + 0x5e3e70]
xor dl, byte [esp + 0x51]
mov byte [esp + 0x10], al
movzx eax, cl
mov cl, byte [eax + 0x5e3d70]
xor cl, byte [esp + 0x52]
movzx eax, bl
mov al, byte [eax + 0x5e3d70]
xor al, byte [esp + 0x53]
mov ebx, dword [esp + 0x2c]
jmp 0x4c1786
movzx ecx, byte [esp + 0x10]
mov al, byte [ecx + 0x5e3e70]
movzx edx, byte [esp + 0x11]
movzx ecx, byte [esp + 0x12]
movzx esi, byte [esp + 0x13]
mov dl, byte [edx + 0x5e3d70]
mov cl, byte [ecx + 0x5e3d70]
mov bl, byte [esi + 0x5e3e70]
xor al, byte [esp + 0x54]
xor dl, byte [esp + 0x55]
xor cl, byte [esp + 0x56]
xor bl, byte [esp + 0x57]
jmp 0x4c16fe
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 + 0x5e3e70]
xor eax, esi
movzx eax, byte [eax + 0x5e3e70]
movzx esi, byte [esp + 0x4b]
movzx ecx, cl
movzx ecx, byte [ecx + 0x5e3d70]
xor eax, esi
movzx esi, byte [esp + 0x4e]
xor ecx, esi
movzx ecx, byte [ecx + 0x5e3e70]
movzx esi, byte [esp + 0x4a]
xor ecx, esi
mov esi, dword [eax*4 + 0x5ec060]
xor esi, dword [ecx*4 + 0x5ebc60]
movzx ecx, byte [esp + 0x4d]
movzx edx, dl
movzx eax, byte [edx + 0x5e3e70]
xor eax, ecx
movzx edx, byte [eax + 0x5e3d70]
movzx eax, byte [esp + 0x49]
movzx ecx, byte [esp + 0x10]
xor edx, eax
xor esi, dword [edx*4 + 0x5eb860]
movzx edx, byte [ecx + 0x5e3d70]
movzx eax, byte [esp + 0x4c]
xor edx, eax
movzx ecx, byte [edx + 0x5e3d70]
movzx edx, byte [esp + 0x48]
xor ecx, edx
xor esi, dword [ecx*4 + 0x5eb460]
mov ecx, dword [esp + 0x34]
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 + 0x30], 1
mov dword [esp + 0x2c], ebx
jne 0x4c1580
mov eax, dword [esp + 0x5c]
sub eax, 0x80
pop ebp
je 0x4c1e13
sub eax, 0x40
je 0x4c1c06
sub eax, 0x40
jne 0x4c1bae
mov eax, dword [esp + 0x20]
push eax
lea ecx, [esp + 0x160]
push 0x5e3e70
push ecx
call fcn.004c11b0
add esp, 0xc
xor eax, eax
mov edi, edi
movzx edx, byte [esp + eax + 0x15c]
movzx ecx, byte [edx + 0x5e3e70]
movzx edx, byte [esp + eax + 0x15d]
mov byte [esp + eax + 0x5c], cl
movzx ecx, byte [edx + 0x5e3e70]
mov byte [esp + eax + 0x5d], cl
add eax, 2
cmp eax, 0x100
jl 0x4c1890
mov edx, dword [esp + 0x1c]
push edx
lea eax, [esp + 0x60]
push eax
mov ecx, eax
push ecx
call fcn.004c11b0
mov edi, dword [esp + 0x1c]
movzx edx, byte [esp + 0x20]
movzx esi, byte [esp + 0x24]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0x12c]
jmp 0x4c18f0
movzx ebx, byte [esp + eax + 0x5c]
movzx ebx, byte [ebx + 0x5e3d70]
xor ebx, esi
movzx ebx, byte [ebx + 0x5e3d70]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x5eb460]
mov dword [ecx - 8], ebx
movzx ebx, byte [esp + eax + 0x5d]
movzx ebx, byte [ebx + 0x5e3d70]
xor ebx, esi
movzx ebx, byte [ebx + 0x5e3d70]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x5eb460]
mov dword [ecx], ebx
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x4c18f0
mov edx, dword [esp + 0x21]
push edx
lea eax, [esp + 0x160]
push 0x5e3d70
push eax
call fcn.004c11b0
add esp, 0xc
xor eax, eax
lea ebx, [ebx]
movzx ecx, byte [esp + eax + 0x15c]
movzx edx, byte [ecx + 0x5e3e70]
movzx ecx, byte [esp + eax + 0x15d]
mov byte [esp + eax + 0x5c], dl
movzx edx, byte [ecx + 0x5e3e70]
mov byte [esp + eax + 0x5d], dl
add eax, 2
cmp eax, 0x100
jl 0x4c1960
mov eax, dword [esp + 0x1d]
push eax
lea ecx, [esp + 0x60]
push ecx
mov edx, ecx
push edx
call fcn.004c11b0
movzx edx, byte [esp + 0x21]
movzx esi, byte [esp + 0x25]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0x130]
jmp 0x4c19c0
movzx ebx, byte [esp + eax + 0x5c]
movzx ebx, byte [ebx + 0x5e3e70]
xor ebx, esi
movzx ebx, byte [ebx + 0x5e3d70]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x5eb860]
mov dword [ecx - 8], ebx
movzx ebx, byte [esp + eax + 0x5d]
movzx ebx, byte [ebx + 0x5e3e70]
xor ebx, esi
movzx ebx, byte [ebx + 0x5e3d70]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x5eb860]
mov dword [ecx], ebx
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x4c19c0
mov eax, dword [esp + 0x22]
push eax
lea ecx, [esp + 0x160]
push 0x5e3d70
push ecx
call fcn.004c11b0
add esp, 0xc
xor eax, eax
lea ebx, [ebx]
movzx edx, byte [esp + eax + 0x15c]
movzx ecx, byte [edx + 0x5e3d70]
movzx edx, byte [esp + eax + 0x15d]
mov byte [esp + eax + 0x5c], cl
movzx ecx, byte [edx + 0x5e3d70]
mov byte [esp + eax + 0x5d], cl
add eax, 2
cmp eax, 0x100
jl 0x4c1a30
mov edx, dword [esp + 0x1e]
push edx
lea eax, [esp + 0x60]
push eax
mov ecx, eax
push ecx
call fcn.004c11b0
movzx edx, byte [esp + 0x22]
movzx esi, byte [esp + 0x26]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0x92c]
jmp 0x4c1a90
movzx ebx, byte [esp + eax + 0x5c]
movzx ebx, byte [ebx + 0x5e3d70]
xor ebx, esi
movzx ebx, byte [ebx + 0x5e3e70]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x5ebc60]
mov dword [ecx - 8], ebx
movzx ebx, byte [esp + eax + 0x5d]
movzx ebx, byte [ebx + 0x5e3d70]
xor ebx, esi
movzx ebx, byte [ebx + 0x5e3e70]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x5ebc60]
mov dword [ecx], ebx
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x4c1a90
mov edx, dword [esp + 0x23]
push edx
lea eax, [esp + 0x160]
push 0x5e3e70
push eax
call fcn.004c11b0
add esp, 0xc
xor eax, eax
lea ebx, [ebx]
movzx ecx, byte [esp + eax + 0x15c]
movzx edx, byte [ecx + 0x5e3d70]
movzx ecx, byte [esp + eax + 0x15d]
mov byte [esp + eax + 0x5c], dl
movzx edx, byte [ecx + 0x5e3d70]
mov byte [esp + eax + 0x5d], dl
add eax, 2
cmp eax, 0x100
jl 0x4c1b00
mov eax, dword [esp + 0x1f]
push eax
lea ecx, [esp + 0x60]
push ecx
mov edx, ecx
push edx
call fcn.004c11b0
movzx edx, byte [esp + 0x23]
movzx esi, byte [esp + 0x27]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0x930]
jmp 0x4c1b60
movzx edi, byte [esp + eax + 0x5c]
movzx edi, byte [edi + 0x5e3e70]
xor edi, esi
movzx edi, byte [edi + 0x5e3e70]
xor edi, edx
mov edi, dword [edi*4 + 0x5ec060]
mov dword [ecx - 8], edi
movzx edi, byte [esp + eax + 0x5d]
movzx edi, byte [edi + 0x5e3e70]
xor edi, esi
movzx edi, byte [edi + 0x5e3e70]
xor edi, edx
mov edi, dword [edi*4 + 0x5ec060]
mov dword [ecx], edi
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x4c1b60
mov edi, dword [esp + 0x10]
cmp byte [edi], 0
jne 0x4c1be9
mov ecx, dword [edi + 0x50]
lea eax, [edi + 0xa4]
lea ecx, [eax + ecx*8 - 8]
cmp eax, ecx
jae 0x4c1be6
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 0x4c1bc8
mov byte [edi], 0
mov ecx, dword [esp + 0x25c]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.004d99c4
add esp, 0x254
ret
mov eax, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x60]
push 0x5e3e70
push ecx
call fcn.004c11b0
mov edi, dword [esp + 0x1c]
movzx edx, byte [esp + 0x20]
movzx esi, byte [esp + 0x24]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0x12c]
jmp 0x4c1c40
movzx ebx, byte [esp + eax + 0x5c]
movzx ebx, byte [ebx + 0x5e3d70]
xor ebx, esi
movzx ebx, byte [ebx + 0x5e3d70]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x5eb460]
mov dword [ecx - 8], ebx
movzx ebx, byte [esp + eax + 0x5d]
movzx ebx, byte [ebx + 0x5e3d70]
xor ebx, esi
movzx ebx, byte [ebx + 0x5e3d70]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x5eb460]
mov dword [ecx], ebx
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x4c1c40
mov edx, dword [esp + 0x1d]
push edx
lea eax, [esp + 0x60]
push 0x5e3e70
push eax
call fcn.004c11b0
movzx edx, byte [esp + 0x21]
movzx esi, byte [esp + 0x25]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0x130]
jmp 0x4c1cc0
movzx ebx, byte [esp + eax + 0x5c]
movzx ebx, byte [ebx + 0x5e3e70]
xor ebx, esi
movzx ebx, byte [ebx + 0x5e3d70]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x5eb860]
mov dword [ecx - 8], ebx
movzx ebx, byte [esp + eax + 0x5d]
movzx ebx, byte [ebx + 0x5e3e70]
xor ebx, esi
movzx ebx, byte [ebx + 0x5e3d70]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x5eb860]
mov dword [ecx], ebx
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x4c1cc0
mov ecx, dword [esp + 0x1e]
push ecx
lea edx, [esp + 0x60]
push 0x5e3d70
push edx
call fcn.004c11b0
movzx edx, byte [esp + 0x22]
movzx esi, byte [esp + 0x26]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0x92c]
jmp 0x4c1d40
movzx ebx, byte [esp + eax + 0x5c]
movzx ebx, byte [ebx + 0x5e3d70]
xor ebx, esi
movzx ebx, byte [ebx + 0x5e3e70]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x5ebc60]
mov dword [ecx - 8], ebx
movzx ebx, byte [esp + eax + 0x5d]
movzx ebx, byte [ebx + 0x5e3d70]
xor ebx, esi
movzx ebx, byte [ebx + 0x5e3e70]
xor ebx, edx
mov ebx, dword [ebx*4 + 0x5ebc60]
mov dword [ecx], ebx
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x4c1d40
mov eax, dword [esp + 0x1f]
push eax
lea ecx, [esp + 0x60]
push 0x5e3d70
push ecx
call fcn.004c11b0
movzx edx, byte [esp + 0x23]
movzx esi, byte [esp + 0x27]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0x930]
jmp 0x4c1dc0
movzx edi, byte [esp + eax + 0x5c]
movzx edi, byte [edi + 0x5e3e70]
xor edi, esi
movzx edi, byte [edi + 0x5e3e70]
xor edi, edx
mov edi, dword [edi*4 + 0x5ec060]
mov dword [ecx - 8], edi
movzx edi, byte [esp + eax + 0x5d]
movzx edi, byte [edi + 0x5e3e70]
xor edi, esi
movzx edi, byte [edi + 0x5e3e70]
xor edi, edx
mov edi, dword [edi*4 + 0x5ec060]
mov dword [ecx], edi
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x4c1dc0
jmp 0x4c1bae
mov edx, dword [esp + 0x18]
push edx
lea eax, [esp + 0x60]
push 0x5e3d70
push eax
call fcn.004c11b0
mov edi, dword [esp + 0x1c]
movzx edx, byte [esp + 0x20]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0x12c]
jmp 0x4c1e40
movzx esi, byte [esp + eax + 0x5c]
movzx esi, byte [esi + 0x5e3d70]
xor esi, edx
mov esi, dword [esi*4 + 0x5eb460]
mov dword [ecx - 8], esi
movzx esi, byte [esp + eax + 0x5d]
movzx esi, byte [esi + 0x5e3d70]
xor esi, edx
mov esi, dword [esi*4 + 0x5eb460]
mov dword [ecx], esi
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x4c1e40
mov ecx, dword [esp + 0x19]
push ecx
lea edx, [esp + 0x60]
push 0x5e3e70
push edx
call fcn.004c11b0
movzx edx, byte [esp + 0x21]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0x130]
movzx esi, byte [esp + eax + 0x5c]
movzx esi, byte [esi + 0x5e3d70]
xor esi, edx
mov esi, dword [esi*4 + 0x5eb860]
mov dword [ecx - 8], esi
movzx esi, byte [esp + eax + 0x5d]
movzx esi, byte [esi + 0x5e3d70]
xor esi, edx
mov esi, dword [esi*4 + 0x5eb860]
mov dword [ecx], esi
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x4c1ea0
mov eax, dword [esp + 0x1a]
push eax
lea ecx, [esp + 0x60]
push 0x5e3d70
push ecx
call fcn.004c11b0
movzx edx, byte [esp + 0x22]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0x92c]
movzx esi, byte [esp + eax + 0x5c]
movzx esi, byte [esi + 0x5e3e70]
xor esi, edx
mov esi, dword [esi*4 + 0x5ebc60]
mov dword [ecx - 8], esi
movzx esi, byte [esp + eax + 0x5d]
movzx esi, byte [esi + 0x5e3e70]
xor esi, edx
mov esi, dword [esi*4 + 0x5ebc60]
mov dword [ecx], esi
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x4c1f00
mov edx, dword [esp + 0x1b]
push edx
lea eax, [esp + 0x60]
push 0x5e3e70
push eax
call fcn.004c11b0
movzx edx, byte [esp + 0x23]
add esp, 0xc
xor eax, eax
lea ecx, [edi + 0x930]
movzx esi, byte [esp + eax + 0x5c]
movzx esi, byte [esi + 0x5e3e70]
xor esi, edx
mov esi, dword [esi*4 + 0x5ec060]
mov dword [ecx - 8], esi
movzx esi, byte [esp + eax + 0x5d]
movzx esi, byte [esi + 0x5e3e70]
xor esi, edx
mov esi, dword [esi*4 + 0x5ec060]
mov dword [ecx], esi
add eax, 2
add ecx, 0x10
cmp eax, 0x100
jl 0x4c1f60
jmp 0x4c1bb2