This repository has been archived by the owner on May 7, 2018. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0x81307D90 - Heap.txt
112 lines (94 loc) · 3.97 KB
/
0x81307D90 - Heap.txt
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
OSHeapHandle BS2Heap; // 7C78
void InitHeap (void)
{
void* arenaLo;
void* arenaHi;
void* newArenaLo;
arenaLo = OSRoundUp32B ( OSGetArenaLo () );
arenaHi = OSRoundDown32B ( OSGetArenaHi() );
newArenaLo = OSInitAlloc ( 0x80700000, arenaHi, 2 );
OSSetArenaLo ( arenaHi );
BS2Heap = OSCreateHeap ( arenaLo, arenaHi );
OSSetCurrentHeap ( BS2Heap );
OSAddToHeap ( BS2Heap, newArenaLo, 0x81100000 );
DumpHeap ();
}
u32
81307D90 7C0802A6 mflr r0
81307D94 90010004 stw r0, 4 (r1)
81307D98 9421FFE8 stwu r1, -24 (r1)
81307D9C 93E10014 stw r31, 20 (r1)
81307DA0 93C10010 stw r30, 16 (r1)
81307DA4 93A1000C stw r29, 12 (r1)
81307DA8 48054BE5 bl OSGetArenaLo
81307DAC 3803001F addi r0, r3, 31
81307DB0 541F0034 rlwinm r31, r0, 0, 0, 26 mask:0xFFFFFFE0
81307DB4 48054BD1 bl OSGetArenaHi
81307DB8 547E0034 rlwinm r30, r3, 0, 0, 26 mask:0xFFFFFFE0
81307DBC 389E0000 addi r4, r30, 0
81307DC0 3C608070 lis r3, 0x8070
81307DC4 38A00002 li r5, 2
81307DC8 4805497D bl OSInitAlloc
81307DCC 3BA30000 addi r29, r3, 0
81307DD0 387E0000 addi r3, r30, 0
81307DD4 48054BC9 bl OSSetArenaLo
81307DD8 387F0000 addi r3, r31, 0
81307DDC 389E0000 addi r4, r30, 0
81307DE0 480549D5 bl OSCreateHeap
81307DE4 906D8388 stw r3, -0x7C78 (r13)
81307DE8 4805494D bl OSSetCurrentHeap
81307DEC 806D8388 lwz r3, -0x7C78 (r13)
81307DF0 389D0000 addi r4, r29, 0
81307DF4 3CA08110 lis r5, 0x8110
81307DF8 48054A29 bl OSAddToHeap
81307DFC 48000021 bl 0x81307E1C
81307E00 8001001C lwz r0, 28 (r1)
81307E04 83E10014 lwz r31, 20 (r1)
81307E08 83C10010 lwz r30, 16 (r1)
81307E0C 83A1000C lwz r29, 12 (r1)
81307E10 38210018 addi r1, r1, 24
81307E14 7C0803A6 mtlr r0
81307E18 4E800020 blr
r31 = OSRoundUp32B ( 0x8135C98C () );
r30 = OSRoundDown32B ( 0x8135C984 () );
r29 = OSInitAlloc ( 0x80700000, r30, 2 );
0x8135C99C ( r30 );
var_7C78 = OSCreateHeap ( r31, r30 );
0x8135C734 ();
0x8135C820 ( var_7C78, r29, 0x81100000 );
0x81307E1C ();
81307D90 7C0802A6 mflr r0
81307D94 90010004 stw r0, 4 (r1)
81307D98 9421FFE8 stwu r1, -24 (r1)
81307D9C 93E10014 stw r31, 20 (r1)
81307DA0 93C10010 stw r30, 16 (r1)
81307DA4 93A1000C stw r29, 12 (r1)
81307DA8 48054BE5 bl 0x8135C98C
81307DAC 3803001F addi r0, r3, 31
81307DB0 541F0034 rlwinm r31, r0, 0, 0, 26 mask:0xFFFFFFE0
81307DB4 48054BD1 bl 0x8135C984
81307DB8 547E0034 rlwinm r30, r3, 0, 0, 26 mask:0xFFFFFFE0
81307DBC 389E0000 addi r4, r30, 0
81307DC0 3C608070 lis r3, 0x8070
81307DC4 38A00002 li r5, 2
81307DC8 4805497D bl OSInitAlloc
81307DCC 3BA30000 addi r29, r3, 0
81307DD0 387E0000 addi r3, r30, 0
81307DD4 48054BC9 bl 0x8135C99C
81307DD8 387F0000 addi r3, r31, 0
81307DDC 389E0000 addi r4, r30, 0
81307DE0 480549D5 bl OSCreateHeap
81307DE4 906D8388 stw r3, -0x7C78 (r13)
81307DE8 4805494D bl 0x8135C734
81307DEC 806D8388 lwz r3, -0x7C78 (r13)
81307DF0 389D0000 addi r4, r29, 0
81307DF4 3CA08110 lis r5, 0x8110
81307DF8 48054A29 bl 0x8135C820
81307DFC 48000021 bl 0x81307E1C
81307E00 8001001C lwz r0, 28 (r1)
81307E04 83E10014 lwz r31, 20 (r1)
81307E08 83C10010 lwz r30, 16 (r1)
81307E0C 83A1000C lwz r29, 12 (r1)
81307E10 38210018 addi r1, r1, 24
81307E14 7C0803A6 mtlr r0
81307E18 4E800020 blr