// // sub_1008B5C30 from 0x1008b5c30 to 0x1008b60cb (1179 bytes) // // 3 xrefs: // > sub_1008B5630 @ 0x1008b5b81 // > sub_1008B5BB0 @ 0x1008b5be1 // > sub_1008B6200 @ 0x1008b620b // // This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 12:37:23 +0000 // __int64 __fastcall sub_1008B5C30(_QWORD *a1) { double v1; // xmm0_8 __int64 v2; // r15 __int64 v3; // rdi bool v4; // zf __int64 v5; // rsi void *v6; // r14 int v7; // r14d int v8; // r13d __int64 v9; // rbx __int64 v10; // rdi __int64 v11; // rsi __int64 v12; // rdi int v13; // r14d char *v14; // rax __int64 v15; // r15 _QWORD *v16; // rbx __int64 v17; // rsi __int64 v18; // rax unsigned int *v19; // rax _QWORD *v20; // rbx unsigned __int64 v21; // r13 __int64 v22; // rdi int v23; // r14d char *v24; // rax __int64 v25; // r15 _QWORD *v26; // rbx __int64 v27; // rsi __int64 v28; // rax unsigned int *v29; // rax _QWORD *v30; // rbx unsigned __int64 v31; // r13 __int64 v32; // rdi int v33; // r14d char *v34; // rax __int64 v35; // r15 __int64 v36; // rax __int64 v37; // rsi __int64 v38; // rax unsigned int *v39; // rax _QWORD *v40; // rbx unsigned __int64 v41; // r13 _QWORD *v43; // [rsp+0h] [rbp-50h] bool v44; // [rsp+Fh] [rbp-41h] BYREF __int128 v45; // [rsp+10h] [rbp-40h] v1 = 0.0; v45 = 0; v2 = 0; v43 = a1; do { v7 = *((_DWORD *)&unk_100BAE5A0 + v2); v8 = *((_DWORD *)a1 + 83); v9 = *((int *)&unk_100BAE5A0 + v2 + 1); if ( v9 == 1 ) goto LABEL_13; if ( (_DWORD)v9 ) { v10 = *(_QWORD *)(a1[44] + v2); v11 = 80; if ( v7 == v8 ) v11 = 255; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v10 + 912LL))(v10, v11); a1 = v43; LABEL_13: if ( v7 == v8 ) *((_DWORD *)&v45 + v9) = v7; goto LABEL_7; } v3 = *(_QWORD *)(a1[44] + v2); v4 = v7 == v8; v5 = 50; if ( v7 == v8 ) v5 = 255; v6 = &unk_100A13542; if ( v4 ) v6 = &unk_100A1353F; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v3 + 912LL))(v3, v5); (*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v43[44] + v2) + 960LL))(*(_QWORD *)(v43[44] + v2), v6); a1 = v43; LABEL_7: v2 += 8; } while ( v2 != 168 ); v12 = a1[48]; if ( v12 ) (*(void (__fastcall **)(__int64))(*(_QWORD *)v12 + 520LL))(v12); v44 = 0; v13 = DWORD1(v45); if ( DWORD1(v45) ) v14 = KeybindingsLayer::buildControllerGlyph(SDWORD1(v45), &v44); else v14 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"controllerBtn_DPad_None_001.png", 0.0); v15 = (__int64)v14; v16 = v43; v43[48] = v14; if ( v14 ) { HIDWORD(v1) = 0; *(float *)&v1 = 36.400002 / *(float *)((*(__int64 (__fastcall **)(char *))(*(_QWORD *)v14 + 328LL))(v14) + 4); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v15 + 160LL))(v15, *(float *)&v1); (*(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v15 + 184LL))(v15, v43 + 52); v17 = 255; if ( !v13 ) v17 = 50; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v15 + 912LL))(v15, v17); v18 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v15 + 488LL))(v15); if ( v18 ) { v19 = *(unsigned int **)(v18 + 56); if ( *v19 ) { v20 = *((_QWORD **)v19 + 2); v21 = (unsigned __int64)&v20[*v19 - 1]; do { if ( !*v20 ) break; (*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*v20 + 912LL))(*v20, (unsigned __int8)-(v13 != 0) | 0x32u); ++v20; } while ( (unsigned __int64)v20 <= v21 ); } } KeybindingsLayer::tintGlyph(v15, v13 != 0 ? -1 : 0xFF969696); v16 = v43; (*(void (__fastcall **)(_QWORD *, __int64, __int64))(*v43 + 464LL))(v43, v15, 1); } v22 = v16[49]; if ( v22 ) (*(void (__fastcall **)(__int64))(*(_QWORD *)v22 + 520LL))(v22); v44 = 0; v23 = DWORD2(v45); if ( DWORD2(v45) ) v24 = KeybindingsLayer::buildControllerGlyph(SDWORD2(v45), &v44); else v24 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"controllerBtn_LThumb_001.png", v1); v25 = (__int64)v24; v26 = v43; v43[49] = v24; if ( v24 ) { HIDWORD(v1) = 0; *(float *)&v1 = 31.200001 / *(float *)((*(__int64 (__fastcall **)(char *))(*(_QWORD *)v24 + 328LL))(v24) + 4); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v25 + 160LL))(v25, *(float *)&v1); (*(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v25 + 184LL))(v25, v43 + 53); v27 = 255; if ( !v23 ) v27 = 50; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v25 + 912LL))(v25, v27); v28 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v25 + 488LL))(v25); if ( v28 ) { v29 = *(unsigned int **)(v28 + 56); if ( *v29 ) { v30 = *((_QWORD **)v29 + 2); v31 = (unsigned __int64)&v30[*v29 - 1]; do { if ( !*v30 ) break; (*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*v30 + 912LL))(*v30, (unsigned __int8)-(v23 != 0) | 0x32u); ++v30; } while ( (unsigned __int64)v30 <= v31 ); } } KeybindingsLayer::tintGlyph(v25, v23 != 0 ? -1 : 0xFF969696); v26 = v43; (*(void (__fastcall **)(_QWORD *, __int64, __int64))(*v43 + 464LL))(v43, v25, 1); } v32 = v26[50]; if ( v32 ) (*(void (__fastcall **)(__int64))(*(_QWORD *)v32 + 520LL))(v32); v44 = 0; v33 = HIDWORD(v45); if ( HIDWORD(v45) ) v34 = KeybindingsLayer::buildControllerGlyph(SHIDWORD(v45), &v44); else v34 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"controllerBtn_RThumb_001.png", v1); v35 = (__int64)v34; v43[50] = v34; if ( v34 ) { v36 = (*(__int64 (__fastcall **)(char *))(*(_QWORD *)v34 + 328LL))(v34); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v35 + 160LL))(v35, 31.200001 / *(float *)(v36 + 4)); (*(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v35 + 184LL))(v35, v43 + 54); v37 = 255; if ( !v33 ) v37 = 50; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v35 + 912LL))(v35, v37); v38 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v35 + 488LL))(v35); if ( v38 ) { v39 = *(unsigned int **)(v38 + 56); if ( *v39 ) { v40 = *((_QWORD **)v39 + 2); v41 = (unsigned __int64)&v40[*v39 - 1]; do { if ( !*v40 ) break; (*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*v40 + 912LL))(*v40, (unsigned __int8)-(v33 != 0) | 0x32u); ++v40; } while ( (unsigned __int64)v40 <= v41 ); } } KeybindingsLayer::tintGlyph(v35, v33 != 0 ? -1 : 0xFF969696); (*(void (__fastcall **)(_QWORD *, __int64, __int64))(*v43 + 464LL))(v43, v35, 1); } return __stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source