Function at 0x10904f00
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10917a20
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x58
mov eax, dword [ebp + 0x14]
fld qword [0x1091d738]
push ebx
push esi
mov esi, ecx
mov ecx, dword [ebp + 0x10]
mov dword [esi], 0x7fffffff
mov dword [eax], 1
mov dword [ecx], 0
mov edx, dword [sym.imp.core.dll_double_GSecondsPerCycle]
fdiv qword [edx]
mov eax, dword [ebp + 0x24]
mov ecx, dword [ebp + 0x18]
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], 0
fstp dword [eax]
mov dword [ecx], 0
mov ecx, 0x44c
mov edi, dword [ebp + 8]
xor eax, eax
mov ebx, ecx
shr ecx, 2
and ebx, 3
rep stosd dword es:[edi], eax
mov ecx, ebx
rep stosb byte es:[edi], al
lea edx, [ebp - 0x64]
push edx
mov dword [ebp - 0x64], 0x20
call dword [sym.imp.kernel32.dll_GlobalMemoryStatus]
mov eax, dword [ebp - 0x5c]
mov ecx, dword [ebp + 0x20]
shr eax, 0x14
push eax
mov dword [ecx], eax
mov edx, dword [sym.imp.core.dll_class_FOutputDevice__GLog]
mov eax, dword [edx]
push str.Physical_Memory:__i_MByte
push 0x2fa
push eax
call dword [sym.imp.core.dll_public:_void___cdecl_FOutputDevice::Logf_enum_EName__unsigned_short_int_const__]
add esp, 0x10
mov byte [ebp - 4], 1
mov ecx, 0x130
mov edi, dword [ebp + 0xc]
xor eax, eax
mov ebx, ecx
shr ecx, 2
and ebx, 3
rep stosd dword es:[edi], eax
mov ecx, ebx
rep stosb byte es:[edi], al
push 0
lea ecx, [ebp - 0x14]
push ecx
push 0
mov dword [esi], 0x7fffffff
call sub.ddraw.dll_DirectDrawCreate
test eax, eax
jge 0x10905005
mov edx, dword [sym.imp.core.dll_class_FOutputDevice__GLog]
mov eax, dword [edx]
mov ebx, dword [sym.imp.core.dll_public:_void___cdecl_FOutputDevice::Logf_enum_EName__unsigned_short_int_const__]
push str.D3D_Driver:_Couldnt_query_amount_of_local_video_memory
push 0x2fa
push eax
call ebx
add esp, 0xc
jmp 0x1090519c
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
lea edx, [ebp + 0x20]
push edx
push 0x1091fb10
push eax
call dword [ecx]
test eax, eax
jge 0x1090503a
mov eax, dword [sym.imp.core.dll_class_FOutputDevice__GLog]
mov ecx, dword [eax]
push str.D3D_Device:_Couldnt_query_amount_of_local_video_memory
push 0x2fa
push ecx
call dword [sym.imp.core.dll_public:_void___cdecl_FOutputDevice::Logf_enum_EName__unsigned_short_int_const__]
add esp, 0xc
jmp 0x1090518d
lea edx, [ebp - 0x44]
mov dword [ebp - 0x1c], edx
mov ecx, 0x10
mov edi, dword [ebp - 0x1c]
xor eax, eax
mov ebx, ecx
shr ecx, 2
and ebx, 3
rep stosd dword es:[edi], eax
mov ecx, ebx
rep stosb byte es:[edi], al
mov eax, dword [ebp + 0x20]
lea edx, [ebp - 0x18]
push edx
lea edx, [ebp + 0x24]
push edx
lea edx, [ebp - 0x44]
push edx
mov dword [ebp - 0x44], 0x10007000
mov ecx, dword [eax]
push eax
call dword [ecx + 0x5c]
test eax, eax
jl 0x109050a8
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x109050a8
push eax
mov eax, dword [sym.imp.core.dll_class_FOutputDevice__GLog]
mov ecx, dword [eax]
push str.D3D_Device:_Mem_query_DX7_3DDEVICE__LOCALVIDMEM__TEXTURE__VIDEOMEMORY____u
push 0x2fa
push ecx
call dword [sym.imp.core.dll_public:_void___cdecl_FOutputDevice::Logf_enum_EName__unsigned_short_int_const__]
mov eax, dword [esi]
mov ecx, dword [ebp + 0x24]
add esp, 0x10
cmp eax, ecx
jbe 0x109050a6
mov eax, ecx
mov dword [esi], eax
lea edx, [ebp - 0x44]
mov dword [ebp - 0x1c], edx
mov ecx, 0x10
mov edi, dword [ebp - 0x1c]
xor eax, eax
mov ebx, ecx
shr ecx, 2
and ebx, 3
rep stosd dword es:[edi], eax
mov ecx, ebx
rep stosb byte es:[edi], al
mov eax, dword [ebp + 0x20]
lea edx, [ebp - 0x18]
push edx
lea edx, [ebp + 0x24]
push edx
lea edx, [ebp - 0x44]
push edx
mov dword [ebp - 0x44], 0x10005000
mov ecx, dword [eax]
push eax
call dword [ecx + 0x5c]
test eax, eax
jl 0x10905116
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x10905116
push eax
mov eax, dword [sym.imp.core.dll_class_FOutputDevice__GLog]
mov ecx, dword [eax]
push str.D3D_Device:_Mem_query_DX7_LOCALVIDMEM__TEXTURE__VIDEOMEMORY____u
push 0x2fa
push ecx
call dword [sym.imp.core.dll_public:_void___cdecl_FOutputDevice::Logf_enum_EName__unsigned_short_int_const__]
mov eax, dword [esi]
mov ecx, dword [ebp + 0x24]
add esp, 0x10
cmp eax, ecx
jbe 0x10905114
mov eax, ecx
mov dword [esi], eax
lea edx, [ebp - 0x44]
mov dword [ebp - 0x1c], edx
mov ecx, 0x10
mov edi, dword [ebp - 0x1c]
xor eax, eax
mov ebx, ecx
shr ecx, 2
and ebx, 3
rep stosd dword es:[edi], eax
mov ecx, ebx
rep stosb byte es:[edi], al
mov eax, dword [ebp + 0x20]
lea edx, [ebp - 0x18]
push edx
lea edx, [ebp + 0x24]
push edx
lea edx, [ebp - 0x44]
push edx
mov dword [ebp - 0x44], 0x10004040
mov ecx, dword [eax]
push eax
call dword [ecx + 0x5c]
test eax, eax
jl 0x10905184
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x10905184
push eax
mov eax, dword [sym.imp.core.dll_class_FOutputDevice__GLog]
mov ecx, dword [eax]
push str.D3D_Device:_Mem_query_DX7_OFFSCREENPLAIN__LOCALVIDMEM__VIDEOMEMORY____u
push 0x2fa
push ecx
call dword [sym.imp.core.dll_public:_void___cdecl_FOutputDevice::Logf_enum_EName__unsigned_short_int_const__]
mov eax, dword [esi]
mov ecx, dword [ebp + 0x24]
add esp, 0x10
cmp eax, ecx
jbe 0x10905182
mov eax, ecx
mov dword [esi], eax
mov eax, dword [ebp + 0x20]
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ebx, dword [sym.imp.core.dll_public:_void___cdecl_FOutputDevice::Logf_enum_EName__unsigned_short_int_const__]
push 0
mov dword [ebp - 4], 0
call dword [sym.imp.ole32.dll_CoInitialize]
call fcn.10901100
mov edi, eax
cmp edi, 0x1c00000
jbe 0x109051db
mov edx, dword [sym.imp.core.dll_class_FOutputDevice__GLog]
mov eax, dword [edx]
push edi
push str.D3D_Device:_Mem_query_WMIVideoMemory___u
push 0x2fa
push eax
call ebx
add esp, 0x10
add edi, 0xffc00000
mov dword [esi], edi
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ecx, dword [sym.imp.core.dll_enum_ERunningOS_GRunningOS]
cmp dword [ecx], 2
jne 0x109051fc
cmp dword [esi], 0x2000000
jge 0x109051fc
mov dword [esi], 0x2000000
jmp 0x10905204
cmp dword [esi], 0x7fffffff
je 0x10905239
mov eax, dword [esi]
cdq
and edx, 0x3ff
add eax, edx
sar eax, 0xa
cdq
and edx, 0x3ff
add eax, edx
sar eax, 0xa
push eax
mov dword [esi], eax
mov edx, dword [sym.imp.core.dll_class_FOutputDevice__GLog]
mov eax, dword [edx]
push str.D3D_Device:_Video_memory_on_board:__i__MB_
push 0x2fa
push eax
call ebx
add esp, 0x10
push str.RTCShader.dll
call dword [sym.imp.kernel32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
mov dword [ebp + 0x24], edi
jne 0x1090526a
mov ecx, dword [sym.imp.core.dll_class_FOutputDevice__GLog]
mov edx, dword [ecx]
push str.D3D_Device:_Could_not_load_RTCShader_DLL
push 0x2fa
push edx
call ebx
add esp, 0xc
jmp 0x10905342
push str.QueryDX9Support
push edi
call dword [sym.imp.kernel32.dll_GetProcAddress]
test eax, eax
jne 0x10905296
mov eax, dword [sym.imp.core.dll_class_FOutputDevice__GLog]
mov ecx, dword [eax]
push str.D3D_Device:_Loaded_RTCShader_DLL__but_could_not_find_the_function_address_of__QueryDX9Support_
push 0x2fa
push ecx
call ebx
add esp, 0xc
jmp 0x10905334
mov byte [ebp - 4], 3
call eax
mov esi, eax
test esi, esi
jne 0x109052bc
mov edx, dword [sym.imp.core.dll_class_FOutputDevice__GLog]
mov eax, dword [edx]
push str.D3D_Device:_Couldnt_create_DirectX_to_query_SW_vs_HW_TL
push 0x2fa
push eax
call ebx
add esp, 0xc
jmp 0x10905334
mov edi, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x18]
push edi
push 1
push 0
mov dword [ecx], 1
mov edx, dword [esi]
push esi
call dword [edx + 0x38]
test eax, eax
jge 0x109052f0
mov eax, dword [sym.imp.core.dll_class_FOutputDevice__GLog]
mov ecx, dword [eax]
push str.D3D_Device:_Created_DirectX_but_couldnt_query_SW_vs_HW_TL
push 0x2fa
push ecx
call ebx
add esp, 0xc
jmp 0x1090531d
mov edx, dword [ebp + 0x10]
mov dword [edx], 1
test dword [edi + 0x1c], 0x10000
jne 0x1090530b
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
cmp dword [edi + 0xbc], 8
jae 0x1090531d
mov ecx, dword [ebp + 0x14]
mov dword [ecx], 0
mov eax, dword [ebp + 8]
mov edx, dword [esi]
push eax
push 2
push 0
push esi
call dword [edx + 0x14]
mov ecx, dword [esi]
push esi
call dword [ecx + 8]
mov edi, dword [ebp + 0x24]
push edi
mov dword [ebp - 4], 0
call dword [sym.imp.kernel32.dll_FreeLibrary]
mov edx, dword [sym.imp.core.dll_class_FConfigCache__GConfig]
mov ecx, dword [edx]
mov eax, dword [ecx]
push 0
lea edx, [ebp + 0x14]
push edx
push str.CompatibilityMode
push 0x1091b384
mov byte [ebp - 4], 5
call dword [eax]
mov eax, dword [sym.imp.core.dll_class_FConfigCache__GConfig]
mov ecx, dword [eax]
mov edx, dword [ecx]
push 0
lea eax, [ebp + 0x18]
push eax
push str.Use3DSound
push str.ALAudio.ALAudioSubsystem
call dword [edx]
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x1090538b
mov eax, str.MMSYSTEM
jmp 0x1090539c
mov eax, dword [ebp + 0x18]
test eax, eax
mov eax, str.DirectSound3D
jne 0x1090539c
mov eax, str.DirectSound
push eax
call sub.alaudio.dll_int___cdecl_appInitializeSoundDevice_char_const__
mov ecx, dword [ebp + 0x1c]
add esp, 4
pop edi
mov dword [ecx], eax
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret