Function at 0x1004be70
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x38
call fcn.10079f60
mov eax, dword [0x100ce750]
xor eax, esp
mov dword [esp + 0x34], eax
cmp dword [esp + 0x50], 1
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x48]
push ebx
mov ebx, dword [esp + 0x40]
push ebp
mov ebp, dword [esp + 0x4c]
push esi
push edi
mov edi, dword [esp + 0x50]
mov esi, eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], esi
jne 0x1004c095
cmp ebp, 0x10
jb 0x1004bf60
mov eax, ebp
shr eax, 4
mov dword [esp + 0x10], eax
lea eax, [esi + 0xf]
cmp edi, eax
ja 0x1004bede
lea eax, [edi + 0xf]
cmp eax, esi
jae 0x1004beec
lea eax, [ebx + 0xf]
cmp edi, eax
ja 0x1004bf20
lea eax, [edi + 0xf]
cmp eax, ebx
jb 0x1004bf20
mov edx, ebx
mov eax, edi
sub edx, esi
mov ecx, 0x10
sub eax, esi
mov dword [esp + 0x24], eax
mov ebp, eax
nop
mov al, byte [edx + esi]
lea esi, [esi + 1]
xor al, byte [esi - 1]
mov byte [esi + ebp - 1], al
dec ecx
jne 0x1004bf00
mov ebp, dword [esp + 0x54]
mov ecx, dword [esp + 0x14]
jmp 0x1004bf30
movdqu xmm1, xmmword [ebx]
movdqu xmm0, xmmword [esi]
pxor xmm1, xmm0
movdqu xmmword [edi], xmm1
push ecx
push edi
push edi
call fcn.1004b170
mov ecx, dword [esp + 0x20]
mov esi, edi
sub ebp, 0x10
add esp, 0xc
add ebx, 0x10
mov dword [esp + 0x54], ebp
add edi, 0x10
dec dword [esp + 0x10]
jne 0x1004bed0
mov dword [esp + 0x10], ebx
mov dword [esp + 0x24], edi
test ebp, ebp
je 0x1004c08c
xor ecx, ecx
mov dword [esp + 0x1c], ecx
test ebp, ebp
je 0x1004c057
cmp ebp, 0x20
jb 0x1004c02b
lea eax, [ebp - 1]
mov dword [esp + 0x1c], ecx
lea edx, [ebp - 1]
add eax, esi
add edx, edi
cmp edi, eax
ja 0x1004bf99
cmp edx, esi
jae 0x1004c02b
lea eax, [ebp - 1]
add eax, ebx
cmp edi, eax
ja 0x1004bfaa
cmp edx, ebx
jae 0x1004c02b
mov ecx, edi
mov eax, ebp
sub ecx, ebx
and eax, 0x1f
mov dword [esp + 0x28], ecx
mov edx, ebp
mov ebp, dword [esp + 0x28]
mov ecx, esi
sub ecx, ebx
sub edx, eax
mov dword [esp + 0x2c], ecx
mov eax, ebx
mov ebx, dword [esp + 0x2c]
mov ecx, edi
sub ecx, esi
mov dword [esp + 0x20], edx
mov dword [esp + 0x30], ecx
lea edx, [esi + 0x10]
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x30]
movdqu xmm0, xmmword [eax]
add ecx, 0x20
lea eax, [eax + 0x20]
lea edx, [edx + 0x20]
movdqu xmm1, xmmword [ebx + eax - 0x20]
pxor xmm1, xmm0
movdqu xmmword [eax + ebp - 0x20], xmm1
movdqu xmm1, xmmword [eax - 0x10]
movdqu xmm0, xmmword [edx - 0x20]
pxor xmm1, xmm0
movdqu xmmword [edx + edi - 0x20], xmm1
cmp ecx, dword [esp + 0x20]
jb 0x1004bfe4
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x10]
mov ebp, dword [esp + 0x54]
mov dword [esp + 0x1c], ecx
cmp ecx, ebp
jae 0x1004c057
mov eax, edi
mov edx, ebp
sub eax, esi
add ecx, esi
sub ebx, esi
mov dword [esp + 0x20], eax
sub edx, dword [esp + 0x1c]
mov ebp, eax
mov al, byte [ecx + ebx]
lea ecx, [ecx + 1]
xor al, byte [ecx - 1]
mov byte [ecx + ebp - 1], al
dec edx
jne 0x1004c043
mov ebp, dword [esp + 0x54]
cmp ebp, 0x10
jae 0x1004c07c
mov edx, 0x10
lea ecx, [edi + ebp]
sub esi, edi
sub edx, ebp
jmp 0x1004c070
mov al, byte [esi + ecx]
lea ecx, [ecx + 1]
mov byte [ecx - 1], al
dec edx
jne 0x1004c070
push dword [esp + 0x14]
push edi
push edi
call fcn.1004b170
add esp, 0xc
mov esi, edi
movdqu xmm0, xmmword [esi]
jmp 0x1004c382
cmp ebx, edi
je 0x1004c21e
cmp ebp, 0x10
jb 0x1004c115
mov eax, ebp
shr eax, 4
mov dword [esp + 0x10], eax
jmp 0x1004c0b0
push ecx
push edi
push ebx
call fcn.1004abd0
lea eax, [esi + 0xf]
add esp, 0xc
cmp edi, eax
ja 0x1004c0e0
lea eax, [edi + 0xf]
cmp eax, esi
jb 0x1004c0e0
mov ecx, edi
sub esi, edi
mov edx, 0x10
mov al, byte [ecx + esi]
lea ecx, [ecx + 1]
xor byte [ecx - 1], al
dec edx
jne 0x1004c0d2
jmp 0x1004c0f0
movdqu xmm1, xmmword [edi]
movdqu xmm0, xmmword [esi]
pxor xmm1, xmm0
movdqu xmmword [edi], xmm1
mov ecx, dword [esp + 0x14]
mov esi, ebx
sub ebp, 0x10
add ebx, 0x10
add edi, 0x10
dec dword [esp + 0x10]
jne 0x1004c0b0
mov dword [esp + 0x54], ebp
mov dword [esp + 0x10], ebx
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], esi
test ebp, ebp
je 0x1004c215
push ecx
lea eax, [esp + 0x38]
push eax
push ebx
call fcn.1004abd0
add esp, 0xc
xor edx, edx
test ebp, ebp
je 0x1004c213
cmp ebp, 0x20
jb 0x1004c1f2
lea ecx, [ebp - 1]
lea eax, [esp + ebp + 0x33]
add ecx, edi
cmp edi, eax
ja 0x1004c158
lea eax, [esp + 0x34]
cmp ecx, eax
jae 0x1004c1f2
lea eax, [ebp - 1]
add eax, esi
cmp edi, eax
ja 0x1004c169
cmp ecx, esi
jae 0x1004c1f2
mov eax, ebp
mov ecx, ebp
and eax, 0x1f
sub ecx, eax
mov eax, esi
mov dword [esp + 0x20], ecx
mov ecx, edi
sub ecx, esi
mov dword [esp + 0x30], ecx
lea ecx, [esp + 0x34]
mov ebp, dword [esp + 0x30]
sub ecx, esi
mov dword [esp + 0x2c], ecx
lea ecx, [esp + 0x44]
mov ebx, dword [esp + 0x2c]
sub ecx, esi
mov dword [esp + 0x28], ecx
lea ecx, [edi + 0x10]
mov edi, dword [esp + 0x28]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x14]
nop
movdqu xmm0, xmmword [eax]
lea eax, [eax + 0x20]
movdqu xmm1, xmmword [ebx + eax - 0x20]
pxor xmm1, xmm0
movdqu xmmword [eax + ebp - 0x20], xmm1
movdqu xmm0, xmmword [eax - 0x10]
movdqu xmm1, xmmword [edi + eax - 0x20]
pxor xmm1, xmm0
movdqu xmmword [esi + edx], xmm1
add edx, 0x20
cmp edx, ecx
jb 0x1004c1b0
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x10]
mov ebp, dword [esp + 0x54]
cmp edx, ebp
jae 0x1004c213
lea eax, [esp + 0x34]
sub esi, eax
sub edi, eax
mov edi, edi
lea ecx, [esp + 0x34]
add ecx, edx
inc edx
mov al, byte [ecx + esi]
xor al, byte [ecx]
mov byte [ecx + edi], al
cmp edx, ebp
jb 0x1004c200
mov esi, ebx
movdqu xmm0, xmmword [esi]
jmp 0x1004c382
cmp ebp, 0x10
jb 0x1004c2b6
lea edx, [eax + 0xf]
sub esi, edi
mov eax, ebp
mov dword [esp + 0x20], edx
shr eax, 4
mov dword [esp + 0x10], eax
lea esp, [esp]
movdqu xmm0, xmmword [ebx]
push ecx
push edi
push ebx
movdqu xmmword [esp + 0x40], xmm0
call fcn.1004abd0
add esp, 0xc
cmp edi, dword [esp + 0x20]
ja 0x1004c282
lea eax, [edi + 0xf]
cmp eax, dword [esp + 0x18]
jb 0x1004c282
mov ecx, edi
mov edx, 0x10
jmp 0x1004c270
mov al, byte [esi + ecx]
lea ecx, [ecx + 1]
xor byte [ecx - 1], al
dec edx
jne 0x1004c270
mov eax, dword [esp + 0x18]
jmp 0x1004c296
mov eax, dword [esp + 0x18]
movdqu xmm0, xmmword [edi]
movdqu xmm1, xmmword [eax]
pxor xmm1, xmm0
movdqu xmmword [edi], xmm1
movdqu xmm0, xmmword [esp + 0x34]
mov ecx, dword [esp + 0x14]
sub ebp, 0x10
add ebx, 0x10
add edi, 0x10
sub esi, 0x10
dec dword [esp + 0x10]
movdqu xmmword [eax], xmm0
jne 0x1004c240
test ebp, ebp
je 0x1004c38a
movdqu xmm0, xmmword [ebx]
push ecx
lea eax, [esp + 0x38]
push edi
push eax
movdqu xmmword [esp + 0x40], xmm0
call fcn.1004abd0
add esp, 0xc
xor edx, edx
test ebp, ebp
je 0x1004c35c
mov ebx, dword [esp + 0x18]
cmp ebp, 0x20
jb 0x1004c341
lea eax, [ebx - 1]
lea ecx, [ebp - 1]
add eax, ebp
add ecx, edi
cmp edi, eax
ja 0x1004c2f8
cmp ecx, ebx
jae 0x1004c341
mov eax, ebp
mov ecx, ebp
and eax, 0x1f
mov esi, ebx
sub ecx, eax
mov eax, edi
sub esi, edi
jmp 0x1004c310
movdqu xmm0, xmmword [eax]
lea eax, [eax + 0x20]
movdqu xmm1, xmmword [eax + esi - 0x20]
pxor xmm1, xmm0
movdqu xmmword [eax - 0x20], xmm1
movdqu xmm1, xmmword [ebx + edx + 0x10]
add edx, 0x20
movdqu xmm0, xmmword [eax - 0x10]
pxor xmm1, xmm0
movdqu xmmword [eax - 0x10], xmm1
cmp edx, ecx
jb 0x1004c310
cmp edx, ebp
jae 0x1004c35c
mov esi, ebp
lea ecx, [edi + edx]
sub ebx, edi
sub esi, edx
mov edi, edi
mov al, byte [ecx + ebx]
lea ecx, [ecx + 1]
xor byte [ecx - 1], al
dec esi
jne 0x1004c350
cmp ebp, 0x10
jae 0x1004c37c
mov eax, 0x10
lea ecx, [esp + 0x34]
sub eax, ebp
lea edx, [edi + ebp]
push eax
add ecx, ebp
push ecx
push edx
call fcn.10078a50
add esp, 0xc
movdqu xmm0, xmmword [esp + 0x34]
mov ecx, dword [esp + 0x18]
movdqu xmmword [ecx], xmm0
mov ecx, dword [esp + 0x44]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1007ba40
add esp, 0x38
ret