Function at 0x402d00
Capabilities:
Execute anti-debugging instructions
Read file on windows

Disassembly:
push edi
lea edi, [esp + 8]
and esp, 0xfffffff8
push dword [edi - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x68
mov dword [ebp - 0x20], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
mov dword [esp], str.__unix_sys_busclocksourcedevicesclocksource0current_clocksource
call dword [sym.imp.kernelbase.dll_CreateFileW]
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x402d9e
lea esi, [ebp - 0x20]
mov ebx, eax
mov dword [esp + 0x10], 0
lea eax, [ebp - 0x24]
mov dword [esp + 8], 3
mov dword [esp + 0xc], eax
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [sym.imp.kernelbase.dll_ReadFile]
sub esp, 0x14
test eax, eax
jne 0x402fd9
mov dword [esp], ebx
call dword [sym.imp.kernelbase.dll_CloseHandle]
push edx
xor esi, esi
mov eax, 1
mov ecx, esi
cpuid
and dl, 0x10
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ecx
je 0x40301d
mov eax, 0x80000000
mov ecx, esi
cpuid
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ecx
cmp eax, 0x80000006
jbe 0x40307b
mov eax, 0x80000007
mov ecx, esi
cpuid
and dh, 1
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ecx
je 0x40304c
mov eax, 0x80000001
mov ecx, esi
mov dword [ebp - 0x28], 0x32
cpuid
and edx, 0x8000000
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x30], edx
jmp 0x402f4f
rdtscp
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], edx
call dword [sym.imp.ntdll.dll_RtlGetSystemTimePrecise]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
rdtscp
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], edx
mov dword [esp], 1
call dword [sym.imp.kernelbase.dll_Sleep]
sub esp, 4
rdtscp
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], edx
call dword [sym.imp.ntdll.dll_RtlGetSystemTimePrecise]
mov esi, eax
mov edi, edx
rdtscp
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], edx
sub esi, dword [ebp - 0x38]
mov ebx, 0x989680
sbb edi, dword [ebp - 0x34]
mov eax, dword [ebp - 0x50]
mov edx, dword [ebp - 0x4c]
sub eax, dword [ebp - 0x40]
sbb edx, dword [ebp - 0x3c]
mov dword [esp + 8], esi
mov dword [esp + 0xc], edi
imul ecx, edx, 0x989680
mul ebx
add edx, ecx
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.004045c0
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x34], edx
sub eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x54]
sbb edx, dword [ebp - 0x44]
mov dword [esp + 8], esi
mov dword [esp + 0xc], edi
imul ecx, edx, 0x989680
mul ebx
add edx, ecx
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.004045c0
mov ebx, dword [ebp - 0x34]
mov esi, eax
mov edi, edx
sub eax, dword [ebp - 0x38]
sbb edx, dword [ebp - 0x34]
mov dword [ebp - 0x40], eax
mov eax, 0xf4240
mov dword [ebp - 0x3c], edx
mul dword [ebp - 0x40]
imul ecx, dword [ebp - 0x3c], 0xf4240
mov dword [ebp - 0x3c], edx
mov edx, ebx
add dword [ebp - 0x3c], ecx
mov dword [ebp - 0x40], eax
mov eax, edi
mov ecx, dword [ebp - 0x38]
cmp esi, ecx
sbb eax, ebx
mov ebx, ecx
mov ecx, edx
cmovl ebx, esi
cmovl ecx, edi
mov dword [esp + 8], ebx
mov dword [esp + 0xc], ecx
mov eax, dword [ebp - 0x40]
mov edx, dword [ebp - 0x3c]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.004045c0
mov ebx, edx
sar ebx, 0x1f
mov ecx, ebx
xor edx, ebx
xor eax, ecx
sub eax, ecx
mov ecx, 0x1f4
sbb edx, ebx
xor ebx, ebx
cmp ecx, eax
sbb ebx, edx
jge 0x40310c
sub dword [ebp - 0x28], 1
je 0x4030d6
mov eax, dword [ebp - 0x30]
test eax, eax
jne 0x402e10
rdtsc
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x3c], edx
mov ecx, eax
cpuid
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ecx
call dword [sym.imp.ntdll.dll_RtlGetSystemTimePrecise]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
rdtsc
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x44], edx
mov ecx, eax
cpuid
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ecx
mov dword [esp], 1
call dword [sym.imp.kernelbase.dll_Sleep]
sub esp, 4
rdtsc
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x4c], edx
mov ecx, eax
cpuid
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ecx
call dword [sym.imp.ntdll.dll_RtlGetSystemTimePrecise]
mov esi, eax
mov edi, edx
rdtsc
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x54], edx
mov ecx, eax
cpuid
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ecx
jmp 0x402e66
mov dword [esp + 4], esi
mov dword [esp], 0x40b550
call dword [sym.imp.ucrtbase.dll_strcmp]
test eax, eax
je 0x402d94
mov dword [esp], ebx
call dword [sym.imp.kernelbase.dll_CloseHandle]
push ecx
test byte [0x409090], 4
jne 0x4030ad
xor edx, edx
xor ecx, ecx
lea esp, [ebp - 0xc]
mov eax, edx
mov edx, ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret
test byte [0x409090], 4
je 0x403009
mov dword [esp + 0xc], str.Failed_to_compute_TSC_frequency__RDTSC_instruction_not_supported._n
mov dword [esp + 8], str.read_tsc_frequency
mov dword [esp + 4], 0x409090
mov dword [esp], 2
call fcn.004027a0
jmp 0x403009
test byte [0x409090], 4
je 0x403009
mov dword [esp + 0xc], str.Failed_to_compute_TSC_frequency__no_invariant_TSC._n
mov dword [esp + 8], str.read_tsc_frequency
mov dword [esp + 4], 0x409090
mov dword [esp], 2
call fcn.004027a0
jmp 0x403009
test byte [0x409090], 4
je 0x403009
mov dword [esp + 0xc], str.Failed_to_compute_TSC_frequency__unable_to_check_invariant_TSC._n
mov dword [esp + 8], str.read_tsc_frequency
mov dword [esp + 4], 0x409090
mov dword [esp], 2
call fcn.004027a0
jmp 0x403009
mov dword [esp + 0xc], str.Failed_to_compute_TSC_frequency__not_trusted_by_the_kernel._n
mov dword [esp + 8], str.read_tsc_frequency
mov dword [esp + 4], 0x409090
mov dword [esp], 2
call fcn.004027a0
jmp 0x403009
test byte [0x409090], 4
je 0x403009
mov dword [esp + 0xc], str.TSC_frequency_calibration_failed__unstable_TSC__n
mov dword [esp + 8], str.read_tsc_frequency
mov dword [esp + 4], 0x409090
mov dword [esp], 2
call fcn.004027a0
jmp 0x403009
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
add eax, esi
adc edx, edi
xor ebx, ebx
mov ecx, edx
shr ecx, 0x1f
add eax, ecx
adc edx, ebx
shrd eax, edx, 1
sar edx, 1
mov ecx, edx
mov edx, eax
test byte [0x409090], 8
je 0x40300d
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ecx
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], ecx
mov dword [esp + 0xc], str.TSC_frequency_calibration_complete__found__I64u_Hz_n
mov dword [esp + 8], str.read_tsc_frequency
mov dword [esp + 4], 0x409090
mov dword [esp], 3
call fcn.004027a0
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x2c]
jmp 0x40300d