Function at 0x140003cc0
Capabilities:
Get memory capacity

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xb0
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rsp + 0x108], rbx
mov esi, r8d
mov edi, edx
mov r12, rcx
mov qword [rsp + 0x28], rcx
lea eax, [rdx + rdx*2]
lea r8d, [rax + rax + 0xa]
mov eax, r8d
cdq
and edx, 3
add eax, edx
and eax, 3
sub eax, edx
xor ebx, ebx
test eax, eax
jle 0x140003d16
mov ecx, 4
sub ecx, eax
jmp 0x140003d18
mov ecx, ebx
add r8d, ecx
mov eax, esi
imul eax, r8d
lea eax, [rax + rax*2]
movsxd rbp, eax
xor edx, edx
mov r13d, 0x200
lea r8d, [rdx + 0x3c]
lea rcx, [rsp + 0x54]
call sub.MSVCR90.dll_memset
mov dword [rsp + 0x50], 0x40
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
mov r11, qword [rsp + 0x60]
mov rax, qword [rsp + 0x80]
cmp rax, r11
cmovb r11, rax
pxor xmm0, xmm0
cvtsi2sd xmm0, r11
movsd xmm2, qword [0x14004e2f0]
test r11, r11
jns 0x140003d7e
addsd xmm0, xmm2
pxor xmm1, xmm1
cvtsi2sd xmm1, rbp
test rbp, rbp
jns 0x140003d90
addsd xmm1, xmm2
subsd xmm0, xmm1
xorpd xmm2, xmm2
comisd xmm2, xmm0
jbe 0x140003da2
movapd xmm0, xmm2
mulsd xmm0, qword [0x14004e2e8]
comisd xmm0, xmm2
jbe 0x140003e0d
mulsd xmm0, qword [0x14004edb8]
divsd xmm0, qword [0x14004de68]
call sub.MSVCR90.dll_sqrt
addsd xmm0, qword [0x14004d388]
movsd xmm2, xmm0
shufpd xmm2, xmm2, 0
cvttpd2dq xmm0, xmm2
cvtdq2pd xmm1, xmm0
cmpltpd xmm2, xmm1
andpd xmm2, xmmword [0x14004c750]
subpd xmm1, xmm2
cvtpd2dq xmm0, xmm1
movdqa xmmword [rsp + 0xa0], xmm0
mov eax, dword [rsp + 0xa0]
cmp eax, r13d
cmovl eax, r13d
mov r13d, eax
mov dword [r12 + 0xe0], r13d
lea rax, vtable.fast_array_class_IntRect_.0
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x40], rbx
mov ebp, edi
mov r14d, esi
test r13d, r13d
jle 0x140003e78
mov ebp, r13d
mov r14d, r13d
mov edx, r13d
imul edx, r13d
mov eax, esi
imul eax, edi
cmp eax, edx
jg 0x140003e52
mov ebp, edi
mov r14d, esi
jmp 0x140003e78
mov ecx, esi
cmp edi, esi
cmovl ecx, edi
cmp ecx, r13d
jge 0x140003e78
cmp ecx, edi
jne 0x140003e6e
mov ebp, ecx
mov eax, edx
cdq
idiv ecx
mov r14d, eax
jmp 0x140003e78
mov r14d, ecx
mov eax, edx
cdq
idiv ecx
mov ebp, eax
movd xmm1, edi
cvtdq2pd xmm1, xmm1
movd xmm0, ebp
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
movsd xmm2, xmm1
shufpd xmm2, xmm2, 0
cvttpd2dq xmm0, xmm2
cvtdq2pd xmm1, xmm0
movapd xmm4, xmmword [0x14004c750]
movapd xmm0, xmm1
cmpltpd xmm0, xmm2
andpd xmm0, xmm4
addpd xmm0, xmm1
cvtpd2dq xmm0, xmm0
movdqa xmmword [rsp + 0xa0], xmm0
movd xmm2, esi
cvtdq2pd xmm2, xmm2
movd xmm1, r14d
cvtdq2pd xmm1, xmm1
divsd xmm2, xmm1
movsd xmm3, xmm2
shufpd xmm3, xmm3, 0
cvttpd2dq xmm0, xmm3
cvtdq2pd xmm1, xmm0
movapd xmm0, xmm1
cmpltpd xmm0, xmm3
andpd xmm0, xmm4
addpd xmm0, xmm1
cvtpd2dq xmm0, xmm0
movdqa xmmword [rsp + 0x90], xmm0
mov r15d, dword [rsp + 0x90]
mov eax, r15d
imul eax, dword [rsp + 0xa0]
mov dword [rsp + 0x20], eax
movsxd rdx, eax
lea rcx, [rsp + 0x30]
call fcn.140006240
mov dword [rsp + 0x90], ebx
mov dword [rsp + 0x94], ebx
mov dword [rsp + 0x98], ebp
mov dword [rsp + 0x9c], r14d
mov r13, rbx
test r15d, r15d
jle 0x140004009
mov r10d, ebx
mov eax, dword [rsp + 0xa0]
mov r12, qword [rsp + 0x38]
test eax, eax
jle 0x140003ff7
mov r9d, ebx
mov r8, r13
shl r8, 4
add r8, r12
mov r11d, eax
add r13, r11
nop
mov rdx, r8
add r8, 0x10
lea rcx, [rsp + 0x90]
mov eax, dword [rcx]
mov dword [rdx], eax
mov eax, dword [rcx + 4]
mov dword [rdx + 4], eax
mov eax, dword [rcx + 8]
mov dword [rdx + 8], eax
mov eax, dword [rcx + 0xc]
mov dword [rdx + 0xc], eax
mov eax, dword [rdx + 8]
lea ecx, [r9 + rax]
mov eax, edi
cmp ecx, edi
cmovl eax, ecx
mov dword [rdx + 8], eax
mov eax, dword [rdx + 0xc]
lea ecx, [r10 + rax]
mov eax, esi
cmp ecx, esi
cmovl eax, ecx
mov dword [rdx + 0xc], eax
mov eax, dword [rdx]
lea ecx, [r9 + rax]
mov eax, ebx
test ecx, ecx
cmovg eax, ecx
mov dword [rdx], eax
mov eax, dword [rdx + 4]
lea ecx, [r10 + rax]
mov eax, ebx
test ecx, ecx
cmovg eax, ecx
mov dword [rdx + 4], eax
add r9d, ebp
sub r11, 1
jne 0x140003f80
mov eax, dword [rsp + 0xa0]
add r10d, r14d
sub r15, 1
jne 0x140003f63
mov r12, qword [rsp + 0x28]
mov eax, dword [r12 + 0x48]
test al, 2
je 0x140004024
cmp dword [r12 + 0xa0], 0
mov ecx, dword [rsp + 0x20]
cmovne ebx, ecx
jmp 0x140004028
mov ecx, dword [rsp + 0x20]
test al, 8
je 0x140004070
cmp dword [r12 + 0xc8], 0
jne 0x14000406e
cmp dword [r12 + 0xcc], 0
jne 0x14000406e
cmp dword [r12 + 0xd0], 0
jne 0x14000406e
cmp dword [r12 + 0xd4], 0
jne 0x14000406e
cmp dword [r12 + 0xd8], 0
jne 0x14000406e
cmp dword [r12 + 0xdc], 0
je 0x140004070
mov ebx, ecx
test al, 4
je 0x14000408c
cmp dword [r12 + 0xb4], 0
jne 0x14000408a
cmp dword [r12 + 0xbc], 0
je 0x14000408c
add ebx, ecx
lea edi, [rbx + 3]
mov rax, qword [rsp + 0x38]
test rax, rax
je 0x1400040c0
lea rbx, [rax - 4]
lea r9, [fcn.140018370]
mov r8d, dword [rbx]
mov edx, 0x10
mov rcx, rax
call fcn.140037398
mov rcx, rbx
call sub.mfc90u.dll_delete__
mov eax, edi
jmp 0x1400040c2
mov eax, edi
mov rbx, qword [rsp + 0x108]
add rsp, 0xb0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret