Function at 0x407080
Capabilities:
Check for peb ntglobalflag flag
Check os version
Get number of processors
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x41af9c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x9c
mov al, byte [esp + 0x13]
push ebx
push ebp
push esi
push edi
push 0
lea ecx, [esp + 0x14]
mov byte [esp + 0x14], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, 0x20
mov edi, 0x6f
mov dword [esp + 0x4c], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x68], eax
mov eax, 0x77
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov ebx, 0x43
mov esi, 0x70
mov ecx, 0x79
mov edx, 0x72
mov eax, 0x2e
mov dword [esp + 0x2c], edi
mov dword [esp + 0xa0], edi
mov dword [esp + 0xb4], 0
mov dword [esp + 0x28], ebx
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], 0x69
mov dword [esp + 0x40], 0x67
mov dword [esp + 0x44], 0x68
mov dword [esp + 0x48], 0x74
mov dword [esp + 0x50], 0x28
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], 0x29
mov dword [esp + 0x60], 0x62
mov dword [esp + 0x64], ecx
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], 0x76
mov dword [esp + 0x80], 0x65
mov dword [esp + 0x84], edx
mov dword [esp + 0x88], ecx
mov dword [esp + 0x8c], esi
mov dword [esp + 0x90], 0x64
mov dword [esp + 0x94], 0x66
mov dword [esp + 0x98], eax
mov dword [esp + 0x9c], 0x63
mov dword [esp + 0xa4], 0x6d
mov dword [esp + 0xa8], eax
lea edi, [esp + 0x28]
mov ebp, 0x21
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov bl, byte [edi]
mov edx, dword [ecx]
mov ecx, dword [esp + 0x18]
sub edx, ecx
cmp edx, 1
ja 0x4071e3
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov eax, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x14]
lea esi, [eax + 1]
push esi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x407217
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
movsx ecx, bl
add eax, edx
mov ch, cl
push esi
mov byte [eax], cl
lea ecx, [esp + 0x14]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
add edi, 4
dec ebp
jne 0x4071c8
call dword [sym.imp.MSVCRT.dll__tzset]
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.MSVCRT.dll_time]
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.MSVCRT.dll_localtime]
mov ecx, dword [eax + 0x14]
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 0xc]
add esp, 8
add ecx, 0x76c
inc edx
pop edi
pop esi
pop ebp
cmp ecx, 0x7d1
pop ebx
jne 0x407265
cmp edx, 1
jne 0x40730c
cmp eax, edx
jmp 0x4072cf
cmp ecx, 0x7d2
jne 0x40727b
cmp edx, 5
jne 0x40730c
cmp eax, 1
jmp 0x4072cf
cmp ecx, 0x7d4
jne 0x407291
cmp edx, 0xc
jne 0x40730c
cmp eax, 1
jmp 0x4072cf
cmp ecx, 0x7d5
jne 0x4072ad
cmp edx, 3
jne 0x4072a3
cmp eax, 1
jmp 0x4072cf
cmp edx, 0xa
jne 0x40730c
cmp eax, 1
jmp 0x4072cf
cmp ecx, 0x7ce
jne 0x4072bf
cmp edx, 8
jne 0x40730c
cmp eax, 1
jmp 0x4072cf
cmp ecx, 0x7cf
jne 0x4072db
cmp edx, 7
jne 0x40730c
cmp eax, 0x13
jne 0x40730c
mov eax, dword [esp + 4]
test eax, eax
jne 0x4072fa
jmp 0x4072f5
cmp ecx, 0x7d0
jne 0x40730c
cmp edx, 1
jne 0x40730c
cmp eax, 0xd
jne 0x40730c
mov eax, dword [esp + 4]
test eax, eax
jne 0x4072fa
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push 0x40
push 0
push eax
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [esp + 4]
test ecx, ecx
je 0x407343
mov al, byte [ecx - 1]
test al, al
je 0x407339
cmp al, 0xff
je 0x407339
dec al
mov byte [ecx - 1], al
mov ecx, dword [esp + 0x9c]
mov dword fs:[0], ecx
add esp, 0xa8
ret
dec ecx
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ecx, dword [esp + 0x9c]
mov dword fs:[0], ecx
add esp, 0xa8
ret