Function at 0x407450
Capabilities:
Get memory capacity

Disassembly:
sub esp, 0x140
mov eax, dword [0x4afca0]
mov edx, dword [esp + 0x144]
push ebx
push esi
mov ebx, ecx
push edi
mov dword [esp + 0x148], eax
xor eax, eax
cmp dword [esp + 0x15c], eax
mov ecx, 0x1f
mov edi, edx
rep stosd dword es:[edi], eax
mov dword [edx], 0x7c
mov ecx, 8
lea edi, [edx + 0x48]
lea esi, [ebx + 0xf8]
jne 0x40749c
lea esi, [ebx + 0xd8]
mov eax, dword [esp + 0x154]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x158]
push 0
lea esi, [esp + 0x10]
push esi
mov dword [edx + 4], 0x11007
mov dword [edx + 0x68], 0x10005000
mov dword [edx + 0x6c], 0
mov dword [edx + 0xc], eax
mov dword [edx + 8], ecx
mov eax, dword [ebx + 0x28]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x18]
mov esi, eax
test esi, esi
je 0x4076cb
mov ebx, dword [ebx + 0x28]
xor edx, edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], edx
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x40], edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x48]
push eax
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x30], 0x20
mov dword [esp + 0x20], 0x4000
mov ecx, dword [ebx]
push ebx
call dword [ecx + 0x5c]
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatus]
cmp esi, 0x887600e6
jg 0x407609
je 0x407602
cmp esi, 0x88760082
jg 0x4075bd
je 0x4075b3
cmp esi, 0x8876005f
jg 0x40759d
je 0x407593
cmp esi, 0x8007000e
je 0x407589
cmp esi, 0x80070057
jne case.0x4075d3.2005532526
push str.DDERR_INVALIDPARAMS
jmp 0x407683
push str.DDERR_OUTOFMEMORY
jmp 0x407683
push str.DDERR_INCOMPATIBLEPRIMARY
jmp 0x407683
cmp esi, 0x88760064
jne case.0x4075d3.2005532526
push str.DDERR_INVALIDCAPS
jmp 0x407683
push str.DDERR_INVALIDOBJECT
jmp 0x407683
lea eax, [esi + 0x7789ff6f]
cmp eax, 0x50
ja case.0x4075d3.2005532526
movzx ecx, byte [eax + 0x4076fc]
jmp dword [ecx*4 + 0x4076e8]
push str.DDERR_INVALIDPIXELFORMAT
jmp 0x407683
push str.DDERR_NOALPHAHW
jmp 0x407683
push str.DDERR_NOCOOPERATIVELEVELSET
jmp 0x407683
push str.DDERR_NOEXCLUSIVEMODE
jmp 0x407683
push str.DDERR_NOFLIPHW
jmp 0x407683
cmp esi, 0x88760234
jg 0x407658
je 0x407651
cmp esi, 0x8876017c
jg 0x407642
je 0x40763b
cmp esi, 0x88760104
je 0x407634
cmp esi, 0x88760154
jne case.0x4075d3.2005532526
push str.DDERR_NOZBUFFERHW
jmp 0x407683
push str.DDERR_NOOVERLAYHW
jmp 0x407683
push str.DDERR_OUTOFVIDEOMEMORY
jmp 0x407683
cmp esi, 0x88760233
jne case.0x4075d3.2005532526
push str.DDERR_NODIRECTDRAWHW
jmp 0x407683
push str.DDERR_PRIMARYSURFACEALREADYEXISTS
jmp 0x407683
cmp esi, 0x88760235
je 0x40767e
cmp esi, 0x8876024e
je 0x407677
cmp esi, 0x8876024f
jne case.0x4075d3.2005532526
push str.DDERR_NOMIPMAPHW
jmp 0x407683
push str.DDERR_UNSUPPORTEDMODE
jmp 0x407683
push str.DDERR_NOEMULATION
call fcn.00402880
add esp, 4
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x30]
push edx
push eax
lea ecx, [esp + 0x50]
push str.KGraphics::CreateTextureSurface___Failed__AvailPhy:_d__AvailVid:_d_
push ecx
call fcn.004788cf
lea edx, [esp + 0x58]
push edx
call fcn.00402880
add esp, 0x14
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x13c]
call fcn.0047882f
add esp, 0x140
ret 0x10
mov ecx, dword [esp + 0x148]
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
call fcn.0047882f
add esp, 0x140
ret 0x10