Function at 0x40ba2c
Capabilities:
Get memory capacity
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xa4
push ebx
push ebp
push esi
push edi
mov ebx, dword [esp + 0xb8]
mov dword [esp + 0xb0], eax
movzx ecx, byte [esp + 0xc0]
mov esi, dword [esp + 0xbc]
mov edx, dword [ecx*4 + 0x41cdb0]
mov dword [esi], edx
lea eax, [esp + 0xb0]
mov dword [esp + 0xa0], 0
call fcn.0040bcd8
xor al, 1
je 0x40bbde
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatus]
mov eax, dword [esp + 0x48]
mov edx, 0xcccccccd
mul edx
shr edx, 4
cmp dword [esp + 0x4c], edx
jb 0x40bb4f
mov edx, dword [esp + 0xb0]
cmp dword [edx + 0x24], 0
jne 0x40bad3
mov esi, dword [edx + 0x60]
mov dword [esp + 0x10], esi
xor edi, edi
mov dword [esp + 0x14], edi
fild qword [esp + 0x10]
fcomp dword [edx + 0x58]
fnstsw ax
sahf
jae 0x40bb4f
jp 0x40bb4f
mov ecx, dword [esp + 0xb0]
mov dword [esp + 0xa8], ecx
push 1
push 0
mov eax, dword [esp + 0xb0]
call fcn.0040c024
test eax, eax
jne 0x40bb9d
mov esi, dword [esp + 0xb0]
mov dword [esp + 0xa4], esi
push 0
mov eax, dword [esp + 0xa8]
call fcn.0040cf58
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x80]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x80]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatus]
mov eax, dword [esp + 0x98]
mov edx, 0xcccccccd
mul edx
shr edx, 4
cmp dword [esp + 0x9c], edx
jb 0x40bb91
jmp 0x40bb9d
mov ecx, dword [esp + 0xb0]
mov dword [esp + 0x20], ecx
push 0
mov eax, dword [esp + 0x24]
call fcn.0040cf58
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x60]
rep stosd dword es:[edi], eax
lea edx, [esp + 0x60]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatus]
mov eax, dword [esp + 0x78]
mov edx, 0xcccccccd
mul edx
shr edx, 4
cmp dword [esp + 0x7c], edx
jae 0x40bb9d
mov eax, dword [esp + 0xb0]
call fcn.0040b8ac
lea eax, [esp + 0xb0]
call fcn.0040bcd8
xor al, 1
je 0x40bbde
mov edx, dword [esp + 0xb0]
mov dword [esp + 0x50], edx
push 1
push 0
mov eax, dword [esp + 0x58]
call fcn.0040c024
test eax, eax
je 0x40bbd9
lea eax, [esp + 0xb0]
call fcn.0040bcd8
xor al, 1
je 0x40bbde
call fcn.0040d700
mov ecx, dword [esp + 0xa0]
mov edx, dword [ecx]
movzx ecx, byte [esp + 0xc0]
mov esi, dword [esp + 0xb0]
lea ecx, [esi + ecx*4]
test ebx, ebx
mov dword [ecx + 0x38], edx
mov edx, dword [esp + 0xa0]
mov edi, dword [edx + 4]
je 0x40bcc4
mov esi, edx
mov ecx, dword [edi + 0x50]
mov ebp, 1
sub esi, dword [edi]
sar esi, cl
mov dword [esp + 0xac], esi
mov ecx, dword [esp + 0xac]
and ecx, 0x1f
shr esi, 5
shl ebp, cl
test ebx, 0x20
je 0x40bc58
cmp dword [edi + 0x24], 0
jne 0x40bc50
lea edx, [edi + 0x20]
push dword [edi + 0xc]
mov eax, edx
call fcn.0040ec58
mov edx, dword [edi + 0x20]
mov ecx, ebp
or dword [edx + esi*4], ecx
test ebx, 1
je 0x40bc7b
cmp dword [edi + 0x1c], 0
jne 0x40bc73
lea ecx, [edi + 0x18]
push dword [edi + 0xc]
mov eax, ecx
call fcn.0040ec58
mov ecx, dword [edi + 0x18]
mov edx, ebp
or dword [ecx + esi*4], edx
test ebx, 2
je 0x40bc8b
mov ecx, dword [edi + 0x28]
mov edx, ebp
or dword [ecx + esi*4], edx
test ebx, 8
je 0x40bc9b
mov ecx, dword [edi + 0x30]
mov edx, ebp
or dword [ecx + esi*4], edx
cmp byte [edi + 0x4c], 0
je 0x40bcc4
test ebx, 0x10
je 0x40bcc4
cmp dword [edi + 0x3c], 0
jne 0x40bcbc
lea edx, [edi + 0x38]
push dword [edi + 0xc]
mov eax, edx
call fcn.0040ec58
mov edx, dword [edi + 0x38]
mov ecx, ebp
or dword [edx + esi*4], ecx
mov eax, dword [esp + 0xa0]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa4
ret 0xc