Function at 0x480530
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
mov eax, dword [0x521104]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ecx + 0x7c]
push esi
push edi
mov dword [ebp - 0x50], ebx
mov esi, dword [ebx + 0x10]
mov dword [ebp - 0x4c], esi
test esi, esi
je 0x4807de
push 0x40
lea eax, [ebp - 0x48]
push 0
push eax
call fcn.004a6890
add esp, 0xc
mov dword [ebp - 0x48], 0x40
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
test eax, eax
je 0x48058a
mov edx, dword [ebp - 0x38]
mov edi, dword [ebp - 0x34]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
jmp 0x4805a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4805c3
mov ecx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x60]
mov edi, dword [ebp - 0x64]
mov edx, dword [ebp - 0x68]
test edi, edi
jne 0x4805ac
cmp edx, 0x6000000
jbe 0x4805c3
test ecx, ecx
jne 0x4805b7
cmp eax, 0x4000000
jbe 0x4805c3
add dword [ebx + 0x14], 0x1000000
jmp 0x4807de
xor ecx, ecx
mov eax, esi
mov edx, 4
mul edx
push 0x4f321c
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004a3916
mov esi, eax
add esp, 8
mov dword [ebp - 0x54], esi
test esi, esi
jne 0x480602
lea eax, [esi + 8]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a389b
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebx]
xor edi, edi
test eax, eax
je 0x480645
mov dword [ebp - 8], edi
cmp dword [ebx + 0xc], edi
jbe 0x4807d3
xor edx, edx
nop dword [eax + eax]
cmp dword [edx + eax], 0
lea ecx, [edx + eax]
je 0x480634
mov dword [esi + edi*4], ecx
inc edi
cmp edi, dword [ebp - 0x4c]
je 0x480688
mov eax, dword [ebx]
mov ecx, dword [ebp - 8]
add edx, 0xc
inc ecx
mov dword [ebp - 8], ecx
cmp ecx, dword [ebx + 0xc]
jb 0x480620
jmp 0x480688
mov esi, dword [ebx + 4]
test esi, esi
je 0x4807d3
mov esi, dword [esi]
mov eax, dword [esi]
mov dword [ebp - 8], eax
cmp eax, esi
je 0x4807d3
mov ebx, dword [ebp - 0x54]
add eax, 0x18
cmp dword [eax], 0
je 0x480673
mov dword [ebx + edi*4], eax
inc edi
cmp edi, dword [ebp - 0x4c]
je 0x480682
lea ecx, [ebp - 8]
call fcn.00416100
mov eax, dword [ebp - 8]
cmp eax, esi
jne 0x480662
mov ebx, dword [ebp - 0x50]
mov esi, dword [ebp - 0x54]
cmp edi, 1
jbe 0x4807d3
mov eax, dword [ebx]
test eax, eax
je 0x4806b4
cmp dword [eax], 0
je 0x4806a0
add dword [eax + 8], 2
mov eax, dword [ebx + 0xc]
lea ecx, [eax + eax*2]
mov eax, dword [ebx]
cmp dword [eax + ecx*4 - 0xc], 0
je 0x4806b4
add dword [eax + ecx*4 - 4], 2
push 0x4804f0
push 4
push edi
push esi
call fcn.004bdfb0
mov eax, dword [ebx]
add esp, 0x10
test eax, eax
je 0x4806e8
cmp dword [eax], 0
je 0x4806d4
add dword [eax + 8], 0xfffffffe
mov eax, dword [ebx + 0xc]
lea ecx, [eax + eax*2]
mov eax, dword [ebx]
cmp dword [eax + ecx*4 - 0xc], 0
je 0x4806e8
add dword [eax + ecx*4 - 4], 0xfffffffe
mov eax, dword [ebx + 0x18]
mov edx, edi
mov ecx, dword [ebp - 0x54]
xor esi, esi
mov dword [ebp - 0x4c], eax
mov ebx, dword [ebp - 0x4c]
shr edx, 2
mov eax, dword [ecx + edi*4 - 4]
mov dword [ebp - 8], edx
cmp dword [eax + 4], ebx
mov ebx, dword [ebp - 0x50]
jbe 0x480735
lea esi, [edi - 1]
test esi, esi
je 0x480735
mov ebx, dword [ebp - 0x4c]
lea ecx, [ecx + esi*4]
add ecx, 0xfffffffc
nop word [eax + eax]
mov eax, dword [ecx]
cmp dword [eax + 4], ebx
jbe 0x48072f
sub ecx, 4
sub esi, 1
jne 0x480720
mov ebx, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x54]
test edx, edx
je 0x480783
nop dword [eax]
cmp esi, edi
sbb eax, eax
and esi, eax
mov eax, dword [ecx + esi*4]
mov dword [ebp - 0x4c], eax
mov eax, dword [eax]
test eax, eax
je 0x48077b
push eax
call fcn.004a3911
mov eax, dword [ebp - 0x4c]
add esp, 4
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0x54]
mov dword [eax], 0
mov dword [eax + 8], 0
mov dword [eax + 4], 0
dec dword [ebx + 0x10]
sub edx, 1
mov dword [ebp - 8], edx
jne 0x480740
mov edi, dword [ebx + 4]
test edi, edi
je 0x4807d3
mov eax, dword [edi]
mov esi, dword [eax]
mov dword [ebp - 0x50], esi
cmp esi, eax
je 0x4807d3
cmp dword [esi + 0x18], 0
je 0x4807a8
lea ecx, [ebp - 0x50]
call fcn.00416100
mov esi, dword [ebp - 0x50]
jmp 0x4807cc
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x4c], esi
call fcn.00416100
push esi
mov ecx, edi
call fcn.004717a0
push 0x28
push eax
call fcn.004a38d3
mov esi, dword [ebp - 0x4c]
add esp, 8
mov dword [ebp - 0x50], esi
mov edi, dword [ebx + 4]
cmp esi, dword [edi]
jne 0x480795
push dword [ebp - 0x54]
call fcn.004a3911
add esp, 4
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a389b
mov esp, ebp
pop ebp
ret 8