Function at 0x4037e0
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, 0x8c
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 0x403881
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 0x403aef
mov dword [esp], ebx
call dword [sym.imp.kernelbase.dll_CloseHandle]
push ecx
xor esi, esi
mov eax, 1
mov ecx, esi
cpuid
and dl, 0x10
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ecx
je 0x403b2f
mov eax, 0x80000000
mov ecx, esi
cpuid
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ecx
cmp eax, 0x80000006
jbe 0x403b75
mov eax, 0x80000007
mov ecx, esi
cpuid
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ecx
and dh, 1
je 0x403b62
mov eax, 0x80000001
mov ecx, esi
mov dword [ebp - 0x6c], 0x32
cpuid
and edx, 0x8000000
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x30], edx
jmp 0x403a65
rdtscp
mov dword [ebp - 0x24], ecx
mov esi, eax
mov edi, edx
call dword [sym.imp.ntdll.dll_RtlGetSystemTimePrecise]
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], edx
rdtscp
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
mov dword [esp], 1
call dword [sym.imp.kernelbase.dll_Sleep]
sub esp, 4
rdtscp
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], edx
call dword [sym.imp.ntdll.dll_RtlGetSystemTimePrecise]
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], edx
rdtscp
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x44]
sub eax, esi
mov esi, dword [ebp - 0x68]
sbb edx, edi
sub esi, dword [ebp - 0x60]
mov edi, dword [ebp - 0x64]
mov dword [ebp - 0x50], eax
sbb edi, dword [ebp - 0x5c]
mov dword [ebp - 0x4c], edx
mov eax, 0x989680
imul ecx, dword [ebp - 0x4c], 0x989680
mov dword [esp + 8], esi
mul dword [ebp - 0x50]
mov dword [esp + 0xc], edi
add edx, ecx
mov dword [esp], eax
mov dword [esp + 4], edx
call sym.___divdi3
mov ecx, dword [ebp - 0x58]
mov ebx, dword [ebp - 0x54]
mov dword [esp + 8], esi
sub ecx, dword [ebp - 0x38]
sbb ebx, dword [ebp - 0x34]
mov dword [ebp - 0x48], eax
mov eax, 0x989680
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x54], ebx
imul ecx, dword [ebp - 0x54], 0x989680
mov dword [ebp - 0x44], edx
mul dword [ebp - 0x58]
mov dword [esp + 0xc], edi
add edx, ecx
mov dword [esp], eax
mov dword [esp + 4], edx
call sym.___divdi3
mov esi, eax
mov edi, edx
sub esi, dword [ebp - 0x48]
sbb edi, dword [ebp - 0x44]
mov dword [ebp - 0x38], eax
imul ecx, edi, 0xf4240
mov eax, esi
mov edi, 0xf4240
mov dword [ebp - 0x34], edx
mov esi, dword [ebp - 0x48]
mul edi
mov edi, dword [ebp - 0x44]
mov ebx, esi
mov esi, dword [ebp - 0x38]
add edx, ecx
mov ecx, edi
mov edi, dword [ebp - 0x34]
cmp esi, ebx
mov esi, dword [ebp - 0x38]
sbb edi, ecx
mov edi, dword [ebp - 0x34]
mov dword [esp], eax
cmovl ebx, esi
mov dword [esp + 4], edx
cmovl ecx, edi
mov dword [esp + 8], ebx
mov dword [esp + 0xc], ecx
call sym.___divdi3
mov edi, edx
sar edi, 0x1f
mov dword [ebp - 0x40], edi
mov esi, dword [ebp - 0x40]
mov dword [ebp - 0x3c], edi
mov edi, dword [ebp - 0x3c]
xor eax, esi
xor edx, edi
mov dword [ebp - 0x2c], eax
mov eax, 0x1f4
sub dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], edx
mov edx, dword [ebp - 0x2c]
sbb dword [ebp - 0x28], edi
mov ecx, dword [ebp - 0x28]
cmp eax, edx
mov eax, 0
sbb eax, ecx
jge 0x403b92
dec dword [ebp - 0x6c]
je 0x403c01
mov edx, dword [ebp - 0x30]
test edx, edx
jne 0x4038f8
rdtsc
mov esi, eax
mov eax, dword [ebp - 0x30]
mov edi, 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 - 0x60], eax
mov dword [ebp - 0x5c], edx
rdtsc
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x34], edx
mov dword [esp], 1
mov ecx, eax
cpuid
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ecx
call dword [sym.imp.kernelbase.dll_Sleep]
sub esp, 4
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
call dword [sym.imp.ntdll.dll_RtlGetSystemTimePrecise]
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], 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 0x40394e
mov dword [esp + 4], esi
mov dword [esp], 0x40b4a4
call dword [sym.imp.ucrtbase.dll_strcmp]
mov dword [esp], ebx
test eax, eax
je 0x40387a
call dword [sym.imp.kernelbase.dll_CloseHandle]
push ebx
test byte [0x40a160], 4
jne 0x403b88
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 [0x40a160], 4
je 0x403b1b
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], 0x40a160
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_1
xor edx, edx
xor ecx, ecx
jmp 0x403b1f
test byte [0x40a160], 4
je 0x403b1b
mov dword [esp + 0xc], str.Failed_to_compute_TSC_frequency__no_invariant_TSC._n
jmp 0x403b40
test byte [0x40a160], 4
je 0x403b1b
mov dword [esp + 0xc], str.Failed_to_compute_TSC_frequency__unable_to_check_invariant_TSC._n
jmp 0x403b40
mov dword [esp + 0xc], str.Failed_to_compute_TSC_frequency__not_trusted_by_the_kernel._n
jmp 0x403b40
mov esi, dword [ebp - 0x38]
mov eax, dword [ebp - 0x48]
mov edi, dword [ebp - 0x34]
mov edx, dword [ebp - 0x44]
add eax, esi
adc edx, edi
xor edi, edi
mov esi, edx
shr esi, 0x1f
add esi, eax
adc edi, edx
shrd esi, edi, 1
sar edi, 1
mov edx, esi
mov ecx, edi
test byte [0x40a160], 8
je 0x403b1f
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], 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], 0x40a160
mov dword [esp], 3
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x28], ecx
call sym._wine_dbg_log.constprop.0_1
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x28]
jmp 0x403b1f
mov esi, dword [ebp - 0x38]
mov edi, dword [ebp - 0x34]
test byte [0x40a160], 1
je 0x403b1b
mov dword [esp + 0xc], str.TSC_frequency_calibration_failed__unstable_TSC_
mov dword [esp + 8], str.read_tsc_frequency
mov dword [esp + 4], 0x40a160
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_1
test byte [0x40a160], 1
je 0x403b1b
mov edx, dword [ebp - 0x64]
mov eax, dword [ebp - 0x68]
mov ebx, 0x64
mov dword [esp + 0xc], str.time0__I64u_ns__time1__I64u_ns_n
mov dword [esp + 8], str.read_tsc_frequency
imul ecx, edx, 0x64
mov dword [esp + 4], 0x40a160
mul ebx
mov dword [esp], 0
add edx, ecx
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x60]
mov dword [esp + 0x1c], edx
mov edx, dword [ebp - 0x5c]
imul ecx, edx, 0x64
mul ebx
add edx, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
call sym._wine_dbg_log.constprop.0_1
test byte [0x40a160], 1
je 0x403b1b
mov eax, dword [ebp - 0x58]
mov edx, dword [ebp - 0x54]
mov dword [esp + 0xc], str.tsc2___tsc0__I64u__tsc3___tsc1__I64u_n
mov dword [esp + 8], str.read_tsc_frequency
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x50]
mov dword [esp + 0x1c], edx
mov edx, dword [ebp - 0x4c]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
mov dword [esp + 4], 0x40a160
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_1
test byte [0x40a160], 1
je 0x403b1b
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x28]
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], eax
mov eax, dword [ebp - 0x48]
mov dword [esp + 0x24], edx
mov edx, dword [ebp - 0x44]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], str.freq0__I64u_Hz__freq2__I64u_Hz__error__I64u_ppm_n
mov dword [esp + 8], str.read_tsc_frequency
mov dword [esp + 4], 0x40a160
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_1
xor edx, edx
xor ecx, ecx
jmp 0x403b1f