Function at 0x4c0390
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x3c
mov eax, dword [0x530d68]
mov esi, ecx
cmp dword [eax], 0
je 0x4c03b1
push esi
call fcn.004a4b70
add esp, 0x40
jmp 0x4c086d
mov ecx, dword [esi + 0x7c]
mov eax, dword [esi + 0xc4]
movd xmm0, ecx
lea edx, [ecx - 0x106]
mov dword [esp + 0x14], ecx
pshufd xmm0, xmm0, 0x44
mov dword [esp + 0x1c], edx
movdqu xmmword [esp + 0x20], xmm0
jmp 0x4c03e3
mov ecx, dword [esi + 0x7c]
mov ebp, dword [esi + 0x8c]
add ecx, dword [esp + 0x1c]
mov edx, dword [esi + 0xbc]
sub ebp, eax
sub ebp, edx
cmp edx, ecx
jb 0x4c0677
mov edi, dword [esp + 0x14]
mov eax, dword [esi + 0x88]
mov edx, edi
lea ecx, [eax + edi]
sub edx, ebp
push edx
push ecx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
movsd xmm0, qword [esi + 0xbc]
movdqu xmm1, xmmword [esp + 0x20]
shufps xmm0, xmm0, 0xd4
psubd xmm0, xmm1
pshufd xmm0, xmm0, 0xe8
movq qword [esi + 0xbc], xmm0
sub dword [esi + 0xac], edi
mov ebx, dword [esi + 0x9c]
mov eax, dword [esi + 0x7c]
lea edi, [ebx + ebx]
add edi, dword [esi + 0x94]
cmp ebx, 8
jae 0x4c0470
movdqa xmm7, xmmword [0x52aec0]
mov ecx, edi
mov edx, ebx
pxor xmm6, xmm6
jmp 0x4c0557
mov dword [esp + 0x18], ebp
mov ebp, ebx
movdqa xmm7, xmmword [0x52aec0]
mov ecx, edi
movd xmm0, eax
add edi, 0xfffffff0
pxor xmm6, xmm6
mov dword [esp + 0xc], ebx
and ebp, 0xfffffff8
pshufd xmm0, xmm0, 0
lea edx, [ebp + ebp]
mov dword [esp + 0x10], ebp
sub ecx, edx
mov edx, ebx
sub edx, ebp
nop word cs:[eax + eax]
nop
movdqu xmm1, xmmword [edi]
pshufd xmm1, xmm1, 0x4e
pshuflw xmm2, xmm1, 0x1b
movdqa xmm1, xmm0
pshufhw xmm3, xmm2, 0x1b
punpcklwd xmm2, xmm6
pxor xmm1, xmm7
movdqa xmm4, xmm2
movdqa xmm5, xmm1
punpckhwd xmm3, xmm6
por xmm4, xmm7
pcmpgtd xmm5, xmm4
movdqa xmm4, xmm0
pand xmm4, xmm5
pandn xmm5, xmm2
movdqa xmm2, xmm3
por xmm2, xmm7
por xmm5, xmm4
movdqa xmm4, xmm0
pcmpgtd xmm1, xmm2
psubd xmm5, xmm0
pand xmm4, xmm1
pandn xmm1, xmm3
pslld xmm5, 0x10
por xmm1, xmm4
psrad xmm5, 0x10
psubd xmm1, xmm0
pslld xmm1, 0x10
psrad xmm1, 0x10
packssdw xmm1, xmm5
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
movdqu xmmword [edi], xmm1
add edi, 0xfffffff0
add ebp, 0xfffffff8
jne 0x4c04b0
mov edi, dword [esp + 0x10]
mov ebp, dword [esp + 0x18]
cmp dword [esp + 0xc], edi
je 0x4c0573
add ecx, 0xfffffffe
nop word [eax + eax]
movzx edi, word [ecx]
cmp eax, edi
cmova edi, eax
sub edi, eax
mov word [ecx], di
add ecx, 0xfffffffe
dec edx
jne 0x4c0560
lea edi, [eax + eax]
add edi, dword [esi + 0x90]
cmp eax, 8
jae 0x4c0590
mov ecx, edi
mov edx, eax
jmp 0x4c064f
mov ebx, eax
mov ecx, edi
movd xmm0, eax
add edi, 0xfffffff0
and ebx, 0xfffffff8
pshufd xmm0, xmm0, 0
lea edx, [ebx + ebx]
mov dword [esp + 0xc], ebx
sub ecx, edx
mov edx, eax
sub edx, ebx
movdqu xmm1, xmmword [edi]
pshufd xmm1, xmm1, 0x4e
pshuflw xmm2, xmm1, 0x1b
movdqa xmm1, xmm0
pshufhw xmm3, xmm2, 0x1b
punpcklwd xmm2, xmm6
pxor xmm1, xmm7
movdqa xmm4, xmm2
movdqa xmm5, xmm1
punpckhwd xmm3, xmm6
por xmm4, xmm7
pcmpgtd xmm5, xmm4
movdqa xmm4, xmm0
pand xmm4, xmm5
pandn xmm5, xmm2
movdqa xmm2, xmm3
por xmm2, xmm7
por xmm5, xmm4
movdqa xmm4, xmm0
pcmpgtd xmm1, xmm2
psubd xmm5, xmm0
pand xmm4, xmm1
pandn xmm1, xmm3
pslld xmm5, 0x10
por xmm1, xmm4
psrad xmm5, 0x10
psubd xmm1, xmm0
pslld xmm1, 0x10
psrad xmm1, 0x10
packssdw xmm1, xmm5
pshuflw xmm1, xmm1, 0x1b
pshufhw xmm1, xmm1, 0x1b
movdqu xmmword [edi], xmm1
add edi, 0xfffffff0
add ebx, 0xfffffff8
jne 0x4c05b0
cmp eax, dword [esp + 0xc]
je 0x4c0673
add ecx, 0xfffffffe
nop word cs:[eax + eax]
nop dword [eax]
movzx edi, word [ecx]
cmp eax, edi
cmova edi, eax
sub edi, eax
mov word [ecx], di
add ecx, 0xfffffffe
dec edx
jne 0x4c0660
add ebp, dword [esp + 0x14]
mov edi, dword [esi]
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x4c07f3
mov eax, dword [esi + 0xc4]
cmp ecx, ebp
cmovbe ebp, ecx
test ebp, ebp
je 0x4c06f0
mov ebx, dword [esi + 0x88]
sub ecx, ebp
add ebx, dword [esi + 0xbc]
mov dword [edi + 4], ecx
mov ecx, dword [edi + 0x1c]
add ebx, eax
cmp dword [ecx + 0x18], 2
jne 0x4c06c0
push ebp
push ebx
push edi
call fcn.004515e0
add esp, 0xc
jmp 0x4c06e5
push ebp
push dword [edi]
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov eax, dword [edi + 0x1c]
cmp dword [eax + 0x18], 1
jne 0x4c06e5
push ebp
push ebx
push dword [edi + 0x30]
call fcn.004a3aa0
add esp, 0xc
mov dword [edi + 0x30], eax
add dword [edi], ebp
add dword [edi + 8], ebp
mov eax, dword [esi + 0xc4]
add eax, ebp
mov dword [esi + 0xc4], eax
mov edi, dword [esi + 0x1704]
lea ecx, [edi + eax]
cmp ecx, 3
jb 0x4c07e0
mov edx, dword [esi + 0xbc]
mov ebx, dword [esi + 0x88]
mov dword [esp + 0xc], edi
sub edx, edi
mov edi, dword [esi + 0xa4]
movzx ebp, byte [ebx + edx]
mov dword [esi + 0x98], ebp
mov ecx, dword [esi + 0xa8]
shl ebp, cl
mov dword [esp + 0x10], ebp
movzx ebp, byte [ebx + edx + 1]
xor ebp, dword [esp + 0x10]
and ebp, edi
cmp dword [esp + 0xc], 0
mov dword [esi + 0x98], ebp
jne 0x4c0779
jmp 0x4c07e0
mov ebx, dword [esi + 0x88]
mov ebp, dword [esi + 0x98]
mov ecx, dword [esi + 0xa8]
mov edi, dword [esi + 0xa4]
inc edx
movzx eax, byte [ebx + edx + 2]
shl ebp, cl
xor eax, ebp
and eax, edi
mov dword [esi + 0x98], eax
mov edi, dword [esi + 0x94]
mov ecx, dword [esi + 0x90]
movzx eax, word [edi + eax*2]
mov edi, dword [esi + 0x84]
and edi, edx
mov word [ecx + edi*2], ax
mov eax, dword [esi + 0x94]
mov ecx, dword [esi + 0x98]
mov word [eax + ecx*2], dx
mov edi, dword [esi + 0x1704]
lea ecx, [edi - 1]
mov dword [esi + 0x1704], ecx
mov eax, dword [esi + 0xc4]
lea edi, [eax + edi - 1]
cmp edi, 3
jb 0x4c07e0
test ecx, ecx
jne 0x4c0760
nop dword [eax + eax]
cmp eax, 0x105
ja 0x4c07f3
mov ecx, dword [esi]
cmp dword [ecx + 4], 0
jne 0x4c03e0
mov edx, dword [esi + 0x8c]
mov eax, dword [esi + 0x1710]
mov ecx, edx
sub ecx, eax
jbe 0x4c086a
mov edi, dword [esi + 0xc4]
add edi, dword [esi + 0xbc]
cmp eax, edi
jae 0x4c0843
mov eax, dword [esi + 0x88]
sub edx, edi
mov ebx, 0x102
cmp edx, 0x102
cmovb ebx, edx
add eax, edi
push ebx
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
add ebx, edi
mov dword [esi + 0x1710], ebx
jmp 0x4c086a
add edi, 0x102
sub edi, eax
jbe 0x4c086a
cmp edi, ecx
cmova edi, ecx
add eax, dword [esi + 0x88]
push edi
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
add dword [esi + 0x1710], edi
add esp, 0x3c
pop esi
pop edi
pop ebx
pop ebp
ret