Function at 0x4018b0
Capabilities:
Check for debugger via api
Check for outputdebugstring error
Check for peb beingdebugged flag
Check for time delay via queryperformancecounter
Delete file
Execute anti-debugging instructions
Print debug messages

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 0x4079fa
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x310
mov eax, dword [0x40e040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x308], 0
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
jne 0x401efb
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call esi
lea ecx, [ebp - 0x124]
mov dword [ebp - 0x124], 0
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CheckRemoteDebuggerPresent]
test eax, eax
je 0x401939
cmp dword [ebp - 0x124], 0
setne al
jmp 0x40193b
xor al, al
test al, al
jne 0x401efb
mov dword [ebp - 0x30c], 0
xor eax, eax
mov eax, dword fs:[0x30]
movzx eax, byte [eax + 2]
mov dword [ebp - 0x30c], eax
cmp dword [ebp - 0x30c], 0
jne 0x401efb
call fcn.00403010
test al, al
jne 0x401efb
push str.Ntdll.dll
mov dword [ebp - 0x2dc], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
test edi, edi
je 0x4019b5
push str.NtQueryInformationProcess
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x308], eax
test eax, eax
jne 0x401a42
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor al, al
test al, al
jne 0x401efb
call fcn.00401f30
test al, al
jne 0x401efb
call fcn.00402490
test al, al
jne 0x401efb
call fcn.00402ab0
test al, al
jne 0x401efb
mov esi, dword [sym.imp.KERNEL32.dll_HeapWalk]
xorps xmm0, xmm0
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
movups xmmword [ebp - 0x300], xmm0
mov dword [ebp - 0x2e8], 0
movq qword [ebp - 0x2f0], xmm0
nop
lea eax, [ebp - 0x300]
push eax
call edi
push eax
call esi
test eax, eax
je 0x401a7d
cmp word [ebp - 0x2f6], 4
jne 0x401a10
mov eax, dword [ebp - 0x2fc]
mov ecx, dword [ebp - 0x300]
cmp dword [eax + ecx], 0xabababab
sete al
jmp 0x401a7f
push 0
push 4
lea eax, [ebp - 0x2dc]
push eax
push 0x1e
call esi
push eax
call dword [ebp - 0x308]
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test esi, esi
js 0x4019b5
cmp dword [ebp - 0x2dc], 0
je 0x4019b5
mov al, 1
jmp 0x4019b7
xor al, al
test al, al
jne 0x401efb
push 4
push 0x3000
push 0x1000
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
mov dword [ebp - 0x2e4], esi
test esi, esi
jne 0x401aab
xor al, al
jmp 0x401af0
push 8
lea eax, [ebp - 0x2e4]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_K32QueryWorkingSetEx]
test eax, eax
je 0x401ad5
test byte [ebp - 0x2e0], 1
mov byte [ebp - 0x301], 1
jne 0x401adc
mov byte [ebp - 0x301], 0
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov al, byte [ebp - 0x301]
test al, al
jne 0x401efb
push 0x1000
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
jne 0x401efb
call fcn.00402ee0
test al, al
jne 0x401efb
call fcn.00402f70
test al, al
jne 0x401efb
push 0xaa289
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str._s_s_s_s_s_s_s_s_s_s
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xaa289
jne 0x401efb
push 0x104
lea eax, [ebp - 0x120]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x401b68
mov al, 1
jmp 0x401b9a
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, eax
cmp ecx, 0xffffffff
sete al
je 0x401b9a
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
test al, al
jne 0x401efb
push 0xb0
lea eax, [ebp - 0x2d8]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push str.dummyfile
lea ecx, [ebp - 0x2d8]
call fcn.004050c0
mov dword [ebp - 4], 0x4b
cmp dword [ebp - 0x288], 0
je 0x401d7d
lea ecx, [ebp - 0x2d4]
call fcn.00405780
test eax, eax
jne 0x401c00
push eax
mov eax, dword [ebp - 0x2d8]
lea ecx, [ebp - 0x2d8]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
push 0xb8
lea eax, [ebp - 0x208]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x208], 0x40a228
lea ecx, [ebp - 0x198]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::constructor_void_]
push 0
push 0
lea eax, [ebp - 0x1f8]
mov byte [ebp - 4], 0x4c
push eax
lea ecx, [ebp - 0x208]
mov dword [ebp - 0x308], 0x8000
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_istream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char_____bool_]
mov dword [ebp - 4], 0x4d
mov eax, dword [ebp - 0x208]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ifstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x208]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x20c], eax
lea ecx, [ebp - 0x1f8]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void_]
lea ecx, [ebp - 0x1f8]
mov dword [ebp - method.std::basic_filebuf_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [ebp - 0x1b0], 0
mov byte [ebp - 0x1bb], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x40e6a4]
mov ecx, dword [0x40e6a8]
mov dword [ebp - 0x1ac], 0
mov dword [ebp - 0x1b8], eax
mov dword [ebp - 0x1b4], ecx
mov dword [ebp - 0x1c0], 0
push ecx
push 1
push str.dummyfile
lea ecx, [ebp - 0x1f8]
mov byte [ebp - 4], 0x4e
call fcn.00405810
test eax, eax
jne 0x401d0d
push eax
mov eax, dword [ebp - 0x208]
lea ecx, [ebp - 0x208]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov byte [ebp - 4], 0x4f
cmp dword [ebp - 0x1ac], 0
je 0x401d72
lea ecx, [ebp - 0x1f8]
call fcn.00405780
test eax, eax
jne 0x401d43
push eax
mov eax, dword [ebp - 0x208]
lea ecx, [ebp - 0x208]
push 2
mov eax, dword [eax + 4]
add ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
push str.dummyfile
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
add esp, 4
lea ecx, [ebp - 0x208]
call fcn.00403a10
lea ecx, [ebp - 0x2d8]
mov dword [ebp - 4], 0xffffffff
call fcn.00403950
xor al, al
jmp 0x401d91
lea ecx, [ebp - 0x208]
call fcn.00403a10
lea ecx, [ebp - 0x2d8]
mov dword [ebp - 4], 0xffffffff
call fcn.00403950
mov al, 1
test al, al
jne 0x401efb
lea eax, [ebp - 0x140]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov esi, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea eax, [ebp - 0x138]
push eax
call esi
xor eax, eax
push eax
push ecx
pop eax
pop ecx
sub ecx, eax
shl ecx, 4
lea eax, [ebp - 0x130]
push eax
call esi
mov ecx, dword [ebp - 0x130]
sub ecx, dword [ebp - 0x138]
mov edx, dword [ebp - 0x12c]
sbb edx, dword [ebp - 0x134]
call fcn.004078d0
mulsd xmm0, qword [0x40a248]
mov edx, dword [ebp - 0x13c]
mov ecx, dword [ebp - 0x140]
movsd qword [ebp - 0x320], xmm0
call fcn.004078d0
movsd xmm1, qword [ebp - 0x320]
divsd xmm1, xmm0
comisd xmm1, xmmword [0x40a240]
seta al
test al, al
jne 0x401efb
mov esi, dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea eax, [ebp - 0x218]
push eax
call esi
xor eax, eax
push eax
push ecx
pop eax
pop ecx
sub ecx, eax
shl ecx, 4
lea eax, [ebp - 0x228]
push eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea eax, [ebp - 0x150]
push eax
lea eax, [ebp - 0x218]
push eax
call esi
test eax, eax
jne 0x401e67
xor al, al
jmp 0x401ea7
lea eax, [ebp - 0x148]
push eax
lea eax, [ebp - 0x228]
push eax
call esi
test eax, eax
jne 0x401e7f
xor al, al
jmp 0x401ea7
mov ecx, dword [ebp - 0x148]
sub ecx, dword [ebp - 0x150]
mov eax, dword [ebp - 0x144]
sbb eax, dword [ebp - 0x14c]
jne 0x401ea5
cmp ecx, 0xc350
ja 0x401ea5
xor al, al
jmp 0x401ea7
mov al, 1
test al, al
jne 0x401efb
rdtsc
mov dword [ebp - 0x314], eax
rdtsc
mov dword [ebp - 0x310], eax
mov eax, dword [ebp - 0x310]
sub eax, dword [ebp - 0x314]
cmp eax, 0xff
jae 0x401efb
mov al, byte [0x7ffe02d4]
test al, 3
jne 0x401efb
call fcn.004030a0
test al, al
jne 0x401efb
call fcn.00403120
test al, al
jne 0x401efb
call fcn.004031a0
test al, al
jne 0x401efb
call fcn.004034d0
test al, al
je 0x401efd
mov al, 1
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.00406836
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret