Function at 0x49c2d0
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 0x49c4df
mov ebx, dword [esp + 0x38]
test ebx, ebx
je 0x49c4df
cmp byte [ebx], 1
je 0x49c4df
mov edi, dword [esp + 0x3c]
test edi, edi
je 0x49c4d5
mov ebp, dword [esp + 0x40]
test ebp, ebp
jbe 0x49c4d5
xor ecx, ecx
mov cl, byte [esi]
shr ebp, 7
dec ecx
mov dword [esp + 0x40], ebp
je 0x49c499
dec ecx
je 0x49c413
dec ecx
jne 0x49c4df
inc esi
test ebp, ebp
jle 0x49c4c8
mov dword [esp + 0x34], ebp
jmp 0x49c347
mov ebx, dword [esp + 0x38]
mov edi, dword [esp + 0x3c]
mov eax, dword [esp + 0x44]
mov ecx, dword [edi]
xor ebp, ebp
mov dword [eax], ecx
mov edx, dword [edi + 4]
mov dword [eax + 4], edx
mov ecx, dword [edi + 8]
mov dword [eax + 8], ecx
mov edx, dword [edi + 0xc]
mov dword [eax + 0xc], edx
jmp 0x49c369
mov ebx, dword [esp + 0x38]
mov ecx, dword [ebx + 0x4c]
lea eax, [esp + 0x10]
push eax
push esi
lea eax, [ebx + 0x140]
push ecx
push eax
call fcn.0049f6b0
mov ecx, dword [esp + 0x54]
mov eax, ebp
sar eax, 3
mov edx, ebp
add esp, 0x10
lea edi, [eax + ecx]
mov al, byte [esp + 0x10]
and edx, 7
and al, 0x80
mov cl, dl
shr al, cl
mov cl, byte [edi]
xor cl, al
xor eax, eax
mov byte [edi], cl
mov cl, byte [esi + eax + 1]
mov bl, byte [eax + esi]
shr cl, 7
shl bl, 1
or cl, bl
mov byte [eax + esi], cl
inc eax
cmp eax, 0xf
jl 0x49c3a5
mov cl, 7
mov al, byte [esi + 0xf]
sub cl, dl
mov dl, byte [edi]
shr dl, cl
shl al, 1
and dl, 1
or dl, al
inc ebp
cmp ebp, 0x80
mov byte [esi + 0xf], dl
jl 0x49c365
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x3c]
mov eax, 0x10
add edx, eax
add ecx, eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x44], edx
dec eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x34], eax
jne 0x49c33f
mov ebp, dword [esp + 0x40]
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
shl eax, 7
add esp, 0x20
ret
test ebp, ebp
lea eax, [esi + 1]
jle 0x49c4c8
mov esi, dword [esp + 0x44]
mov dword [esp + 0x3c], ebp
mov ebp, eax
push esi
mov eax, dword [ebp]
mov ecx, dword [ebp + 4]
mov edx, dword [ebp + 8]
mov ebp, dword [ebp + 0xc]
mov dword [esp + 0x30], ebp
mov ebp, dword [edi]
xor ebp, eax
mov eax, dword [edi + 4]
xor eax, ecx
mov ecx, dword [edi + 8]
xor ecx, edx
mov edx, dword [edi + 0xc]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x14]
xor edx, ecx
mov ecx, dword [ebx + 0x4c]
push eax
lea eax, [ebx + 0x50]
push ecx
push eax
mov dword [esp + 0x20], ebp
mov dword [esp + 0x2c], edx
call fcn.0049f6b0
mov ecx, dword [esp + 0x4c]
mov eax, esi
add esp, 0x10
add edi, 0x10
add esi, 0x10
dec ecx
mov dword [esp + 0x3c], ecx
jne 0x49c426
mov ebp, dword [esp + 0x40]
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
shl eax, 7
add esp, 0x20
ret
test ebp, ebp
jle 0x49c4c8
mov esi, dword [esp + 0x44]
mov dword [esp + 0x3c], ebp
mov edx, dword [ebx + 0x4c]
push esi
push edi
lea eax, [ebx + 0x50]
push edx
push eax
call fcn.0049f6b0
mov eax, dword [esp + 0x4c]
add esp, 0x10
add edi, 0x10
add esi, 0x10
dec eax
mov dword [esp + 0x3c], eax
jne 0x49c4a5
pop edi
mov eax, ebp
pop esi
pop ebp
shl eax, 7
pop ebx
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