Function at 0x49e5a3
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x30
mov eax, dword [0x5894dc]
xor eax, esp
mov dword [esp + 0x2c], eax
push ebp
mov ebp, dword [esp + 0x38]
push esi
mov esi, ecx
cmp dword [esi + 0x2c], 0
push edi
mov edi, dword [esp + 0x48]
mov dword [esp + 0x14], esi
je 0x49e5ce
pop edi
pop esi
mov eax, 0xfffffffb
pop ebp
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004ec47e
add esp, 0x30
ret 0xc
mov ecx, dword [esi + 0x30]
cmp ecx, 2
je 0x49e5f5
cmp dword [esi + 0x34], 0
jne 0x49e5f5
pop edi
pop esi
mov eax, 0xfffffffa
pop ebp
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004ec47e
add esp, 0x30
ret 0xc
test ebp, ebp
je 0x49e907
mov eax, dword [esp + 0x44]
test eax, eax
jle 0x49e907
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
sub ecx, 0
push ebx
mov dword [esp + 0x14], eax
je 0x49e8cf
sub ecx, 1
je 0x49e817
sub ecx, 1
je 0x49e646
pop ebx
pop edi
pop esi
or eax, 0xffffffff
pop ebp
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004ec47e
add esp, 0x30
ret 0xc
test eax, eax
mov ecx, dword [esi + 0x38]
mov edx, dword [esi + 0x3c]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esi + 0x40]
mov dword [esp + 0x20], edx
mov edx, dword [esi + 0x44]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
mov dword [esp + 0x10], eax
jle 0x49e8ef
mov edi, edi
xor esi, esi
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
mov bl, byte [esp + 0x1d]
mov dword [esp + 0x30], ecx
lea ecx, [esp + 0x2c]
mov dword [esp + 0x34], edx
push ecx
mov edx, ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x2c]
push edx
mov dword [esp + 0x40], eax
call fcn.0049d460
movzx ecx, byte [esp + 0x1c]
add cl, cl
mov al, bl
shr al, 7
or al, cl
mov cl, byte [esp + 0x1f]
mov byte [esp + 0x1c], al
mov al, byte [esp + 0x1e]
mov dl, al
shr dl, 7
add al, al
add bl, bl
or dl, bl
mov byte [esp + 0x1d], dl
mov dl, cl
shr dl, 7
or dl, al
mov al, byte [esp + 0x20]
mov byte [esp + 0x1e], dl
mov dl, al
shr dl, 7
add cl, cl
or dl, cl
mov cl, byte [esp + 0x21]
mov byte [esp + 0x1f], dl
mov dl, cl
shr dl, 7
add al, al
or dl, al
mov al, byte [esp + 0x22]
mov byte [esp + 0x20], dl
mov dl, al
shr dl, 7
add cl, cl
or dl, cl
mov cl, byte [esp + 0x23]
mov byte [esp + 0x21], dl
mov dl, cl
shr dl, 7
add al, al
or dl, al
mov al, byte [esp + 0x24]
mov byte [esp + 0x22], dl
mov dl, al
shr dl, 7
add cl, cl
or dl, cl
mov cl, byte [esp + 0x25]
mov byte [esp + 0x23], dl
mov dl, cl
shr dl, 7
add al, al
or dl, al
mov al, byte [esp + 0x26]
mov byte [esp + 0x24], dl
mov dl, al
shr dl, 7
add cl, cl
or dl, cl
mov cl, byte [esp + 0x27]
mov byte [esp + 0x25], dl
mov dl, cl
shr dl, 7
add al, al
or dl, al
mov byte [esp + 0x26], dl
mov al, byte [esp + 0x28]
add cl, cl
mov dl, al
shr dl, 7
or dl, cl
mov cl, byte [esp + 0x29]
mov byte [esp + 0x27], dl
mov dl, cl
shr dl, 7
add al, al
or dl, al
mov al, byte [esp + 0x2a]
add cl, cl
mov byte [esp + 0x28], dl
mov dl, al
shr dl, 7
or dl, cl
movzx ecx, byte [esp + 0x2b]
shr cl, 7
add al, al
or cl, al
mov byte [esp + 0x2a], cl
mov eax, esi
mov byte [esp + 0x29], dl
shr eax, 3
movzx ebx, byte [eax + ebp]
mov edx, esi
and edx, 7
mov cl, 7
sub cl, dl
shr bl, cl
movzx ecx, byte [esp + 0x2b]
and bl, 1
add cl, cl
or bl, cl
mov byte [esp + 0x2b], bl
movzx ebx, byte [esp + 0x2c]
and bl, 0x80
mov cl, dl
shr bl, cl
add esi, 1
xor byte [eax + edi], bl
cmp esi, 0x80
jl 0x49e672
mov eax, dword [esp + 0x10]
sub eax, 1
test eax, eax
mov dword [esp + 0x10], eax
jg 0x49e670
mov eax, dword [esp + 0x14]
pop ebx
pop edi
pop esi
shl eax, 7
pop ebp
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004ec47e
add esp, 0x30
ret 0xc
test eax, eax
mov edx, dword [esi + 0x3c]
mov ecx, dword [esi + 0x40]
mov ebx, dword [esi + 0x38]
mov dword [esp + 0x20], edx
mov edx, dword [esi + 0x44]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
mov dword [esp + 0x10], eax
jle 0x49e8ef
jmp 0x49e840
lea eax, [esp + 0x2c]
push eax
push ebp
mov ecx, esi
call fcn.0049d840
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
xor ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x34]
xor edx, dword [esp + 0x24]
xor eax, ebx
mov ebx, dword [esp + 0x28]
xor dword [esp + 0x38], ebx
mov ebx, dword [ebp]
mov dword [edi], eax
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 4]
mov dword [edi + 4], ecx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x30], ecx
mov ecx, dword [ebp + 8]
mov dword [edi + 8], edx
mov dword [esp + 0x34], edx
mov edx, dword [ebp + 0xc]
mov dword [edi + 0xc], eax
mov eax, dword [esp + 0x10]
sub eax, 1
add ebp, 0x10
add edi, 0x10
test eax, eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
mov dword [esp + 0x10], eax
jg 0x49e840
mov eax, dword [esp + 0x14]
pop ebx
pop edi
pop esi
shl eax, 7
pop ebp
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004ec47e
add esp, 0x30
ret 0xc
test eax, eax
mov ebx, eax
jle 0x49e8ef
push edi
push ebp
mov ecx, esi
call fcn.0049d840
sub ebx, 1
add ebp, 0x10
add edi, 0x10
test ebx, ebx
jg 0x49e8d5
mov eax, dword [esp + 0x14]
pop ebx
pop edi
pop esi
shl eax, 7
pop ebp
mov ecx, dword [esp + 0x2c]
xor ecx, esp
call fcn.004ec47e
add esp, 0x30
ret 0xc
mov ecx, dword [esp + 0x38]
pop edi
pop esi
pop ebp
xor ecx, esp
xor eax, eax
call fcn.004ec47e
add esp, 0x30
ret 0xc