Function at 0x4293d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x10], edx
mov ecx, dword [ebp + 0x28]
mov dword [ebp - 0xc], esi
push edi
cmp ecx, 2
je 0x42982b
cmp ecx, 0x10
ja 0x42982b
test cl, 1
jne 0x42982b
mov edx, dword [ebp + 0x10]
cmp edx, 7
jb 0x42982b
cmp edx, 0xd
ja 0x42982b
mov ebx, dword [ebp + 0x18]
cmp ebx, 0xff00
ja 0x42982b
sub cl, 2
mov al, 0xf
sub al, dl
and cl, 0xfe
mov ah, al
shl cl, 2
dec ah
mov byte [ebp - 1], al
xor edi, edi
mov byte [ebp - 2], ah
cmp edi, ebx
push edx
push dword [ebp + 0xc]
sbb al, al
and al, 0x40
or cl, al
or cl, ah
lea eax, [ebp - 0x27]
push eax
mov byte [ebp - 0x28], cl
call sub.ntdll.dll_memcpy
mov dl, byte [ebp - 1]
add esp, 0xc
mov eax, dword [ebp + 8]
test dl, dl
je 0x42947d
lea ecx, [ebp - 0x19]
movzx edx, dl
nop dword [eax]
mov byte [ecx], al
lea ecx, [ecx - 1]
shr eax, 8
sub edx, 1
jne 0x429470
test eax, eax
jne 0x42982b
xorps xmm0, xmm0
xor ecx, ecx
movups xmmword [ebp - 0x38], xmm0
mov edx, 0x10
mov al, byte [ebp + ecx - 0x28]
lea ecx, [ecx + 1]
xor byte [ebp + ecx - 0x39], al
sub edx, 1
jne 0x429493
lea eax, [ebp - 8]
mov ecx, esi
push eax
lea eax, [ebp - 0x38]
push eax
push 0x10
mov edx, eax
call fcn.00422380
add esp, 0xc
test eax, eax
jne 0x429830
test ebx, ebx
je 0x429595
mov esi, dword [ebp + 0x14]
mov eax, ebx
shr eax, 8
mov edi, 0xe
cmp ebx, edi
xorps xmm0, xmm0
movups xmmword [ebp - 0x28], xmm0
cmovb edi, ebx
mov byte [ebp - 0x28], al
push edi
lea eax, [ebp - 0x26]
mov byte [ebp - 0x27], bl
push esi
push eax
call sub.ntdll.dll_memcpy
sub ebx, edi
add esp, 0xc
add edi, esi
mov edx, 0x10
xor ecx, ecx
mov al, byte [ebp + ecx - 0x28]
lea ecx, [ecx + 1]
xor byte [ebp + ecx - 0x39], al
sub edx, 1
jne 0x429501
mov ecx, dword [ebp - 0xc]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x38]
push eax
push 0x10
mov edx, eax
call fcn.00422380
add esp, 0xc
test eax, eax
jne 0x429830
test ebx, ebx
je 0x429595
cmp ebx, 0x10
mov eax, 0x10
mov esi, ebx
xorps xmm0, xmm0
cmova esi, eax
lea eax, [ebp - 0x28]
push esi
push edi
push eax
movups xmmword [ebp - 0x28], xmm0
call sub.ntdll.dll_memcpy
add esp, 0xc
mov edx, 0x10
xor ecx, ecx
nop dword [eax]
mov al, byte [ebp + ecx - 0x28]
lea ecx, [ecx + 1]
xor byte [ebp + ecx - 0x39], al
sub edx, 1
jne 0x429560
mov ecx, dword [ebp - 0xc]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x38]
push eax
push 0x10
mov edx, eax
call fcn.00422380
add esp, 0xc
test eax, eax
jne 0x429830
add edi, esi
sub ebx, esi
jne 0x429534
mov al, byte [ebp - 2]
mov esi, dword [ebp + 0x10]
push esi
push dword [ebp + 0xc]
mov byte [ebp - 0x48], al
lea eax, [ebp - 0x47]
push eax
call sub.ntdll.dll_memcpy
mov bl, byte [ebp - 1]
movzx eax, bl
push eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x47]
add eax, esi
push 0
push eax
call sub.ntdll.dll_memset
mov eax, dword [ebp + 8]
add esp, 0x18
mov edi, dword [ebp + 0x1c]
mov esi, dword [ebp + 0x20]
mov byte [ebp - 0x39], 1
test eax, eax
je 0x4297be
nop word [eax + eax]
cmp eax, 0x10
mov ebx, eax
mov eax, 0x10
cmova ebx, eax
cmp dword [ebp - 0x10], 0
jne 0x42963f
push ebx
lea eax, [ebp - 0x28]
xorps xmm0, xmm0
push edi
push eax
movups xmmword [ebp - 0x28], xmm0
call sub.ntdll.dll_memcpy
add esp, 0xc
mov edx, 0x10
xor ecx, ecx
nop
mov al, byte [ebp + ecx - 0x28]
lea ecx, [ecx + 1]
xor byte [ebp + ecx - 0x39], al
sub edx, 1
jne 0x429610
mov ecx, dword [ebp - 0xc]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x38]
push eax
push 0x10
mov edx, eax
call fcn.00422380
add esp, 0xc
test eax, eax
jne 0x429830
mov ecx, dword [ebp - 0xc]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x28]
push eax
push 0x10
lea edx, [ebp - 0x48]
call fcn.00422380
add esp, 0xc
test eax, eax
jne 0x429830
xor dl, dl
test ebx, ebx
je 0x429713
cmp ebx, 0x40
jb 0x429713
mov al, bl
dec al
movzx ecx, al
lea eax, [ebp - 0x28]
add eax, ecx
cmp esi, eax
ja 0x429694
lea eax, [ebp - 0x28]
mov dword [ebp - 0x14], eax
lea eax, [ecx + esi]
cmp eax, dword [ebp - 0x14]
jae 0x429713
lea eax, [ecx + edi]
cmp esi, eax
ja 0x4296a2
lea eax, [ecx + esi]
cmp eax, edi
jae 0x429713
mov eax, ebx
mov cl, 0x20
and eax, 0xffffffc0
mov dword [ebp - 0x14], eax
xor eax, eax
nop
movups xmm0, xmmword [ebp + eax - 0x28]
add dl, 0x40
movups xmm1, xmmword [eax + edi]
pxor xmm1, xmm0
movups xmmword [eax + esi], xmm1
mov al, cl
sub al, 0x10
movzx eax, al
movups xmm0, xmmword [ebp + eax - 0x28]
movups xmm1, xmmword [eax + edi]
pxor xmm1, xmm0
movups xmmword [eax + esi], xmm1
movzx eax, cl
movups xmm0, xmmword [ebp + eax - 0x28]
movups xmm1, xmmword [eax + edi]
pxor xmm1, xmm0
movups xmmword [eax + esi], xmm1
mov al, cl
add cl, 0x40
add al, 0x10
movzx eax, al
movups xmm1, xmmword [eax + edi]
movups xmm0, xmmword [ebp + eax - 0x28]
pxor xmm1, xmm0
movups xmmword [eax + esi], xmm1
movzx eax, dl
cmp eax, dword [ebp - 0x14]
jb 0x4296b0
movzx eax, dl
cmp eax, ebx
jae 0x429733
nop word [eax + eax]
mov cl, byte [eax + edi]
inc dl
xor cl, byte [ebp + eax - 0x28]
mov byte [eax + esi], cl
movzx eax, dl
cmp eax, ebx
jb 0x429720
cmp dword [ebp - 0x10], 1
jne 0x429784
push ebx
lea eax, [ebp - 0x28]
xorps xmm0, xmm0
push esi
push eax
movups xmmword [ebp - 0x28], xmm0
call sub.ntdll.dll_memcpy
add esp, 0xc
mov edx, 0x10
xor ecx, ecx
mov al, byte [ebp + ecx - 0x28]
lea ecx, [ecx + 1]
xor byte [ebp + ecx - 0x39], al
sub edx, 1
jne 0x429755
mov ecx, dword [ebp - 0xc]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x38]
push eax
push 0x10
mov edx, eax
call fcn.00422380
add esp, 0xc
test eax, eax
jne 0x429830
mov eax, dword [ebp + 8]
add esi, ebx
sub eax, ebx
add edi, ebx
mov bl, byte [ebp - 1]
xor dl, dl
mov dword [ebp + 8], eax
test bl, bl
je 0x4297b6
nop dword [eax]
movzx eax, dl
lea ecx, [ebp - 0x39]
sub ecx, eax
add byte [ecx], 1
jne 0x4297b3
inc dl
cmp dl, bl
jb 0x4297a0
mov eax, dword [ebp + 8]
test eax, eax
jne 0x4295e0
test bl, bl
je 0x4297db
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x39]
nop dword [eax + eax]
mov byte [eax], 0
lea eax, [eax - 1]
sub ecx, 1
jne 0x4297d0
mov ecx, dword [ebp - 0xc]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x28]
push eax
push 0x10
lea edx, [ebp - 0x48]
call fcn.00422380
add esp, 0xc
test eax, eax
jne 0x429830
xor ecx, ecx
mov edx, 0x10
nop
mov al, byte [ebp + ecx - 0x28]
lea ecx, [ecx + 1]
xor byte [ebp + ecx - 0x39], al
sub edx, 1
jne 0x429800
push dword [ebp + 0x28]
lea eax, [ebp - 0x38]
push eax
push dword [ebp + 0x24]
call sub.ntdll.dll_memcpy
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0xfffffff3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret