Function at 0x406580
Capabilities:
Get memory capacity

Disassembly:
sub esp, 0xc0
push esi
push edi
push 0
call dword [sym.imp.MSVCRT.dll_time]
add esp, 4
mov dword [esp + 0x1c], eax
call sub.KERNEL32.dll_GetCurrentProcessId
mov dword [esp + 0xc], eax
call sub.KERNEL32.dll_GetCurrentThreadId
mov edi, dword [0x41e39c]
mov dword [esp + 0x10], eax
test edi, edi
je 0x406603
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
call dword [sym.imp.MSVCRT.dll_malloc]
mov edx, eax
add esp, 4
test edx, edx
jne 0x4065d5
pop edi
pop esi
add esp, 0xc0
ret
mov edi, dword [0x41e39c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
add esp, 0xc0
ret
mov eax, dword [0x41e3d0]
test eax, eax
je 0x40661d
push eax
call fcn.00406990
add esp, 4
test eax, eax
jne 0x40697f
lea ecx, [esp + 0x20]
push ecx
call fcn.00403640
lea edx, [esp + 0x20]
push 4
lea eax, [esp + 0x28]
push edx
push eax
call fcn.00403680
lea ecx, [esp + 0x1c]
push 4
lea edx, [esp + 0x34]
push ecx
push edx
call fcn.00403680
lea eax, [esp + 0x2c]
push 4
lea ecx, [esp + 0x40]
push eax
push ecx
call fcn.00403680
add esp, 0x28
call dword [sym.imp.USER32.dll_GetActiveWindow]
mov dword [esp + 8], eax
lea edx, [esp + 8]
push 4
lea eax, [esp + 0x24]
push edx
push eax
call fcn.00403680
add esp, 0xc
call dword [sym.imp.USER32.dll_GetCapture]
lea ecx, [esp + 8]
push 4
lea edx, [esp + 0x24]
push ecx
push edx
mov dword [esp + 0x14], eax
call fcn.00403680
add esp, 0xc
call dword [sym.imp.USER32.dll_GetClipboardOwner]
mov dword [esp + 8], eax
lea eax, [esp + 8]
push 4
lea ecx, [esp + 0x24]
push eax
push ecx
call fcn.00403680
add esp, 0xc
call dword [sym.imp.USER32.dll_GetClipboardViewer]
mov dword [esp + 8], eax
lea edx, [esp + 8]
push 4
lea eax, [esp + 0x24]
push edx
push eax
call fcn.00403680
add esp, 0xc
call dword [sym.imp.USER32.dll_GetDesktopWindow]
lea ecx, [esp + 8]
push 4
lea edx, [esp + 0x24]
push ecx
push edx
mov dword [esp + 0x14], eax
call fcn.00403680
add esp, 0xc
call dword [sym.imp.USER32.dll_GetFocus]
mov dword [esp + 8], eax
lea eax, [esp + 8]
push 4
lea ecx, [esp + 0x24]
push eax
push ecx
call fcn.00403680
add esp, 0xc
call dword [sym.imp.USER32.dll_GetInputState]
lea edx, [esp + 8]
push 4
mov dword [esp + 0xc], eax
push edx
lea eax, [esp + 0x28]
push eax
call fcn.00403680
add esp, 0xc
call dword [sym.imp.USER32.dll_GetMessagePos]
lea ecx, [esp + 8]
push 4
lea edx, [esp + 0x24]
push ecx
push edx
mov dword [esp + 0x14], eax
call fcn.00403680
add esp, 0xc
call dword [sym.imp.USER32.dll_GetMessageTime]
mov dword [esp + 8], eax
lea eax, [esp + 8]
push 4
lea ecx, [esp + 0x24]
push eax
push ecx
call fcn.00403680
add esp, 0xc
call dword [sym.imp.USER32.dll_GetOpenClipboardWindow]
mov dword [esp + 8], eax
lea edx, [esp + 8]
push 4
lea eax, [esp + 0x24]
push edx
push eax
call fcn.00403680
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
lea ecx, [esp + 8]
push 4
lea edx, [esp + 0x24]
push ecx
push edx
mov dword [esp + 0x14], eax
call fcn.00403680
add esp, 0xc
call dword [sym.imp.USER32.dll_GetProcessWindowStation]
mov dword [esp + 8], eax
lea eax, [esp + 8]
push 4
lea ecx, [esp + 0x24]
push eax
push ecx
call fcn.00403680
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 8], eax
lea edx, [esp + 8]
push 4
lea eax, [esp + 0x24]
push edx
push eax
call fcn.00403680
add esp, 0xc
lea ecx, [esp + 0x80]
push ecx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea edx, [esp + 0x80]
push 8
lea eax, [esp + 0x24]
push edx
push eax
call fcn.00403680
add esp, 0xc
lea ecx, [esp + 0x88]
lea edx, [esp + 0xa0]
lea eax, [esp + 0x90]
push ecx
push edx
lea ecx, [esp + 0xa0]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessTimes]
push 8
lea edx, [esp + 0x9c]
lea eax, [esp + 0x24]
push edx
push eax
call fcn.00403680
lea ecx, [esp + 0x9c]
push 8
lea edx, [esp + 0x30]
push ecx
push edx
call fcn.00403680
lea eax, [esp + 0xb8]
push 8
lea ecx, [esp + 0x3c]
push eax
push ecx
call fcn.00403680
lea edx, [esp + 0xac]
push 8
lea eax, [esp + 0x48]
push edx
push eax
call fcn.00403680
add esp, 0x30
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.USER32.dll_GetCaretPos]
lea edx, [esp + 0x14]
push 8
lea eax, [esp + 0x24]
push edx
push eax
call fcn.00403680
add esp, 0xc
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.USER32.dll_GetCursorPos]
lea edx, [esp + 0x14]
push 8
lea eax, [esp + 0x24]
push edx
push eax
call fcn.00403680
add esp, 0xc
lea ecx, [esp + 0xa8]
mov dword [esp + 0xa8], 0x20
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatus]
lea edx, [esp + 0xa8]
push 0x20
lea eax, [esp + 0x24]
push edx
push eax
call fcn.00403680
lea ecx, [esp + 0x2c]
push ecx
call fcn.00404af0
mov eax, dword [esp + 0x30]
add esp, 0x10
test eax, eax
jne 0x40693b
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x40693b
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x40693b
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x40693b
mov eax, dword [esp + 0x30]
test eax, eax
je 0x40692d
cmp eax, 1
jne 0x40693b
call fcn.00406580
pop edi
pop esi
add esp, 0xc0
ret
push 0x29
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
jne 0x406955
pop edi
pop esi
add esp, 0xc0
ret
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x28]
push ecx
push edx
push eax
push str._08lx_08lx_08lx_08lx_08lx
push esi
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x1c
mov eax, esi
pop edi
pop esi
add esp, 0xc0
ret