Function at 0x502250
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb4
push ebx
push esi
xor ecx, ecx
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], edx
mov ebx, eax
mov eax, dword [ebp - 4]
call fcn.00484c2c
xor eax, eax
push ebp
push 0x50246b
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x30], 0x20
lea eax, [ebx + 8]
mov edx, dword [ebp - 4]
call fcn.004847d0
lea eax, [ebp - 0x34]
mov ecx, 0x502480
mov edx, dword [ebx + 8]
call fcn.00484a90
mov eax, dword [ebp - 0x34]
call fcn.00488f2c
test al, al
je 0x502364
lea eax, [ebp - 0x38]
mov ecx, 0x502480
mov edx, dword [ebx + 8]
call fcn.00484a90
mov edx, dword [ebp - 0x38]
mov eax, ebx
call fcn.005024dc
mov eax, dword [ebx + 0x20]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jl 0x502440
inc eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], 0
lea eax, [ebp - 0x30]
push eax
call sub.kernel32.dll_GlobalMemoryStatus
cmp dword [ebp - 0x24], 0xe4e1c0
jb 0x502440
lea ecx, [ebp - 0x3c]
mov edx, dword [ebp - 8]
mov eax, dword [ebx + 0x20]
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebp - 0x3c]
lea edx, [ebp - 0xc]
call fcn.00488960
mov dl, 1
mov eax, dword [0x4ea84c]
call fcn.004ec6d8
mov esi, eax
lea eax, [ebp - 0x40]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebx + 8]
call fcn.00484a90
mov edx, dword [ebp - 0x40]
mov eax, esi
call fcn.004ec7ac
mov ecx, esi
mov edx, dword [ebp - 0xc]
mov eax, dword [ebx + 0xc]
mov esi, dword [eax]
call dword [esi + 0x3c]
inc dword [ebp - 8]
dec dword [ebp - 0x10]
jne 0x5022f5
jmp 0x502440
lea eax, [ebp - 0x44]
mov ecx, 0x502490
mov edx, dword [ebx + 8]
call fcn.00484a90
mov eax, dword [ebp - 0x44]
mov ecx, 0x5b3c44
mov edx, 0x3f
call fcn.00488fa0
mov esi, eax
test esi, esi
jne 0x5023cc
lea edx, [ebp - 0xc]
mov eax, dword [0x5b3c50]
call fcn.00488960
mov dl, 1
mov eax, dword [0x4ea84c]
call fcn.004ec6d8
mov esi, eax
lea eax, [ebp - 0x48]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebx + 8]
call fcn.00484a90
mov edx, dword [ebp - 0x48]
mov eax, esi
call fcn.004ec7ac
mov ecx, esi
mov edx, dword [ebp - 0xc]
mov eax, dword [ebx + 0xc]
mov esi, dword [eax]
call dword [esi + 0x3c]
mov eax, 0x5b3c44
call fcn.00488ff0
mov esi, eax
lea eax, [ebp - 0x30]
push eax
call sub.kernel32.dll_GlobalMemoryStatus
cmp dword [ebp - 0x24], 0xe4e1c0
jb 0x502440
test esi, esi
jne 0x502440
lea edx, [ebp - 0xc]
mov eax, dword [0x5b3c50]
call fcn.00488960
mov edx, dword [ebp - 0xc]
mov eax, 0x5024a0
call fcn.00484d80
dec eax
je 0x5023cc
mov dl, 1
mov eax, dword [0x4ea84c]
call fcn.004ec6d8
mov esi, eax
lea eax, [ebp - 0x4c]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebx + 8]
call fcn.00484a90
mov edx, dword [ebp - 0x4c]
mov eax, esi
call fcn.004ec7ac
mov ecx, esi
mov edx, dword [ebp - 0xc]
mov eax, dword [ebx + 0xc]
mov esi, dword [eax]
call dword [esi + 0x3c]
jmp 0x5023cc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x502472
lea eax, [ebp - 0x4c]
mov edx, 7
call fcn.004847a0
lea eax, [ebp - 0xc]
call fcn.0048477c
lea eax, [ebp - 4]
call fcn.0048477c
ret