Function at 0x4022f0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x158
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x174]
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], 0xddccbbaa
mov dword [esp + 0x18], 0x2211ffee
mov byte [edi + 8], cl
and cl, 0x80
mov dword [esp + 0x1c], 0x66554433
mov dword [esp + 0x20], 0x99998877
mov byte [edi + 5], cl
call dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__tzset]
mov esi, dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time32]
push 0
call esi
push 0
call esi
mov cl, byte [esp + 0x174]
add esp, 8
mov ebp, dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
mov dword [edi + 1], eax
mov dword [esp + 0x24], ebp
test cl, cl
jne 0x402366
mov byte [edi + 9], 0
jmp 0x402483
cmp byte [edi + 5], 0
movzx ebx, cl
jge 0x40246f
mov eax, ebx
and eax, 0x8000000f
jns 0x402383
dec eax
or eax, 0xfffffff0
add eax, 1
je 0x40238b
and cl, 0xf0
add cl, 0x10
push ebx
push dword [esp + 0x14]
lea eax, [esp + 0x30]
mov byte [edi + 9], cl
push eax
call sub.VCRUNTIME140.dll_memcpy
movzx eax, byte [edi + 9]
add esp, 0xc
mov esi, eax
sub esi, ebx
je 0x4023bc
lea ebx, [esp + eax + 0x27]
nop
call ebp
mov byte [ebx], al
lea ebx, [ebx - 1]
sub esi, 1
jne 0x4023b0
movzx ebx, byte [edi + 9]
lea esi, [edi + 0xa]
test bl, 0xf
jne 0x402483
mov edx, dword [esp + 0x170]
push ecx
lea ecx, [esp + 0xbc]
call fcn.004037f0
movups xmm0, xmmword [esp + 0x18]
shr ebx, 4
add esp, 4
mov dword [esp + 0x10], eax
movups xmmword [esp + 0x14], xmm0
test ebx, ebx
je 0x402483
lea ebp, [esp + 0x29]
mov edi, eax
sub ebp, esi
xor edx, edx
lea eax, [esi + ebp]
nop dword [eax]
movzx ecx, byte [eax - 1]
lea eax, [eax + 4]
xor byte [esp + edx + 0x14], cl
movzx ecx, byte [eax - 4]
xor byte [esp + edx + 0x15], cl
movzx ecx, byte [eax - 3]
xor byte [esp + edx + 0x16], cl
movzx ecx, byte [eax - 2]
xor byte [esp + edx + 0x17], cl
add edx, 4
cmp edx, 0x10
jl 0x402410
lea eax, [esp + 0x14]
mov edx, edi
push esi
push eax
lea ecx, [esp + 0xc0]
call fcn.00403b80
movups xmm0, xmmword [esi]
add esp, 8
add esi, 0x10
movups xmmword [esp + 0x14], xmm0
sub ebx, 1
jne 0x402404
mov edi, dword [esp + 0x174]
mov ebp, dword [esp + 0x24]
jmp 0x402483
push ebx
push dword [esp + 0x14]
lea eax, [edi + 0xa]
mov byte [edi + 9], cl
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
movzx eax, byte [edi + 9]
lea ecx, [edi + 9]
mov esi, dword [esp + 0x178]
sub esi, eax
je 0x4024ac
lea ebx, [ecx + eax]
add ebx, esi
nop word [eax + eax]
call ebp
mov byte [ebx], al
lea ebx, [ebx - 1]
sub esi, 1
jne 0x4024a0
movzx ebp, byte [edi + 9]
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x10], 0
mov word [edi + 6], ax
lea ebx, [ebp + 0xa]
mov esi, ebx
and ebx, 1
shr esi, 1
je 0x40252b
cmp esi, 0x10
jb 0x40252b
mov eax, esi
mov edx, esi
and eax, 0xf
xorps xmm1, xmm1
sub edx, eax
xorps xmm2, xmm2
movups xmm0, xmmword [edi + ecx*2]
pxor xmm1, xmm0
movups xmm0, xmmword [edi + ecx*2 + 0x10]
add ecx, 0x10
pxor xmm2, xmm0
cmp ecx, edx
jl 0x4024e0
pxor xmm1, xmm2
movaps xmm0, xmm1
psrldq xmm0, 8
pxor xmm1, xmm0
movups xmm0, xmm1
psrldq xmm0, 4
pxor xmm1, xmm0
movups xmm0, xmm1
psrldq xmm0, 2
pxor xmm1, xmm0
movd eax, xmm1
movzx eax, ax
mov dword [esp + 0x10], eax
mov dx, word [esp + 0x10]
cmp ecx, esi
jge 0x40253d
xor dx, word [edi + ecx*2]
inc ecx
cmp ecx, esi
jl 0x402534
test ebx, ebx
je 0x402549
movzx eax, byte [edi + ebp + 9]
xor dx, ax
mov word [edi + 6], dx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x158
ret