Function at 0x402d10
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 0x402dae
mov ebx, eax
lea esi, [ebp - 0x20]
lea eax, [ebp - 0x24]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 3
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [sym.imp.kernelbase.dll_ReadFile]
sub esp, 0x14
test eax, eax
jne 0x402ff0
mov dword [esp], ebx
call dword [sym.imp.kernelbase.dll_CloseHandle]
push eax
xor esi, esi
mov eax, 1
mov ecx, esi
cpuid
and dl, 0x10
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ecx
je 0x403034
mov eax, 0x80000000
mov ecx, esi
cpuid
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ecx
cmp eax, 0x80000006
jbe 0x403092
mov eax, 0x80000007
mov ecx, esi
cpuid
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ecx
and dh, 1
je 0x403063
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 0x402f66
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 eax, dword [ebp - 0x50]
mov ebx, 0x989680
sbb edi, dword [ebp - 0x34]
mov edx, dword [ebp - 0x4c]
sub eax, dword [ebp - 0x40]
sbb edx, dword [ebp - 0x3c]
mov dword [esp + 8], esi
imul ecx, edx, 0x989680
mov dword [esp + 0xc], edi
mul ebx
add edx, ecx
mov dword [esp], eax
mov dword [esp + 4], edx
call sym.___divdi3
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
imul ecx, edx, 0x989680
mov dword [esp + 0xc], edi
mul ebx
add edx, ecx
mov dword [esp], eax
mov dword [esp + 4], edx
call sym.___divdi3
mov ebx, dword [ebp - 0x34]
mov esi, eax
mov edi, edx
sub eax, dword [ebp - 0x38]
sbb edx, dword [ebp - 0x34]
mov dword [ebp - 0x3c], edx
imul ecx, dword [ebp - 0x3c], 0xf4240
mov dword [ebp - 0x40], eax
mov eax, 0xf4240
mul dword [ebp - 0x40]
mov dword [ebp - 0x3c], edx
mov edx, ebx
add dword [ebp - 0x3c], ecx
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x40], eax
mov eax, edi
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 sym.___divdi3
mov ebx, eax
mov ecx, eax
mov eax, edx
neg ebx
adc eax, 0
neg eax
cmovs ebx, ecx
cmovns edx, eax
mov eax, 0x1f4
cmp eax, ebx
mov eax, 0
sbb eax, edx
jge 0x403123
sub dword [ebp - 0x28], 1
je 0x4030ed
mov eax, dword [ebp - 0x30]
test eax, eax
jne 0x402e20
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 0x402e76
mov dword [esp + 4], esi
mov dword [esp], 0x40b540
call dword [sym.imp.ucrtbase.dll_strcmp]
test eax, eax
je 0x402da4
mov dword [esp], ebx
call dword [sym.imp.kernelbase.dll_CloseHandle]
push eax
test byte [0x40939c], 4
jne 0x4030c4
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 [0x40939c], 4
je 0x403020
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], 0x40939c
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_1
jmp 0x403020
test byte [0x40939c], 4
je 0x403020
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], 0x40939c
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_1
jmp 0x403020
test byte [0x40939c], 4
je 0x403020
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], 0x40939c
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_1
jmp 0x403020
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], 0x40939c
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_1
jmp 0x403020
test byte [0x40939c], 4
je 0x403020
mov dword [esp + 0xc], str.TSC_frequency_calibration_failed__unstable_TSC__n
mov dword [esp + 8], str.read_tsc_frequency
mov dword [esp + 4], 0x40939c
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_1
jmp 0x403020
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 [0x40939c], 8
je 0x403024
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], 0x40939c
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x2c]
jmp 0x403024