// // sub_10016BE30 from 0x10016be30 to 0x10016c4e6 (1718 bytes) // // 2 xrefs: // > GJBaseGameLayer::processAreaEffects @ 0x10014097c // > sub_10016BE30 @ 0x10016c282 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // __int64 __fastcall sub_10016BE30( __int64 a1, __int64 a2, unsigned __int8 (__fastcall **a3)(__int64, __int64), __int64 a4, char a5) { __int64 (__fastcall **v5)(__int64, __int64); // rbx __int64 v7; // rdx __int64 v8; // r13 __int64 result; // rax unsigned __int64 v10; // r15 __int64 v11; // r15 __int64 (__fastcall *v12)(__int64, __int64); // rax char v13; // r12 char v14; // al __int64 v15; // rdi __int64 v16; // rsi __int64 v17; // r13 char v18; // r12 char v19; // al __int64 v20; // r15 __int64 v21; // r15 unsigned __int8 v22; // r12 unsigned __int8 v23; // al __int64 v24; // rdi __int64 v25; // r15 __int64 v26; // rdi __int64 v27; // rsi __int64 v28; // rdi __int64 v29; // rsi __int64 v30; // r13 unsigned __int8 v31; // bl unsigned __int8 v32; // al __int64 v33; // rdi __int64 (__fastcall **v34)(__int64, __int64); // rbx __int64 v35; // rdi __int64 v36; // rsi char v37; // al __int64 (__fastcall **v38)(__int64, __int64); // rcx char v39; // bl char v40; // al __int64 v41; // rdi __int64 v42; // rsi __int64 v43; // rax __int64 v44; // r15 char v45; // dl char v46; // r13 __int64 v47; // r12 __int64 v48; // r15 char v49; // r12 __int64 v50; // rdi __int64 v51; // rdi __int64 v52; // rsi unsigned __int64 v53; // rbx __int64 v54; // r12 unsigned __int64 v55; // rbx __int64 v56; // r12 unsigned __int64 v57; // r13 __int64 v58; // r15 __int64 v60; // [rsp+8h] [rbp-78h] __int64 v61; // [rsp+10h] [rbp-70h] __int64 v62; // [rsp+18h] [rbp-68h] __int64 v63; // [rsp+20h] [rbp-60h] __int64 v64; // [rsp+28h] [rbp-58h] __int64 v66; // [rsp+38h] [rbp-48h] __int64 v67; // [rsp+40h] [rbp-40h] __int64 v69; // [rsp+50h] [rbp-30h] v5 = (__int64 (__fastcall **)(__int64, __int64))a3; LABEL_2: v69 = a2 - 240; v63 = a2 - 480; v64 = a2 - 720; v66 = a2; LABEL_3: v7 = 1 - a4; while ( 2 ) { v8 = a2 - a1; result = 0xEEEEEEEEEEEEEEEFLL; v10 = 0xEEEEEEEEEEEEEEEFLL * ((a2 - a1) >> 4); switch ( v10 ) { case 0uLL: case 1uLL: return result; case 2uLL: result = ((__int64 (__fastcall *)(__int64, __int64, __int64))*v5)(v69, a1, v7); if ( (_BYTE)result ) goto LABEL_70; return result; case 3uLL: v48 = a1 + 240; v49 = ((__int64 (__fastcall *)(__int64, __int64, __int64))*v5)(a1 + 240, a1, v7); result = (*v5)(v69, a1 + 240); if ( v49 ) { if ( (_BYTE)result ) { LABEL_70: v50 = a1; return sub_10016DB50(v50, v69); } sub_10016DB50(a1, a1 + 240); result = (*v5)(v69, a1 + 240); if ( (_BYTE)result ) { v50 = a1 + 240; return sub_10016DB50(v50, v69); } } else if ( (_BYTE)result ) { v51 = a1 + 240; v52 = v69; goto LABEL_87; } return result; case 4uLL: return sub_10016C500(a1, a1 + 240, a1 + 480, v69, v5); case 5uLL: v48 = a1 + 240; sub_10016C500(a1, a1 + 240, a1 + 480, a1 + 720, v5); result = (*v5)(v69, a1 + 720); if ( (_BYTE)result ) { sub_10016DB50(a1 + 720, v69); result = (*v5)(a1 + 720, a1 + 480); if ( (_BYTE)result ) { sub_10016DB50(a1 + 480, a1 + 720); result = (*v5)(a1 + 480, a1 + 240); if ( (_BYTE)result ) { v51 = a1 + 240; v52 = a1 + 480; LABEL_87: sub_10016DB50(v51, v52); result = (*v5)(v48, a1); if ( (_BYTE)result ) return sub_10016DB50(a1, v48); } } } return result; default: if ( v8 <= 5759 ) { if ( (a5 & 1) != 0 ) return sub_10016C600(a1, a2, v5); else return sub_10016C9D0(a1, a2, v5); } if ( v7 != 1 ) { v60 = v7; v11 = 240 * (v10 >> 1); v12 = *v5; if ( (unsigned __int64)v8 >= 0x7801 ) { v13 = v12(a1 + v11, a1); v62 = a1 + v11; v14 = ((__int64 (__fastcall *)(__int64))*v5)(v69); if ( v13 ) { v15 = a1; if ( !v14 ) { sub_10016DB50(a1, v62); if ( !(*a3)(v69, v62) ) goto LABEL_20; v15 = a1 + v11; } v16 = v69; } else { if ( !v14 || (sub_10016DB50(v62, v69), !(*a3)(v62, a1)) ) { LABEL_20: v61 = v11; v21 = a1 + v11 - 240; v22 = (*a3)(v21, a1 + 240); v67 = v21; v23 = (*a3)(v63, v21); if ( v22 ) { v24 = a1 + 240; if ( v23 ) { sub_10016DB50(v24, v63); v25 = v61; goto LABEL_34; } sub_10016DB50(v24, v21); v25 = v61; if ( (*a3)(v63, v67) ) { v28 = v67; v29 = v63; goto LABEL_33; } } else { v25 = v61; if ( v23 ) { sub_10016DB50(v67, v63); if ( (*a3)(v67, a1 + 240) ) { v28 = a1 + 240; v29 = v67; LABEL_33: sub_10016DB50(v28, v29); } } } LABEL_34: v30 = v25 + a1 + 240; v31 = (*a3)(v30, a1 + 480); v32 = (*a3)(v64, v30); if ( v31 ) { v33 = a1 + 480; if ( v32 ) { sub_10016DB50(v33, v64); v34 = (__int64 (__fastcall **)(__int64, __int64))a3; goto LABEL_43; } sub_10016DB50(v33, v30); v34 = (__int64 (__fastcall **)(__int64, __int64))a3; if ( (*a3)(v64, v30) ) { v35 = v25 + a1 + 240; v36 = v64; goto LABEL_42; } } else { v34 = (__int64 (__fastcall **)(__int64, __int64))a3; if ( v32 ) { sub_10016DB50(v30, v64); if ( (*a3)(v30, a1 + 480) ) { v35 = a1 + 480; v36 = v25 + a1 + 240; LABEL_42: sub_10016DB50(v35, v36); } } } LABEL_43: v37 = (*v34)(v62, v67); v38 = v34; v39 = v37; v40 = (*v38)(v30, v62); if ( v39 ) { v20 = v66; if ( v40 ) { sub_10016DB50(v67, v30); v5 = (__int64 (__fastcall **)(__int64, __int64))a3; LABEL_52: v26 = a1; v27 = v62; goto LABEL_53; } sub_10016DB50(v67, v62); v5 = (__int64 (__fastcall **)(__int64, __int64))a3; if ( !(*a3)(v30, v62) ) goto LABEL_52; v41 = v62; v42 = v30; } else { v5 = (__int64 (__fastcall **)(__int64, __int64))a3; v20 = v66; if ( !v40 ) goto LABEL_52; sub_10016DB50(v62, v30); if ( !(*a3)(v62, v67) ) goto LABEL_52; v41 = v67; v42 = v62; } sub_10016DB50(v41, v42); goto LABEL_52; } v15 = a1; v16 = a1 + v11; } sub_10016DB50(v15, v16); goto LABEL_20; } v17 = a1 + v11; v18 = v12(a1, a1 + v11); v19 = (*v5)(v69, a1); if ( v18 ) { if ( v19 ) { sub_10016DB50(v17, v69); v5 = (__int64 (__fastcall **)(__int64, __int64))a3; v20 = v66; } else { sub_10016DB50(v17, a1); v5 = (__int64 (__fastcall **)(__int64, __int64))a3; v20 = v66; if ( (*a3)(v69, a1) ) { v26 = a1; v27 = v69; goto LABEL_53; } } } else { v5 = (__int64 (__fastcall **)(__int64, __int64))a3; v20 = v66; if ( v19 ) { sub_10016DB50(a1, v69); if ( (*a3)(a1, v17) ) { v26 = v17; v27 = a1; LABEL_53: sub_10016DB50(v26, v27); } } } if ( (a5 & 1) == 0 && !(unsigned __int8)(*v5)(a1 - 240, a1) ) { v47 = sub_10016CD60(a1, v20, v5); LABEL_61: v7 = v60 + 1; a1 = v47; a2 = v66; continue; } v43 = sub_10016D110(a1, v20, v5); v44 = v43; if ( (v45 & 1) == 0 ) { LABEL_62: sub_10016BE30(a1, v44, v5, -v60, a5 & 1); a5 = 0; a1 = v44 + 240; a4 = -v60; a2 = v66; goto LABEL_3; } v46 = sub_10016D4D0(a1, v43, v5); v47 = v44 + 240; result = sub_10016D4D0(v44 + 240, v66, v5); if ( !(_BYTE)result ) { if ( v46 ) goto LABEL_61; goto LABEL_62; } a4 = -v60; a2 = v44; if ( v46 ) return result; goto LABEL_2; } if ( a1 != a2 ) { v53 = (v10 - 2) >> 1; v54 = 240 * v53; v55 = v53 + 1; v56 = a1 + v54; do { sub_10016DDB0(a1, a3, v10, v56); v56 -= 240; --v55; } while ( v55 ); v57 = 0xEEEEEEEEEEEEEEEFLL * ((unsigned __int64)v8 >> 4); v58 = v66; do { sub_10016E160(a1, v58, a3, v57); v58 -= 240; result = v57 - 1; } while ( v57-- > 2 ); } return result; } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source