// // sub_1005533D0 from 0x1005533d0 to 0x100553a96 (1734 bytes) // // 2 xrefs: // > sub_100522F40 @ 0x1005230e1 // > sub_10055F180 @ 0x10055fa15 // // 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:32:04 +0000 // __int64 __fastcall sub_1005533D0(float *a1, int a2, unsigned __int8 *a3) { char v3; // bl size_t v4; // r15 char *v5; // r12 unsigned __int64 v6; // rax char *v7; // r13 signed __int64 v8; // rdx void *v9; // r14 char *v10; // rax unsigned __int64 v11; // r14 char *v12; // rbx char v13; // r15 unsigned int v14; // r12d size_t v15; // r13 char *v16; // rbx __m128 v17; // xmm0 int v18; // r13d float *v19; // r14 unsigned int v20; // eax char v21; // r13 __int64 v22; // rcx __int64 v23; // r15 unsigned __int8 *v24; // rbx signed __int64 v25; // rdx unsigned __int8 *v26; // r15 char *v27; // r12 unsigned __int8 *v28; // rax _BYTE *v29; // r12 char *v30; // rdx char *v31; // rcx std::string::size_type v32; // rbx char *data; // r14 size_t v34; // r15 unsigned __int64 v35; // rdx char *v36; // r15 size_t v37; // r14 size_t v38; // rdx char *v39; // rbx unsigned __int8 *v40; // r14 size_t v41; // r14 std::string::size_type v42; // r13 char *v43; // rsi size_t v44; // r15 std::string::pointer v45; // rbx unsigned int v46; // eax unsigned __int64 v47; // rax _BYTE *v48; // r12 std::string::size_type v49; // rbx char *v50; // r14 size_t v51; // r15 std::string::size_type v52; // rax std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0 v53; // cl float *v54; // rdi char *v55; // rax unsigned __int64 v57; // [rsp+0h] [rbp-B0h] unsigned __int64 v58; // [rsp+8h] [rbp-A8h] int *v59; // [rsp+10h] [rbp-A0h] BYREF float *v60; // [rsp+18h] [rbp-98h] unsigned __int8 *v61; // [rsp+20h] [rbp-90h] unsigned __int8 *v62; // [rsp+28h] [rbp-88h] unsigned __int64 v63; // [rsp+30h] [rbp-80h] unsigned __int8 *v64; // [rsp+38h] [rbp-78h] char __dst[16]; // [rsp+40h] [rbp-70h] BYREF char *v66; // [rsp+50h] [rbp-60h] int v67; // [rsp+5Ch] [rbp-54h] BYREF char *v68; // [rsp+60h] [rbp-50h] std::string __str; // [rsp+68h] [rbp-48h] BYREF v60 = a1; v67 = a2; v3 = *a3; v4 = *a3 >> 1; v5 = *((char **)a3 + 2); v68 = v5; v64 = a3 + 1; if ( (v3 & 1) == 0 ) v5 = (char *)(a3 + 1); v62 = a3; v6 = *((_QWORD *)a3 + 1); v63 = v6; if ( (v3 & 1) != 0 ) v4 = v6; if ( (__int64)v4 > 0 ) { v7 = &v5[v4]; v8 = v4; v9 = v5; while ( 1 ) { v10 = (char *)memchr(v9, 59, v8); if ( !v10 ) goto LABEL_19; if ( *v10 == 59 ) break; v9 = v10 + 1; v8 = v7 - (v10 + 1); if ( v8 <= 0 ) goto LABEL_19; } if ( v10 == v7 ) goto LABEL_19; v11 = v10 - v5; if ( v10 - v5 == -1 ) goto LABEL_19; if ( v4 >= v11 ) v4 = v10 - v5; if ( v4 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); if ( v4 >= 0x17 ) { v15 = 26; if ( (v4 | 7) != 0x17 ) v15 = (v4 | 7) + 1; v12 = (char *)operator new(v15); v66 = v12; *(_QWORD *)__dst = v15 + 1; *(_QWORD *)&__dst[8] = v4; } else { __dst[0] = 2 * v4; v12 = &__dst[1]; if ( !v11 ) { LABEL_28: v12[v4] = 0; v13 = 0; if ( (__dst[0] & 1) == 0 ) goto LABEL_23; goto LABEL_29; } } memmove(v12, v5, v4); goto LABEL_28; } LABEL_19: if ( (v3 & 1) != 0 ) { sub_10001AD30(__dst, v68, v63); } else { v66 = *((char **)v62 + 2); *(_OWORD *)__dst = *(_OWORD *)v62; } v11 = -1; v13 = 1; if ( (__dst[0] & 1) != 0 ) { LABEL_29: v16 = v66; v14 = atoi(v66); operator delete(v16); } else { LABEL_23: v14 = atoi(&__dst[1]); } v17 = 0; *(_OWORD *)__dst = 0; v66 = nullptr; v18 = 0; if ( v13 ) { v19 = v60; v20 = (unsigned __int8)__dst[0]; if ( (__dst[0] & 1) == 0 ) goto LABEL_95; goto LABEL_55; } LODWORD(v63) = v14; v68 = (char *)(v11 + 1); v21 = *v62; v22 = *v62 >> 1; v23 = *((_QWORD *)v62 + 1); v24 = *((unsigned __int8 **)v62 + 2); v61 = v24; if ( (v21 & 1) == 0 ) v24 = v64; v58 = v23; v57 = v22; if ( (v21 & 1) == 0 ) v23 = v22; if ( v23 <= v11 ) goto LABEL_45; v25 = v23 - (_QWORD)v68; if ( v23 <= (__int64)v68 ) goto LABEL_45; v26 = &v24[v23]; v27 = &v68[(_QWORD)v24]; while ( 1 ) { v28 = (unsigned __int8 *)memchr(v27, 59, v25); if ( !v28 ) goto LABEL_45; if ( *v28 == 59 ) break; v27 = (char *)(v28 + 1); v25 = v26 - (v28 + 1); if ( v25 <= 0 ) goto LABEL_45; } v29 = (_BYTE *)(v28 - v24); if ( v28 == v26 || v28 - v24 == -1 ) { LABEL_45: if ( (v21 & 1) != 0 ) { v30 = (char *)v58; v64 = v61; v18 = 0; v31 = v68; if ( v58 <= v11 ) LABEL_47: sub_100056810(); } else { v30 = (char *)v57; v18 = 0; v31 = v68; if ( v11 >= v57 ) goto LABEL_47; } v32 = v30 - v31; if ( (unsigned __int64)(v30 - v31) >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v14 = v63; if ( v32 >= 0x17 ) { v34 = 26; if ( (v32 | 7) != 0x17 ) v34 = (v32 | 7) + 1; data = (char *)operator new(v34); __str.__r_.__value_.__r.__words[2] = (std::string::size_type)data; __str.__r_.__value_.__r.__words[0] = v34 | 1; __str.__r_.__value_.__l.__size_ = v32; v31 = v68; } else { __str.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v32); data = __str.__r_.__value_.__s.__data_; if ( v30 == v31 ) { *((_BYTE *)&__str.__r_.__value_.__l.0 + v32 + 1) = 0; if ( (__dst[0] & 1) == 0 ) goto LABEL_54; goto LABEL_53; } } memmove(data, &v64[(_QWORD)v31], v32); data[v32] = 0; if ( (__dst[0] & 1) == 0 ) { LABEL_54: v66 = __str.__r_.__value_.__l.__data_; v17 = *(__m128 *)&__str.__r_.__value_.__l.0; *(_OWORD *)__dst = *(_OWORD *)&__str.__r_.__value_.__l.0; v19 = v60; v20 = (unsigned int)__str.__r_.__value_.__l.0; if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_95; goto LABEL_55; } LABEL_53: operator delete(v66); goto LABEL_54; } if ( (v21 & 1) != 0 ) { v35 = v58; v36 = v68; if ( v58 <= v11 ) LABEL_64: sub_100056810(); } else { v61 = v64; v35 = v57; v36 = v68; if ( v11 >= v57 ) goto LABEL_64; } v37 = (size_t)&v29[~v11]; v38 = v35 - (_QWORD)v36; if ( v38 >= v37 ) v38 = v37; if ( v38 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); if ( v38 >= 0x17 ) { v41 = 26; if ( (v38 | 7) != 0x17 ) v41 = (v38 | 7) + 1; v42 = v38; v39 = (char *)operator new(v41); __str.__r_.__value_.__r.__words[2] = (std::string::size_type)v39; __str.__r_.__value_.__r.__words[0] = v41 | 1; __str.__r_.__value_.__l.__size_ = v42; v40 = v62; v38 = v42; goto LABEL_75; } __str.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v38); v39 = __str.__r_.__value_.__s.__data_; v40 = v62; if ( v38 ) { LABEL_75: v43 = (char *)&v61[(_QWORD)v36]; v44 = v38; memmove(v39, v43, v38); v38 = v44; } v39[v38] = 0; if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 ) { v45 = __str.__r_.__value_.__l.__data_; v18 = atoi(__str.__r_.__value_.__l.__data_); operator delete(v45); } else { v18 = atoi(__str.__r_.__value_.__s.__data_); } v46 = *v40; if ( (v46 & 1) != 0 ) { v47 = *((_QWORD *)v40 + 1); if ( v47 <= (unsigned __int64)v29 ) goto LABEL_114; v64 = *((unsigned __int8 **)v40 + 2); } else { v47 = v46 >> 1; if ( (unsigned __int64)v29 >= v47 ) LABEL_114: sub_100056810(); } v48 = v29 + 1; v49 = v47 - (_QWORD)v48; if ( v47 - (unsigned __int64)v48 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); if ( v49 >= 0x17 ) { v51 = 26; if ( (v49 | 7) != 0x17 ) v51 = (v49 | 7) + 1; v50 = (char *)operator new(v51); __str.__r_.__value_.__r.__words[2] = (std::string::size_type)v50; __str.__r_.__value_.__r.__words[0] = v51 | 1; __str.__r_.__value_.__l.__size_ = v49; goto LABEL_91; } __str.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v49); v50 = __str.__r_.__value_.__s.__data_; if ( (_BYTE *)v47 != v48 ) LABEL_91: memmove(v50, &v64[(_QWORD)v48], v49); v50[v49] = 0; if ( (__dst[0] & 1) != 0 ) operator delete(v66); v66 = __str.__r_.__value_.__l.__data_; v17 = *(__m128 *)&__str.__r_.__value_.__l.0; *(_OWORD *)__dst = *(_OWORD *)&__str.__r_.__value_.__l.0; v19 = v60; v14 = v63; v20 = (unsigned int)__str.__r_.__value_.__l.0; if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) == 0 ) { LABEL_95: if ( !(v20 >> 1) ) goto LABEL_96; LABEL_56: cocos2d::ZipUtils::decompressString(&__str, __dst, 0, 0); goto LABEL_97; } LABEL_55: if ( *(_QWORD *)&__dst[8] ) goto LABEL_56; LABEL_96: *(_WORD *)&__str.__r_.__value_.__l.0 = 0; LABEL_97: v52 = std::string::find(&__str, 124, 0); v53 = __str.__r_.__value_.__s.0; if ( v52 != -1 ) goto LABEL_100; if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) == 0 ) { *(_WORD *)&__str.__r_.__value_.__l.0 = 0; v53 = 0; LABEL_100: if ( (*(_BYTE *)&v53 & 1) != 0 ) goto LABEL_101; LABEL_104: v54 = v19 + 80; if ( *(unsigned __int8 *)&v53 >> 1 ) goto LABEL_102; goto LABEL_105; } *__str.__r_.__value_.__l.__data_ = 0; __str.__r_.__value_.__l.__size_ = 0; v53 = __str.__r_.__value_.__s.0; if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_104; LABEL_101: v54 = v19 + 80; if ( __str.__r_.__value_.__l.__size_ ) { LABEL_102: v59 = &v67; v55 = sub_1000E8600(v54, &v67, (__int64)&unk_100A0CEB7, &v59); std::string::operator=((std::string *)v55 + 1, &__str); v59 = &v67; *((_DWORD *)sub_10001C2C0(v19 + 90, &v67, v17, (__int64)&unk_100A0CEB7, &v59) + 5) = v18; goto LABEL_106; } LABEL_105: sub_1000E9050((__int64 *)v54, &v67); sub_10001C120((__int64 *)v19 + 45, &v67); LABEL_106: sub_10001B800(v19 + 100, &v67, &v67, v17); if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 ) operator delete(__str.__r_.__value_.__l.__data_); if ( (__dst[0] & 1) != 0 ) operator delete(v66); return v14; }
GD Web Decomp Icon

GD Web Decomp

Raw Source