Function at 0x4147e0
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x462b4d
mov eax, dword fs:[0]
push eax
sub esp, 0x218
mov eax, dword [0x49001c]
xor eax, esp
mov dword [esp + 0x210], eax
push ebx
push esi
push edi
mov eax, dword [0x49001c]
xor eax, esp
push eax
lea eax, [esp + 0x228]
mov dword fs:[0], eax
push 0x110
xor esi, esi
lea eax, [esp + 0x10c]
push esi
push eax
mov edi, ecx
mov dword [esp + 0x110], 0x114
call sub.MSVCR80.dll_memset
add esp, 0xc
lea ecx, [esp + 0x104]
push ecx
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [esp + 0x114], 2
mov edx, dword [edi + 0x218]
mov ebx, dword [edi + 0x21c]
mov dword [esp + 0x14], edx
jne 0x414aa9
push esi
push 2
lea ecx, [esp + 0x34]
call dword [sym.imp.K8Common.dll_public:_void___thiscall_GameMgr::GMToolHelp::constructor_unsigned_int__unsigned_int_]
push 4
mov dword [esp + 0x234], esi
call sub.MSVCR80.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x24], eax
cmp eax, esi
mov byte [esp + 0x230], 1
je 0x4148a9
mov ecx, eax
call dword [sym.imp.K8Common.dll_public:_void___thiscall_GameMgr::GMProcessEntry::constructor_void_]
mov esi, eax
mov byte [esp + 0x230], 0
push esi
lea ecx, [esp + 0x24]
mov dword [esp + 0x20], esi
call fcn.00415120
push esi
lea eax, [esp + 0x20]
push esi
push eax
call fcn.00414420
mov byte [esp + 0x23c], 2
mov ecx, dword [esp + 0x28]
add esp, 4
mov eax, esp
mov dword [eax], ecx
mov edx, dword [esp + 0x28]
mov dword [eax + 4], edx
mov eax, dword [esp + 0x28]
test eax, eax
mov dword [esp + 0x2c], esp
je 0x4148fd
add eax, 4
mov ecx, 1
lock xadd dword [eax], ecx
lea ecx, [esp + 0x34]
call dword [sym.imp.K8Common.dll_public:_bool___thiscall_GameMgr::GMToolHelp::ProcessFirst_class_boost::shared_ptr_class_GameMgr::GMProcessEntry__const]
test al, al
je 0x414a5a
nop
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.K8Common.dll_public:_bool___thiscall_GameMgr::GMProcessEntry::GetPID_unsigned_int__]
test al, al
je 0x414a1e
mov eax, dword [esp + 0x10]
push eax
push 0
push 0x510
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
mov dword [esp + 0x28], esi
je 0x414a1e
push 0x28
lea ecx, [esp + 0xe0]
push ecx
push esi
call sub.PSAPI.DLL_GetProcessMemoryInfo
push 0xffffffffffffffff
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_SetProcessWorkingSetSize]
push 0x28
lea edx, [esp + 0xb8]
push edx
push esi
call sub.PSAPI.DLL_GetProcessMemoryInfo
mov eax, dword [esp + 0xc0]
mov edx, dword [esp + 0xe8]
xor ecx, ecx
xor esi, esi
sub eax, edx
sbb ecx, esi
add dword [esp + 0x14], eax
adc ebx, ecx
test ebx, ebx
mov dword [esp + 0x18], ebx
jg 0x4149ac
jl 0x41499e
cmp dword [esp + 0x14], esi
ja 0x4149ac
xor ebx, ebx
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], ebx
mov eax, dword [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x3c
lea ecx, [esp + 0x7c]
push 0
push ecx
mov dword [esp + 0x80], 0x40
call sub.MSVCR80.dll_memset
add esp, 0xc
lea edx, [esp + 0x74]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
test eax, eax
je 0x414a1e
mov edx, dword [esp + 0x7c]
mov esi, dword [esp + 0x80]
mov ebx, dword [esp + 0x18]
mov eax, edx
sub eax, dword [esp + 0x84]
mov ecx, esi
sbb ecx, dword [esp + 0x88]
push ecx
push eax
add eax, dword [esp + 0x1c]
push esi
push edx
adc ecx, ebx
add edx, dword [esp + 0x24]
push ecx
push eax
adc esi, ebx
push esi
push edx
mov ecx, edi
call fcn.00414cb0
mov ecx, dword [esp + 0x1c]
sub esp, 8
mov eax, esp
mov dword [eax], ecx
mov edx, dword [esp + 0x28]
mov dword [eax + 4], edx
mov eax, dword [esp + 0x28]
test eax, eax
mov dword [esp + 0x2c], esp
je 0x414a48
add eax, 4
mov ecx, 1
lock xadd dword [eax], ecx
lea ecx, [esp + 0x34]
call dword [sym.imp.K8Common.dll_public:_bool___thiscall_GameMgr::GMToolHelp::ProcessNext_class_boost::shared_ptr_class_GameMgr::GMProcessEntry__const]
test al, al
jne 0x414910
mov byte [esp + 0x230], 0
mov esi, dword [esp + 0x20]
test esi, esi
je 0x414a94
lea edx, [esi + 4]
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x414a94
mov edx, dword [esi]
mov eax, dword [edx + 4]
mov ecx, esi
call eax
lea ecx, [esi + 8]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x414a94
mov eax, dword [esi]
mov edx, dword [eax + 8]
mov ecx, esi
call edx
lea ecx, [esp + 0x2c]
mov dword [esp + 0x230], 0xffffffff
call dword [sym.imp.K8Common.dll_public:_void___thiscall_GameMgr::GMToolHelp::destructor_void_]
push 0x3c
lea eax, [esp + 0x3c]
push 0
push eax
mov dword [esp + 0x40], 0x40
call sub.MSVCR80.dll_memset
add esp, 0xc
lea ecx, [esp + 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
test eax, eax
je 0x414c8c
mov edx, dword [esp + 0x3c]
mov esi, dword [esp + 0x40]
mov eax, edx
sub eax, dword [esp + 0x44]
mov ecx, esi
sbb ecx, dword [esp + 0x48]
push ecx
push eax
add eax, dword [esp + 0x1c]
push esi
push edx
adc ecx, ebx
add edx, dword [esp + 0x24]
push ecx
push eax
adc esi, ebx
push esi
push edx
mov ecx, edi
call fcn.00414cb0
lea esi, [edi + 0x24]
push 0x6b
mov ecx, esi
call dword [sym.imp.K8UIRender.dll_public:_class_GameMgr::GMControl____thiscall_GameMgr::GMPaintManager::FindControl_unsigned_int_const]
push 0x6c
mov ecx, esi
mov dword [esp + 0x2c], eax
call dword [sym.imp.K8UIRender.dll_public:_class_GameMgr::GMControl____thiscall_GameMgr::GMPaintManager::FindControl_unsigned_int_const]
push 0x6a
mov ecx, esi
mov dword [esp + 0x14], eax
call dword [sym.imp.K8UIRender.dll_public:_class_GameMgr::GMControl____thiscall_GameMgr::GMPaintManager::FindControl_unsigned_int_const]
mov ecx, dword [esp + 0x28]
test ecx, ecx
mov dword [esp + 0x24], eax
je 0x414b70
cmp dword [esp + 0x10], 0
je 0x414b70
test eax, eax
je 0x414b70
mov edx, dword [ecx]
mov eax, dword [edx + 0xd4]
push 0
call eax
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0xd4]
push 0
call eax
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
mov eax, dword [edx + 0xd4]
push 1
call eax
push 0x6d
mov ecx, esi
call dword [sym.imp.K8UIRender.dll_public:_class_GameMgr::GMControl____thiscall_GameMgr::GMPaintManager::FindControl_unsigned_int_const]
mov edx, dword [esp + 0x44]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x48]
mov ecx, edx
sub ecx, dword [edi + 0x228]
sbb eax, dword [edi + 0x22c]
shrd ecx, eax, 0x14
shr eax, 0x14
mov eax, dword [edi + 0x220]
sub eax, dword [esp + 0x3c]
mov edi, dword [edi + 0x224]
sbb edi, dword [esp + 0x40]
sub eax, dword [esp + 0x14]
sbb edi, ebx
add eax, edx
adc edi, dword [esp + 0x48]
mov edx, eax
shrd edx, edi, 0x14
xor eax, eax
shr edi, 0x14
test ecx, ecx
setle al
xor ebx, ebx
sub eax, 1
and eax, ecx
test edx, edx
setle bl
mov edi, eax
sub ebx, 1
and ebx, edx
cmp dword [esp + 0x10], 0
je 0x414c84
lea ecx, [esp + 0xdc]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
lea ecx, [esp + 0xb4]
push 0x483
push ecx
mov dword [esp + 0x238], 3
call dword [sym.imp.K8UIRender.dll_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____cdecl_GameMgr::LoadStr_unsigned_int_]
add esp, 8
mov byte [esp + 0x230], 4
cmp dword [eax + 0x18], 8
jb 0x414c2a
mov eax, dword [eax + 4]
jmp 0x414c2d
add eax, 4
push edi
push ebx
push eax
lea edx, [esp + 0xe8]
push edx
call dword [sym.imp.K8Common.dll_public:_static_void___cdecl_GameMgr::GMStringUtils::Format_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____wchar_t_const__]
add esp, 0x10
lea ecx, [esp + 0xb4]
mov byte [esp + 0x230], 3
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx]
mov eax, dword [eax + 0x170]
lea edx, [esp + 0xdc]
push edx
call eax
lea ecx, [esp + 0xdc]
mov dword [esp + 0x230], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov ecx, esi
call dword [sym.imp.K8UIRender.dll_public:_void___thiscall_GameMgr::GMPaintManager::Invalidate_void_]
mov ecx, dword [esp + 0x228]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x210]
xor ecx, esp
call fcn.0045d098
mov esp, ebp
pop ebp
ret