Function at 0x11470
Capabilities:
Get system information on windows
Print debug messages
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push esi
push edi
call fcn.00011080
test al, al
jne 0x114db
push str.Cxbx_Reloaded_can_only_run_under_WoW64_nThis_means_either_a_64_bit_version_of_Windows_or_Wine_with_a_64_bit_prefix_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, eax
xor esi, esi
nop dword [eax + eax]
inc esi
cmp byte [esi + str.Cxbx_Reloaded_can_only_run_under_WoW64_nThis_means_either_a_64_bit_version_of_Windows_or_Wine_with_a_64_bit_prefix_n], 0
jne 0x114a0
lea eax, [ebp - 4]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
push 0
test eax, eax
lea eax, [ebp - 0xc]
push eax
push esi
push str.Cxbx_Reloaded_can_only_run_under_WoW64_nThis_means_either_a_64_bit_version_of_Windows_or_Wine_with_a_64_bit_prefix_n
push edi
jne 0x115f7
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
mov eax, 0xa
pop esi
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
cmp dword [ebp - 0x14], 0x10000
je 0x11540
push str.Unsupported_system_allocation_granularity__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, eax
xor esi, esi
inc esi
cmp byte [esi + str.Unsupported_system_allocation_granularity__n], 0
jne 0x11505
lea eax, [ebp - 0xc]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
push 0
test eax, eax
lea eax, [ebp - 4]
push eax
push esi
push str.Unsupported_system_allocation_granularity__n
push edi
jne 0x115f7
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
mov eax, 0xa
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x2c], 0x1000
je 0x11597
push str.Unsupported_system_page_size__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, eax
xor esi, esi
inc esi
cmp byte [esi + str.Unsupported_system_page_size__n], 0
jne 0x11560
lea eax, [ebp - 0xc]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
push 0
test eax, eax
lea eax, [ebp - 4]
push eax
push esi
push str.Unsupported_system_page_size__n
push edi
jne 0x115f7
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
mov eax, 0xa
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x24], 0xfffeffff
jae 0x11608
push str.Maximum_application_address_too_low__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, eax
xor esi, esi
nop word [eax + eax]
inc esi
cmp byte [esi + str.Maximum_application_address_too_low__n], 0
jne 0x115c0
lea eax, [ebp - 0xc]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
push 0
test eax, eax
lea eax, [ebp - 4]
push eax
push esi
push str.Maximum_application_address_too_low__n
push edi
jne 0x115f7
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
mov eax, 0xa
pop esi
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
pop edi
mov eax, 0xa
pop esi
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 8]
mov dword [ebp - 8], 0xe
push 0x8013018
push eax
call fcn.000110d0
add esp, 8
test al, al
jne 0x11688
push str.None_of_system_types_required_address_range_s__could_be_reserved__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, eax
xor esi, esi
nop dword [eax + eax]
inc esi
cmp byte [esi + str.None_of_system_types_required_address_range_s__could_be_reserved__n], 0
jne 0x11640
lea eax, [ebp - 0xc]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
push 0
test eax, eax
lea eax, [ebp - 4]
push eax
push esi
push str.None_of_system_types_required_address_range_s__could_be_reserved__n
push edi
jne 0x11677
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
mov eax, 8
pop esi
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
pop edi
mov eax, 8
pop esi
mov esp, ebp
pop ebp
ret
push str.cxbxr_emu.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
jne 0x11733
push str.Error_loading_cxbxr_emu.dll_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, eax
xor esi, esi
inc esi
cmp byte [esi + str.Error_loading_cxbxr_emu.dll_n], 0
jne 0x116b4
lea eax, [ebp - 0xc]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
push 0
test eax, eax
lea eax, [ebp - 4]
push eax
push esi
push str.Error_loading_cxbxr_emu.dll_n
push edi
jne 0x116e2
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x116e8
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0
lea ecx, [ebp - 4]
mov dword [ebp - 4], 0
push ecx
push 0
push eax
push 0
push 0x1100
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov esi, dword [ebp - 4]
test esi, esi
je 0x117bd
push esi
call fcn.00011410
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
mov eax, 0x138f
pop esi
mov esp, ebp
pop ebp
ret
xor esi, esi
call fcn.00011000
test eax, eax
je 0x11758
nop
call fcn.00011010
mov al, byte [eax + esi]
mov byte [esi - 0x7ffff000], al
inc esi
call fcn.00011000
cmp esi, eax
jb 0x11740
push str.Emulate
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x117c8
push str.Entrypoint_not_found__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, eax
xor esi, esi
nop
inc esi
cmp byte [esi + str.Entrypoint_not_found__n], 0
jne 0x11780
lea eax, [ebp - 0xc]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
push 0
test eax, eax
lea eax, [ebp - 4]
push eax
push esi
push str.Entrypoint_not_found__n
push edi
jne 0x117b7
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
mov eax, 0x138f
pop esi
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
pop edi
mov eax, 0x138f
pop esi
mov esp, ebp
pop ebp
ret
push 0x8013018
push dword [ebp - 8]
call eax
push str.Initialization_failure__n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, eax
xor esi, esi
nop dword [eax]
inc esi
cmp byte [esi + str.Initialization_failure__n], 0
jne 0x117f0
lea eax, [ebp - 0xc]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
push 0
test eax, eax
lea eax, [ebp - 4]
push eax
push esi
push str.Initialization_failure__n
push edi
jne 0x11827
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
mov eax, 0x1132
pop esi
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
pop edi
mov eax, 0x1132
pop esi
mov esp, ebp
pop ebp
ret