Function at 0x4b5050
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
and esp, 0xfffffff0
sub esp, 0x50
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov ebx, dword [eax]
mov dword [esp + 0x28], ebx
test edi, edi
je 0x4b5485
cmp byte [esi + 0x400], 0
jne 0x4b5329
mov dword [esp + 0x4c], edi
xor edx, edx
lea esi, cs:[esi]
nop
cmp byte [esi + 0x3fa], 0x14
jne 0x4b54ce
mov eax, dword [esi + 0x114]
cmp byte [eax + 0x136], 2
ja 0x4b54ce
mov ecx, dword [esp + 0x4c]
test ecx, ecx
je 0x4b54ce
mov edx, dword [esi + 8]
mov ecx, dword [edx + 0xc]
test ecx, ecx
jne 0x4b50ce
mov edx, dword [esi]
mov ecx, dword [edx + 0x6f8]
mov edx, dword [eax + 0x128]
mov edi, dword [esp + 0x4c]
mov ebx, edx
cmp edi, edx
cmovbe ebx, edi
cmp ebx, ecx
cmova ebx, ecx
test ebx, ebx
je 0x4b5300
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx]
mov dword [esp + 0x48], ecx
test byte [eax + 0x120], 4
jne 0x4b5370
movzx edx, byte [eax + 0x135]
mov edi, ebx
mov ecx, edx
and ecx, 3
movzx ecx, byte [eax + ecx + 0x124]
mov byte [esp + 0x43], cl
lea ecx, [edx + 1]
and ecx, 3
movzx ecx, byte [eax + ecx + 0x124]
mov byte [esp + 0x42], cl
lea ecx, [edx + 2]
add edx, 3
and ecx, 3
and edx, 3
shr edi, 2
movzx ecx, byte [eax + ecx + 0x124]
mov dword [esp + 0x44], edi
movzx eax, byte [eax + edx + 0x124]
mov byte [esp + 0x41], cl
je 0x4b5450
sub edi, 1
mov dword [esp + 0x2c], edi
cmp edi, 2
jle 0x4b545f
mov edi, ebx
shr edi, 4
mov ecx, edi
movzx edi, al
movzx eax, byte [esp + 0x41]
mov dword [esp + 0x34], edi
shl edi, 8
mov edx, eax
mov dword [esp + 0x38], eax
mov eax, edi
movzx edi, byte [esp + 0x42]
or eax, edx
xor edx, edx
shl eax, 8
mov dword [esp + 0x3c], edi
or eax, edi
movzx edi, byte [esp + 0x43]
shl eax, 8
or eax, edi
mov dword [esp + 0x30], edi
mov edi, dword [esp + 0x4c]
movd xmm1, eax
mov eax, dword [esp + 0x48]
punpckldq xmm1, xmm1
punpcklqdq xmm1, xmm1
lea esi, [esi]
movdqu xmm0, xmmword [eax]
add edx, 1
add eax, 0x10
pxor xmm0, xmm1
movups xmmword [eax - 0x10], xmm0
cmp edx, ecx
jne 0x4b51c0
mov dword [esp + 0x4c], edi
shl edx, 2
cmp dword [esp + 0x44], edx
je 0x4b522f
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x44]
mov edi, dword [esp + 0x38]
sub ecx, edx
lea edx, [eax + edx*4]
mov eax, dword [esp + 0x34]
shl eax, 8
or eax, edi
mov edi, dword [esp + 0x3c]
shl eax, 8
or eax, edi
mov edi, dword [esp + 0x30]
shl eax, 8
or eax, edi
mov edi, dword [edx]
xor edi, eax
mov dword [edx], edi
cmp ecx, 1
je 0x4b522f
mov edi, dword [edx + 4]
xor edi, eax
mov dword [edx + 4], edi
cmp ecx, 2
je 0x4b522f
mov edi, dword [edx + 8]
xor edi, eax
mov dword [edx + 8], edi
mov edx, ebx
and edx, 3
je 0x4b5440
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x48]
mov dword [esp + 0x44], edx
lea eax, [eax + edi*4 + 4]
mov edi, edx
movzx ecx, byte [esp + 0x43]
xor byte [eax], cl
cmp edi, 1
jle 0x4b526d
movzx ecx, byte [esp + 0x42]
xor byte [eax + 1], cl
cmp edi, 3
jne 0x4b526d
movzx ecx, byte [esp + 0x41]
xor byte [eax + 2], cl
mov eax, dword [esi + 0x114]
mov edi, dword [ebp + 0xc]
movzx edx, byte [eax + 0x135]
add edx, ebx
and edx, 3
mov byte [eax + 0x135], dl
mov edx, dword [eax + 0x128]
mov ecx, dword [edi]
mov edi, dword [ebp + 0xc]
sub edx, ebx
add ecx, ebx
mov dword [edi], ecx
mov dword [eax + 0x128], edx
movzx edx, byte [eax + 0x121]
and edx, 0xc
cmp dl, 4
je 0x4b53c0
mov edx, dword [esi + 8]
mov edx, dword [edx + 4]
test edx, edx
je 0x4b52ca
mov edi, dword [esi + 0x3cc]
test edi, edi
je 0x4b5380
and byte [eax + 0x121], 0xbf
mov ecx, dword [ebp + 0xc]
mov edx, 1
mov eax, dword [esp + 0x48]
sub eax, dword [ecx]
mov ecx, dword [esp + 0x4c]
add eax, ecx
mov dword [esp + 0x4c], eax
test ebx, ebx
jns 0x4b5090
mov eax, 0xffffffff
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], 0
mov dword [esp + 4], 3
mov dword [esp], esi
call fcn.004b2250
test eax, eax
js 0x4b52f1
cmp byte [esi + 0x400], 0
je 0x4b5080
mov dword [ebp + 0x10], edi
mov ebx, dword [esp + 0x28]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.0049ac40
cmp eax, 2
je 0x4b535a
mov eax, dword [ebp + 0xc]
mov ebx, dword [eax]
add ebx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
mov dword [eax], ebx
mov eax, 1
jmp 0x4b52f6
mov dword [esp + 0x44], 0
jmp 0x4b5290
mov eax, dword [esp + 0x48]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x340]
mov dword [esp + 8], 6
mov dword [esp + 0xc], eax
mov dword [esp + 4], esi
mov dword [esp], edx
call fcn.0049c730
test eax, eax
jne 0x4b52f1
mov eax, dword [esi + 0x114]
jmp 0x4b52ca
mov edi, dword [esp + 0x48]
add eax, 0x13a
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edi
call fcn.00489ac0
test eax, eax
jne 0x4b548f
mov eax, dword [esi + 0x114]
mov ecx, dword [eax + 0x128]
test ecx, ecx
jne 0x4b52b2
test byte [eax + 0x120], 1
je 0x4b52b2
cmp byte [eax + 0x13a], 0
je 0x4b52b2
mov edx, dword [esp + 0x44]
test edx, edx
jne 0x4b52b2
mov dword [esp + 0xc], 0xc
mov edi, ebx
mov dword [esp + 8], 0xeba280
mov dword [esp + 4], 0x3ef
mov dword [esp], esi
call fcn.004b3020
jmp 0x4b54b1
mov dword [esp + 0x44], 0
jmp 0x4b526d
mov dword [esp + 0x44], ebx
mov eax, dword [esp + 0x48]
mov edi, ebx
jmp 0x4b524c
mov dword [esp + 0x34], eax
movzx eax, byte [esp + 0x41]
xor edx, edx
mov dword [esp + 0x38], eax
movzx eax, byte [esp + 0x42]
mov dword [esp + 0x3c], eax
movzx eax, byte [esp + 0x43]
mov dword [esp + 0x30], eax
jmp 0x4b51e3
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0xc], 8
mov edi, ebx
mov dword [esp + 8], 0xeba277
mov dword [esp + 4], 0x3ef
mov dword [esp], esi
call fcn.004b3020
mov eax, dword [esp + 0x48]
mov dword [esp + 8], edi
mov dword [esp], 8
mov dword [esp + 4], eax
call fcn.0048eb50
jmp 0x4b52f1
mov edi, dword [esp + 0x4c]
test edx, edx
je 0x4b5500
xor eax, eax
mov dword [esp + 4], 3
mov dword [esp + 8], eax
mov dword [esp], esi
call fcn.004b2250
lea esi, [esi]
test eax, eax
jns 0x4b506b
jmp 0x4b52f1
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 0xc]
sub edi, 1
mov eax, dword [eax]
lea edx, [eax + 1]
mov dword [ebx], edx
movzx eax, byte [eax]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], esi
call fcn.004b2250
jmp 0x4b54f0