summaryrefslogtreecommitdiff
path: root/source/notes/star_trek_armada/memory_check
blob: 38e26aae03c77c2d925048c27be431d3ac5d28ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
            0x005005a0      55             push ebp
            0x005005a1      8bec           mov ebp, esp
            0x005005a3      83ec20         sub esp, 0x20
            0x005005a6      8d45e0         lea eax, [ebp - 0x20]
            0x005005a9      50             push eax
            0x005005aa      ff15887b6d00   call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatus] ; 0x6d7b88
            0x005005b0      e8fbfdffff     call 0x5003b0
            0x005005b5      3d66fdffff     cmp eax, 0xfffffd66         ; 4294966630
            0x005005ba      a3c4db6700     mov dword [0x67dbc4], eax   ; [0x67dbc4:4]=-1
        ,=< 0x005005bf      750c           jne 0x5005cd
        |   0x005005c1      c705c4db6700.  mov dword [0x67dbc4], 0     ; [0x67dbc4:4]=-1
       ,==< 0x005005cb      eb0f           jmp 0x5005dc
       |`-> 0x005005cd      83f8ff         cmp eax, 0xffffffffffffffff
       |,=< 0x005005d0      750a           jne 0x5005dc
       ||   0x005005d2      c705c4db6700.  mov dword [0x67dbc4], 0xc8  ; [0x67dbc4:4]=-1
       ``-> 0x005005dc      8b45e8         mov eax, dword [ebp - 0x18]
            0x005005df      8b4df4         mov ecx, dword [ebp - 0xc]
            0x005005e2      3d0000c001     cmp eax, 0x1c00000
            0x005005e7      a3c8db6700     mov dword [0x67dbc8], eax   ; [0x67dbc8:4]=-1
            0x005005ec      890ddcdb6700   mov dword [0x67dbdc], ecx   ; [0x67dbdc:4]=-1
        ,=< 0x005005f2      7d12           jge 0x500606
        |   0x005005f4      81f90000e001   cmp ecx, 0x1e00000
       ,==< 0x005005fa      7d0a           jge 0x500606
       ||   0x005005fc      6a00           push 0
       ||   0x005005fe      e8ad28f4ff     call 0x442eb0
       ||   0x00500603      83c404         add esp, 4
       ``-> 0x00500606      8b4508         mov eax, dword [ebp + 8]    ; [0x8:4]=4
            0x00500609      56             push esi
            0x0050060a      57             push edi
            0x0050060b      b908000000     mov ecx, 8
            0x00500610      bec0db6700     mov esi, 0x67dbc0
            0x00500615      8bf8           mov edi, eax
            0x00500617      f3a5           rep movsd dword es:[edi], dword ptr [esi]
            0x00500619      5f             pop edi
            0x0050061a      5e             pop esi
            0x0050061b      8be5           mov esp, ebp
            0x0050061d      5d             pop ebp
            0x0050061e      c3             ret