Function at 0x10038de4
Capabilities:
Get memory capacity

Disassembly:
sub esp, 0xcc
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], edi
mov dword [esp + 0xc8], eax
movzx ecx, byte [esp + 0xd8]
mov ebx, dword [esp + 0xd4]
mov edx, dword [ecx*4 + 0x100735d0]
mov dword [ebx], edx
lea eax, [esp + 0xc8]
mov dword [esp + 0x8c], 0
call fcn.100393dc
xor al, 1
je 0x1003924c
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x6c]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x6c]
push ecx
call sub.KERNEL32.DLL_GlobalMemoryStatus
mov eax, dword [esp + 0x84]
mov edx, 0xcccccccd
mul edx
shr edx, 4
cmp dword [esp + 0x88], edx
jb 0x10039074
mov edx, dword [esp + 0xc8]
cmp dword [edx + 0xa4], 0
jne 0x10038ea6
xor edi, edi
mov dword [esp + 0x20], edi
mov ebx, dword [edx + 0xe0]
mov dword [esp + 0x1c], ebx
fild qword [esp + 0x1c]
fcomp dword [edx + 0xd8]
fnstsw ax
sahf
jae 0x10039074
jp 0x10039074
mov eax, dword [esp + 0xc8]
mov dword [esp + 0xc0], eax
push 1
push 0
mov eax, dword [esp + 0xc8]
call fcn.10039b10
test eax, eax
jne 0x10039205
mov ebx, dword [esp + 0xc8]
mov dword [esp + 0xbc], ebx
push 0
mov eax, dword [esp + 0xc0]
call fcn.1003a910
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x9c]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x9c]
push ecx
call sub.KERNEL32.DLL_GlobalMemoryStatus
mov eax, dword [esp + 0xb4]
mov edx, 0xcccccccd
mul edx
shr edx, 4
cmp dword [esp + 0xb8], edx
jae 0x10039205
mov edx, dword [esp + 0xc8]
mov ebp, dword [esp + 0xc8]
lea eax, [edx + 0xa8]
call fcn.1003d080
xor ebx, ebx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], edx
cmp dword [esp + 0x2c], ebx
je 0x10039205
mov ecx, dword [esp + 0x30]
mov edi, dword [ecx + ebx*4]
mov edx, dword [edi + 0x40]
sub dword [ebp + 0xe8], edx
mov ecx, dword [edi]
test ecx, ecx
je 0x10038f87
cmp dword [edi + 0x40], 0
je 0x10038f80
push 0x8000
push 0
push ecx
call sub.KERNEL32.DLL_VirtualFree
mov dword [edi + 0x40], 0
xor edx, edx
mov dword [edi], edx
mov dword [edi + 4], edx
mov ecx, dword [edi + 0x48]
test ecx, ecx
je 0x10038f9d
mov dword [esp], ecx
call fcn.10063694
mov dword [edi + 0x48], 0
mov edx, dword [edi + 0x54]
test edx, edx
je 0x10038fac
mov dword [esp], edx
call fcn.10063694
lea esi, [edi + 8]
cmp dword [esi], 0
je 0x10038fc4
mov ecx, dword [esi]
mov dword [esp], ecx
call fcn.10063694
mov dword [esi], 0
cmp byte [edi + 0x4c], 0
je 0x10038fe4
lea esi, [edi + 0x38]
cmp dword [esi], 0
je 0x10038ffc
mov ecx, dword [esi]
mov dword [esp], ecx
call fcn.10063694
mov dword [esi], 0
jmp 0x10038ffc
lea esi, [edi + 0x10]
cmp dword [esi], 0
je 0x10038ffc
mov edx, dword [esi]
mov dword [esp], edx
call fcn.10063694
mov dword [esi], 0
lea esi, [edi + 0x18]
cmp dword [esi], 0
je 0x10039014
mov edx, dword [esi]
mov dword [esp], edx
call fcn.10063694
mov dword [esi], 0
lea esi, [edi + 0x20]
cmp dword [esi], 0
je 0x1003902c
mov ecx, dword [esi]
mov dword [esp], ecx
call fcn.10063694
mov dword [esi], 0
lea esi, [edi + 0x28]
cmp dword [esi], 0
je 0x10039044
mov edx, dword [esi]
mov dword [esp], edx
call fcn.10063694
mov dword [esi], 0
lea esi, [edi + 0x30]
cmp dword [esi], 0
je 0x1003905c
mov ecx, dword [esi]
mov dword [esp], ecx
call fcn.10063694
mov dword [esi], 0
mov dword [esp], edi
call fcn.10063694
inc ebx
cmp ebx, dword [esp + 0x2c]
jb 0x10038f50
jmp 0x10039205
mov ecx, dword [esp + 0xc8]
mov dword [esp + 0x3c], ecx
push 0
mov eax, dword [esp + 0x40]
call fcn.1003a910
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x4c]
rep stosd dword es:[edi], eax
lea edx, [esp + 0x4c]
push edx
call sub.KERNEL32.DLL_GlobalMemoryStatus
mov eax, dword [esp + 0x64]
mov edx, 0xcccccccd
mul edx
shr edx, 4
cmp dword [esp + 0x68], edx
jae 0x10039205
mov ecx, dword [esp + 0xc8]
mov ebp, dword [esp + 0xc8]
lea eax, [ecx + 0xa8]
call fcn.1003d080
xor ebx, ebx
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], edx
cmp dword [esp + 0x34], ebx
je 0x10039205
mov edx, dword [esp + 0x38]
mov edi, dword [edx + ebx*4]
mov ecx, dword [edi + 0x40]
sub dword [ebp + 0xe8], ecx
mov edx, dword [edi]
test edx, edx
je 0x1003911d
cmp dword [edi + 0x40], 0
je 0x10039116
push 0x8000
push 0
push edx
call sub.KERNEL32.DLL_VirtualFree
mov dword [edi + 0x40], 0
xor ecx, ecx
mov dword [edi], ecx
mov dword [edi + 4], ecx
mov edx, dword [edi + 0x48]
test edx, edx
je 0x10039133
mov dword [esp], edx
call fcn.10063694
mov dword [edi + 0x48], 0
mov ecx, dword [edi + 0x54]
test ecx, ecx
je 0x10039142
mov dword [esp], ecx
call fcn.10063694
lea esi, [edi + 8]
cmp dword [esi], 0
je 0x1003915a
mov edx, dword [esi]
mov dword [esp], edx
call fcn.10063694
mov dword [esi], 0
cmp byte [edi + 0x4c], 0
je 0x1003917a
lea esi, [edi + 0x38]
cmp dword [esi], 0
je 0x10039192
mov edx, dword [esi]
mov dword [esp], edx
call fcn.10063694
mov dword [esi], 0
jmp 0x10039192
lea esi, [edi + 0x10]
cmp dword [esi], 0
je 0x10039192
mov ecx, dword [esi]
mov dword [esp], ecx
call fcn.10063694
mov dword [esi], 0
lea esi, [edi + 0x18]
cmp dword [esi], 0
je 0x100391aa
mov ecx, dword [esi]
mov dword [esp], ecx
call fcn.10063694
mov dword [esi], 0
lea esi, [edi + 0x20]
cmp dword [esi], 0
je 0x100391c2
mov edx, dword [esi]
mov dword [esp], edx
call fcn.10063694
mov dword [esi], 0
lea esi, [edi + 0x28]
cmp dword [esi], 0
je 0x100391da
mov ecx, dword [esi]
mov dword [esp], ecx
call fcn.10063694
mov dword [esi], 0
lea esi, [edi + 0x30]
cmp dword [esi], 0
je 0x100391f2
mov edx, dword [esi]
mov dword [esp], edx
call fcn.10063694
mov dword [esi], 0
mov dword [esp], edi
call fcn.10063694
inc ebx
cmp ebx, dword [esp + 0x34]
jb 0x100390e6
lea eax, [esp + 0xc8]
call fcn.100393dc
xor al, 1
je 0x1003924c
mov ebx, dword [esp + 0xc8]
mov dword [esp + 0xc4], ebx
push 1
push 0
mov eax, dword [esp + 0xcc]
call fcn.10039b10
test eax, eax
je 0x10039247
lea eax, [esp + 0xc8]
call fcn.100393dc
xor al, 1
je 0x1003924c
call fcn.1003b630
mov ecx, dword [esp + 0x8c]
mov edx, dword [ecx]
movzx esi, byte [esp + 0xd8]
cmp dword [esp + 0xd0], 0
mov edi, dword [esp + 0xc8]
lea eax, [edi + esi*4]
mov dword [eax + 0xb8], edx
mov ecx, dword [esp + 0x8c]
mov ebx, dword [ecx + 4]
je 0x100393bb
mov eax, ecx
mov ecx, dword [ebx + 0x50]
mov edi, 1
sub eax, dword [ebx]
sar eax, cl
mov esi, eax
mov ecx, eax
and ecx, 0x1f
shr esi, 5
shl edi, cl
test dword [esp + 0xd0], 0x20
je 0x100392f1
cmp dword [ebx + 0x24], 0
jne 0x100392eb
lea ebp, [ebx + 0x20]
mov edx, dword [ebx + 0xc]
mov dword [ebp + 4], edx
mov dword [esp + 4], 4
mov ecx, dword [ebp + 4]
add ecx, 0x1f
shr ecx, 5
mov dword [esp], ecx
call fcn.10065bdc
test eax, eax
mov dword [ebp], eax
jne 0x100392eb
call fcn.1001f3fc
mov dword [esp], eax
call fcn.10019b14
mov edx, dword [ebx + 0x20]
or dword [edx + esi*4], edi
test dword [esp + 0xd0], 1
je 0x10039340
cmp dword [ebx + 0x1c], 0
jne 0x1003933a
lea ebp, [ebx + 0x18]
mov ecx, dword [ebx + 0xc]
mov dword [ebp + 4], ecx
mov dword [esp + 4], 4
mov edx, dword [ebp + 4]
add edx, 0x1f
shr edx, 5
mov dword [esp], edx
call fcn.10065bdc
test eax, eax
mov dword [ebp], eax
jne 0x1003933a
call fcn.1001f3fc
mov dword [esp], eax
call fcn.10019b14
mov ecx, dword [ebx + 0x18]
or dword [ecx + esi*4], edi
test dword [esp + 0xd0], 2
je 0x10039353
mov edx, dword [ebx + 0x28]
or dword [edx + esi*4], edi
test dword [esp + 0xd0], 8
je 0x10039366
mov ecx, dword [ebx + 0x30]
or dword [ecx + esi*4], edi
cmp byte [ebx + 0x4c], 0
je 0x100393bb
test dword [esp + 0xd0], 0x10
je 0x100393bb
cmp dword [ebx + 0x3c], 0
jne 0x100393b5
lea ebp, [ebx + 0x38]
mov edx, dword [ebx + 0xc]
mov dword [ebp + 4], edx
mov dword [esp + 4], 4
mov ecx, dword [ebp + 4]
add ecx, 0x1f
shr ecx, 5
mov dword [esp], ecx
call fcn.10065bdc
test eax, eax
mov dword [ebp], eax
jne 0x100393b5
call fcn.1001f3fc
mov dword [esp], eax
call fcn.10019b14
mov edx, dword [ebx + 0x38]
or dword [edx + esi*4], edi
mov eax, dword [esp + 0x8c]
mov ebx, dword [esp + 0xc]
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
add esp, 0xcc
ret 0xc