Function at 0x4e04a0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc
push ebx
mov ebx, dword [esp + 0x18]
mov eax, ebx
push ebp
mov ebp, dword [esp + 0x18]
sub eax, ebp
push esi
push edi
cmp eax, 0x20
jle 0x4e0683
mov ecx, dword [esp + 0x2c]
mov eax, ebx
sub eax, ebp
cmp dword [esp + 0x28], 0
mov dword [esp + 0x14], eax
jle 0x4e06e9
sar eax, 1
push ecx
lea esi, [eax + ebp]
lea eax, [ebx - 1]
push eax
push esi
push ebp
call fcn.004de2d0
add esp, 0x10
lea edi, [esi + 1]
cmp ebp, esi
jae 0x4e051c
mov dh, byte [esi]
mov dl, byte [esi - 1]
movzx eax, dl
movd xmm0, eax
movzx eax, dh
cvtdq2pd xmm0, xmm0
movd xmm1, eax
cvtdq2pd xmm1, xmm1
comisd xmm0, xmm1
ja 0x4e051c
comisd xmm1, xmm0
ja 0x4e051c
dec esi
mov dh, dl
cmp ebp, esi
jb 0x4e04f0
cmp edi, ebx
jae 0x4e054c
movzx eax, byte [esi]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
nop dword [eax + eax]
movzx eax, byte [edi]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
comisd xmm0, xmm1
ja 0x4e054c
comisd xmm1, xmm0
ja 0x4e054c
inc edi
cmp edi, ebx
jb 0x4e0530
mov edx, edi
mov ebx, esi
cmp edx, dword [esp + 0x24]
jae 0x4e0598
mov ebp, dword [esp + 0x24]
nop word [eax + eax]
movzx eax, byte [esi]
movd xmm0, eax
movzx eax, byte [edx]
cvtdq2pd xmm0, xmm0
movd xmm1, eax
cvtdq2pd xmm1, xmm1
comisd xmm0, xmm1
ja 0x4e058f
comisd xmm1, xmm0
ja 0x4e0594
cmp edi, edx
je 0x4e058e
mov ah, byte [edx]
mov al, byte [edi]
mov byte [edi], ah
mov byte [edx], al
inc edi
inc edx
cmp edx, ebp
jb 0x4e0560
mov ebp, dword [esp + 0x20]
cmp ebx, ebp
jbe 0x4e05d7
lea ecx, [ebx - 1]
nop
movzx eax, byte [ecx]
movd xmm0, eax
movzx eax, byte [esi]
cvtdq2pd xmm0, xmm0
movd xmm1, eax
cvtdq2pd xmm1, xmm1
comisd xmm0, xmm1
ja 0x4e05cf
comisd xmm1, xmm0
ja 0x4e05d5
dec esi
cmp esi, ecx
je 0x4e05cf
mov ah, byte [ecx]
mov al, byte [esi]
mov byte [esi], ah
mov byte [ecx], al
dec ebx
dec ecx
cmp ebp, ebx
jb 0x4e05a0
cmp ebx, ebp
jne 0x4e05fb
cmp edx, dword [esp + 0x24]
je 0x4e062c
cmp edi, edx
je 0x4e05eb
mov al, byte [edi]
mov cl, byte [esi]
mov byte [esi], al
mov byte [edi], cl
mov al, byte [edx]
inc edi
mov cl, byte [esi]
mov byte [esi], al
inc esi
mov byte [edx], cl
inc edx
jmp 0x4e0550
dec ebx
cmp edx, dword [esp + 0x24]
jne 0x4e061e
dec esi
cmp ebx, esi
je 0x4e060f
mov al, byte [esi]
mov cl, byte [ebx]
mov byte [ebx], al
mov byte [esi], cl
mov al, byte [edi - 1]
dec edi
mov cl, byte [esi]
mov byte [esi], al
mov byte [edi], cl
jmp 0x4e0550
mov cl, byte [edx]
mov al, byte [ebx]
mov byte [edx], al
inc edx
mov byte [ebx], cl
jmp 0x4e0550
mov edx, dword [esp + 0x28]
mov eax, edx
mov ebx, dword [esp + 0x24]
mov ecx, ebx
sar eax, 2
sub ecx, edi
sar edx, 1
add edx, eax
mov eax, esi
sub eax, ebp
mov dword [esp + 0x28], edx
cmp eax, ecx
mov eax, dword [esp + 0x2c]
push eax
push edx
jge 0x4e0662
push esi
push ebp
call fcn.004e04a0
mov ebp, edi
mov dword [esp + 0x30], ebp
jmp 0x4e066f
push ebx
push edi
call fcn.004e04a0
mov ebx, esi
mov dword [esp + 0x34], ebx
mov ecx, dword [esp + 0x3c]
mov eax, ebx
sub eax, ebp
add esp, 0x10
cmp eax, 0x20
jg 0x4e04c0
cmp ebp, ebx
je 0x4e0838
lea esi, [ebp + 1]
cmp esi, ebx
je 0x4e0838
mov ecx, 1
sub ecx, ebp
mov dword [esp + 0x20], ecx
mov dh, byte [esi]
mov edi, esi
movzx eax, dh
mov byte [esp + 0x24], dh
movd xmm1, eax
movzx eax, byte [ebp]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
comisd xmm1, xmm0
jbe 0x4e07f7
dec ecx
mov eax, esi
add ecx, esi
push ecx
sub eax, ecx
inc eax
push ebp
push eax
call fcn.0067d850
mov al, byte [esp + 0x30]
add esp, 0xc
mov byte [ebp], al
jmp 0x4e082b
mov esi, eax
sar esi, 1
test esi, esi
jle 0x4e07ac
lea ecx, [eax - 1]
mov edi, ecx
mov dword [esp + 0x18], ecx
sar edi, 1
mov cl, byte [esi + ebp - 1]
dec esi
mov byte [esp + 0x24], cl
mov edx, esi
mov ecx, esi
cmp esi, edi
jge 0x4e074c
add ecx, ecx
movzx eax, byte [ecx + ebp + 2]
movd xmm1, eax
movzx eax, byte [ecx + ebp + 1]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
xor eax, eax
cvtdq2pd xmm0, xmm0
comisd xmm1, xmm0
seta al
inc ecx
xor eax, 1
add ecx, eax
mov al, byte [ecx + ebp]
mov byte [edx + ebp], al
mov edx, ecx
cmp ecx, edi
jl 0x4e0711
mov eax, dword [esp + 0x14]
cmp edx, edi
jne 0x4e075e
test al, 1
jne 0x4e075e
mov al, byte [ebx - 1]
mov byte [edx + ebp], al
mov edx, dword [esp + 0x18]
lea ecx, [edx - 1]
sar ecx, 1
cmp esi, edx
jge 0x4e0795
movzx eax, byte [esp + 0x24]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
movzx eax, byte [ecx + ebp]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
comisd xmm0, xmm1
jbe 0x4e0795
mov al, byte [ecx + ebp]
mov byte [edx + ebp], al
mov edx, ecx
dec ecx
sar ecx, 1
cmp esi, edx
jl 0x4e0774
mov al, byte [esp + 0x24]
mov byte [edx + ebp], al
mov eax, dword [esp + 0x14]
test esi, esi
jg 0x4e0700
mov ecx, dword [esp + 0x2c]
mov eax, ebx
sub eax, ebp
cmp eax, 2
jl 0x4e0838
sub ebx, ebp
nop dword [eax + eax]
mov al, byte [ebx + ebp - 1]
lea esi, [ebx - 1]
mov byte [esp + 0x24], al
mov al, byte [ebp]
push ecx
mov byte [ebx + ebp - 1], al
lea eax, [esp + 0x28]
push eax
push esi
push 0
push ebp
call fcn.004df850
mov ecx, dword [esp + 0x40]
mov ebx, esi
add esp, 0x14
cmp ebx, 2
jge 0x4e07c0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov dl, byte [esi - 1]
lea ecx, [esi - 1]
movzx eax, dl
movd xmm0, eax
cvtdq2pd xmm0, xmm0
comisd xmm1, xmm0
jbe 0x4e0829
nop
mov byte [edi], dl
mov edi, ecx
mov dl, byte [ecx - 1]
dec ecx
movzx eax, dl
movd xmm0, eax
cvtdq2pd xmm0, xmm0
comisd xmm1, xmm0
ja 0x4e0810
mov byte [edi], dh
mov ecx, dword [esp + 0x20]
inc esi
cmp esi, ebx
jne 0x4e06a1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret