I'm trying to understand this code from assembly,
int32_t phase_5(char * str) {
int32_t v1 = 0;
if (strlen(str) != 4) {
// 0x8049153
alert_henchmen(5);
v1 = 0;
// branch -> 0x80491a6
}
while (true) {
int32_t * v2 = (int32_t *)(4 * v1 + (int32_t)&g2); // 0x8049192_0
char * v3 = (char *)(v1 + (int32_t)str);
int32_t v4 = 0;
int32_t v5 = 0; // 0x01516
// branch -> 0x8049175
int32_t v6; // bp+014
while (true) {
char v7 = *(char *)(v4 + (int32_t)"4l6aiqhor20x"); // 0x8049188
v6 = v5;
if ((int32_t)*v3 == (int32_t)v7) {
// 0x804918f
v6 = *v2 == v4 ? 1 : v5;
// branch -> 0x80491a2
}
int32_t v8 = v4 + 1; // 0x80491a2
if (v8 >= 12) {
// break -> 0x80491ac
break;
}
v4 = v8;
v5 = v6;
// continue -> 0x8049175
}
// 0x80491ac
if (v6 % 256 != 1) {
// 0x80491b7
alert_henchmen(5);
// branch -> 0x80491c3
}
int32_t v9 = v1 + 1; // 0x80491c3
if (v9 >= 4) {
// break -> 0x80491cd
break;
}
v1 = v9;
// continue -> 0x80491a6
}
// 0x80491cd
return confirm_phase(5, str);
}
and I'm just not sure what this line does:
int32_t * v2 = (int32_t *)(4 * v1 + (int32_t)&g2)
and also this line:
char v7 = *(char *)(v4 + (int32_t)"4l6aiqhor20x")
and what does int32_t mean?