Function at 0x4b42d0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x18
mov eax, dword [esp + 0x20]
push ebx
push ebp
push esi
push edi
mov edi, ecx
xor ecx, ecx
cmp eax, ecx
je 0x4b4527
test al, 7
jne 0x4b4527
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x34]
cmp ecx, 1
jne 0x4b43f0
mov ecx, dword [edi + 0xc]
mov ebx, dword [edi + 8]
cmp eax, 8
mov dword [esp + 0x24], ecx
jb 0x4b43e6
mov ebp, dword [esp + 0x2c]
shr eax, 3
lea esi, [ebp + 7]
mov dword [esp + 0x2c], eax
xor eax, eax
xor ecx, ecx
mov al, byte [ebp]
mov cl, byte [esi - 6]
shl eax, 0x18
shl ecx, 0x10
or eax, ecx
xor ecx, ecx
mov cl, byte [esi - 5]
xor edx, edx
shl ecx, 8
or eax, ecx
mov dl, byte [esi - 2]
xor ecx, ecx
mov cl, byte [esi - 4]
or eax, ecx
xor ecx, ecx
mov cl, byte [esi - 3]
mov dword [esp + 0x10], eax
shl ecx, 0x18
shl edx, 0x10
or ecx, edx
xor edx, edx
mov dh, byte [esi - 1]
mov dword [esp + 0x18], eax
or ecx, edx
xor edx, edx
mov dl, byte [esi]
lea eax, [esp + 0x10]
or ecx, edx
push eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], ecx
mov ecx, edi
call fcn.004b3c60
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
xor eax, ebx
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x24], edx
xor ecx, ebx
add esi, 8
mov edx, ecx
mov ebx, dword [esp + 0x18]
shr edx, 8
mov byte [esi - 8], cl
mov byte [esi - 9], dl
mov edx, ecx
add ebp, 8
shr edx, 0x10
shr ecx, 0x18
mov byte [esi - 0xa], dl
mov byte [esi - 0xb], cl
mov ecx, eax
mov edx, eax
shr ecx, 8
mov byte [esi - 0xc], al
mov byte [esi - 0xd], cl
shr edx, 0x10
shr eax, 0x18
mov byte [esi - 0xe], dl
mov byte [esi - 0xf], al
mov eax, dword [esp + 0x2c]
dec eax
mov dword [esp + 0x2c], eax
jne 0x4b4325
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc
cmp ecx, 2
jne 0x4b44dd
mov ecx, dword [edi + 8]
mov edx, dword [edi + 0xc]
cmp eax, 8
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
jb 0x4b43e6
mov ebp, dword [esp + 0x2c]
shr eax, 3
lea esi, [ebp + 7]
mov dword [esp + 0x2c], eax
xor eax, eax
xor ecx, ecx
mov al, byte [ebp]
mov cl, byte [esi - 6]
shl eax, 0x18
shl ecx, 0x10
or eax, ecx
xor ecx, ecx
mov cl, byte [esi - 5]
xor edx, edx
shl ecx, 8
or eax, ecx
xor ecx, ecx
mov cl, byte [esi - 4]
mov dl, byte [esi]
or eax, ecx
xor ecx, ecx
mov cl, byte [esi - 2]
mov dword [esp + 0x10], eax
xor eax, eax
mov al, byte [esi - 3]
shl eax, 0x18
shl ecx, 0x10
or eax, ecx
xor ecx, ecx
mov ch, byte [esi - 1]
or eax, ecx
mov ecx, edi
or eax, edx
mov dword [esp + 0x14], eax
lea eax, [esp + 0x18]
push eax
call fcn.004b3910
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
mov ebx, ecx
xor ecx, dword [esp + 0x1c]
mov edx, eax
xor eax, dword [esp + 0x18]
mov dword [esp + 0x18], edx
add esi, 8
mov edx, ecx
add ebp, 8
shr edx, 8
mov byte [esi - 8], cl
mov byte [esi - 9], dl
mov edx, ecx
mov dword [esp + 0x1c], ebx
shr edx, 0x10
shr ecx, 0x18
mov byte [esi - 0xa], dl
mov byte [esi - 0xb], cl
mov ecx, eax
mov edx, eax
shr ecx, 8
mov byte [esi - 0xc], al
mov byte [esi - 0xd], cl
shr edx, 0x10
shr eax, 0x18
mov byte [esi - 0xe], dl
mov byte [esi - 0xf], al
mov eax, dword [esp + 0x2c]
dec eax
mov dword [esp + 0x2c], eax
jne 0x4b441a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc
cmp eax, 8
jb 0x4b43e6
mov esi, dword [esp + 0x2c]
shr eax, 3
mov ebx, eax
lea eax, [esp + 0x10]
push eax
push esi
call fcn.004b4200
add esp, 8
lea ecx, [esp + 0x10]
push ecx
mov ecx, edi
call fcn.004b3c60
add esi, 8
lea edx, [esp + 0x10]
push esi
push edx
call fcn.004b4280
add esp, 8
dec ebx
jne 0x4b44ef
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc
lea eax, [esp + 0x2c]
push 0x5fef68
push eax
mov dword [esp + 0x34], str.Incorrect_buffer_length
call sub.MSVCRT.dll__CxxThrowException
nop
nop
mov eax, dword [esp + 0xc]
sub esp, 0x10
push ebx
push ebp
mov ebp, ecx
push esi
xor ecx, ecx
push edi
cmp eax, ecx
je 0x4b47a3
test al, 7
jne 0x4b47a3
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x30]
cmp ecx, 1
jne 0x4b4664
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
cmp eax, 8
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
jb 0x4b465a
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
shr eax, 3
lea edi, [ebx + 6]
lea esi, [ecx - 7]
mov dword [esp + 0x28], eax
xor eax, eax
xor ecx, ecx
mov al, byte [ebx]
mov cl, byte [edi - 5]
shl eax, 0x18
shl ecx, 0x10
or eax, ecx
xor ecx, ecx
mov cl, byte [edi - 4]
xor edx, edx
shl ecx, 8
or eax, ecx
mov dl, byte [edi - 1]
xor ecx, ecx
mov cl, byte [edi - 3]
or eax, ecx
xor ecx, ecx
mov cl, byte [edi - 2]
shl ecx, 0x18
shl edx, 0x10
or ecx, edx
xor edx, edx
mov dh, byte [edi]
or ecx, edx
xor edx, edx
mov dl, byte [edi + 1]
or ecx, edx
mov edx, dword [esp + 0x18]
xor eax, edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x10], eax
xor ecx, edx
lea eax, [esp + 0x10]
mov dword [esp + 0x14], ecx
push eax
mov ecx, ebp
call fcn.004b3910
mov ecx, dword [esp + 0x14]
add esi, 8
mov edx, ecx
mov eax, dword [esp + 0x10]
shr edx, 8
mov byte [esi + 6], cl
mov byte [esi + 5], dl
mov edx, ecx
mov dword [esp + 0x1c], ecx
shr edx, 0x10
shr ecx, 0x18
mov byte [esi + 4], dl
mov byte [esi + 3], cl
mov ecx, eax
mov edx, eax
shr ecx, 8
mov dword [esp + 0x18], eax
mov byte [esi + 2], al
shr edx, 0x10
mov byte [esi + 1], cl
mov byte [esi], dl
shr eax, 0x18
mov byte [esi - 1], al
mov eax, dword [esp + 0x28]
add ebx, 8
add edi, 8
dec eax
mov dword [esp + 0x28], eax
jne 0x4b45a0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x10
cmp ecx, 2
jne 0x4b4752
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
cmp eax, 8
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
jb 0x4b465a
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
shr eax, 3
lea edi, [ebx + 6]
lea esi, [ecx - 7]
mov dword [esp + 0x28], eax
lea edx, [esp + 0x18]
mov ecx, ebp
push edx
call fcn.004b3910
xor eax, eax
xor ecx, ecx
mov al, byte [ebx]
mov cl, byte [edi - 5]
shl eax, 0x18
shl ecx, 0x10
or eax, ecx
xor ecx, ecx
mov cl, byte [edi - 4]
xor edx, edx
shl ecx, 8
or eax, ecx
mov dl, byte [edi - 1]
xor ecx, ecx
add esi, 8
mov cl, byte [edi - 3]
add ebx, 8
or eax, ecx
xor ecx, ecx
mov cl, byte [edi - 2]
add edi, 8
shl ecx, 0x18
shl edx, 0x10
or ecx, edx
xor edx, edx
mov dh, byte [edi - 8]
or ecx, edx
xor edx, edx
mov dl, byte [edi - 7]
or ecx, edx
mov edx, dword [esp + 0x18]
xor eax, edx
mov edx, dword [esp + 0x1c]
xor ecx, edx
mov dword [esp + 0x10], eax
mov edx, ecx
mov byte [esi + 6], cl
shr edx, 8
mov byte [esi + 5], dl
mov edx, ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], ecx
shr edx, 0x10
shr ecx, 0x18
mov byte [esi + 4], dl
mov byte [esi + 3], cl
mov ecx, eax
mov edx, eax
shr ecx, 8
mov dword [esp + 0x18], eax
mov byte [esi + 2], al
shr edx, 0x10
mov byte [esi + 1], cl
mov byte [esi], dl
shr eax, 0x18
mov byte [esi - 1], al
mov eax, dword [esp + 0x28]
dec eax
mov dword [esp + 0x28], eax
jne 0x4b4695
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x10
cmp eax, 8
jb 0x4b465a
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
shr eax, 3
mov ebx, eax
lea eax, [esp + 0x10]
push eax
push edi
call fcn.004b4200
add esp, 8
lea ecx, [esp + 0x10]
push ecx
mov ecx, ebp
call fcn.004b3910
add esi, 8
lea edx, [esp + 0x10]
push esi
push edx
call fcn.004b4280
add esp, 8
add edi, 8
dec ebx
jne 0x4b4768
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x10
lea eax, [esp + 0x28]
push 0x5fef68
push eax
mov dword [esp + 0x30], str.Incorrect_buffer_length
call sub.MSVCRT.dll__CxxThrowException
nop
nop
nop
nop
nop
nop