Function at 0x409820
Capabilities:
Get memory capacity

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x44
mov esi, dword [esp + 0x58]
mov eax, dword [0x464504]
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0
mov dword [0x464504], ecx
test esi, esi
mov dword [esp + 4], eax
mov dword [esp + 8], str.Kernel.NewBlock
js 0x409866
cmp esi, 0x7fffffed
jl 0x40988c
mov dword [0x464504], eax
xor ebx, ebx
jmp 0x40990f
push 0x464504
push 0x14
call fcn.00401380
add esp, 8
push 0x647
push str.Kernel.c
push 0x43d25a
call fcn.00424f0d
add esp, 0xc
lea edi, [esi + 0x13]
and edi, 0xfffffff0
push edi
call fcn.0040b730
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x409919
mov eax, 4
sub eax, edi
add eax, dword [ebx + 4]
test eax, eax
jle 0x4098bc
lea ecx, [edi + ebx]
push eax
push ecx
call fcn.0040b5b0
add esp, 8
test esi, esi
jle 0x4098d5
add esi, 3
lea eax, [ebx + 4]
and esi, 0xfffffffc
push esi
push 0
push eax
call fcn.00420480
add esp, 0xc
add dword [0x45c658], edi
test bl, 1
je 0x409906
push 0x464504
push 0x70
call fcn.00401380
add esp, 8
push 0x6b3
push str.Kernel.c
push 0x43d25a
call fcn.00424f0d
add esp, 0xc
mov eax, dword [esp + 4]
mov dword [0x464504], eax
mov eax, ebx
add esp, 0x44
pop esi
pop edi
pop ebx
pop ebp
ret
mov al, byte [0x45d698]
mov byte [esp], al
call fcn.0040a450
push edi
call fcn.0040b730
add esp, 4
cmp byte [esp], 0
mov ebx, eax
je 0x4099a8
test ebx, ebx
jne 0x4098a1
call fcn.00408c90
push edi
call fcn.0040b730
add esp, 4
mov ebx, eax
test ebx, ebx
jne 0x4098a1
mov eax, edi
lea ecx, [esp + 0x14]
or eax, 0xc
push ecx
push eax
call fcn.0040b890
add esp, 8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x409d28
mov ecx, dword [0x45c654]
test ecx, ecx
je 0x409a6d
cmp eax, ecx
jl 0x409a6d
nop dword [eax]
mov edx, ecx
mov ecx, dword [edx + 4]
test ecx, ecx
je 0x40999d
cmp eax, ecx
jg 0x409990
add edx, 4
mov dword [eax + 4], ecx
jmp 0x409a75
test ebx, ebx
jne 0x4098a1
call fcn.00408c90
push edi
call fcn.0040b730
add esp, 4
mov ebx, eax
test ebx, ebx
jne 0x4098a1
mov eax, dword [0x464504]
mov dword [esp + 0x24], 0x20
mov dword [esp + 0x28], 0xffffffff
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x20], str.Kernel.HeapFull
mov dword [0x464504], eax
lea eax, [esp + 0x24]
push eax
call sub.KERNEL32.dll_GlobalMemoryStatus
mov ecx, dword [0x45c65c]
mov eax, dword [esp + 0x1c]
add ecx, edi
mov dword [0x464504], eax
cmp ecx, dword [esp + 0x2c]
jle 0x409a47
mov ebx, dword [0x45c650]
test ebx, ebx
je 0x409a47
mov dword [0x45c650], 0
nop word [eax + eax]
mov eax, dword [ebx - 4]
push 0
push ebx
call dword [eax - 8]
add esp, 8
mov ebx, dword [ebx]
test ebx, ebx
jne 0x409a30
call fcn.00408c90
mov eax, dword [0x45c658]
mov ecx, 0x55555554
sub ecx, eax
cmp edi, ecx
jle 0x409a8d
mov ecx, dword [0x45c654]
mov ebp, dword [ecx + 8]
mov edx, ebp
sub edx, eax
cmp edi, edx
jle 0x409a9a
jmp 0x409d28
mov dword [eax + 4], ecx
mov edx, 0x45c654
mov dword [edx], eax
lea ebx, [eax + 0xc]
mov ecx, dword [eax]
add ecx, 0xfffffff4
and ecx, 0xfffffff0
add ecx, 0xfffffffc
mov dword [eax + 0x10], ecx
jmp 0x4098a1
mov ecx, dword [0x45c654]
add eax, edi
sar eax, 1
lea ebp, [eax + eax*2]
mov edx, dword [ecx]
mov eax, dword [0x45c660]
add edx, 0xfffffff4
and edx, 0xfffffff0
or edx, 0xc
cmp ebp, eax
jle 0x409ac1
lea ecx, [edx + edi]
cmp ebp, ecx
cmovl ebp, ecx
xor ebx, ebx
test ebx, ebx
je 0x409ae5
jmp 0x409d0d
push edi
mov ebx, edx
call fcn.0040b730
mov edx, ebx
add esp, 4
mov ebx, eax
lea eax, [edx + edi]
test ebx, ebx
cmove ebp, eax
mov eax, dword [0x45c660]
test ebx, ebx
jne 0x409d0d
cmp eax, ebp
jge 0x409d0d
mov dword [esp], edx
push 0x45c654
push ebp
call fcn.0040ba80
add esp, 8
mov ecx, dword [0x45c654]
mov eax, dword [ecx]
cmp eax, ebp
jge 0x409b3e
mov ebx, dword [0x45c650]
test ebx, ebx
je 0x409d15
mov dword [0x45c650], 0
mov eax, dword [ebx - 4]
push 1
push ebx
call dword [eax - 8]
add esp, 8
mov ebx, dword [ebx]
test ebx, ebx
jne 0x409b22
call fcn.00408c90
jmp 0x409d15
mov edx, dword [0x464504]
mov dword [esp + 0x18], ecx
mov ebp, dword [0x45d678]
lea ebx, [esp + 0x24]
mov dword [esp + 0x10], eax
mov dword [0x464504], ebx
mov dword [esp + 0x24], edx
mov dword [esp + 0xc], edx
mov edx, dword [esp]
mov dword [esp + 0x28], str.Kernel.LastBlock
lea edx, [edx + ecx - 4]
mov ecx, dword [0x45d674]
cmp ebp, ecx
je 0x409b97
xor eax, eax
mov ebx, ebp
mov ebp, dword [ebx + 4]
add ebp, ebx
cmp ebp, edx
je 0x409c92
mov ebp, dword [ebx + 8]
mov eax, ebx
cmp ebp, ecx
jne 0x409b7f
mov ebp, dword [0x45d67c]
cmp ebp, ecx
je 0x409bbb
xor eax, eax
mov ebx, ebp
mov ebp, dword [ebx + 4]
add ebp, ebx
cmp ebp, edx
je 0x409c99
mov ebp, dword [ebx + 8]
mov eax, ebx
cmp ebp, ecx
jne 0x409ba3
mov ebp, dword [0x45d680]
cmp ebp, ecx
je 0x409bdf
xor eax, eax
mov ebx, ebp
mov ebp, dword [ebx + 4]
add ebp, ebx
cmp ebp, edx
je 0x409ca0
mov ebp, dword [ebx + 8]
mov eax, ebx
cmp ebp, ecx
jne 0x409bc7
mov ebp, dword [0x45d684]
cmp ebp, ecx
je 0x409c03
xor eax, eax
mov ebx, ebp
mov ebp, dword [ebx + 4]
add ebp, ebx
cmp ebp, edx
je 0x409ca7
mov ebp, dword [ebx + 8]
mov eax, ebx
cmp ebp, ecx
jne 0x409beb
mov ebp, dword [0x45d688]
cmp ebp, ecx
je 0x409c27
xor eax, eax
mov ebx, ebp
mov ebp, dword [ebx + 4]
add ebp, ebx
cmp ebp, edx
je 0x409cae
mov ebp, dword [ebx + 8]
mov eax, ebx
cmp ebp, ecx
jne 0x409c0f
mov ebp, dword [0x45d68c]
cmp ebp, ecx
je 0x409c47
xor eax, eax
mov ebx, ebp
mov ebp, dword [ebx + 4]
add ebp, ebx
cmp ebp, edx
je 0x409cb5
mov ebp, dword [ebx + 8]
mov eax, ebx
cmp ebp, ecx
jne 0x409c33
mov ebp, dword [0x45d690]
cmp ebp, ecx
je 0x409c67
xor eax, eax
mov ebx, ebp
mov ebp, dword [ebx + 4]
add ebp, ebx
cmp ebp, edx
je 0x409cbc
mov ebp, dword [ebx + 8]
mov eax, ebx
cmp ebp, ecx
jne 0x409c53
mov ebp, dword [0x45d694]
cmp ebp, ecx
je 0x409c87
xor eax, eax
mov ebx, ebp
mov ebp, dword [ebx + 4]
add ebp, ebx
cmp ebp, edx
je 0x409cc3
mov ebp, dword [ebx + 8]
mov eax, ebx
cmp ebp, ecx
jne 0x409c73
mov eax, dword [esp + 0xc]
mov dword [0x464504], eax
jmp 0x409cf3
mov ecx, 0x45d678
jmp 0x409cc8
mov ecx, 0x45d67c
jmp 0x409cc8
mov ecx, 0x45d680
jmp 0x409cc8
mov ecx, 0x45d684
jmp 0x409cc8
mov ecx, 0x45d688
jmp 0x409cc8
mov ecx, 0x45d68c
jmp 0x409cc8
mov ecx, 0x45d690
jmp 0x409cc8
mov ecx, 0x45d694
mov edx, dword [ebx + 8]
test eax, eax
lea eax, [eax + 8]
cmove eax, ecx
test ebx, ebx
mov dword [eax], edx
mov eax, dword [esp + 0xc]
mov dword [0x464504], eax
je 0x409cf3
mov eax, 4
sub eax, dword [esp]
add eax, dword [esp + 0x10]
add eax, dword [ebx + 4]
jmp 0x409d04
mov eax, dword [esp]
mov ecx, dword [esp + 0x10]
mov ebx, dword [esp + 0x18]
sub ecx, eax
add ebx, eax
mov eax, ecx
and eax, 0xfffffff0
add eax, 0xfffffffc
mov dword [ebx + 4], eax
test ebx, ebx
jne 0x4098a1
push edi
call fcn.0040b730
add esp, 4
mov ebx, eax
test ebx, ebx
jne 0x4098a1
mov eax, dword [esp + 4]
jmp 0x40985a