Function at 0x404ccc
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x255c
call fcn.0040c214
push ebx
push esi
push edi
call fcn.004046b5
mov byte [ebp - 0x201d], 0
call sub.KERN_GetVersion
cmp eax, 0x80000000
jae 0x404cfb
mov byte [ebp - 0x201d], 1
mov byte [ebp - 0x100d], 0
inc dword [0x42c094]
cmp byte [ebp - 0x201d], 0
jne 0x404d22
movzx eax, byte [ebp - 0x100d]
cmp byte [eax + 0x42c8f0], 1
je 0x404d3c
cmp byte [ebp - 0x201d], 0
je 0x404d3e
movzx eax, byte [ebp - 0x100d]
cmp byte [eax + 0x42c8f0], 2
jne 0x404d3e
jmp 0x404d9c
movzx edx, byte [ebp - 0x100d]
mov dword [ebp - 0x2158], edx
imul ecx, edx, 0xf
lea ecx, [ecx + 0x42c8c8]
push ecx
call sub.KERN_LoadLibraryA
mov edx, dword [ebp - 0x2158]
mov dword [edx*4 + 0x4186e0], eax
movzx edx, byte [ebp - 0x100d]
imul ecx, edx, 0x1e
lea ecx, [ecx + 0x42c86e]
push ecx
shl edx, 2
mov dword [ebp - 0x215c], edx
push dword [edx + 0x4186e0]
call sub.KERN_GetProcAddress
mov edx, dword [ebp - 0x215c]
mov dword [edx + 0x417df0], eax
add byte [ebp - 0x100d], 1
movzx eax, byte [ebp - 0x100d]
imul eax, eax, 0x1e
cmp byte [eax + 0x42c86e], 0
jne 0x404d08
mov byte [ebp - 0x100d], 0
movzx edx, byte [ebp - 0x100d]
shl edx, 2
cmp dword [edx + 0x417df0], 0
je 0x405274
movzx edx, byte [ebp - 0x100d]
shl edx, 2
mov edx, dword [edx + 0x4186e0]
mov dword [ebp - 0x202c], edx
inc dword [0x42c094]
cmp byte [ebp - 0x201d], 0
je 0x404f9b
call fcn.0040473b
mov dword [ebp - 0x2028], eax
inc dword [0x42c094]
mov edx, dword [ebp - 0x202c]
mov ebx, edx
shr ebx, 0x16
shl ebx, 0x16
mov eax, ebx
add eax, 0x400000
mov dword [ebp - 0x100c], eax
xor edi, edi
jmp 0x404e55
push 0x1000
push ebx
call sub.KERN_IsBadReadPtr
mov esi, eax
xor esi, 1
shl esi, 2
mov dword [ebp + edi*4 - 0x1008], esi
inc edi
add ebx, 0x1000
cmp ebx, dword [ebp - 0x100c]
jbe 0x404e34
lea eax, [ebp - 0x217c]
push eax
call sub.KERN_GlobalMemoryStatus
inc dword [0x42c094]
and dword [ebp - 0x1014], 0
jmp 0x404f07
push 0xffff
push dword [ebp - 0x1014]
push dword [ebp - 0x2028]
call fcn.004048a8
add esp, 0xc
mov dword [ebp - 4], eax
or eax, eax
je 0x404efd
and dword [ebp - 0x2180], 0
mov ebx, dword [ebp - 0x2180]
jmp 0x404eec
xor edi, edi
mov edx, ebx
shr edx, 2
shl edx, 2
add edx, dword [ebp - 4]
mov esi, dword [edx + edi*4]
and esi, 4
cmp esi, dword [ebp + edi*4 - 0x1008]
jne 0x404ecf
inc edi
cmp edi, 0x400
jb 0x404eac
cmp edi, 0x3ff
jb 0x404ee6
mov eax, ebx
add eax, 0x1000
mov dword [ebp - 0x2180], eax
jmp 0x404f34
add ebx, 0x1000
cmp ebx, 0xf000
jbe 0x404eaa
push dword [ebp - 4]
call fcn.0040490f
pop ecx
add dword [ebp - 0x1014], 0x10000
mov eax, dword [ebp - 0x2174]
sub eax, 0xffff
cmp dword [ebp - 0x1014], eax
jbe 0x404e7b
inc dword [0x42c094]
push dword [ebp - 0x2028]
call sub.KERN_CloseHandle
jmp 0x405274
movzx edx, byte [ebp - 0x100d]
shl edx, 2
mov edx, dword [edx + 0x417df0]
mov dword [ebp - 0x100c], edx
and dword [ebp - 0x100c], 0
mov edx, dword [ebp - 0x100c]
shl edx, 2
mov ecx, ebx
shr ecx, 2
shl ecx, 2
add ecx, dword [ebp - 4]
mov ecx, dword [ecx + edx]
mov dword [ebp + edx - 0x2018], ecx
mov edx, dword [ebp - 0x100c]
shl edx, 2
mov ecx, ebx
shr ecx, 2
shl ecx, 2
add ecx, dword [ebp - 4]
add edx, ecx
or byte [edx], 2
inc dword [ebp - 0x100c]
cmp dword [ebp - 0x100c], 0x400
jb 0x404f52
inc dword [0x42c094]
cmp byte [ebp - 0x201d], 0
jne 0x405005
push 0x42c9ee
call sub.KERN_GetModuleHandleA
mov dword [ebp - 0x2160], eax
mov edx, eax
add edx, dword [eax + 0x3c]
mov dword [ebp - 0x2164], edx
add edx, 0x78
add eax, dword [edx]
mov dword [ebp - 0x2168], eax
mov eax, dword [ebp - 0x2160]
mov edx, dword [ebp - 0x2168]
add edx, 0x1c
add eax, dword [edx]
mov dword [ebp - 0x216c], eax
mov eax, dword [ebp - 0x2160]
mov edx, dword [ebp - 0x216c]
add eax, dword [edx]
mov dword [ebp - 0x2170], eax
mov dword [ebp - 0x2054], eax
mov eax, dword [ebp - 0x202c]
mov dword [ebp - 0x2024], eax
push 0x1c
lea eax, [ebp - 0x2048]
push eax
push dword [ebp - 0x2024]
call sub.KERN_VirtualQuery
mov eax, dword [ebp - 0x202c]
cmp dword [ebp - 0x2044], eax
jne 0x405076
mov eax, dword [ebp - 0x203c]
mov dword [ebp - 0x204c], eax
add dword [ebp - 0x2024], eax
cmp byte [ebp - 0x201d], 0
jne 0x405011
push 0x20060000
push 0
mov edx, dword [ebp - 0x204c]
shr edx, 0xc
push edx
mov edx, dword [ebp - 0x2048]
shr edx, 0xc
push edx
push 0x1000d
call dword [ebp - 0x2054]
jmp 0x405011
inc dword [0x42c094]
movzx edx, byte [ebp - 0x100d]
shl edx, 2
mov ecx, dword [ebp - 0x2024]
sub ecx, dword [ebp - 0x202c]
mov dword [edx + 0x4181f0], ecx
movzx edx, byte [ebp - 0x100d]
shl edx, 2
mov edx, dword [edx + 0x417df0]
mov dword [ebp - 0x100c], edx
push 0x1000
push edx
call sub.KERN_IsBadWritePtr
mov dword [ebp - 0x2050], eax
or eax, eax
jne 0x405229
cmp byte [ebp + 8], 0
je 0x40520d
mov eax, dword [ebp - 0x100c]
movzx eax, byte [eax]
cmp eax, 0xe9
je 0x4050f2
cmp byte [ebp + 8], 1
je 0x405229
jmp 0x40520d
mov eax, dword [ebp - 0x100c]
mov edx, dword [eax + 1]
sub edx, 0xffffffff
lea eax, [edx + eax + 4]
mov dword [ebp - 0x201c], eax
mov byte [ebp - 0x215d], 0
sub dword [ebp - 0x201c], 5
mov esi, dword [ebp - 0x201c]
mov eax, esi
dec eax
cmp byte [eax], 0
jne 0x405150
mov eax, esi
sub eax, 2
cmp byte [eax], 0
jne 0x405150
mov eax, esi
sub eax, 3
cmp byte [eax], 0
jne 0x405150
mov eax, esi
sub eax, 4
cmp byte [eax], 0
jne 0x405150
mov eax, esi
sub eax, 5
cmp byte [eax], 0
je 0x405159
dec esi
jmp 0x405120
movzx edx, byte [ebp - 0x215d]
shl edx, 2
mov dword [ebp + edx - 0x255c], esi
add byte [ebp - 0x215d], 1
movzx eax, byte [esi]
cmp eax, 0xe9
jne 0x405191
mov eax, dword [esi + 1]
sub eax, 0xffffffff
lea eax, [eax + esi + 4]
mov dword [ebp - 0x201c], eax
jmp 0x405113
mov edi, esi
jmp 0x4051a4
mov eax, dword [ebp - 0x100c]
add eax, edi
sub eax, esi
mov dl, byte [edi]
mov byte [eax], dl
inc edi
cmp edi, dword [ebp - 0x201c]
jb 0x405195
sub byte [ebp - 0x215d], 1
movzx edx, byte [ebp - 0x215d]
shl edx, 2
mov edi, dword [ebp + edx - 0x255c]
mov byte [edi], 0
cmp byte [edi + 1], 0
jne 0x4051f9
cmp byte [edi + 2], 0
jne 0x4051f9
cmp byte [edi + 3], 0
jne 0x4051f9
cmp byte [edi + 4], 0
jne 0x4051f9
cmp byte [edi + 5], 0
je 0x4051fc
inc edi
jmp 0x4051c4
movzx eax, byte [ebp - 0x215d]
or eax, eax
jg 0x4051ac
cmp byte [ebp + 8], 1
je 0x405229
movzx eax, byte [ebp - 0x100d]
push eax
push dword [ebp - 0x2024]
push dword [ebp - 0x202c]
call fcn.00404b9d
add esp, 0xc
cmp byte [ebp - 0x201d], 0
je 0x405274
and dword [ebp - 0x100c], 0
mov edx, dword [ebp - 0x100c]
shl edx, 2
mov ecx, ebx
shr ecx, 2
shl ecx, 2
add ecx, dword [ebp - 4]
mov eax, dword [ebp + edx - 0x2018]
mov dword [ecx + edx], eax
inc dword [ebp - 0x100c]
cmp dword [ebp - 0x100c], 0x400
jb 0x405239
inc dword [0x42c094]
jmp 0x404ea2
add byte [ebp - 0x100d], 1
movzx eax, byte [ebp - 0x100d]
imul eax, eax, 0x1e
cmp byte [eax + 0x42c86e], 0
jne 0x404dc2
pop edi
pop esi
pop ebx
leave
ret