Function at 0x408060
Capabilities:
Get memory capacity

Disassembly:
push 0xffffffffffffffff
push 0x4a8ebe
mov eax, dword fs:[0]
push eax
sub esp, 0x170
mov eax, dword [0x4e86e0]
xor eax, esp
mov dword [esp + 0x16c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4e86e0]
xor eax, esp
push eax
lea eax, [esp + 0x184]
mov dword fs:[0], eax
mov esi, ecx
or ebp, 0xffffffff
call fcn.00438330
mov ecx, dword [esi + 0xb8]
mov dword [esi + 0xb0], eax
mov dword [eax + 0x14], ecx
mov eax, dword [esi + 0xb0]
push 0x210
mov dword [eax + 4], 0x407f00
call fcn.00482367
add esp, 4
mov dword [esp + 0x14], eax
xor ebx, ebx
cmp eax, ebx
mov dword [esp + 0x18c], ebx
je 0x4080e8
mov ecx, eax
call fcn.00437040
jmp 0x4080ea
xor eax, eax
push ebx
mov dword [esp + 0x190], ebp
mov dword [esi + 0x10c], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0x104
lea ecx, [esp + 0x80]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov edx, dword [esi + 0x10c]
push edx
lea eax, [esp + 0x80]
push eax
call fcn.00438330
mov ecx, eax
call fcn.00438030
mov edi, dword [esi + 0x10c]
mov ecx, dword [edi]
push ecx
call fcn.00407dd0
add esp, 4
test eax, eax
je 0x40818f
cmp dword [edi + 0xc], ebx
jne 0x40816a
mov edx, dword [edi + 8]
mov eax, dword [edi + 4]
mov ecx, dword [edi]
push edx
push eax
push ecx
push str._d._d_d
lea edx, [esi + 0xf4]
push 0x10
push edx
call fcn.00437120
add esp, 0x18
jmp 0x40818f
mov eax, dword [edi + 0xc]
mov ecx, dword [edi + 8]
mov edx, dword [edi + 4]
push eax
mov eax, dword [edi]
push ecx
push edx
push eax
push str._d._d_d._d
lea ecx, [esi + 0xf4]
push 0x10
push ecx
call fcn.00437120
add esp, 0x1c
push 0xfa0
call fcn.00438330
mov ecx, eax
call fcn.004370e0
test eax, eax
je 0x4085ae
call fcn.00407e80
mov ecx, dword [esi + 0xb0]
call fcn.00437de0
test eax, eax
je 0x40821a
mov edx, dword [esi + 0xb0]
mov eax, dword [edx + 0x4c]
mov dword [esi + 0xb4], eax
mov eax, dword [eax + 0x2c]
add eax, 0xffffffff
cmp eax, 1
ja 0x40821a
mov dword [esi + 0xec], 1
mov eax, dword [0x4eab10]
mov dword [eax + 0x210], ebx
mov ecx, dword [0x4eab10]
mov dword [ecx + 0x214], ebx
mov edx, dword [0x4eab10]
mov dword [edx + 0x21c], ebx
mov eax, dword [0x4eab10]
mov dword [eax + 0x220], ebx
mov ecx, dword [0x4eab10]
mov dword [ecx + 0x224], ebx
mov ecx, dword [esi + 0xb8]
push 0x7d0
lea edx, [esp + 0x1c]
push edx
call fcn.00421de0
call fcn.00407e80
mov eax, dword [0x4eab10]
cmp dword [eax + 0x210], ebx
je 0x408279
mov ecx, dword [esi + 0xb0]
call fcn.004379d0
test eax, eax
je 0x408279
mov ecx, dword [esi + 0xb0]
mov eax, dword [ecx + 0x34]
mov dword [esi + 0xc0], eax
mov edx, dword [0x4eab10]
mov ecx, dword [edx + 0x230]
mov dword [eax + 8], ecx
mov ecx, dword [esi + 0xc0]
call fcn.0043feb0
call fcn.00407e80
mov edx, dword [0x4eab10]
cmp dword [edx + 0x214], ebx
je 0x4082aa
mov ecx, dword [esi + 0xb0]
call fcn.00437a80
test eax, eax
je 0x4082aa
mov eax, dword [esi + 0xb0]
mov ecx, dword [eax + 0x38]
mov dword [esi + 0xd4], ecx
call fcn.00407e80
mov edx, dword [0x4eab10]
xor eax, eax
cmp dword [edx + 0x228], ebx
je 0x4082c4
mov eax, 1
mov ecx, dword [esi + 0xb0]
push eax
call fcn.00437c90
test eax, eax
je 0x408331
mov eax, dword [esi + 0xb0]
mov ecx, dword [eax + 0x3c]
mov dword [esi + 0xbc], ecx
call fcn.00438330
cmp dword [eax + 0x38], ebx
je 0x4082fa
call fcn.00438330
mov edx, dword [eax + 0x38]
mov edi, dword [edx + 0x10]
jmp 0x4082fc
xor edi, edi
cmp edi, ebx
je 0x408331
call fcn.00438330
mov ecx, eax
call fcn.00437840
mov edx, dword [edi]
push ebx
push eax
mov eax, dword [edx + 4]
mov ecx, edi
call eax
fldz
fcomp st(1)
fnstsw ax
test ah, 5
jp 0x40832f
fsub qword [edi + 0x10]
fabs
fstp qword [0x4ea5d8]
jmp 0x408331
fstp st(0)
call fcn.00407e80
mov ecx, dword [0x4eab10]
cmp dword [ecx + 0x218], ebx
je 0x4083a4
mov ecx, dword [esi + 0xb0]
call fcn.00437be0
test eax, eax
je 0x4083a4
mov edx, dword [esi + 0xb0]
mov ecx, dword [edx + 0x48]
cmp ecx, ebx
mov dword [esi + 0xd0], ecx
je 0x4083a4
push 2
call fcn.00480040
cmp eax, ebx
je 0x4083a4
push eax
call fcn.00403e20
mov edi, eax
mov eax, dword [edi + 0xc]
add esp, 4
cmp byte [eax], bl
je 0x4083a4
mov ecx, dword [esi + 0xb0]
push eax
call fcn.00436ff0
mov ecx, dword [esi + 0xb0]
mov ebp, eax
mov eax, dword [edi + 0xc]
push eax
call fcn.00436fc0
mov edi, eax
jmp 0x4083a8
mov edi, dword [esp + 0x18]
call fcn.00407e80
mov ecx, dword [esi + 0xb0]
call fcn.00437b30
test eax, eax
je 0x4083cb
mov ecx, dword [esi + 0xb0]
mov edx, dword [ecx + 0x44]
mov dword [esi + 0xc4], edx
call fcn.00407e80
mov eax, dword [0x4eab10]
cmp dword [eax + 0x21c], ebx
je 0x408429
mov ecx, dword [esi + 0xb0]
call fcn.00437d30
test eax, eax
je 0x408429
mov ecx, dword [esi + 0xb0]
mov edx, dword [ecx + 0x40]
mov ecx, dword [esi + 0xbc]
cmp ecx, ebx
mov dword [esi + 0xc8], edx
je 0x408422
push ebx
call fcn.0043c940
cmp eax, ebx
je 0x408422
mov ecx, eax
call fcn.00439f10
sub eax, 0x1000805
je 0x408429
sub eax, 5
je 0x408429
mov ecx, esi
call fcn.00407ed0
mov eax, dword [0x4eab10]
cmp dword [eax + 0x224], ebx
je 0x408441
mov ecx, dword [esi + 0xb0]
call fcn.00437e90
call fcn.00407e80
mov ecx, dword [0x4eab10]
cmp dword [ecx + 0x220], ebx
je 0x408484
mov ecx, dword [esi + 0xb0]
push edi
push ebp
call fcn.00437f40
test eax, eax
je 0x408484
mov ecx, dword [esi + 0xb0]
push 0x80
call fcn.00437ff0
push eax
call fcn.00403e20
add esp, 4
mov dword [esi + 0xd8], eax
mov ecx, dword [esi + 0xb8]
call fcn.00421eb0
call fcn.00407e80
xor ebp, ebp
call fcn.00407e80
push str.GlobalMemoryStatusEx
push 0x4b17e0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x40
lea edx, [esp + 0x20]
push ebx
push edx
mov edi, eax
call fcn.00491b30
add esp, 0xc
cmp edi, ebx
mov dword [esp + 0x1c], 0x40
je 0x408509
lea eax, [esp + 0x1c]
push eax
call edi
test eax, eax
je 0x408509
mov ecx, dword [esp + 0x28]
fild dword [esp + 0x28]
test ecx, ecx
jge 0x4084ed
fadd qword [0x4b17d8]
mov edx, dword [esp + 0x24]
fmul qword [0x4b17d8]
test edx, edx
fild dword [esp + 0x24]
jge 0x408505
fadd qword [0x4b17d8]
faddp st(1)
jmp 0x408526
lea eax, [esp + 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatus]
fild dword [esp + 0x64]
mov ecx, dword [esp + 0x64]
test ecx, ecx
jge 0x408526
fadd qword [0x4b17d8]
fmul qword [0x4b17d0]
fadd qword [str.ffffff]
call fcn.004918a0
test al, 1
je 0x40853e
add eax, 1
mov ecx, dword [esi + 0xcc]
mov edx, dword [ecx + 4]
cmp edx, ebx
jle 0x408573
mov ecx, dword [ecx + 8]
mov edx, dword [esi + 0xcc]
mov edi, dword [edx + 4]
add ecx, 0x180
lea ecx, [ecx]
mov edx, dword [ecx]
cmp edx, ebx
jle 0x408568
add ebp, edx
add ecx, 0x224
sub edi, 1
jne 0x408560
cmp ebp, eax
jle 0x40857f
mov dword [esi + 0xdc], ebp
jmp 0x408585
mov dword [esi + 0xdc], eax
mov eax, dword [esi + 0xc4]
cmp eax, ebx
je 0x40859b
mov eax, dword [eax + 0x14]
mov ecx, dword [esi + 0xdc]
mov dword [eax + 8], ecx
call fcn.00438330
mov ecx, eax
call fcn.00436c70
mov eax, 1
jmp 0x4085b0
xor eax, eax
mov ecx, dword [esp + 0x184]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x16c]
xor ecx, esp
call fcn.00490dce
add esp, 0x17c
ret