Skip to content

Instantly share code, notes, and snippets.

@uyjulian
Created November 6, 2025 23:40
Show Gist options
  • Select an option

  • Save uyjulian/f72b57a08f9aaf2ac74af76d0615b9ac to your computer and use it in GitHub Desktop.

Select an option

Save uyjulian/f72b57a08f9aaf2ac74af76d0615b9ac to your computer and use it in GitHub Desktop.
__int64 __fastcall sub_1404E9300(__int64 a1, unsigned int a2)
{
unsigned int v2; // er15
__int64 v4; // r12
unsigned int v5; // eax
int v6; // er15
unsigned int v7; // eax
unsigned int v8; // eax
unsigned int v9; // eax
unsigned int v10; // ebx
__int64 v11; // rdi
__int64 i; // r14
const char *v13; // rbx
const char *v14; // rcx
unsigned int v15; // eax
unsigned int v16; // esi
unsigned int v17; // eax
unsigned int v18; // ebx
unsigned int v19; // eax
unsigned int v20; // ebx
unsigned int v21; // eax
unsigned int v22; // esi
const char *v26; // rbx
unsigned int v27; // eax
unsigned int v28; // eax
unsigned int v29; // ebx
unsigned int v30; // eax
unsigned int v31; // eax
unsigned int v32; // eax
unsigned int v33; // ebx
unsigned int v34; // eax
unsigned int v35; // ebx
__int64 v36; // rdi
__int64 j; // r14
const char *v38; // rbx
const char *v39; // rcx
unsigned int v40; // eax
unsigned int v41; // esi
unsigned int v42; // eax
unsigned int v43; // ebx
unsigned int v44; // eax
unsigned int v45; // ebx
unsigned int v46; // eax
unsigned int v47; // esi
const char *v51; // rbx
unsigned int v52; // eax
unsigned int v53; // eax
unsigned int v54; // ebx
unsigned int v55; // eax
unsigned int v56; // eax
unsigned int v57; // eax
unsigned int v58; // ebx
unsigned int v59; // eax
unsigned int v60; // ebx
__int64 v61; // rdi
__int64 k; // r14
const char *v63; // rbx
const char *v64; // rcx
unsigned int v65; // eax
unsigned int v66; // esi
unsigned int v67; // eax
unsigned int v68; // ebx
unsigned int v69; // eax
unsigned int v70; // ebx
unsigned int v71; // eax
unsigned int v72; // esi
const char *v76; // rbx
unsigned int v77; // eax
unsigned int v78; // eax
unsigned int v79; // ebx
unsigned int v80; // eax
unsigned int v81; // eax
unsigned int v82; // eax
unsigned int v83; // ebx
unsigned int v84; // eax
unsigned int v85; // ebx
unsigned int v86; // eax
unsigned int v87; // ebx
__int64 v88; // rdi
__int64 m; // r14
const char *v90; // rbx
const char *v91; // rcx
unsigned int v92; // eax
unsigned int v93; // esi
unsigned int v94; // eax
unsigned int v95; // ebx
unsigned int v96; // eax
unsigned int v97; // ebx
unsigned int v98; // eax
unsigned int v99; // esi
const char *v103; // rbx
unsigned int v104; // eax
unsigned int v105; // eax
unsigned int v106; // ebx
unsigned int v107; // eax
unsigned int v108; // eax
unsigned int v109; // eax
unsigned int v110; // ebx
unsigned int v111; // eax
unsigned int v112; // ebx
__int64 v113; // rdi
__int64 n; // r14
const char *v115; // rbx
const char *v116; // rcx
unsigned int v117; // eax
unsigned int v118; // esi
unsigned int v119; // eax
unsigned int v120; // ebx
unsigned int v121; // eax
unsigned int v122; // ebx
unsigned int v123; // eax
unsigned int v124; // esi
const char *v128; // rbx
unsigned int v129; // eax
unsigned int v130; // eax
unsigned int v131; // ebx
unsigned int v132; // eax
unsigned int v133; // eax
unsigned int v134; // eax
unsigned int v135; // ebx
unsigned int v136; // eax
unsigned int v137; // ebx
unsigned int v138; // eax
unsigned int v139; // ebx
__int64 v140; // rbx
__int64 ii; // r14
const char *v142; // rdi
const char *v143; // rcx
unsigned int v144; // eax
unsigned int v145; // esi
unsigned int v146; // eax
unsigned int v147; // edi
unsigned int v148; // eax
unsigned int v149; // edi
unsigned int v150; // eax
unsigned int v151; // esi
const char *v155; // rbx
unsigned int v156; // eax
unsigned int v157; // eax
unsigned int v158; // ebx
unsigned int v159; // eax
unsigned int v160; // eax
unsigned int v161; // eax
unsigned int v162; // ebx
__int64 v163; // rdi
__int64 jj; // r14
const char *v165; // rbx
const char *v166; // rcx
unsigned int v167; // eax
unsigned int v168; // esi
unsigned int v169; // eax
unsigned int v170; // ebx
unsigned int v171; // eax
unsigned int v172; // ebx
unsigned int v173; // eax
unsigned int v174; // esi
const char *v178; // rbx
unsigned int v179; // eax
unsigned int v180; // eax
unsigned int v181; // ebx
unsigned int v182; // eax
unsigned int v183; // eax
unsigned int v184; // eax
unsigned int v185; // ebx
unsigned int v186; // eax
unsigned int v187; // ebx
__int64 v188; // rdi
__int64 kk; // r14
const char *v190; // rbx
const char *v191; // rcx
unsigned int v192; // eax
unsigned int v193; // esi
unsigned int v194; // eax
unsigned int v195; // ebx
unsigned int v196; // eax
unsigned int v197; // ebx
unsigned int v198; // eax
unsigned int v199; // esi
const char *v203; // rbx
unsigned int v204; // eax
unsigned int v205; // eax
unsigned int v206; // ebx
unsigned int v207; // eax
unsigned int v208; // eax
unsigned int v209; // eax
unsigned int v210; // ebx
unsigned int v211; // eax
unsigned int v212; // ebx
__int64 v213; // rdi
__int64 mm; // r14
const char *v215; // rbx
const char *v216; // rcx
unsigned int v217; // eax
unsigned int v218; // esi
unsigned int v219; // eax
unsigned int v220; // ebx
unsigned int v221; // eax
unsigned int v222; // ebx
unsigned int v223; // eax
unsigned int v224; // esi
const char *v228; // rbx
unsigned int v229; // eax
unsigned int v230; // eax
unsigned int v231; // ebx
unsigned int v232; // eax
unsigned int v233; // eax
unsigned int v234; // eax
unsigned int v235; // ebx
__int64 v236; // rdi
__int64 nn; // r14
const char *v238; // rbx
const char *v239; // rcx
unsigned int v240; // eax
unsigned int v241; // esi
unsigned int v242; // eax
unsigned int v243; // ebx
unsigned int v244; // eax
unsigned int v245; // ebx
unsigned int v246; // eax
unsigned int v247; // esi
const char *v251; // rbx
unsigned int v252; // eax
unsigned int v253; // eax
unsigned int v254; // ebx
unsigned int v255; // eax
unsigned int v256; // eax
unsigned int v257; // eax
unsigned int v258; // ebx
unsigned int v259; // eax
unsigned int v260; // ebx
__int64 v261; // rdi
__int64 i1; // r14
const char *v263; // rbx
const char *v264; // rcx
unsigned int v265; // eax
unsigned int v266; // esi
unsigned int v267; // eax
unsigned int v268; // ebx
unsigned int v269; // eax
unsigned int v270; // ebx
unsigned int v271; // eax
unsigned int v272; // esi
const char *v276; // rbx
unsigned int v277; // eax
unsigned int v278; // eax
unsigned int v279; // ebx
unsigned int v280; // eax
unsigned int v281; // eax
unsigned int v282; // eax
unsigned int v283; // ebx
unsigned int v284; // eax
unsigned int v285; // ebx
__int64 v286; // rbx
__int64 i2; // r14
const char *v288; // rdi
const char *v289; // rcx
unsigned int v290; // eax
unsigned int v291; // esi
unsigned int v292; // eax
unsigned int v293; // edi
unsigned int v294; // eax
unsigned int v295; // edi
unsigned int v296; // eax
unsigned int v297; // esi
const char *v301; // rbx
unsigned int v302; // eax
unsigned int v303; // eax
unsigned int v304; // ebx
unsigned int v305; // eax
unsigned int v306; // eax
unsigned int v307; // eax
unsigned int v308; // ebx
__int64 v309; // rdi
__int64 i3; // r14
const char *v311; // rbx
const char *v312; // rcx
unsigned int v313; // eax
unsigned int v314; // esi
unsigned int v315; // eax
unsigned int v316; // ebx
unsigned int v317; // eax
unsigned int v318; // ebx
unsigned int v319; // eax
unsigned int v320; // esi
const char *v324; // rbx
unsigned int v325; // eax
unsigned int v326; // eax
unsigned int v327; // ebx
unsigned int v328; // eax
unsigned int v329; // eax
unsigned int v330; // eax
unsigned int v332; // eax
__int64 v334; // rdi
__int64 i4; // r14
const char *v336; // rbx
const char *v337; // rcx
unsigned int v338; // eax
unsigned int v340; // eax
unsigned int v342; // eax
unsigned int v344; // eax
const char *v349; // rbx
unsigned int v350; // eax
unsigned int v351; // eax
unsigned int v353; // eax
unsigned int v354; // eax
unsigned int v355; // eax
unsigned int v357; // eax
__int64 v359; // rbx
__int64 i5; // r14
const char *v361; // rdi
const char *v362; // rcx
unsigned int v363; // eax
unsigned int v365; // eax
unsigned int v367; // eax
unsigned int v369; // eax
const char *v374; // rbx
unsigned int v375; // eax
unsigned int v376; // eax
__int64 v378; // rcx
__int64 v379; // rcx
__int64 v380; // rcx
__int64 v381; // rcx
__int64 v382; // rcx
__int64 v383; // rcx
__int64 v384; // rcx
__int64 v385; // rbx
__int64 i6; // rdi
__int64 v387; // rax
__int64 v389; // [rsp+20h] [rbp-E0h]
char Destination[128]; // [rsp+30h] [rbp-D0h] BYREF
unsigned int v391; // [rsp+B0h] [rbp-50h]
char v392[1024]; // [rsp+C0h] [rbp-40h] BYREF
unsigned int v393; // [rsp+4C0h] [rbp+3C0h]
char String[16]; // [rsp+4D0h] [rbp+3D0h] BYREF
char Source[64]; // [rsp+4E0h] [rbp+3E0h] BYREF
v2 = a2;
LODWORD(v389) = a2;
v4 = g_material_obj;
v391 = 0;
M_STR_CPY(Destination, g_material_shader_filename, v391, 0x7F);
if ( (*(_DWORD *)(a1 + 284) & 0x10) == 0 )
{
v6 = (8 * (*(_BYTE *)(a1 + 248) & 0x20)) | 1;
HIDWORD(v389) = v6;
v393 = 0;
M_STR_CPY(v392, g_material_shader_filename, v393, 0x3FF);
M_STR_CPY(v392, "COMPILE_VS", v393, 0x3FF);
if ( (*(_BYTE *)(a1 + 248) & 0x20) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_TESSELLATION", v393, 0x400);
}
if ( (*(_BYTE *)(a1 + 284) & 1) == 0 || (*(_BYTE *)(a1 + 284) & 4) != 0 )
{
v11 = *(_QWORD *)(a1 + 144);
for ( i = v11 + 32i64 * *(_QWORD *)(a1 + 152); v11 != i; v11 += 32i64 )
{
v13 = *(const char **)v11;
M_STR_CAT_LEN_ERR(v392, v13, v393, 0x400);
if ( *(_DWORD *)(v11 + 28) != -1 )
{
M_STR_CAT_LEN_ERR(v392, " ", v393, 0x400);
sub_1400F95A0(String, 16, (int)"%d", *(unsigned int *)(v11 + 28));
M_STR_CAT_LEN_ERR(v392, String, v393, 0x400);
}
}
M_SPRINTF_CRC32(Source, v392, v393);
v26 = *(const char **)(a1 + 32);
if ( v26 )
{
M_STR_CPY(Destination, v26, v391, 0x7F);
}
M_STR_CAT_LEN_ERR(Destination, Source, v391, 0x80);
*(_QWORD *)(a1 + 296) = sub_14029DBE0(v4, (__int64)Destination, v6);
}
v393 = 0;
M_STR_CPY(v392, g_material_shader_filename, v393, 0x3FF);
M_STR_CPY(v392, "COMPILE_VS", v393, 0x3FF);
if ( (*(_BYTE *)(a1 + 248) & 0x20) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_TESSELLATION", v393, 0x400);
}
if ( (*(_BYTE *)(a1 + 284) & 1) != 0 || (*(_BYTE *)(a1 + 284) & 4) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_SKIN", v393, 0x400);
v36 = *(_QWORD *)(a1 + 144);
for ( j = v36 + 32i64 * *(_QWORD *)(a1 + 152); v36 != j; v36 += 32i64 )
{
v38 = *(const char **)v36;
M_STR_CAT_LEN_ERR(v392, v38, v393, 0x400);
if ( *(_DWORD *)(v36 + 28) != -1 )
{
M_STR_CAT_LEN_ERR(v392, " ", v393, 0x400);
sub_1400F95A0(String, 16, (int)"%d", *(unsigned int *)(v36 + 28));
M_STR_CAT_LEN_ERR(v392, String, v393, 0x400);
}
}
M_SPRINTF_CRC32(Source, v392, v393);
v51 = *(const char **)(a1 + 32);
if ( v51 )
{
M_STR_CPY(Destination, v51, v391, 0x7F);
}
M_STR_CAT_LEN_ERR(Destination, Source, v391, 0x80);
*(_QWORD *)(a1 + 352) = sub_14029DBE0(v4, (__int64)Destination, 1u);
}
v393 = 0;
M_STR_CPY(v392, g_material_shader_filename, v393, 0x3FF);
M_STR_CPY(v392, "COMPILE_VS", v393, 0x3FF);
if ( (*(_BYTE *)(a1 + 248) & 0x20) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_TESSELLATION", v393, 0x400);
}
if ( (*(_BYTE *)(a1 + 284) & 1) == 0 || (*(_BYTE *)(a1 + 284) & 4) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_TRANSPARENT", v393, 0x400);
v61 = *(_QWORD *)(a1 + 144);
for ( k = v61 + 32i64 * *(_QWORD *)(a1 + 152); v61 != k; v61 += 32i64 )
{
v63 = *(const char **)v61;
M_STR_CAT_LEN_ERR(v392, v63, v393, 0x400);
if ( *(_DWORD *)(v61 + 28) != -1 )
{
M_STR_CAT_LEN_ERR(v392, " ", v393, 0x400);
sub_1400F95A0(String, 16, (int)"%d", *(unsigned int *)(v61 + 28));
M_STR_CAT_LEN_ERR(v392, String, v393, 0x400);
}
}
M_SPRINTF_CRC32(Source, v392, v393);
v6 = HIDWORD(v389);
v76 = *(const char **)(a1 + 32);
if ( v76 )
{
M_STR_CPY(Destination, v76, v391, 0x7F);
}
M_STR_CAT_LEN_ERR(Destination, Source, v391, 0x80);
*(_QWORD *)(a1 + 304) = sub_14029DBE0(v4, (__int64)Destination, v6);
}
v393 = 0;
M_STR_CPY(v392, g_material_shader_filename, v393, 0x3FF);
M_STR_CPY(v392, "COMPILE_VS", v393, 0x3FF);
if ( (*(_BYTE *)(a1 + 248) & 0x20) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_TESSELLATION", v393, 0x400);
}
if ( (*(_BYTE *)(a1 + 284) & 1) != 0 || (*(_BYTE *)(a1 + 284) & 4) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_SKIN", v393, 0x400);
M_STR_CAT_LEN_ERR(v392, "BUILD_TRANSPARENT", v393, 0x400);
v88 = *(_QWORD *)(a1 + 144);
for ( m = v88 + 32i64 * *(_QWORD *)(a1 + 152); v88 != m; v88 += 32i64 )
{
v90 = *(const char **)v88;
M_STR_CAT_LEN_ERR(v392, v90, v393, 0x400);
if ( *(_DWORD *)(v88 + 28) != -1 )
{
M_STR_CAT_LEN_ERR(v392, " ", v393, 0x400);
sub_1400F95A0(String, 16, (int)"%d", *(unsigned int *)(v88 + 28));
M_STR_CAT_LEN_ERR(v392, String, v393, 0x400);
}
}
M_SPRINTF_CRC32(Source, v392, v393);
v6 = HIDWORD(v389);
v103 = *(const char **)(a1 + 32);
if ( v103 )
{
M_STR_CPY(Destination, v103, v391, 0x7F);
}
M_STR_CAT_LEN_ERR(Destination, Source, v391, 0x80);
*(_QWORD *)(a1 + 360) = sub_14029DBE0(v4, (__int64)Destination, 1u);
}
v393 = 0;
M_STR_CPY(v392, g_material_shader_filename, v393, 0x3FF);
M_STR_CPY(v392, "COMPILE_VS", v393, 0x3FF);
if ( (*(_BYTE *)(a1 + 248) & 1) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_SHADOW", v393, 0x400);
if ( (*(_BYTE *)(a1 + 248) & 0x20) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_TESSELLATION", v393, 0x400);
}
if ( (*(_BYTE *)(a1 + 284) & 1) == 0 || (*(_BYTE *)(a1 + 284) & 4) != 0 )
{
v113 = *(_QWORD *)(a1 + 144);
for ( n = v113 + 32i64 * *(_QWORD *)(a1 + 152); v113 != n; v113 += 32i64 )
{
v115 = *(const char **)v113;
M_STR_CAT_LEN_ERR(v392, v115, v393, 0x400);
if ( *(_DWORD *)(v113 + 28) != -1 )
{
M_STR_CAT_LEN_ERR(v392, " ", v393, 0x400);
sub_1400F95A0(String, 16, (int)"%d", *(unsigned int *)(v113 + 28));
M_STR_CAT_LEN_ERR(v392, String, v393, 0x400);
}
}
M_SPRINTF_CRC32(Source, v392, v393);
v6 = HIDWORD(v389);
v128 = *(const char **)(a1 + 32);
if ( v128 )
{
M_STR_CPY(Destination, v128, v391, 0x7F);
}
M_STR_CAT_LEN_ERR(Destination, Source, v391, 0x80);
*(_QWORD *)(a1 + 312) = sub_14029DBE0(v4, (__int64)Destination, v6);
}
}
v393 = 0;
M_STR_CPY(v392, g_material_shader_filename, v393, 0x3FF);
M_STR_CPY(v392, "COMPILE_VS", v393, 0x3FF);
if ( (*(_BYTE *)(a1 + 248) & 1) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_SHADOW", v393, 0x400);
if ( (*(_BYTE *)(a1 + 248) & 0x20) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_TESSELLATION", v393, 0x400);
}
if ( (*(_BYTE *)(a1 + 284) & 1) != 0 || (*(_BYTE *)(a1 + 284) & 4) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_SKIN", v393, 0x400);
v140 = *(_QWORD *)(a1 + 144);
for ( ii = v140 + 32i64 * *(_QWORD *)(a1 + 152); v140 != ii; v140 += 32i64 )
{
v142 = *(const char **)v140;
M_STR_CAT_LEN_ERR(v392, v142, v393, 0x400);
if ( *(_DWORD *)(v140 + 28) != -1 )
{
M_STR_CAT_LEN_ERR(v392, " ", v393, 0x400);
sub_1400F95A0(String, 16, (int)"%d", *(unsigned int *)(v140 + 28));
M_STR_CAT_LEN_ERR(v392, String, v393, 0x400);
}
}
M_SPRINTF_CRC32(Source, v392, v393);
v155 = *(const char **)(a1 + 32);
if ( v155 )
{
M_STR_CPY(Destination, v155, v391, 0x7F);
}
M_STR_CAT_LEN_ERR(Destination, Source, v391, 0x80);
*(_QWORD *)(a1 + 368) = sub_14029DBE0(v4, (__int64)Destination, 1u);
}
}
v2 = v389;
}
if ( (*(_DWORD *)(a1 + 284) & 0x10) == 0 && (*(_BYTE *)(a1 + 248) & 0x20) != 0 )
{
v393 = 0;
M_STR_CPY(v392, g_material_shader_filename, v393, 0x3FF);
M_STR_CPY(v392, "COMPILE_HS", v393, 0x3FF);
if ( (*(_BYTE *)(a1 + 248) & 0x20) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_TESSELLATION", v393, 0x400);
}
v163 = *(_QWORD *)(a1 + 144);
for ( jj = v163 + 32i64 * *(_QWORD *)(a1 + 152); v163 != jj; v163 += 32i64 )
{
v165 = *(const char **)v163;
M_STR_CAT_LEN_ERR(v392, v165, v393, 0x400);
if ( *(_DWORD *)(v163 + 28) != -1 )
{
M_STR_CAT_LEN_ERR(v392, " ", v393, 0x400);
sub_1400F95A0(String, 16, (int)"%d", *(unsigned int *)(v163 + 28));
M_STR_CAT_LEN_ERR(v392, String, v393, 0x400);
}
}
M_SPRINTF_CRC32(Source, v392, v393);
v2 = v389;
v178 = *(const char **)(a1 + 32);
if ( v178 )
{
M_STR_CPY(Destination, v178, v391, 0x7F);
}
M_STR_CAT_LEN_ERR(Destination, Source, v391, 0x80);
*(_QWORD *)(a1 + 408) = sub_1404EE5F0(v4, (__int64)Destination);
v393 = 0;
M_STR_CPY(v392, g_material_shader_filename, v393, 0x3FF);
M_STR_CPY(v392, "COMPILE_HS", v393, 0x3FF);
if ( (*(_BYTE *)(a1 + 248) & 0x20) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_TESSELLATION", v393, 0x400);
}
M_STR_CAT_LEN_ERR(v392, "BUILD_TRANSPARENT", v393, 0x400);
v188 = *(_QWORD *)(a1 + 144);
for ( kk = v188 + 32i64 * *(_QWORD *)(a1 + 152); v188 != kk; v188 += 32i64 )
{
v190 = *(const char **)v188;
M_STR_CAT_LEN_ERR(v392, v190, v393, 0x400);
if ( *(_DWORD *)(v188 + 28) != -1 )
{
M_STR_CAT_LEN_ERR(v392, " ", v393, 0x400);
sub_1400F95A0(String, 16, (int)"%d", *(unsigned int *)(v188 + 28));
M_STR_CAT_LEN_ERR(v392, String, v393, 0x400);
}
}
M_SPRINTF_CRC32(Source, v392, v393);
v2 = v389;
v203 = *(const char **)(a1 + 32);
if ( v203 )
{
M_STR_CPY(Destination, v203, v391, 0x7F);
}
M_STR_CAT_LEN_ERR(Destination, Source, v391, 0x80);
*(_QWORD *)(a1 + 416) = sub_1404EE5F0(v4, (__int64)Destination);
v393 = 0;
M_STR_CPY(v392, g_material_shader_filename, v393, 0x3FF);
M_STR_CPY(v392, "COMPILE_HS", v393, 0x3FF);
if ( (*(_BYTE *)(a1 + 248) & 1) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_SHADOW", v393, 0x400);
if ( (*(_BYTE *)(a1 + 248) & 0x20) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_TESSELLATION", v393, 0x400);
}
v213 = *(_QWORD *)(a1 + 144);
for ( mm = v213 + 32i64 * *(_QWORD *)(a1 + 152); v213 != mm; v213 += 32i64 )
{
v215 = *(const char **)v213;
M_STR_CAT_LEN_ERR(v392, v215, v393, 0x400);
if ( *(_DWORD *)(v213 + 28) != -1 )
{
M_STR_CAT_LEN_ERR(v392, " ", v393, 0x400);
sub_1400F95A0(String, 16, (int)"%d", *(unsigned int *)(v213 + 28));
M_STR_CAT_LEN_ERR(v392, String, v393, 0x400);
}
}
M_SPRINTF_CRC32(Source, v392, v393);
v2 = v389;
v228 = *(const char **)(a1 + 32);
if ( v228 )
{
M_STR_CPY(Destination, v228, v391, 0x7F);
}
M_STR_CAT_LEN_ERR(Destination, Source, v391, 0x80);
*(_QWORD *)(a1 + 424) = sub_1404EE5F0(v4, (__int64)Destination);
}
v393 = 0;
M_STR_CPY(v392, g_material_shader_filename, v393, 0x3FF);
M_STR_CPY(v392, "COMPILE_DS", v393, 0x3FF);
if ( (*(_BYTE *)(a1 + 248) & 0x20) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_TESSELLATION", v393, 0x400);
}
v236 = *(_QWORD *)(a1 + 144);
for ( nn = v236 + 32i64 * *(_QWORD *)(a1 + 152); v236 != nn; v236 += 32i64 )
{
v238 = *(const char **)v236;
M_STR_CAT_LEN_ERR(v392, v238, v393, 0x400);
if ( *(_DWORD *)(v236 + 28) != -1 )
{
M_STR_CAT_LEN_ERR(v392, " ", v393, 0x400);
sub_1400F95A0(String, 16, (int)"%d", *(unsigned int *)(v236 + 28));
M_STR_CAT_LEN_ERR(v392, String, v393, 0x400);
}
}
M_SPRINTF_CRC32(Source, v392, v393);
v2 = v389;
v251 = *(const char **)(a1 + 32);
if ( v251 )
{
M_STR_CPY(Destination, v251, v391, 0x7F);
}
M_STR_CAT_LEN_ERR(Destination, Source, v391, 0x80);
*(_QWORD *)(a1 + 464) = sub_1404EE6F0(v4, (__int64)Destination);
v393 = 0;
M_STR_CPY(v392, g_material_shader_filename, v393, 0x3FF);
M_STR_CPY(v392, "COMPILE_DS", v393, 0x3FF);
if ( (*(_BYTE *)(a1 + 248) & 0x20) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_TESSELLATION", v393, 0x400);
}
M_STR_CAT_LEN_ERR(v392, "BUILD_TRANSPARENT", v393, 0x400);
v261 = *(_QWORD *)(a1 + 144);
for ( i1 = v261 + 32i64 * *(_QWORD *)(a1 + 152); v261 != i1; v261 += 32i64 )
{
v263 = *(const char **)v261;
M_STR_CAT_LEN_ERR(v392, v263, v393, 0x400);
if ( *(_DWORD *)(v261 + 28) != -1 )
{
M_STR_CAT_LEN_ERR(v392, " ", v393, 0x400);
sub_1400F95A0(String, 16, (int)"%d", *(unsigned int *)(v261 + 28));
M_STR_CAT_LEN_ERR(v392, String, v393, 0x400);
}
}
M_SPRINTF_CRC32(Source, v392, v393);
v2 = v389;
v276 = *(const char **)(a1 + 32);
if ( v276 )
{
M_STR_CPY(Destination, v276, v391, 0x7F);
}
M_STR_CAT_LEN_ERR(Destination, Source, v391, 0x80);
*(_QWORD *)(a1 + 472) = sub_1404EE6F0(v4, (__int64)Destination);
v393 = 0;
M_STR_CPY(v392, g_material_shader_filename, v393, 0x3FF);
M_STR_CPY(v392, "COMPILE_DS", v393, 0x3FF);
if ( (*(_BYTE *)(a1 + 248) & 1) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_SHADOW", v393, 0x400);
if ( (*(_BYTE *)(a1 + 248) & 0x20) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_TESSELLATION", v393, 0x400);
}
v286 = *(_QWORD *)(a1 + 144);
for ( i2 = v286 + 32i64 * *(_QWORD *)(a1 + 152); v286 != i2; v286 += 32i64 )
{
v288 = *(const char **)v286;
M_STR_CAT_LEN_ERR(v392, v288, v393, 0x400);
if ( *(_DWORD *)(v286 + 28) != -1 )
{
M_STR_CAT_LEN_ERR(v392, " ", v393, 0x400);
sub_1400F95A0(String, 16, (int)"%d", *(unsigned int *)(v286 + 28));
M_STR_CAT_LEN_ERR(v392, String, v393, 0x400);
}
}
M_SPRINTF_CRC32(Source, v392, v393);
v2 = v389;
v301 = *(const char **)(a1 + 32);
if ( v301 )
{
M_STR_CPY(Destination, v301, v391, 0x7F);
}
M_STR_CAT_LEN_ERR(Destination, Source, v391, 0x80);
*(_QWORD *)(a1 + 480) = sub_1404EE6F0(v4, (__int64)Destination);
}
}
if ( (*(_DWORD *)(a1 + 284) & 0x10) == 0 )
{
v393 = 0;
M_STR_CPY(v392, g_material_shader_filename, v393, 0x3FF);
M_STR_CPY(v392, "COMPILE_PS", v393, 0x3FF);
if ( (*(_BYTE *)(a1 + 248) & 0x20) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_TESSELLATION", v393, 0x400);
}
v309 = *(_QWORD *)(a1 + 144);
for ( i3 = v309 + 32i64 * *(_QWORD *)(a1 + 152); v309 != i3; v309 += 32i64 )
{
v311 = *(const char **)v309;
M_STR_CAT_LEN_ERR(v392, v311, v393, 0x400);
if ( *(_DWORD *)(v309 + 28) != -1 )
{
M_STR_CAT_LEN_ERR(v392, " ", v393, 0x400);
sub_1400F95A0(String, 16, (int)"%d", *(unsigned int *)(v309 + 28));
M_STR_CAT_LEN_ERR(v392, String, v393, 0x400);
}
}
M_SPRINTF_CRC32(Source, v392, v393);
v2 = v389;
v324 = *(const char **)(a1 + 32);
if ( v324 )
{
M_STR_CPY(Destination, v324, v391, 0x7F);
}
M_STR_CAT_LEN_ERR(Destination, Source, v391, 0x80);
*(_QWORD *)(a1 + 520) = sub_14029DCF0(v4, (__int64)Destination);
v393 = 0;
M_STR_CPY(v392, g_material_shader_filename, v393, 0x3FF);
M_STR_CPY(v392, "COMPILE_PS", v393, 0x3FF);
if ( (*(_BYTE *)(a1 + 248) & 0x20) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_TESSELLATION", v393, 0x400);
}
M_STR_CAT_LEN_ERR(v392, "BUILD_TRANSPARENT", v393, 0x400);
v334 = *(_QWORD *)(a1 + 144);
for ( i4 = v334 + 32i64 * *(_QWORD *)(a1 + 152); v334 != i4; v334 += 32i64 )
{
v336 = *(const char **)v334;
M_STR_CAT_LEN_ERR(v392, v336, v393, 0x400);
if ( *(_DWORD *)(v334 + 28) != -1 )
{
M_STR_CAT_LEN_ERR(v392, " ", v393, 0x400);
sub_1400F95A0(String, 16, (int)"%d", *(unsigned int *)(v334 + 28));
M_STR_CAT_LEN_ERR(v392, String, v393, 0x400);
}
}
M_SPRINTF_CRC32(Source, v392, v393);
v2 = v389;
v349 = *(const char **)(a1 + 32);
if ( v349 )
{
M_STR_CPY(Destination, v349, v391, 0x7F);
}
M_STR_CAT_LEN_ERR(Destination, Source, v391, 0x80);
*(_QWORD *)(a1 + 528) = sub_14029DCF0(v4, (__int64)Destination);
v393 = 0;
M_STR_CPY(v392, g_material_shader_filename, v393, 0x3FF);
M_STR_CPY(v392, "COMPILE_PS", v393, 0x3FF);
if ( (*(_BYTE *)(a1 + 248) & 1) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_SHADOW", v393, 0x400);
if ( (*(_BYTE *)(a1 + 248) & 0x20) != 0 )
{
M_STR_CAT_LEN_ERR(v392, "BUILD_TESSELLATION", v393, 0x400);
}
v359 = *(_QWORD *)(a1 + 144);
for ( i5 = v359 + 32i64 * *(_QWORD *)(a1 + 152); v359 != i5; v359 += 32i64 )
{
v361 = *(const char **)v359;
M_STR_CAT_LEN_ERR(v392, v361, v393, 0x400);
if ( *(_DWORD *)(v359 + 28) != -1 )
{
M_STR_CAT_LEN_ERR(v392, " ", v393, 0x400);
sub_1400F95A0(String, 16, (int)"%d", *(unsigned int *)(v359 + 28));
M_STR_CAT_LEN_ERR(v392, String, v393, 0x400);
}
}
M_SPRINTF_CRC32(Source, v392, v393);
v2 = v389;
v374 = *(const char **)(a1 + 32);
if ( v374 )
{
M_STR_CPY(Destination, v374, v391, 0x7F);
}
M_STR_CAT_LEN_ERR(Destination, Source, v391, 0x80);
*(_QWORD *)(a1 + 536) = sub_14029DCF0(v4, (__int64)Destination);
}
}
if ( (*(_DWORD *)(a1 + 284) & 0x10) == 0 && (*(_BYTE *)(a1 + 248) & 0x20) != 0 )
{
v378 = *(_QWORD *)(a1 + 408);
if ( v378 )
(*(void (__fastcall **)(__int64, _QWORD, _QWORD, _QWORD))(*(_QWORD *)v378 + 16i64))(
v378,
*(_QWORD *)(a1 + 296),
*(_QWORD *)(a1 + 464),
*(_QWORD *)(a1 + 520));
v379 = *(_QWORD *)(a1 + 416);
if ( v379 )
(*(void (__fastcall **)(__int64, _QWORD, _QWORD, _QWORD))(*(_QWORD *)v379 + 16i64))(
v379,
*(_QWORD *)(a1 + 304),
*(_QWORD *)(a1 + 472),
*(_QWORD *)(a1 + 528));
v380 = *(_QWORD *)(a1 + 424);
if ( v380 )
(*(void (__fastcall **)(__int64, _QWORD, _QWORD, _QWORD))(*(_QWORD *)v380 + 16i64))(
v380,
*(_QWORD *)(a1 + 312),
*(_QWORD *)(a1 + 480),
*(_QWORD *)(a1 + 536));
v381 = *(_QWORD *)(a1 + 432);
if ( v381 )
(*(void (__fastcall **)(__int64, _QWORD, _QWORD, _QWORD))(*(_QWORD *)v381 + 16i64))(
v381,
*(_QWORD *)(a1 + 320),
*(_QWORD *)(a1 + 488),
*(_QWORD *)(a1 + 544));
v382 = *(_QWORD *)(a1 + 440);
if ( v382 )
(*(void (__fastcall **)(__int64, _QWORD, _QWORD, _QWORD))(*(_QWORD *)v382 + 16i64))(
v382,
*(_QWORD *)(a1 + 328),
*(_QWORD *)(a1 + 496),
*(_QWORD *)(a1 + 552));
v383 = *(_QWORD *)(a1 + 448);
if ( v383 )
(*(void (__fastcall **)(__int64, _QWORD, _QWORD, _QWORD))(*(_QWORD *)v383 + 16i64))(
v383,
*(_QWORD *)(a1 + 336),
*(_QWORD *)(a1 + 504),
*(_QWORD *)(a1 + 560));
v384 = *(_QWORD *)(a1 + 456);
if ( v384 )
(*(void (__fastcall **)(__int64, _QWORD, _QWORD, _QWORD))(*(_QWORD *)v384 + 16i64))(
v384,
*(_QWORD *)(a1 + 344),
*(_QWORD *)(a1 + 512),
*(_QWORD *)(a1 + 568));
}
v385 = *(_QWORD *)(a1 + 96);
for ( i6 = v385 + 72i64 * *(_QWORD *)(a1 + 104); v385 != i6; v385 += 72i64 )
{
v387 = sub_140037550(v4, *(_QWORD *)v385, v2);
*(_QWORD *)(v385 + 56) = v387;
if ( v387 && *(_QWORD *)(v387 + 72) )
*(_BYTE *)(v385 + 64) = 1;
}
if ( (*(_DWORD *)(a1 + 284) & 0x10) == 0 )
sub_1404ED1D0(a1, 0);
return 0i64;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment