Function at 0x49c4f0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
mov esi, dword [esp + 0x30]
test esi, esi
push edi
je 0x49c72c
mov ebx, dword [esp + 0x38]
test ebx, ebx
je 0x49c72c
mov cl, byte [esi]
cmp cl, 3
je 0x49c51f
cmp byte [ebx], 0
je 0x49c72c
mov ebp, dword [esp + 0x3c]
test ebp, ebp
je 0x49c722
mov eax, dword [esp + 0x40]
test eax, eax
jbe 0x49c722
and ecx, 0xff
shr eax, 7
dec ecx
mov dword [esp + 0x34], eax
je 0x49c6ee
dec ecx
je 0x49c62c
dec ecx
jne 0x49c72c
inc esi
test eax, eax
jle 0x49c717
mov dword [esp + 0x3c], eax
jmp 0x49c56c
mov ebx, dword [esp + 0x38]
mov ecx, dword [esp + 0x44]
mov eax, ebp
xor edi, edi
mov edx, dword [eax]
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov edx, dword [eax + 8]
mov dword [ecx + 8], edx
mov eax, dword [eax + 0xc]
mov dword [ecx + 0xc], eax
jmp 0x49c590
mov ebx, dword [esp + 0x38]
mov edx, dword [ebx + 0x4c]
lea ecx, [esp + 0x10]
push ecx
push esi
lea eax, [ebx + 0x140]
push edx
push eax
call fcn.0049f6b0
add esp, 0x10
xor eax, eax
mov cl, byte [esi + eax + 1]
mov dl, byte [eax + esi]
shr cl, 7
shl dl, 1
or cl, dl
mov byte [eax + esi], cl
inc eax
cmp eax, 0xf
jl 0x49c5ab
mov eax, edi
mov edx, edi
sar eax, 3
and edx, 7
mov cl, 7
mov bl, byte [eax + ebp]
sub cl, dl
shr bl, cl
mov cl, byte [esi + 0xf]
shl cl, 1
and bl, 1
or bl, cl
mov cl, dl
mov byte [esi + 0xf], bl
mov bl, byte [esp + 0x10]
and bl, 0x80
shr bl, cl
mov ecx, dword [esp + 0x44]
mov dl, byte [eax + ecx]
xor dl, bl
inc edi
cmp edi, 0x80
mov byte [eax + ecx], dl
jl 0x49c58c
mov eax, dword [esp + 0x3c]
mov edx, ecx
add edx, 0x10
add ebp, 0x10
dec eax
mov dword [esp + 0x44], edx
mov dword [esp + 0x3c], eax
jne 0x49c568
mov eax, dword [esp + 0x34]
pop edi
pop esi
pop ebp
shl eax, 7
pop ebx
add esp, 0x20
ret
inc esi
mov edx, esi
test eax, eax
mov esi, dword [edx]
mov edi, dword [edx + 4]
mov ecx, dword [edx + 8]
mov dword [esp + 0x28], ecx
mov edx, dword [edx + 0xc]
mov dword [esp + 0x2c], edx
jle 0x49c717
mov dword [esp + 0x38], eax
mov ecx, dword [ebx + 0x4c]
lea eax, [esp + 0x10]
push eax
push ebp
lea eax, [ebx + 0x50]
push ecx
push eax
call fcn.0049fc50
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x38]
xor eax, esi
mov esi, dword [esp + 0x28]
xor ecx, edi
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x3c]
xor esi, edx
mov edx, dword [esp + 0x2c]
xor edx, ecx
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], edx
mov edx, ebp
mov dword [esp + 0x20], eax
add esp, 0x10
mov esi, dword [edx]
add ebp, 0x10
mov edi, dword [edx + 4]
mov ecx, dword [edx + 8]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x44]
mov edx, dword [edx + 0xc]
mov dword [esp + 0x2c], edx
mov edx, ecx
add ecx, 0x10
mov dword [edx], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x44], ecx
mov dword [edx + 4], eax
mov eax, dword [esp + 0x18]
mov dword [edx + 8], eax
mov eax, dword [esp + 0x1c]
mov dword [edx + 0xc], eax
mov eax, dword [esp + 0x38]
dec eax
mov dword [esp + 0x38], eax
jne 0x49c64e
mov eax, dword [esp + 0x34]
pop edi
pop esi
pop ebp
shl eax, 7
pop ebx
add esp, 0x20
ret
test eax, eax
jle 0x49c717
mov esi, dword [esp + 0x44]
mov edi, eax
mov ecx, dword [ebx + 0x4c]
push esi
push ebp
lea eax, [ebx + 0x50]
push ecx
push eax
call fcn.0049fc50
add esp, 0x10
add ebp, 0x10
add esi, 0x10
dec edi
jne 0x49c6f8
mov eax, dword [esp + 0x34]
pop edi
pop esi
pop ebp
pop ebx
shl eax, 7
add esp, 0x20
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret
pop edi
pop esi
pop ebp
mov eax, 0xfffffffb
pop ebx
add esp, 0x20
ret