Function at 0x402240
Capabilities:
Execute anti-debugging instructions

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4053cd
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x3c
mov eax, dword [0x409040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xorps xmm0, xmm0
mov dword [ebp - 0x18], 0
xor eax, eax
movq qword [ebp - 0x20], xmm0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x34], 0x6e
nop dword [eax]
rdtsc
mov dword [ebp - 0x3c], eax
xor ecx, ecx
xor eax, eax
mov dword [ebp - 0x38], edx
push ebx
cpuid
pop ebx
mov ecx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x30]
rdtsc
sub eax, dword [ebp - 0x3c]
mov dword [ebp - 0x28], eax
sbb edx, dword [ebp - 0x38]
mov dword [ebp - 0x24], edx
cmp ecx, edi
je 0x4022e5
mov dword [ecx], eax
mov dword [ecx + 4], edx
add ecx, 8
mov dword [ebp - 0x1c], ecx
jmp 0x4022fb
lea eax, [ebp - 0x28]
push eax
push ecx
lea ecx, [ebp - 0x20]
call fcn.00403480
mov edi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x30], edi
sub dword [ebp - 0x34], 1
jne 0x4022b0
mov eax, ecx
mov byte [ebp - 0x38], 0
sub eax, dword [ebp - 0x20]
mov edx, ecx
push dword [ebp - 0x38]
mov ecx, dword [ebp - 0x20]
sar eax, 3
push eax
call fcn.004035f0
mov eax, dword [ebp - 0x20]
xor esi, esi
add esp, 8
mov dword [ebp - 0x34], esi
lea ecx, [eax + 0x28]
sub eax, ecx
mov dword [ebp - 0x3c], ecx
add eax, 0x348
mov dword [ebp - 0x38], eax
sar eax, 3
mov dword [ebp - 0x30], eax
test eax, eax
je 0x4023a9
cmp eax, 0x1fffffff
ja 0x4024da
lea esi, [eax*8]
test esi, esi
je 0x402396
cmp esi, 0x1000
jb 0x402385
lea eax, [esi + 0x23]
cmp eax, esi
jbe 0x4024df
push eax
call fcn.00403df5
add esp, 4
test eax, eax
je 0x4024a9
lea esi, [eax + 0x23]
and esi, 0xffffffe0
mov dword [esi - 4], eax
jmp 0x402390
push esi
call fcn.00403df5
add esp, 4
mov esi, eax
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x30]
push dword [ebp - 0x38]
lea eax, [esi + eax*8]
push ecx
push esi
mov dword [ebp - 0x34], eax
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
mov ecx, dword [ebp - 0x34]
xor edx, edx
sub ecx, esi
xorps xmm0, xmm0
mov dword [ebp - 0x30], ecx
mov eax, esi
add ecx, 7
movlpd qword [ebp - 0x28], xmm0
shr ecx, 3
cmp esi, dword [ebp - 0x34]
cmova ecx, edx
test ecx, ecx
je 0x402418
cmp ecx, 4
jb 0x402418
and ecx, 0xfffffffc
xorps xmm1, xmm1
xorps xmm2, xmm2
nop dword [eax + eax]
movups xmm0, xmmword [eax]
add edx, 4
paddq xmm1, xmm0
movups xmm0, xmmword [eax + 0x10]
add eax, 0x20
paddq xmm2, xmm0
cmp edx, ecx
jne 0x4023e0
paddq xmm1, xmm2
movaps xmm0, xmm1
psrldq xmm0, 8
paddq xmm1, xmm0
movd ecx, xmm1
psrldq xmm1, 4
movd edx, xmm1
jmp 0x40241e
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x34]
je 0x402430
add ecx, dword [eax]
adc edx, dword [eax + 4]
add eax, 8
cmp eax, dword [ebp - 0x34]
jne 0x402423
mov eax, dword [ebp - 0x30]
push 0
sar eax, 3
push eax
push edx
push ecx
mov dword [ebp - 0x30], eax
call fcn.00404da0
test edx, edx
jne 0x402451
mov byte [ebp - 0x29], dl
cmp eax, 0x3e8
jbe 0x402455
mov byte [ebp - 0x29], 1
test esi, esi
je 0x402483
mov ecx, dword [ebp - 0x30]
shl ecx, 3
cmp ecx, 0x1000
jb 0x402479
mov edx, dword [esi - 4]
add ecx, 0x23
sub esi, edx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x4024a9
mov esi, edx
push ecx
push esi
call fcn.0040418b
add esp, 8
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x4024b9
sub edi, ecx
mov eax, ecx
and edi, 0xfffffff8
cmp edi, 0x1000
jb 0x4024af
mov ecx, dword [eax - 4]
add edi, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4024af
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edi
push ecx
call fcn.0040418b
add esp, 8
mov al, byte [ebp - 0x29]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00403de7
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.004035e0
call fcn.00401a60
int3