Function at 0x40f420
Capabilities:
Check for debugger via api
Enumerate processes via ntquerysysteminformation
Get system information on windows
Suspend thread

Disassembly:
sub esp, 0x1c
mov eax, dword [0x4462c4]
push ebx
push ebp
push esi
or esi, 0xffffffff
mov dword [esp + 0xc], eax
cmp byte [0x430f38], 0
mov ebx, 0x408
je 0x40f445
mov ebx, 0x448
test eax, eax
jne 0x40f44c
or ebx, 0x30
cmp byte [0x430f3a], 0
je 0x40f464
cmp byte [0x4462c1], 0
jne 0x40f464
or ebx, 0x800
mov ebp, dword [esp + 0x2c]
push edi
push ebp
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
lea eax, [edi + 1]
cmp eax, 1
jbe 0x40f4c1
cmp dword [esp + 0x10], 1
jne 0x40f4c1
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CheckRemoteDebuggerPresent]
test eax, eax
je 0x40f4c1
cmp dword [esp + 0x14], 0
je 0x40f4c1
push edi
mov dword [esp + 0x14], 0
or ebx, 0x30
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
lea eax, [edi + 1]
cmp eax, 1
ja 0x40f4d1
or ebx, 0xffffffff
jmp 0x40f7f7
cmp byte [0x4462c1], 0
je 0x40f6e0
xor ebx, ebx
mov ebp, 0x100000
mov dword [esp + 0x18], ebx
cmp dword [0x4467d4], ebx
je 0x40f605
mov dword [esp + 0x14], ebp
test ebx, ebx
je 0x40f50b
push 0x8000
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 4
push 0x1000
push ebp
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
test ebx, ebx
je 0x40f6d6
mov ebp, dword [0x4471e0]
mov ecx, ebp
or ecx, dword [0x4471e4]
jne 0x40f562
push 0x41697c
call fcn.004154a0
push edx
push eax
call fcn.00412340
mov ebp, eax
add esp, 0xc
mov eax, edx
mov dword [0x4471e0], ebp
mov ecx, ebp
mov dword [0x4471e4], eax
or ecx, eax
je 0x40f6d6
lea eax, [esp + 0x18]
cdq
push edx
push eax
push 0
push dword [esp + 0x20]
mov eax, ebx
cdq
push edx
push eax
push 0
push 0x39
push 4
push dword [0x4471e4]
push ebp
call fcn.00414f50
add esp, 0x2c
test eax, eax
je 0x40f5a3
cmp eax, 0xc0000004
jne 0x40f6d6
mov ebp, dword [esp + 0x14]
add ebp, ebp
jmp 0x40f4f5
mov edx, dword [esp + 0x30]
mov eax, ebx
cmp dword [ebx + 0x50], edx
je 0x40f5c1
mov edi, edi
mov ecx, dword [eax]
test ecx, ecx
je 0x40f6a7
add eax, ecx
cmp dword [eax + 0x50], edx
jne 0x40f5b0
mov esi, dword [eax + 4]
lea ecx, [eax + 0x100]
mov edx, esi
neg edx
sbb edx, edx
and edx, ecx
test esi, esi
je 0x40f5f5
mov eax, dword [ecx + 0x14]
cmp eax, dword [edx + 0x14]
jg 0x40f5ea
jl 0x40f5e8
mov eax, dword [ecx + 0x10]
cmp eax, dword [edx + 0x10]
jae 0x40f5ea
mov edx, ecx
add ecx, 0x88
sub esi, 1
jne 0x40f5d6
test edx, edx
je 0x40f6a7
mov esi, dword [edx + 0x30]
jmp 0x40f6a9
test ebx, ebx
je 0x40f617
push 0x8000
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 4
push 0x1000
push ebp
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
test ebx, ebx
je 0x40f6d6
lea eax, [esp + 0x18]
push eax
push ebp
push ebx
push 5
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
test eax, eax
je 0x40f653
cmp eax, 0xc0000004
jne 0x40f6d6
add ebp, ebp
jmp 0x40f605
mov edx, dword [esp + 0x30]
mov eax, ebx
cmp dword [ebx + 0x44], edx
je 0x40f66d
mov edi, edi
mov ecx, dword [eax]
test ecx, ecx
je 0x40f6a7
add eax, ecx
cmp dword [eax + 0x44], edx
jne 0x40f660
mov esi, dword [eax + 4]
lea ecx, [eax + 0xb8]
mov edx, esi
neg edx
sbb edx, edx
and edx, ecx
test esi, esi
je 0x40f69e
mov eax, dword [ecx + 0x14]
cmp eax, dword [edx + 0x14]
jg 0x40f696
jl 0x40f694
mov eax, dword [ecx + 0x10]
cmp eax, dword [edx + 0x10]
jae 0x40f696
mov edx, ecx
add ecx, 0x58
sub esi, 1
jne 0x40f682
test edx, edx
je 0x40f6a7
mov esi, dword [edx + 0x24]
jmp 0x40f6a9
xor esi, esi
push 0x8000
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push esi
push 0
push 0x42
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov esi, eax
lea eax, [esi + 1]
cmp eax, 1
ja 0x40f6e0
mov ebx, 0xfffffffd
jmp 0x40f7f7
mov ebx, 0xfffffffe
jmp 0x40f7f7
cmp byte [0x430f3a], 0
je 0x40f72a
push dword [esp + 0x38]
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x20]
push dword [esp + 0x38]
mov dword [esp + 0x30], 0
push esi
push edi
mov dword [esp + 0x34], eax
call fcn.0040fa30
lea eax, [esp + 0x1c]
push eax
call fcn.00414500
mov eax, dword [esp + 0x28]
test eax, eax
je 0x40f7f5
add eax, 0xfffffff8
jmp 0x40f7e5
lea eax, [esi + 1]
cmp eax, 1
jbe 0x40f749
push 0
push esi
call dword [sym.imp.ntdll.dll_NtSuspendThread]
test eax, eax
je 0x40f75e
mov ebx, 0xfffffffb
jmp 0x40f7f7
push edi
call dword [sym.imp.ntdll.dll_NtSuspendProcess]
test eax, eax
je 0x40f75e
mov ebx, 0xfffffffc
jmp 0x40f7f7
push dword [esp + 0x38]
mov eax, dword [esp + 0x14]
mov ecx, esi
push dword [esp + 0x38]
mov dword [esp + 0x2c], eax
or esi, 0xffffffff
mov eax, edi
mov dword [esp + 0x30], 0
push ecx
push eax
lea ecx, [esp + 0x2c]
or edi, esi
call fcn.0040fa30
mov ebp, dword [0x4467e4]
push ebp
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp + 0x1c]
cmp ecx, dword [ebp + 0x20]
jae 0x40f7c7
mov eax, dword [esp + 0x1c]
shl ecx, 4
add ecx, dword [ebp + 0x18]
mov dword [ecx], eax
mov eax, dword [esp + 0x20]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x24]
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x28]
mov dword [ecx + 0xc], eax
inc dword [ebp + 0x1c]
xor ebx, ebx
jmp 0x40f7cb
mov ebx, dword [esp + 0x28]
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [0x4467e8]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test ebx, ebx
je 0x40f7f5
lea eax, [ebx - 8]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor ebx, ebx
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [edi + 1]
cmp eax, 1
jbe 0x40f808
push edi
call ebp
lea ecx, [esi + 1]
pop edi
cmp ecx, 1
jbe 0x40f814
push esi
call ebp
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x1c
ret 0xc