Function at 0x4018d0
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 0x407a2a
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 0x401f3f
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 0x401959
cmp dword [ebp - 0x124], 0
setne al
jmp 0x40195b
xor al, al
test al, al
jne 0x401f3f
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 0x401f3f
call fcn.00403040
test al, al
jne 0x401f3f
push str.Ntdll.dll
mov dword [ebp - 0x2dc], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
test edi, edi
je 0x4019d5
push str.NtQueryInformationProcess
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x308], eax
test eax, eax
jne 0x401a62
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor al, al
test al, al
jne 0x401f3f
call fcn.00401f60
test al, al
jne 0x401f3f
call fcn.004024c0
test al, al
jne 0x401f3f
call fcn.00402ae0
test al, al
jne 0x401f3f
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 0x401a9d
cmp word [ebp - 0x2f6], 4
jne 0x401a30
mov eax, dword [ebp - 0x2fc]
mov ecx, dword [ebp - 0x300]
cmp dword [eax + ecx], 0xabababab
sete al
jmp 0x401a9f
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 0x4019d5
cmp dword [ebp - 0x2dc], 0
je 0x4019d5
mov al, 1
jmp 0x4019d7
xor al, al
test al, al
jne 0x401f3f
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 0x401acb
xor al, al
jmp 0x401b10
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 0x401af5
test byte [ebp - 0x2e0], 1
mov byte [ebp - 0x301], 1
jne 0x401afc
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 0x401f3f
push 0x1000
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
jne 0x401f3f
call fcn.00402f10
test al, al
jne 0x401f3f
call fcn.00402fa0
test al, al
jne 0x401f3f
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 0x401f3f
push 0x104
lea eax, [ebp - 0x120]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x401b88
mov al, 1
jmp 0x401bba
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 0x401bba
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
test al, al
jne 0x401f3f
push 0xb0
lea eax, [ebp - 0x2d8]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push str.dummyfile
lea ecx, [ebp - 0x2d8]
call fcn.004050f0
mov dword [ebp - 4], 0x4b
cmp dword [ebp - 0x288], 0
je 0x401d9d
lea ecx, [ebp - 0x2d4]
call fcn.00405820
test eax, eax
jne 0x401c20
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.004058b0
test eax, eax
jne 0x401d2d
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 0x401d92
lea ecx, [ebp - 0x1f8]
call fcn.00405820
test eax, eax
jne 0x401d63
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.00403a40
lea ecx, [ebp - 0x2d8]
mov dword [ebp - 4], 0xffffffff
call fcn.00403980
xor al, al
jmp 0x401db1
lea ecx, [ebp - 0x208]
call fcn.00403a40
lea ecx, [ebp - 0x2d8]
mov dword [ebp - 4], 0xffffffff
call fcn.00403980
mov al, 1
test al, al
jne 0x401f3f
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.00407900
mulsd xmm0, qword [0x40a248]
mov edx, dword [ebp - 0x13c]
mov ecx, dword [ebp - 0x140]
movsd qword [ebp - 0x318], xmm0
call fcn.00407900
movsd xmm1, qword [ebp - 0x318]
sub esp, 8
divsd xmm1, xmm0
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
movsd qword [ebp - 0x318], xmm1
movsd qword [esp], xmm1
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___double_]
movsd xmm0, qword [ebp - 0x318]
comisd xmm0, xmmword [0x40a240]
seta al
test al, al
jne 0x401f3f
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 0x401eab
xor al, al
jmp 0x401eeb
lea eax, [ebp - 0x148]
push eax
lea eax, [ebp - 0x228]
push eax
call esi
test eax, eax
jne 0x401ec3
xor al, al
jmp 0x401eeb
mov ecx, dword [ebp - 0x148]
sub ecx, dword [ebp - 0x150]
mov eax, dword [ebp - 0x144]
sbb eax, dword [ebp - 0x14c]
jne 0x401ee9
cmp ecx, 0xc350
ja 0x401ee9
xor al, al
jmp 0x401eeb
mov al, 1
test al, al
jne 0x401f3f
rdtsc
mov dword [ebp - 0x320], eax
rdtsc
mov dword [ebp - 0x31c], eax
mov eax, dword [ebp - 0x31c]
sub eax, dword [ebp - 0x320]
cmp eax, 0xff
jae 0x401f3f
mov al, byte [0x7ffe02d4]
test al, 3
jne 0x401f3f
call fcn.004030d0
test al, al
jne 0x401f3f
call fcn.00403150
test al, al
jne 0x401f3f
call fcn.004031d0
test al, al
jne 0x401f3f
call fcn.00403500
test al, al
je 0x401f41
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.00406866
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret