Function at 0x42f850
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1dc
mov eax, dword [0x43bfc0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 8]
push str._CS_SS_1
mov dword [ebp - 0x1d8], edi
mov dword [ebp - 0x1dc], eax
call dword [sym.imp.VMProtectSDK32.dll_VMProtectBeginUltra]
test edi, edi
je 0x42fa8e
cmp dword [ebp + 0xc], 0
je 0x42fa8e
mov byte [ebp - 0x30], 0
xorps xmm0, xmm0
movq qword [ebp - 0x1c], xmm0
movups xmmword [ebp - 0x50], xmm0
movups xmmword [ebp - 0x40], xmm0
movups xmmword [ebp - 0x2c], xmm0
test esi, esi
je 0x42f8bd
mov dword [esi], 0
mov edi, dword [ebp + 0x1c]
mov ecx, 0x21
cmp edi, ecx
mov eax, edi
cmova eax, ecx
push eax
lea eax, [ebp - 0x50]
push ebx
push eax
call sub.VCRUNTIME140.dll_memcpy
push 0x80
lea eax, [ebp - 0xd0]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x18
xor eax, eax
xor edx, edx
cmp eax, edi
sbb ecx, ecx
and ecx, eax
movzx eax, byte [ecx + ebx]
xor al, byte [edx + 0x434c50]
mov byte [ebp + edx - 0xd0], al
lea eax, [ecx + 1]
cmp eax, edi
sbb ecx, ecx
and ecx, eax
movzx eax, byte [ecx + ebx]
xor al, byte [edx + 0x434c51]
mov byte [ebp + edx - 0xcf], al
lea eax, [ecx + 1]
cmp eax, edi
sbb ecx, ecx
and ecx, eax
movzx eax, byte [ecx + ebx]
xor al, byte [edx + 0x434c52]
mov byte [ebp + edx - 0xce], al
lea eax, [ecx + 1]
cmp eax, edi
sbb ecx, ecx
and ecx, eax
movzx eax, byte [ecx + ebx]
xor al, byte [edx + 0x434c53]
mov byte [ebp + edx - 0xcd], al
add edx, 4
lea eax, [ecx + 1]
cmp edx, 0x80
jb 0x42f8f1
movzx ecx, byte [ebp - 0x50]
lea eax, [ebp - 0xd0]
shr ecx, 3
lea edx, [ebp - 0xd0]
add eax, ecx
cmp ecx, 0x10
lea ecx, [ebp - 0x14]
cmovae edx, eax
lea eax, [edx + 0xf]
cmp ecx, eax
ja 0x42f98c
lea eax, [ebp - 5]
movups xmm0, xmmword [edx]
push 0x104
lea eax, [ebp - 0x1d4]
push 0
push eax
movups xmmword [ebp - 0x14], xmm0
call sub.VCRUNTIME140.dll_memset
lea eax, [ebp - 0xd0]
mov dword [ebp - 0x1d0], 0x100
mov dword [ebp - 0x1c8], eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x1c4], eax
lea eax, [ebp - 0x1d4]
push eax
mov dword [ebp - 0x1cc], 0
call fcn.00432180
mov edi, dword [ebp - 0x1d8]
lea eax, [ebp - 0x2c]
push 0x10
push edi
push eax
lea eax, [ebp - 0x1d4]
push eax
call fcn.00431ed0
add esp, 0x20
add edi, 0x10
xor eax, eax
xor edx, edx
nop
xor ecx, ecx
cmp eax, 8
cmovl ecx, eax
mov al, byte [ebp + ecx - 0x2c]
mov byte [ebp + edx - 0xd0], al
inc edx
lea eax, [ecx + 1]
cmp edx, 0x80
jb 0x42fa00
lea eax, [ebp - 0xd0]
mov dword [ebp - 0x1d0], 0x80
mov dword [ebp - 0x1c8], eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x1c4], eax
lea eax, [ebp - 0x1d4]
push eax
mov dword [ebp - 0x1cc], 0
call fcn.00432180
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
push eax
push edi
push dword [ebp - 0x1dc]
lea eax, [ebp - 0x1d4]
push eax
call fcn.00431fa0
add esp, 0x14
test esi, esi
je 0x42fa77
mov dword [esi], eax
call dword [sym.imp.VMProtectSDK32.dll_VMProtectEnd]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041d5bd
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x42fa98
mov dword [esi], 0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041d5bd
mov esp, ebp
pop ebp
ret