Function at 0x40cf80
Capabilities:
Check for peb beingdebugged flag
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x41020a
mov eax, dword fs:[0]
push eax
sub esp, 0x148
mov eax, dword [0x43ce6c]
xor eax, esp
mov dword [esp + 0x144], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x43ce6c]
xor eax, esp
push eax
lea eax, [esp + 0x15c]
mov dword fs:[0], eax
mov esi, dword [esp + 0x16c]
xor ebx, ebx
mov ebp, 2
lea ecx, [esp + 0x1c]
mov dword [esp + 0x50], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x4c], 1
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x40], ebx
mov byte [esp + 0x1b], bl
mov byte [esp + 0x1a], bl
mov byte [esp + 0x25], bl
mov byte [esp + 0x23], bl
mov byte [esp + 0x27], bl
mov byte [esp + 0x24], bl
mov byte [esp + 0x22], bl
mov byte [esp + 0x26], bl
mov dword [esp + 0x14], ebp
call dword [sym.imp.mfc90.dll_Ordinal_316]
mov edi, dword [sym.imp.foundation.dll_public:_unsigned_short_int___thiscall_AGS_Input_File::get_16_bit_unsigned_void_]
mov ecx, esi
mov dword [esp + 0x164], ebx
call edi
add dword [esp + 0x14], ebp
movzx eax, ax
mov ecx, esi
mov dword [esp + 0x30], eax
call edi
add dword [esp + 0x14], 2
movzx ebp, ax
mov ecx, esi
mov dword [esp + 0x54], ebp
call edi
add dword [esp + 0x14], 2
push 0x64
call sub.mfc90.dll_Ordinal_798
add esp, 4
mov dword [esp + 0x2c], eax
mov byte [esp + 0x164], 1
test eax, eax
je 0x40d07b
push ebp
mov ecx, eax
call dword [sym.imp.ags_widgets.dll_public:_void___thiscall_AGS_SDL_Symbol::constructor_int_]
mov ebp, eax
mov dword [esp + 0x2c], ebp
jmp 0x40d087
mov dword [esp + 0x2c], 0
mov ebp, dword [esp + 0x2c]
mov byte [esp + 0x164], 0
test ebp, ebp
jne 0x40d0e0
push 0xef19
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90.dll_Ordinal_4431]
push ebp
push 0x10
lea ecx, [esp + 0x24]
call dword [sym.imp.mfc90.dll_Ordinal_910]
push eax
call sub.mfc90.dll_Ordinal_1183
lea ecx, [esp + 0x1c]
push str.Creation_of_AGS_SDL_Symbol_object_failed_n
push ecx
call dword [sym.imp.mfc90.dll_Ordinal_2539]
add esp, 8
lea ecx, [esp + 0x1c]
call dword [sym.imp.mfc90.dll_Ordinal_910]
push eax
push ebp
push ebp
call dword [sym.imp.foundation.dll_void___cdecl_ags_log_message_enum_AGS_Error_Level__unsigned_short_int__char_const__]
add esp, 0xc
mov edi, edi
mov ecx, esi
call edi
add dword [esp + 0x14], 2
movzx eax, ax
lea ecx, [eax - 0x9000]
cmp ecx, 0x60
ja case.0x40d102.36865
movzx edx, byte [ecx + 0x40d52c]
jmp dword [edx*4 + 0x40d50c]
mov ecx, esi
call edi
add dword [esp + 0x14], 2
mov eax, dword [ebp]
mov edx, dword [eax + 8]
mov ecx, ebp
call edx
jmp 0x40d35d
mov ecx, esi
call edi
add dword [esp + 0x14], 2
mov eax, dword [ebp]
mov edx, dword [eax + 0xc]
mov ecx, ebp
call edx
jmp 0x40d35d
mov ecx, esi
mov byte [esp + 0x27], 1
call edi
movzx eax, ax
shr eax, 8
add dword [esp + 0x14], 2
mov dword [esp + 0x50], eax
jmp 0x40d35d
mov ecx, esi
mov byte [esp + 0x24], 1
call edi
add dword [esp + 0x14], 2
movzx eax, ax
mov dword [esp + 0x3c], eax
jmp 0x40d35d
mov ecx, esi
mov byte [esp + 0x22], 1
call edi
movzx eax, ax
shr eax, 8
add dword [esp + 0x14], 2
mov dword [esp + 0x44], eax
jmp 0x40d35d
mov ecx, esi
mov byte [esp + 0x26], 1
call edi
mov ecx, 0xff00
and ax, cx
xor edx, edx
sub dx, ax
movzx eax, dx
neg eax
sbb eax, eax
and eax, 2
add dword [esp + 0x14], 2
mov dword [esp + 0x4c], eax
jmp 0x40d35d
mov ecx, esi
call edi
cmp byte [esp + 0x1b], 0
mov ecx, esi
jne 0x40d1ef
mov ebp, dword [sym.imp.foundation.dll_public:_unsigned_int___thiscall_AGS_Input_File::get_32_bit_unsigned_void_]
call ebp
mov ecx, esi
mov dword [esp + 0x38], eax
call ebp
mov ebp, dword [esp + 0x2c]
add dword [esp + 0x14], 0xa
mov dword [esp + 0x34], eax
mov byte [esp + 0x1b], 1
jmp 0x40d35d
cmp byte [esp + 0x1a], 0
jne 0x40d21d
mov ebp, dword [sym.imp.foundation.dll_public:_unsigned_int___thiscall_AGS_Input_File::get_32_bit_unsigned_void_]
call ebp
mov ecx, esi
mov dword [esp + 0x48], eax
call ebp
mov ebp, dword [esp + 0x2c]
add dword [esp + 0x14], 0xa
mov dword [esp + 0x40], eax
mov byte [esp + 0x1a], 1
jmp 0x40d35d
call dword [sym.imp.foundation.dll_public:_unsigned_int___thiscall_AGS_Input_File::get_32_bit_unsigned_void_]
mov ecx, esi
call dword [sym.imp.foundation.dll_public:_unsigned_int___thiscall_AGS_Input_File::get_32_bit_unsigned_void_]
add dword [esp + 0x14], 0xa
jmp 0x40d35d
add eax, 0xffff6f90
cmp eax, 0xa0
ja case.0x40d24c.36977
movzx eax, byte [eax + 0x40d5c0]
jmp dword [eax*4 + 0x40d590]
mov dword [esp + 0x28], 0xa100
jmp 0x40d33f
mov dword [esp + 0x28], 0xa0f0
jmp 0x40d33f
mov dword [esp + 0x28], 0xa110
jmp 0x40d33f
mov dword [esp + 0x28], 0xa120
jmp 0x40d33f
mov dword [esp + 0x28], 0xa130
jmp 0x40d33f
mov dword [esp + 0x28], 0xa803
jmp 0x40d33f
mov dword [esp + 0x28], 0xa140
jmp 0x40d33f
mov dword [esp + 0x28], 0xa150
jmp 0x40d33f
mov dword [esp + 0x28], 0xa804
jmp 0x40d33f
mov dword [esp + 0x28], 0xa805
jmp 0x40d33f
mov dword [esp + 0x28], 0xa806
jmp 0x40d33f
push 0xef19
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90.dll_Ordinal_4431]
push 0
push 0x10
lea ecx, [esp + 0x24]
call dword [sym.imp.mfc90.dll_Ordinal_910]
push eax
call sub.mfc90.dll_Ordinal_1183
mov ebx, dword [sym.imp.foundation.dll_public:_int___thiscall_AGS_Input_File::file_position_void_const]
mov ebp, dword [esi + 4]
mov ecx, esi
call ebx
push eax
mov ecx, esi
call ebx
push eax
push ebp
lea ecx, [esp + 0x28]
push str.File__s__position__d___0x_X_:_illegal_ARINC_661_symbol_definition_command_n
push ecx
call dword [sym.imp.mfc90.dll_Ordinal_2539]
add esp, 0x14
lea ecx, [esp + 0x1c]
call dword [sym.imp.mfc90.dll_Ordinal_910]
push eax
push 0
push 0
call dword [sym.imp.foundation.dll_void___cdecl_ags_log_message_enum_AGS_Error_Level__unsigned_short_int__char_const__]
mov ebp, dword [esp + 0x38]
add esp, 0xc
mov eax, dword [esp + 0x28]
push 0
lea edx, [esp + 0x18]
push edx
push esi
push 0
push 0
push 0
push eax
call dword [sym.imp.ags_widgets.dll_class_AGS_GP_Shape____cdecl_ags_create_sdl_widget_enum_A661_Widget_Type__int__class_AGS_Container___class_AGS_Layer___class_AGS_Input_File___int___unsigned_short_int_]
add esp, 0x1c
mov ebx, eax
test ebx, ebx
je 0x40d409
cmp byte [esp + 0x27], 0
je 0x40d37f
mov eax, dword [esp + 0x50]
movzx ecx, al
mov dword [ebx + 0x80], eax
mov dword [ebx + 0x90], ecx
mov al, byte [esp + 0x24]
test al, al
je 0x40d39b
mov edx, dword [esp + 0x3c]
mov dword [ebx + 0x84], edx
mov dword [ebx + 0x8c], 0
cmp byte [esp + 0x26], 0
je 0x40d3eb
test al, al
je 0x40d3af
mov eax, dword [esp + 0x4c]
mov dword [ebx + 0x7c], eax
jmp 0x40d3eb
mov ebp, dword [esi + 4]
mov ecx, esi
call dword [sym.imp.foundation.dll_public:_int___thiscall_AGS_Input_File::file_position_void_const]
push eax
mov ecx, esi
call dword [sym.imp.foundation.dll_public:_int___thiscall_AGS_Input_File::file_position_void_const]
push eax
push ebp
lea ecx, [esp + 0x64]
push str.Attempt_to_set_Halo_definition_without_setting_linestyle_definition._________________________File__s__position__d___0x_X_:_missing_ARINC_661_command_n
push ecx
call dword [sym.imp.MSVCR90.dll_sprintf]
lea edx, [esp + 0x6c]
push edx
push 0
push 2
call dword [sym.imp.foundation.dll_void___cdecl_ags_log_message_enum_AGS_Error_Level__unsigned_short_int__char_const__]
mov ebp, dword [esp + 0x4c]
add esp, 0x20
cmp byte [esp + 0x22], 0
je 0x40d3fc
mov eax, dword [esp + 0x44]
mov dword [ebx + 0x88], eax
mov edx, dword [ebp]
mov eax, dword [edx + 4]
push ebx
mov ecx, ebp
call eax
xor ebx, ebx
cmp byte [esp + 0x1b], 0
je 0x40d42e
cmp byte [esp + 0x25], 0
jne 0x40d42e
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
push ecx
push edx
mov ecx, ebp
call dword [sym.imp.ags_widgets.dll_public:_void___thiscall_AGS_SDL_Symbol::set_anchor_int__int_]
mov byte [esp + 0x25], 1
cmp byte [esp + 0x1a], 0
je 0x40d453
cmp byte [esp + 0x23], 0
jne 0x40d453
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x48]
push eax
push ecx
mov ecx, ebp
call dword [sym.imp.ags_widgets.dll_public:_void___thiscall_AGS_SDL_Symbol::set_anchor_int__int_]
mov byte [esp + 0x23], 1
mov edx, dword [esp + 0x14]
cmp edx, dword [esp + 0x30]
jge 0x40d46d
mov ecx, esi
call dword [sym.imp.foundation.dll_public:_bool___thiscall_AGS_Input_File::end_of_file_void_const]
test al, al
je 0x40d0e0
mov eax, dword [esp + 0x30]
cmp dword [esp + 0x14], eax
je 0x40d4cf
push 0xef19
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90.dll_Ordinal_4431]
push 0
push 0x10
lea ecx, [esp + 0x24]
call dword [sym.imp.mfc90.dll_Ordinal_910]
push eax
call sub.mfc90.dll_Ordinal_1183
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x30]
push ecx
push edx
lea eax, [esp + 0x24]
push str.Indicated_size__x_of_sdl_symbol__x_does_not_match_expected_size.
push eax
call dword [sym.imp.mfc90.dll_Ordinal_2539]
add esp, 0x10
lea ecx, [esp + 0x1c]
call dword [sym.imp.mfc90.dll_Ordinal_910]
push eax
push 0
push 0
call dword [sym.imp.foundation.dll_void___cdecl_ags_log_message_enum_AGS_Error_Level__unsigned_short_int__char_const__]
add esp, 0xc
mov edx, dword [ebp]
mov eax, dword [edx + 0x10]
mov ecx, ebp
call eax
lea ecx, [esp + 0x1c]
call dword [sym.imp.mfc90.dll_Ordinal_601]
mov ecx, dword [esp + 0x15c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x144]
xor ecx, esp
call fcn.0040e824
add esp, 0x154
ret