Function at 0x40d850
Capabilities:
Get memory capacity

Disassembly:
push 0xffffffffffffffff
push 0x46aade
mov eax, dword fs:[0]
push eax
sub esp, 0x170
mov eax, dword [0x489e34]
xor eax, esp
mov dword [esp + 0x16c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x489e34]
xor eax, esp
push eax
lea eax, [esp + 0x184]
mov dword fs:[0], eax
push 0xfa0
mov esi, ecx
call fcn.00438d80
mov ecx, eax
call fcn.00438a80
test eax, eax
je 0x40d9b1
call fcn.00438d80
mov ecx, dword [esi + 0xc]
mov dword [esi + 0x30], eax
mov dword [eax + 0xc], ecx
mov eax, dword [esi + 0x30]
push 0x10
mov dword [eax + 4], 0x40d720
call fcn.00447677
add esp, 4
mov dword [esp + 0x14], eax
xor ebp, ebp
cmp eax, ebp
mov dword [esp + 0x18c], ebp
je 0x40d8e2
mov ecx, eax
call fcn.00438b40
jmp 0x40d8e4
xor eax, eax
push ebp
mov dword [esp + 0x190], 0xffffffff
mov dword [esi + 0x64], 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 + 0x64]
push edx
lea eax, [esp + 0x80]
push eax
call fcn.00438d80
mov ecx, eax
call fcn.00438ab0
mov edi, dword [esi + 0x64]
mov ecx, dword [edi]
push ecx
call fcn.00407610
add esp, 4
test eax, eax
je 0x40d97a
cmp dword [edi + 0xc], ebp
jne 0x40d95a
mov edx, dword [edi + 8]
mov eax, dword [edi + 4]
mov ecx, dword [edi]
push edx
push eax
push ecx
lea edx, [esi + 0x4c]
push str._d._d_d
push edx
call fcn.0040d7f0
add esp, 0x14
jmp 0x40d97a
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
lea ecx, [esi + 0x4c]
push str._d._d_d._d
push ecx
call fcn.0040d7f0
add esp, 0x18
mov ecx, dword [esi + 0x30]
call fcn.004392f0
test eax, eax
je 0x40d98f
mov edx, dword [esi + 0x30]
mov eax, dword [edx + 0x3c]
mov dword [esi + 8], eax
mov ecx, dword [esi + 8]
call fcn.00417010
mov ecx, dword [esi + 8]
mov eax, dword [ecx + 0x2c]
add eax, 0xffffffff
cmp eax, 1
ja 0x40d9db
call fcn.00438d80
mov ecx, eax
call fcn.00438aa0
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.004563cf
add esp, 0x17c
ret
mov ecx, dword [esi + 0xc]
lea edx, [esp + 0x18]
push edx
call fcn.00427ef0
mov ecx, dword [esi + 0x30]
call fcn.00438f80
test eax, eax
je 0x40d9fd
mov eax, dword [esi + 0x30]
mov ecx, dword [eax + 0x20]
mov dword [esi + 0x2c], ecx
mov ecx, dword [esi + 0x30]
xor edi, edi
call fcn.00439190
test eax, eax
je 0x40da20
mov edx, dword [esi + 0x30]
mov eax, dword [edx + 0x24]
mov dword [esi + 0x10], eax
mov edi, dword [eax + 0x14]
imul edi, edi, 0x25c
add edi, dword [eax + 0x1c]
mov ecx, dword [esi + 0x30]
call fcn.00438ed0
test eax, eax
je 0x40da3c
mov eax, dword [esi + 0x30]
mov ecx, dword [eax + 0x1c]
mov dword [esi + 0x14], ecx
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
mov ecx, dword [esi + 0x30]
call fcn.00439030
test eax, eax
je 0x40da51
mov ecx, dword [esi + 0x30]
mov edx, dword [ecx + 0x2c]
mov dword [esi + 0x18], edx
mov eax, dword [0x48b7ec]
cmp dword [eax + 0x214], ebp
je 0x40da94
mov ecx, dword [esi + 0x30]
call fcn.00439240
test eax, eax
je 0x40da94
cmp edi, ebp
mov ecx, dword [esi + 0x30]
mov edx, dword [ecx + 0x28]
mov dword [esi + 0x1c], edx
je 0x40da8d
mov edi, dword [edi + 0x190]
cmp edi, 0x1000805
je 0x40da94
cmp edi, 0x100080a
je 0x40da94
mov ecx, esi
call fcn.0040d590
mov eax, dword [0x48b7ec]
cmp dword [eax + 0x210], ebp
je 0x40db1c
mov ecx, dword [esi + 0x30]
call fcn.004390e0
test eax, eax
je 0x40dab6
mov ecx, dword [esi + 0x30]
mov edx, dword [ecx + 0x30]
mov dword [esi + 0x28], edx
mov eax, dword [esi + 0x10]
xor ebx, ebx
cmp dword [eax + 0xc], ebp
jle 0x40db1c
mov ecx, dword [esi + 0x10]
mov edi, dword [ecx + 0x1c]
add edi, ebp
je 0x40db0b
fldz
fcomp dword [edi + 0x1d0]
fnstsw ax
test ah, 0x41
jne 0x40db0b
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x40db0b
push 4
call fcn.00445330
test eax, eax
je 0x40db0b
push eax
call fcn.0040a600
fldz
mov ecx, eax
fcomp dword [ecx + 0x18]
add esp, 4
fnstsw ax
test ah, 5
jp 0x40db0b
fld dword [ecx + 0x18]
fstp dword [edi + 0x1d0]
mov edx, dword [esi + 0x10]
add ebx, 1
add ebp, 0x25c
cmp ebx, dword [edx + 0xc]
jl 0x40dac0
mov eax, dword [0x48b7ec]
cmp dword [eax + 0x218], 0
je 0x40db7b
mov ecx, dword [esi + 0x30]
call fcn.004393a0
test eax, eax
je 0x40db7b
mov ecx, dword [esi + 0x30]
mov eax, dword [ecx + 0x40]
mov dword [esi + 0x24], eax
cmp dword [eax + 0x50], 0
je 0x40db51
mov eax, dword [eax + 0x50]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 8]
call eax
mov eax, dword [esi + 0x24]
cmp dword [eax + 0x50], 0
je 0x40db66
mov eax, dword [eax + 0x50]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
mov eax, dword [esi + 0x24]
cmp dword [eax + 0x50], 0
je 0x40db7b
mov eax, dword [eax + 0x50]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x10]
call eax
mov ecx, dword [esi + 0xc]
call fcn.00427fb0
mov ecx, dword [esi + 0x10]
xor ebx, ebx
cmp dword [ecx + 0xc], ebx
jle 0x40dbec
xor ebp, ebp
nop
mov edx, dword [esi + 0x10]
mov edi, dword [edx + 0x1c]
add edi, ebp
je 0x40dbdb
fldz
fcomp dword [edi + 0x1c4]
fnstsw ax
test ah, 5
jnp 0x40dbdb
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x40dbdb
push 4
call fcn.00445330
test eax, eax
je 0x40dbdb
push eax
call fcn.0040a600
fldz
mov ecx, eax
fcomp dword [ecx + 0x14]
add esp, 4
fnstsw ax
test ah, 5
jp 0x40dbdb
fld dword [ecx + 0x14]
fstp dword [edi + 0x1c4]
mov eax, dword [esi + 0x10]
add ebx, 1
add ebp, 0x25c
cmp ebx, dword [eax + 0xc]
jl 0x40db90
push str.GlobalMemoryStatusEx
push 0x4706c8
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40dc2c
lea ecx, [esp + 0x3c]
push ecx
call eax
test eax, eax
je 0x40dc2c
mov edx, dword [esp + 0x48]
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fmul qword [0x4706c0]
fiadd dword [esp + 0x44]
jmp 0x40dc49
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatus]
fild dword [esp + 0x24]
mov ecx, dword [esp + 0x24]
test ecx, ecx
jge 0x40dc49
fadd qword [0x4706c0]
fmul qword [0x4706b8]
fadd qword [str.ffffff]
call fcn.00456700
test al, 1
je 0x40dc61
add eax, 1
mov ecx, dword [esi + 0x20]
mov edx, dword [ecx + 4]
test edx, edx
jle 0x40dc93
mov ecx, dword [ecx + 8]
mov edx, dword [esi + 0x20]
mov edi, dword [edx + 4]
add ecx, 0x160
lea ebx, [ebx]
mov edx, dword [ecx]
test edx, edx
jle 0x40dc88
add ebx, edx
add ecx, 0x24c
sub edi, 1
jne 0x40dc80
cmp ebx, eax
jle 0x40dc9c
mov dword [esi + 0x34], ebx
jmp 0x40dc9f
mov dword [esi + 0x34], eax
mov eax, dword [esi + 0x18]
test eax, eax
je 0x40dcaf
mov eax, dword [eax + 0x14]
mov ecx, dword [esi + 0x34]
mov dword [eax + 8], ecx
call fcn.00438d80
mov ecx, eax
call fcn.00438aa0
mov ecx, esi
call fcn.0040d6e0
mov eax, 1
jmp 0x40d9b3