Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] ```c

[DiscordArchive] ```c

[DiscordArchive] ```c

Pages (3): 1 2 3 Next
rektbyfaith
Administrator
0
08-15-2025, 09:19 PM
#1
Archived author: MaxtorCoder • Posted: 2025-08-15T21:19:07.607000+00:00
Original source

```c
void __fastcall sub_1434C6040(blz::unordered_map$int32_t$blz::pair$int_const$JamTraitConfig *a1, __int64 a2, int *a3)
{
blz::chained_hash_node$blz::pair$int32_t$blz::pair$int_const$JamTraitConfig **m_buckets; // r11
unsigned __int64 v5; // rdx
unsigned __int64 m_bucket_count; // rbx
unsigned __int64 v7; // rax
blz::chained_hash_node$blz::pair$int32_t$blz::pair$int_const$JamTraitConfig **v8; // r8
blz::chained_hash_node$blz::pair$int32_t$blz::pair$int_const$JamTraitConfig *v9; // rax
blz::chained_hash_node$blz::pair$int32_t$blz::pair$int_const$JamTraitConfig **i; // rcx
__int128 v11; // [rsp+0h] [rbp-28h]
blz::chained_hash_node$blz::pair$int32_t$blz::pair$int_const$JamTraitConfig **v12; // [rsp+10h] [rbp-18h]

m_buckets = a1->m_buckets;
if ( m_buckets )
{
v5 = *a3;
m_bucket_count = a1->m_bucket_count;
v7 = 0xC4CEB9FE1A85EC53uLL * ((0xFF51AFD7ED558CCDuLL * (v5 ^ (v5 >> 0x21))) ^ ((0xFF51AFD7ED558CCDuLL * (v5 ^ (v5 >> 0x21))) >> 0x21));
v8 = &m_buckets[(v7 ^ (v7 >> 0x21)) & (a1->m_bucket_count - 1)];
v9 = *v8;
for ( i = v8; v9; v9 = v9->next )
{
if ( (_DWORD)v5 == v9->val.first )
{
break;
}
i = &v9->next;
}
if ( !*i )
{
v8 = &m_buckets[m_bucket_count];
}
*(_QWORD *)&v11 = *i;
v12 = &m_buckets[m_bucket_count];
*((_QWORD *)&v11 + 1) = v8;
}
else
{
*((_QWORD *)&v11 + 1) = 8 * a1->m_bucket_count;
v12 = (blz::chained_hash_node$blz::pair$int32_t$blz::pair$int_const$JamTraitConfig **)*((_QWORD *)&v11 + 1);
*(_QWORD *)&v11 = 0;
}
*(_OWORD *)a2 = v11;
*(_QWORD *)(a2 + 0x10) = v12;
}
```
I assume that `a2` her is the iterator then?
rektbyfaith
08-15-2025, 09:19 PM #1

Archived author: MaxtorCoder • Posted: 2025-08-15T21:19:07.607000+00:00
Original source

```c
void __fastcall sub_1434C6040(blz::unordered_map$int32_t$blz::pair$int_const$JamTraitConfig *a1, __int64 a2, int *a3)
{
blz::chained_hash_node$blz::pair$int32_t$blz::pair$int_const$JamTraitConfig **m_buckets; // r11
unsigned __int64 v5; // rdx
unsigned __int64 m_bucket_count; // rbx
unsigned __int64 v7; // rax
blz::chained_hash_node$blz::pair$int32_t$blz::pair$int_const$JamTraitConfig **v8; // r8
blz::chained_hash_node$blz::pair$int32_t$blz::pair$int_const$JamTraitConfig *v9; // rax
blz::chained_hash_node$blz::pair$int32_t$blz::pair$int_const$JamTraitConfig **i; // rcx
__int128 v11; // [rsp+0h] [rbp-28h]
blz::chained_hash_node$blz::pair$int32_t$blz::pair$int_const$JamTraitConfig **v12; // [rsp+10h] [rbp-18h]

m_buckets = a1->m_buckets;
if ( m_buckets )
{
v5 = *a3;
m_bucket_count = a1->m_bucket_count;
v7 = 0xC4CEB9FE1A85EC53uLL * ((0xFF51AFD7ED558CCDuLL * (v5 ^ (v5 >> 0x21))) ^ ((0xFF51AFD7ED558CCDuLL * (v5 ^ (v5 >> 0x21))) >> 0x21));
v8 = &m_buckets[(v7 ^ (v7 >> 0x21)) & (a1->m_bucket_count - 1)];
v9 = *v8;
for ( i = v8; v9; v9 = v9->next )
{
if ( (_DWORD)v5 == v9->val.first )
{
break;
}
i = &v9->next;
}
if ( !*i )
{
v8 = &m_buckets[m_bucket_count];
}
*(_QWORD *)&v11 = *i;
v12 = &m_buckets[m_bucket_count];
*((_QWORD *)&v11 + 1) = v8;
}
else
{
*((_QWORD *)&v11 + 1) = 8 * a1->m_bucket_count;
v12 = (blz::chained_hash_node$blz::pair$int32_t$blz::pair$int_const$JamTraitConfig **)*((_QWORD *)&v11 + 1);
*(_QWORD *)&v11 = 0;
}
*(_OWORD *)a2 = v11;
*(_QWORD *)(a2 + 0x10) = v12;
}
```
I assume that `a2` her is the iterator then?

rektbyfaith
Administrator
0
08-15-2025, 09:21 PM
#2
Archived author: Tea • Posted: 2025-08-15T21:21:26.841000+00:00
Original source

yes, return type isnt void
rektbyfaith
08-15-2025, 09:21 PM #2

Archived author: Tea • Posted: 2025-08-15T21:21:26.841000+00:00
Original source

yes, return type isnt void

rektbyfaith
Administrator
0
08-15-2025, 09:21 PM
#3
Archived author: Tea • Posted: 2025-08-15T21:21:30.024000+00:00
Original source

this is .find()
rektbyfaith
08-15-2025, 09:21 PM #3

Archived author: Tea • Posted: 2025-08-15T21:21:30.024000+00:00
Original source

this is .find()

rektbyfaith
Administrator
0
08-15-2025, 09:23 PM
#4
Archived author: MaxtorCoder • Posted: 2025-08-15T21:23:56.578000+00:00
Original source

Makes sense
rektbyfaith
08-15-2025, 09:23 PM #4

Archived author: MaxtorCoder • Posted: 2025-08-15T21:23:56.578000+00:00
Original source

Makes sense

rektbyfaith
Administrator
0
08-15-2025, 09:25 PM
#5
Archived author: MaxtorCoder • Posted: 2025-08-15T21:25:10.160000+00:00
Original source

If I do `blz::unordered_map<int, JamTraitConfig>` btw I get an incorrect accessor
rektbyfaith
08-15-2025, 09:25 PM #5

Archived author: MaxtorCoder • Posted: 2025-08-15T21:25:10.160000+00:00
Original source

If I do `blz::unordered_map<int, JamTraitConfig>` btw I get an incorrect accessor

rektbyfaith
Administrator
0
08-15-2025, 09:25 PM
#6
Archived author: MaxtorCoder • Posted: 2025-08-15T21:25:16.815000+00:00
Original source

As seen here
[Image: image.png?ex=690c697c&is=690b17fc&hm=b77...cde8e6cb8&]
rektbyfaith
08-15-2025, 09:25 PM #6

Archived author: MaxtorCoder • Posted: 2025-08-15T21:25:16.815000+00:00
Original source

As seen here
[Image: image.png?ex=690c697c&is=690b17fc&hm=b77...cde8e6cb8&]

rektbyfaith
Administrator
0
08-15-2025, 09:25 PM
#7
Archived author: MaxtorCoder • Posted: 2025-08-15T21:25:33.210000+00:00
Original source

It goes into `LoadoutName` instead of just the `JamTraitConfig` instance
rektbyfaith
08-15-2025, 09:25 PM #7

Archived author: MaxtorCoder • Posted: 2025-08-15T21:25:33.210000+00:00
Original source

It goes into `LoadoutName` instead of just the `JamTraitConfig` instance

rektbyfaith
Administrator
0
08-15-2025, 09:26 PM
#8
Archived author: MaxtorCoder • Posted: 2025-08-15T21:26:22.692000+00:00
Original source

```c
struct blz::pair$int32_t$JamTraitConfig // sizeof=0x19C
{ // XREF: blz::chained_hash_node$blz::pair$int32_t$JamTraitConfig/r
int32_t first;
JamTraitConfig second;
};

struct __declspec(align(8)) blz::chained_hash_node$blz::pair$int32_t$JamTraitConfig // sizeof=0x1A8
{
blz::chained_hash_node$blz::pair$int32_t$JamTraitConfig *next;
blz::pair$int32_t$JamTraitConfig val;
// padding byte
// padding byte
// padding byte
// padding byte
};

struct blz::unordered_map::iterator$int32_t$JamTraitConfig // sizeof=0x18
{ // XREF: blz::pair$blz::unordered_map::iterator$int32_t$JamTraitConfig$bool/r
blz::chained_hash_node$blz::pair$int32_t$JamTraitConfig *node;
blz::chained_hash_node$blz::pair$int32_t$JamTraitConfig **bucket;
blz::chained_hash_node$blz::pair$int32_t$JamTraitConfig **end;
};

struct blz::pair$blz::unordered_map::iterator$int32_t$JamTraitConfig$bool // sizeof=0x20
{
blz::unordered_map::iterator$int32_t$JamTraitConfig first;
bool second;
// padding byte
// padding byte
// padding byte
// padding byte
// padding byte
// padding byte
// padding byte
};

struct blz::unordered_map$int32_t$JamTraitConfig // sizeof=0x20
{
unsigned __int64 m_bucket_count;
blz::chained_hash_node$blz::pair$int32_t$JamTraitConfig **m_buckets;
unsigned __int64 m_entry_count;
float m_max_load_factor;
// padding byte
// padding byte
// padding byte
// padding byte
};
```
Structs from IDA, I am not sure if this is incorrect then
rektbyfaith
08-15-2025, 09:26 PM #8

Archived author: MaxtorCoder • Posted: 2025-08-15T21:26:22.692000+00:00
Original source

```c
struct blz::pair$int32_t$JamTraitConfig // sizeof=0x19C
{ // XREF: blz::chained_hash_node$blz::pair$int32_t$JamTraitConfig/r
int32_t first;
JamTraitConfig second;
};

struct __declspec(align(8)) blz::chained_hash_node$blz::pair$int32_t$JamTraitConfig // sizeof=0x1A8
{
blz::chained_hash_node$blz::pair$int32_t$JamTraitConfig *next;
blz::pair$int32_t$JamTraitConfig val;
// padding byte
// padding byte
// padding byte
// padding byte
};

struct blz::unordered_map::iterator$int32_t$JamTraitConfig // sizeof=0x18
{ // XREF: blz::pair$blz::unordered_map::iterator$int32_t$JamTraitConfig$bool/r
blz::chained_hash_node$blz::pair$int32_t$JamTraitConfig *node;
blz::chained_hash_node$blz::pair$int32_t$JamTraitConfig **bucket;
blz::chained_hash_node$blz::pair$int32_t$JamTraitConfig **end;
};

struct blz::pair$blz::unordered_map::iterator$int32_t$JamTraitConfig$bool // sizeof=0x20
{
blz::unordered_map::iterator$int32_t$JamTraitConfig first;
bool second;
// padding byte
// padding byte
// padding byte
// padding byte
// padding byte
// padding byte
// padding byte
};

struct blz::unordered_map$int32_t$JamTraitConfig // sizeof=0x20
{
unsigned __int64 m_bucket_count;
blz::chained_hash_node$blz::pair$int32_t$JamTraitConfig **m_buckets;
unsigned __int64 m_entry_count;
float m_max_load_factor;
// padding byte
// padding byte
// padding byte
// padding byte
};
```
Structs from IDA, I am not sure if this is incorrect then

rektbyfaith
Administrator
0
08-15-2025, 09:27 PM
#9
Archived author: Tea • Posted: 2025-08-15T21:27:43.655000+00:00
Original source

JamTraitConfig has a vector in it right? for entries
rektbyfaith
08-15-2025, 09:27 PM #9

Archived author: Tea • Posted: 2025-08-15T21:27:43.655000+00:00
Original source

JamTraitConfig has a vector in it right? for entries

rektbyfaith
Administrator
0
08-15-2025, 09:27 PM
#10
Archived author: MaxtorCoder • Posted: 2025-08-15T21:27:50.410000+00:00
Original source

Yeah
rektbyfaith
08-15-2025, 09:27 PM #10

Archived author: MaxtorCoder • Posted: 2025-08-15T21:27:50.410000+00:00
Original source

Yeah

Pages (3): 1 2 3 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)