{"type": "func", "start": 5370970224, "end": 5370970715, "name": "GJBaseGameLayer::getAreaObjectValue", "pseudocode": "// \n// GJBaseGameLayer::getAreaObjectValue from 0x140228070 to 0x14022825b (491 bytes)\n// \n// 7 xrefs:\n// > GJBaseGameLayer::processAreaEffects @ 0x140228cc8\n// > GJBaseGameLayer::processAreaTransformGroupAction @ 0x140229400\n// > GJBaseGameLayer::processAreaRotateGroupAction @ 0x140229ee1\n// > GJBaseGameLayer::processAreaMoveGroupAction @ 0x14022a6aa\n// > GJBaseGameLayer::processAreaTintGroupAction @ 0x14022ad01\n// > GJBaseGameLayer::processAreaTintGroupAction @ 0x14022b02b\n// > <???> @ 0x1406cd95c\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nfloat GJBaseGameLayer::getAreaObjectValue(\n        GJBaseGameLayer *a1,\n        EnterEffectInstance *a2,\n        GameObject *a3,\n        cocos2d::CCPoint *a4,\n        bool *a5)\n{\n  float v5; // xmm0_4\n  float v10; // xmm6_4\n  int m_directionType; // ecx\n  float m_offsetVariance; // xmm0_4\n  float v13; // xmm0_4\n  float v14; // xmm3_4\n  float x; // xmm2_4\n  float v16; // xmm1_4\n  float m_modFront; // xmm0_4\n  float v18; // xmm1_4\n  bool v19; // cf\n  float v20; // xmm0_4\n  float v21; // xmm0_4\n  float v22; // xmm1_4\n  float v23; // xmm1_4\n  const struct cocos2d::CCPoint *v24; // rax\n  const struct cocos2d::CCPoint *v25; // r8\n  float v26; // xmm2_4\n  float m_lengthVariance; // xmm0_4\n  float result; // xmm0_4\n  float v29; // [rsp+58h] [rbp+10h] BYREF\n  float v30; // [rsp+5Ch] [rbp+14h]\n\n  ((void (__fastcall *)(GameObject *, float *))a3->getRealPosition)(a3, &v29);\n  v10 = 0.0;\n  m_directionType = a2->m_gameObject->m_directionType;\n  if ( m_directionType == 1 )\n  {\n    m_offsetVariance = a2->m_offsetVariance;\n    if ( m_offsetVariance == 0.0 )\n      v13 = 0.0;\n    else\n      v13 = m_offsetVariance * a1->m_varianceValues._Elems[a3->m_varianceIndex + 1];\n    v14 = v29;\n    x = a4->x;\n    v16 = (float)(v29 - a4->x) + v13;\n    if ( v16 < 0.0 )\n    {\n      m_modFront = a2->m_modFront;\n      goto LABEL_8;\n    }\n    goto LABEL_7;\n  }\n  if ( m_directionType == 2 )\n  {\n    v20 = a2->m_offsetVariance;\n    if ( v20 == 0.0 )\n      v21 = 0.0;\n    else\n      v21 = v20 * a1->m_varianceValues._Elems[a3->m_varianceIndex + 1];\n    v14 = v30;\n    x = a4->y;\n    v16 = (float)(v30 - x) + v21;\n    if ( v16 < 0.0 )\n    {\n      m_modFront = a2->m_modFront;\nLABEL_8:\n      v18 = v16 * m_modFront;\n      if ( a2->m_reversed )\n        v19 = x < v14;\n      else\n        v19 = v14 < x;\n      goto LABEL_23;\n    }\nLABEL_7:\n    m_modFront = a2->m_modBack;\n    goto LABEL_8;\n  }\n  v22 = a2->m_offsetVariance;\n  if ( v22 == 0.0 )\n    v23 = 0.0;\n  else\n    v23 = v22 * a1->m_varianceValues._Elems[a3->m_varianceIndex + 1];\n  cocos2d::CCPoint::CCPoint(v5, v23 + a4->x);\n  v18 = cocos2d::ccpDistance((cocos2d *)&v29, v24, v25);\n  v26 = a4->x;\n  if ( a2->m_reversed )\n    v19 = v26 < v29;\n  else\n    v19 = v30 < v26;\nLABEL_23:\n  *a5 = !v19;\n  m_lengthVariance = a2->m_lengthVariance;\n  if ( m_lengthVariance != 0.0 )\n    v10 = m_lengthVariance * a1->m_varianceValues._Elems[a3->m_varianceIndex];\n  result = sub_140227B60(v18, (int)(float)(v10 + a2->m_length), a2->m_deadzone);\n  if ( a2->m_gameObject->m_inbound )\n    return 1.0 - result;\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::getAreaObjectValue from 0x140228070 to 0x14022825b (491 bytes)\n; \n; 7 xrefs:\n; > GJBaseGameLayer::processAreaEffects @ 0x140228cc8\n; > GJBaseGameLayer::processAreaTransformGroupAction @ 0x140229400\n; > GJBaseGameLayer::processAreaRotateGroupAction @ 0x140229ee1\n; > GJBaseGameLayer::processAreaMoveGroupAction @ 0x14022a6aa\n; > GJBaseGameLayer::processAreaTintGroupAction @ 0x14022ad01\n; > GJBaseGameLayer::processAreaTintGroupAction @ 0x14022b02b\n; > <???> @ 0x1406cd95c\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x140228070\npush    rbp                                                            ; +0x5, 0x140228075\npush    rsi                                                            ; +0x6, 0x140228076\npush    rdi                                                            ; +0x7, 0x140228077\nsub     rsp, 30h                                                       ; +0x8, 0x140228078\nmov     rax, [r8]                                                      ; +0xc, 0x14022807c\nmov     rbx, rdx                                                       ; +0xf, 0x14022807f\nmov     rsi, rcx                                                       ; +0x12, 0x140228082\nmovaps  [rsp+48h+var_28], xmm6                                         ; +0x15, 0x140228085\nlea     rdx, [rsp+48h+arg_8]                                           ; +0x1a, 0x14022808a\nmov     rcx, r8                                                        ; +0x1f, 0x14022808f\nmov     rbp, r9                                                        ; +0x22, 0x140228092\nmov     rdi, r8                                                        ; +0x25, 0x140228095\ncall    qword ptr [rax+4A8h]                                           ; +0x28, 0x140228098\nmov     rax, [rbx+0A0h]                                                ; +0x2e, 0x14022809e\nxorps   xmm6, xmm6                                                     ; +0x35, 0x1402280a5\nmov     ecx, [rax+7C0h]                                                ; +0x38, 0x1402280a8\ncmp     ecx, 1                                                         ; +0x3e, 0x1402280ae\njnz     short loc_140228119                                            ; +0x41, 0x1402280b1\nmovss   xmm0, dword ptr [rbx+1Ch]                                      ; +0x43, 0x1402280b3\nucomiss xmm0, xmm6                                                     ; +0x48, 0x1402280b8\njp      short loc_1402280C4                                            ; +0x4b, 0x1402280bb\njnz     short loc_1402280C4                                            ; +0x4d, 0x1402280bd\nxorps   xmm0, xmm0                                                     ; +0x4f, 0x1402280bf\njmp     short loc_1402280D5                                            ; +0x52, 0x1402280c2\nmovsx   rax, word ptr [rdi+3F4h]                                       ; +0x54, 0x1402280c4\nmulss   xmm0, dword ptr [rsi+rax*4+10D0h]                              ; +0x5c, 0x1402280cc\nmovss   xmm3, [rsp+48h+arg_8]                                          ; +0x65, 0x1402280d5\nmovss   xmm2, dword ptr [rbp+0]                                        ; +0x6b, 0x1402280db\nmovaps  xmm1, xmm3                                                     ; +0x70, 0x1402280e0\nsubss   xmm1, xmm2                                                     ; +0x73, 0x1402280e3\naddss   xmm1, xmm0                                                     ; +0x77, 0x1402280e7\ncomiss  xmm6, xmm1                                                     ; +0x7b, 0x1402280eb\njbe     short loc_1402280F7                                            ; +0x7e, 0x1402280ee\nmovss   xmm0, dword ptr [rbx+28h]                                      ; +0x80, 0x1402280f0\njmp     short loc_1402280FC                                            ; +0x85, 0x1402280f5\nmovss   xmm0, dword ptr [rbx+2Ch]                                      ; +0x87, 0x1402280f7\ncmp     byte ptr [rbx+0A8h], 0                                         ; +0x8c, 0x1402280fc\nmulss   xmm1, xmm0                                                     ; +0x93, 0x140228103\njz      short loc_140228111                                            ; +0x97, 0x140228107\ncomiss  xmm2, xmm3                                                     ; +0x99, 0x140228109\njmp     loc_1402281EA                                                  ; +0x9c, 0x14022810c\ncomiss  xmm3, xmm2                                                     ; +0xa1, 0x140228111\njmp     loc_1402281EA                                                  ; +0xa4, 0x140228114\ncmp     ecx, 2                                                         ; +0xa9, 0x140228119\njnz     short loc_140228162                                            ; +0xac, 0x14022811c\nmovss   xmm0, dword ptr [rbx+1Ch]                                      ; +0xae, 0x14022811e\nucomiss xmm0, xmm6                                                     ; +0xb3, 0x140228123\njp      short loc_14022812F                                            ; +0xb6, 0x140228126\njnz     short loc_14022812F                                            ; +0xb8, 0x140228128\nxorps   xmm0, xmm0                                                     ; +0xba, 0x14022812a\njmp     short loc_140228140                                            ; +0xbd, 0x14022812d\nmovsx   rax, word ptr [rdi+3F4h]                                       ; +0xbf, 0x14022812f\nmulss   xmm0, dword ptr [rsi+rax*4+10D0h]                              ; +0xc7, 0x140228137\nmovss   xmm3, [rsp+48h+arg_C]                                          ; +0xd0, 0x140228140\nmovss   xmm2, dword ptr [rbp+4]                                        ; +0xd6, 0x140228146\nmovaps  xmm1, xmm3                                                     ; +0xdb, 0x14022814b\nsubss   xmm1, xmm2                                                     ; +0xde, 0x14022814e\naddss   xmm1, xmm0                                                     ; +0xe2, 0x140228152\ncomiss  xmm6, xmm1                                                     ; +0xe6, 0x140228156\njbe     short loc_1402280F7                                            ; +0xe9, 0x140228159\nmovss   xmm0, dword ptr [rbx+28h]                                      ; +0xeb, 0x14022815b\njmp     short loc_1402280FC                                            ; +0xf0, 0x140228160\nmovss   xmm2, dword ptr [rbx+24h]                                      ; +0xf2, 0x140228162\nucomiss xmm2, xmm6                                                     ; +0xf7, 0x140228167\njp      short loc_140228173                                            ; +0xfa, 0x14022816a\njnz     short loc_140228173                                            ; +0xfc, 0x14022816c\nxorps   xmm2, xmm2                                                     ; +0xfe, 0x14022816e\njmp     short loc_140228184                                            ; +0x101, 0x140228171\nmovsx   rax, word ptr [rdi+3F4h]                                       ; +0x103, 0x140228173\nmulss   xmm2, dword ptr [rsi+rax*4+10D4h]                              ; +0x10b, 0x14022817b\nmovss   xmm1, dword ptr [rbx+1Ch]                                      ; +0x114, 0x140228184\nucomiss xmm1, xmm6                                                     ; +0x119, 0x140228189\njp      short loc_140228195                                            ; +0x11c, 0x14022818c\njnz     short loc_140228195                                            ; +0x11e, 0x14022818e\nxorps   xmm1, xmm1                                                     ; +0x120, 0x140228190\njmp     short loc_1402281A6                                            ; +0x123, 0x140228193\nmovsx   rax, word ptr [rdi+3F4h]                                       ; +0x125, 0x140228195\nmulss   xmm1, dword ptr [rsi+rax*4+10D0h]                              ; +0x12d, 0x14022819d\naddss   xmm2, dword ptr [rbp+4]                                        ; +0x136, 0x1402281a6\naddss   xmm1, dword ptr [rbp+0]                                        ; +0x13b, 0x1402281ab\nlea     rcx, [rsp+48h+arg_10]                                          ; +0x140, 0x1402281b0\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x145, 0x1402281b5\nmov     rdx, rax                                                       ; +0x14b, 0x1402281bb\nlea     rcx, [rsp+48h+arg_8]                                           ; +0x14e, 0x1402281be\ncall    cs:?ccpDistance@cocos2d@@YAMAEBVCCPoint@1@0@Z; cocos2d::ccpDistance(cocos2d::CCPoint const &,cocos2d::CCPoint const &) ; +0x153, 0x1402281c3\ncmp     byte ptr [rbx+0A8h], 0                                         ; +0x159, 0x1402281c9\nmovaps  xmm1, xmm0                                                     ; +0x160, 0x1402281d0\nmovss   xmm2, dword ptr [rbp+0]                                        ; +0x163, 0x1402281d3\njz      short loc_1402281E1                                            ; +0x168, 0x1402281d8\ncomiss  xmm2, [rsp+48h+arg_8]                                          ; +0x16a, 0x1402281da\njmp     short loc_1402281EA                                            ; +0x16f, 0x1402281df\nmovss   xmm0, [rsp+48h+arg_C]                                          ; +0x171, 0x1402281e1\ncomiss  xmm0, xmm2                                                     ; +0x177, 0x1402281e7\nmov     rax, [rsp+48h+arg_20]                                          ; +0x17a, 0x1402281ea\nsetnb   cl                                                             ; +0x17f, 0x1402281ef\nmov     [rax], cl                                                      ; +0x182, 0x1402281f2\nmovss   xmm0, dword ptr [rbx+14h]                                      ; +0x184, 0x1402281f4\nucomiss xmm0, xmm6                                                     ; +0x189, 0x1402281f9\njp      short loc_140228200                                            ; +0x18c, 0x1402281fc\njz      short loc_140228214                                            ; +0x18e, 0x1402281fe\nmovsx   rax, word ptr [rdi+3F4h]                                       ; +0x190, 0x140228200\nmulss   xmm0, dword ptr [rsi+rax*4+10CCh]                              ; +0x198, 0x140228208\nmovaps  xmm6, xmm0                                                     ; +0x1a1, 0x140228211\naddss   xmm6, dword ptr [rbx+10h]                                      ; +0x1a4, 0x140228214\nmovss   xmm2, dword ptr [rbx+30h]                                      ; +0x1a9, 0x140228219\nmovaps  xmm0, xmm1                                                     ; +0x1ae, 0x14022821e\ncvttss2si edx, xmm6                                                    ; +0x1b1, 0x140228221\ncall    sub_140227B60                                                  ; +0x1b5, 0x140228225\nmov     rax, [rbx+0A0h]                                                ; +0x1ba, 0x14022822a\nmovaps  xmm2, xmm0                                                     ; +0x1c1, 0x140228231\ncmp     byte ptr [rax+7ECh], 0                                         ; +0x1c4, 0x140228234\njz      short loc_140228249                                            ; +0x1cb, 0x14022823b\nmovss   xmm0, cs:flt_140622C24                                         ; +0x1cd, 0x14022823d\nsubss   xmm0, xmm2                                                     ; +0x1d5, 0x140228245\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x1d9, 0x140228249\nmovaps  xmm6, [rsp+48h+var_28]                                         ; +0x1de, 0x14022824e\nadd     rsp, 30h                                                       ; +0x1e3, 0x140228253\npop     rdi                                                            ; +0x1e7, 0x140228257\npop     rsi                                                            ; +0x1e8, 0x140228258\npop     rbp                                                            ; +0x1e9, 0x140228259\nretn                                                                   ; +0x1ea, 0x14022825a", "xrefs": ["GJBaseGameLayer::processAreaEffects @ 0x140228cc8", "GJBaseGameLayer::processAreaTransformGroupAction @ 0x140229400", "GJBaseGameLayer::processAreaRotateGroupAction @ 0x140229ee1", "GJBaseGameLayer::processAreaMoveGroupAction @ 0x14022a6aa", "GJBaseGameLayer::processAreaTintGroupAction @ 0x14022ad01", "GJBaseGameLayer::processAreaTintGroupAction @ 0x14022b02b", "<???> @ 0x1406cd95c"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}