{"type": "func", "start": 4296292448, "end": 4296292997, "name": "GJBaseGameLayer::getAreaObjectValue", "pseudocode": "// \n// GJBaseGameLayer::getAreaObjectValue from 0x100143860 to 0x100143a85 (549 bytes)\n// \n// 10 xrefs:\n// > GJBaseGameLayer::processAreaTransformGroupAction @ 0x100141a18\n// > GJBaseGameLayer::processAreaRotateGroupAction @ 0x100141dde\n// > GJBaseGameLayer::processAreaMoveGroupAction @ 0x100142178\n// > GJBaseGameLayer::processAreaFadeGroupAction @ 0x100142943\n// > GJBaseGameLayer::processAreaFadeGroupAction @ 0x100142a63\n// > GJBaseGameLayer::processAreaTintGroupAction @ 0x100142c0c\n// > GJBaseGameLayer::processAreaTintGroupAction @ 0x100142eb0\n// > GJBaseGameLayer::processAreaTintGroupAction @ 0x1001430f7\n// > GJBaseGameLayer::processAreaTintGroupAction @ 0x10014315c\n// > GJBaseGameLayer::processAreaTintGroupAction @ 0x10014327e\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 __fastcall GJBaseGameLayer::getAreaObjectValue(\n        GJBaseGameLayer *a1,\n        EnterEffectInstance *a2,\n        GameObject *a3,\n        cocos2d::CCPoint *a4,\n        bool *a5)\n{\n  int m_directionType; // eax\n  float y; // xmm1_4\n  float x; // xmm2_4\n  float m_offsetVariance; // xmm4_4\n  float v12; // xmm5_4\n  float v13; // xmm0_4\n  _BOOL8 v14; // rax\n  float v15; // xmm0_4\n  float v16; // xmm1_4\n  float v17; // xmm2_4\n  float v18; // xmm3_4\n  float v19; // xmm0_4\n  float m_offsetYVariance; // xmm3_4\n  __m128 m_length_low; // xmm1\n  float m_lengthVariance; // xmm3_4\n  float v23; // xmm4_4\n  float m_deadzone; // xmm3_4\n  float v25; // xmm0_4\n  float v26; // xmm1_4\n  cocos2d::CCPoint v28; // [rsp+0h] [rbp-40h] BYREF\n  bool *v29; // [rsp+8h] [rbp-38h]\n  cocos2d::CCPoint v30[6]; // [rsp+10h] [rbp-30h] BYREF\n\n  ((void (__fastcall *)(cocos2d::CCPoint *, GameObject *))a3->getRealPosition)(v30, a3);\n  m_directionType = a2->m_gameObject->m_directionType;\n  if ( m_directionType == 2 )\n  {\n    y = v30[0].y;\n    x = a4->y;\n    goto LABEL_5;\n  }\n  if ( m_directionType == 1 )\n  {\n    y = v30[0].x;\n    x = a4->x;\nLABEL_5:\n    m_offsetVariance = a2->m_offsetVariance;\n    v12 = 0.0;\n    if ( m_offsetVariance != 0.0 )\n      v12 = m_offsetVariance * a1->m_varianceValues.__elems_[a3->m_varianceIndex + 1];\n    v13 = (float)((float)(y - x) + v12) * *(&a2->m_modFront + ((float)((float)(y - x) + v12) >= 0.0));\n    v14 = y >= x;\n    if ( a2->m_reversed )\n      LOBYTE(v14) = x >= y;\n    goto LABEL_17;\n  }\n  v15 = a4->x;\n  v16 = a2->m_offsetVariance;\n  v17 = 0.0;\n  v18 = 0.0;\n  if ( v16 != 0.0 )\n    v18 = v16 * a1->m_varianceValues.__elems_[a3->m_varianceIndex + 1];\n  v29 = a5;\n  v19 = v15 + v18;\n  m_offsetYVariance = a2->m_offsetYVariance;\n  if ( m_offsetYVariance != 0.0 )\n    v17 = m_offsetYVariance * a1->m_varianceValues.__elems_[a3->m_varianceIndex + 2];\n  sub_10028CBE0(&v28, v19, a4->y + v17);\n  v13 = cocos2d::ccpDistance(v30, &v28);\n  v14 = a4->x >= v30[0].x;\n  if ( !a2->m_reversed )\n    LOBYTE(v14) = v30[0].y >= a4->x;\n  a5 = v29;\nLABEL_17:\n  *a5 = v14;\n  m_length_low = (__m128)LODWORD(a2->m_length);\n  m_lengthVariance = a2->m_lengthVariance;\n  v23 = 0.0;\n  if ( m_lengthVariance != 0.0 )\n    v23 = m_lengthVariance * a1->m_varianceValues.__elems_[a3->m_varianceIndex];\n  m_deadzone = a2->m_deadzone;\n  m_length_low.f32[0] = m_length_low.f32[0] + v23;\n  v25 = v13 / _mm_cvtepi32_ps(_mm_cvttps_epi32(m_length_low)).f32[0];\n  if ( m_deadzone == 0.0 )\n  {\n    if ( v25 < 1.0 )\n    {\n      v26 = 0.0;\n      if ( v25 <= 0.0 )\n        goto LABEL_27;\n    }\n    v26 = 1.0;\n    if ( v25 >= 1.0 )\n      goto LABEL_27;\n    goto LABEL_26;\n  }\n  v26 = 1.0;\n  v25 = (float)(v25 - m_deadzone) / (float)(1.0 - m_deadzone);\n  if ( v25 < 1.0 )\n  {\n    v26 = 0.0;\n    if ( v25 > 0.0 )\nLABEL_26:\n      v26 = v25;\n  }\nLABEL_27:\n  if ( a2->m_gameObject->m_inbound )\n    return 1.0 - v26;\n  return v26;\n}", "assembly": "; \n; GJBaseGameLayer::getAreaObjectValue from 0x100143860 to 0x100143a85 (549 bytes)\n; \n; 10 xrefs:\n; > GJBaseGameLayer::processAreaTransformGroupAction @ 0x100141a18\n; > GJBaseGameLayer::processAreaRotateGroupAction @ 0x100141dde\n; > GJBaseGameLayer::processAreaMoveGroupAction @ 0x100142178\n; > GJBaseGameLayer::processAreaFadeGroupAction @ 0x100142943\n; > GJBaseGameLayer::processAreaFadeGroupAction @ 0x100142a63\n; > GJBaseGameLayer::processAreaTintGroupAction @ 0x100142c0c\n; > GJBaseGameLayer::processAreaTintGroupAction @ 0x100142eb0\n; > GJBaseGameLayer::processAreaTintGroupAction @ 0x1001430f7\n; > GJBaseGameLayer::processAreaTintGroupAction @ 0x10014315c\n; > GJBaseGameLayer::processAreaTintGroupAction @ 0x10014327e\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\npush    rbp                                                            ; +0x0, 0x100143860\nmov     rbp, rsp                                                       ; +0x1, 0x100143861\npush    r15                                                            ; +0x4, 0x100143864\npush    r14                                                            ; +0x6, 0x100143866\npush    r13                                                            ; +0x8, 0x100143868\npush    r12                                                            ; +0xa, 0x10014386a\npush    rbx                                                            ; +0xc, 0x10014386c\nsub     rsp, 18h                                                       ; +0xd, 0x10014386d\nmov     r12, r8                                                        ; +0x11, 0x100143871\nmov     r13, rcx                                                       ; +0x14, 0x100143874\nmov     r15, rdx                                                       ; +0x17, 0x100143877\nmov     rbx, rsi                                                       ; +0x1a, 0x10014387a\nmov     r14, rdi                                                       ; +0x1d, 0x10014387d\nmov     rax, [rdx]                                                     ; +0x20, 0x100143880\nlea     rdi, [rbp+var_30]                                              ; +0x23, 0x100143883\nmov     rsi, rdx                                                       ; +0x27, 0x100143887\ncall    qword ptr [rax+540h]                                           ; +0x2a, 0x10014388a\nmov     rax, [rbx+0A8h]                                                ; +0x30, 0x100143890\nmov     eax, [rax+7ACh]                                                ; +0x37, 0x100143897\ncmp     eax, 2                                                         ; +0x3d, 0x10014389d\njz      short loc_1001438B4                                            ; +0x40, 0x1001438a0\ncmp     eax, 1                                                         ; +0x42, 0x1001438a2\njnz     short loc_10014391E                                            ; +0x45, 0x1001438a5\nmovss   xmm1, [rbp+var_30]                                             ; +0x47, 0x1001438a7\nmovss   xmm2, dword ptr [r13+0]                                        ; +0x4c, 0x1001438ac\njmp     short loc_1001438BF                                            ; +0x52, 0x1001438b2\nmovss   xmm1, [rbp+var_2C]                                             ; +0x54, 0x1001438b4\nmovss   xmm2, dword ptr [r13+4]                                        ; +0x59, 0x1001438b9\nmovaps  xmm0, xmm1                                                     ; +0x5f, 0x1001438bf\nsubss   xmm0, xmm2                                                     ; +0x62, 0x1001438c2\nmovss   xmm4, dword ptr [rbx+24h]                                      ; +0x66, 0x1001438c6\nxorps   xmm3, xmm3                                                     ; +0x6b, 0x1001438cb\nucomiss xmm4, xmm3                                                     ; +0x6e, 0x1001438ce\nxorps   xmm5, xmm5                                                     ; +0x71, 0x1001438d1\njnz     short loc_1001438D8                                            ; +0x74, 0x1001438d4\njnp     short loc_1001438ED                                            ; +0x76, 0x1001438d6\nmovsx   rax, word ptr [r15+3ECh]                                       ; +0x78, 0x1001438d8\nmulss   xmm4, dword ptr [r14+rax*4+0F78h]                              ; +0x80, 0x1001438e0\nmovaps  xmm5, xmm4                                                     ; +0x8a, 0x1001438ea\naddss   xmm0, xmm5                                                     ; +0x8d, 0x1001438ed\nxor     eax, eax                                                       ; +0x91, 0x1001438f1\nucomiss xmm3, xmm0                                                     ; +0x93, 0x1001438f3\nsetbe   al                                                             ; +0x96, 0x1001438f6\nmulss   xmm0, dword ptr [rbx+rax*4+30h]                                ; +0x99, 0x1001438f9\nxor     ecx, ecx                                                       ; +0x9f, 0x1001438ff\nucomiss xmm2, xmm1                                                     ; +0xa1, 0x100143901\nsetnb   cl                                                             ; +0xa4, 0x100143904\nxor     eax, eax                                                       ; +0xa7, 0x100143907\nucomiss xmm1, xmm2                                                     ; +0xa9, 0x100143909\nsetnb   al                                                             ; +0xac, 0x10014390c\ncmp     byte ptr [rbx+0B0h], 0                                         ; +0xaf, 0x10014390f\ncmovnz  eax, ecx                                                       ; +0xb6, 0x100143916\njmp     loc_1001439C0                                                  ; +0xb9, 0x100143919\nmovss   xmm0, dword ptr [r13+0]                                        ; +0xbe, 0x10014391e\nmovss   xmm1, dword ptr [rbx+24h]                                      ; +0xc4, 0x100143924\nxorps   xmm2, xmm2                                                     ; +0xc9, 0x100143929\nucomiss xmm1, xmm2                                                     ; +0xcc, 0x10014392c\nxorps   xmm3, xmm3                                                     ; +0xcf, 0x10014392f\njnz     short loc_100143936                                            ; +0xd2, 0x100143932\njnp     short loc_10014394B                                            ; +0xd4, 0x100143934\nmovsx   rax, word ptr [r15+3ECh]                                       ; +0xd6, 0x100143936\nmulss   xmm1, dword ptr [r14+rax*4+0F78h]                              ; +0xde, 0x10014393e\nmovaps  xmm3, xmm1                                                     ; +0xe8, 0x100143948\nmov     [rbp+var_38], r12                                              ; +0xeb, 0x10014394b\naddss   xmm0, xmm3                                                     ; +0xef, 0x10014394f\nmovss   xmm1, dword ptr [r13+4]                                        ; +0xf3, 0x100143953\nmovss   xmm3, dword ptr [rbx+2Ch]                                      ; +0xf9, 0x100143959\nucomiss xmm3, xmm2                                                     ; +0xfe, 0x10014395e\njnz     short loc_100143965                                            ; +0x101, 0x100143961\njnp     short loc_10014397A                                            ; +0x103, 0x100143963\nmovsx   rax, word ptr [r15+3ECh]                                       ; +0x105, 0x100143965\nmulss   xmm3, dword ptr [r14+rax*4+0F7Ch]                              ; +0x10d, 0x10014396d\nmovaps  xmm2, xmm3                                                     ; +0x117, 0x100143977\naddss   xmm1, xmm2                                                     ; +0x11a, 0x10014397a\nlea     r12, [rbp+var_40]                                              ; +0x11e, 0x10014397e\nmov     rdi, r12                                                       ; +0x122, 0x100143982\ncall    sub_10028CBE0                                                  ; +0x125, 0x100143985\nlea     rdi, [rbp+var_30]                                              ; +0x12a, 0x10014398a\nmov     rsi, r12                                                       ; +0x12e, 0x10014398e\ncall    cocos2d__ccpDistance                                           ; +0x131, 0x100143991\nmovss   xmm1, dword ptr [r13+0]                                        ; +0x136, 0x100143996\nxor     eax, eax                                                       ; +0x13c, 0x10014399c\nucomiss xmm1, [rbp+var_30]                                             ; +0x13e, 0x10014399e\nsetnb   al                                                             ; +0x142, 0x1001439a2\nmovss   xmm2, [rbp+var_2C]                                             ; +0x145, 0x1001439a5\nxor     ecx, ecx                                                       ; +0x14a, 0x1001439aa\nucomiss xmm2, xmm1                                                     ; +0x14c, 0x1001439ac\nsetnb   cl                                                             ; +0x14f, 0x1001439af\ncmp     byte ptr [rbx+0B0h], 0                                         ; +0x152, 0x1001439b2\ncmovz   eax, ecx                                                       ; +0x159, 0x1001439b9\nmov     r12, [rbp+var_38]                                              ; +0x15c, 0x1001439bc\nmov     [r12], al                                                      ; +0x160, 0x1001439c0\nmovss   xmm1, dword ptr [rbx+18h]                                      ; +0x164, 0x1001439c4\nmovss   xmm3, dword ptr [rbx+1Ch]                                      ; +0x169, 0x1001439c9\nxorps   xmm2, xmm2                                                     ; +0x16e, 0x1001439ce\nucomiss xmm3, xmm2                                                     ; +0x171, 0x1001439d1\nxorps   xmm4, xmm4                                                     ; +0x174, 0x1001439d4\njnz     short loc_1001439DB                                            ; +0x177, 0x1001439d7\njnp     short loc_1001439F0                                            ; +0x179, 0x1001439d9\nmovsx   rax, word ptr [r15+3ECh]                                       ; +0x17b, 0x1001439db\nmulss   xmm3, dword ptr [r14+rax*4+0F74h]                              ; +0x183, 0x1001439e3\nmovaps  xmm4, xmm3                                                     ; +0x18d, 0x1001439ed\nmovss   xmm3, dword ptr [rbx+38h]                                      ; +0x190, 0x1001439f0\nucomiss xmm3, xmm2                                                     ; +0x195, 0x1001439f5\naddss   xmm1, xmm4                                                     ; +0x198, 0x1001439f8\ncvttps2dq xmm1, xmm1                                                   ; +0x19c, 0x1001439fc\ncvtdq2ps xmm1, xmm1                                                    ; +0x1a0, 0x100143a00\ndivss   xmm0, xmm1                                                     ; +0x1a3, 0x100143a03\njnz     short loc_100143A2D                                            ; +0x1a7, 0x100143a07\njp      short loc_100143A2D                                            ; +0x1a9, 0x100143a09\nmovss   xmm2, cs:alpha                                                 ; +0x1ab, 0x100143a0b\nucomiss xmm2, xmm0                                                     ; +0x1b3, 0x100143a13\njbe     short loc_100143A23                                            ; +0x1b6, 0x100143a16\nxorps   xmm1, xmm1                                                     ; +0x1b8, 0x100143a18\nxorps   xmm3, xmm3                                                     ; +0x1bb, 0x100143a1b\nucomiss xmm0, xmm3                                                     ; +0x1be, 0x100143a1e\njbe     short loc_100143A54                                            ; +0x1c1, 0x100143a21\nucomiss xmm2, xmm0                                                     ; +0x1c3, 0x100143a23\nmovaps  xmm1, xmm2                                                     ; +0x1c6, 0x100143a26\nja      short loc_100143A51                                            ; +0x1c9, 0x100143a29\njmp     short loc_100143A54                                            ; +0x1cb, 0x100143a2b\nsubss   xmm0, xmm3                                                     ; +0x1cd, 0x100143a2d\nmovss   xmm1, cs:alpha                                                 ; +0x1d1, 0x100143a31\nmovaps  xmm2, xmm1                                                     ; +0x1d9, 0x100143a39\nsubss   xmm2, xmm3                                                     ; +0x1dc, 0x100143a3c\ndivss   xmm0, xmm2                                                     ; +0x1e0, 0x100143a40\nucomiss xmm1, xmm0                                                     ; +0x1e4, 0x100143a44\njbe     short loc_100143A54                                            ; +0x1e7, 0x100143a47\nxorps   xmm1, xmm1                                                     ; +0x1e9, 0x100143a49\nucomiss xmm0, xmm1                                                     ; +0x1ec, 0x100143a4c\njbe     short loc_100143A54                                            ; +0x1ef, 0x100143a4f\nmovaps  xmm1, xmm0                                                     ; +0x1f1, 0x100143a51\nmov     rax, [rbx+0A8h]                                                ; +0x1f4, 0x100143a54\ncmp     byte ptr [rax+7D8h], 0                                         ; +0x1fb, 0x100143a5b\njz      short loc_100143A73                                            ; +0x202, 0x100143a62\nmovss   xmm0, cs:alpha                                                 ; +0x204, 0x100143a64\nsubss   xmm0, xmm1                                                     ; +0x20c, 0x100143a6c\nmovaps  xmm1, xmm0                                                     ; +0x210, 0x100143a70\nmovaps  xmm0, xmm1                                                     ; +0x213, 0x100143a73\nadd     rsp, 18h                                                       ; +0x216, 0x100143a76\npop     rbx                                                            ; +0x21a, 0x100143a7a\npop     r12                                                            ; +0x21b, 0x100143a7b\npop     r13                                                            ; +0x21d, 0x100143a7d\npop     r14                                                            ; +0x21f, 0x100143a7f\npop     r15                                                            ; +0x221, 0x100143a81\npop     rbp                                                            ; +0x223, 0x100143a83\nretn                                                                   ; +0x224, 0x100143a84", "xrefs": ["GJBaseGameLayer::processAreaTransformGroupAction @ 0x100141a18", "GJBaseGameLayer::processAreaRotateGroupAction @ 0x100141dde", "GJBaseGameLayer::processAreaMoveGroupAction @ 0x100142178", "GJBaseGameLayer::processAreaFadeGroupAction @ 0x100142943", "GJBaseGameLayer::processAreaFadeGroupAction @ 0x100142a63", "GJBaseGameLayer::processAreaTintGroupAction @ 0x100142c0c", "GJBaseGameLayer::processAreaTintGroupAction @ 0x100142eb0", "GJBaseGameLayer::processAreaTintGroupAction @ 0x1001430f7", "GJBaseGameLayer::processAreaTintGroupAction @ 0x10014315c", "GJBaseGameLayer::processAreaTintGroupAction @ 0x10014327e"], "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"}