{"type": "func", "start": 5372167552, "end": 5372168000, "name": "GJBaseGameLayer::addProximityVolumeEffect", "pseudocode": "// \n// GJBaseGameLayer::addProximityVolumeEffect from 0x14034c580 to 0x14034c740 (448 bytes)\n// \n// 7 xrefs:\n// > GJBaseGameLayer::processQueuedAudioTriggers @ 0x140345b5e\n// > GJBaseGameLayer::activateSongEditTrigger @ 0x14034baa0\n// > GJBaseGameLayer::activateSFXTrigger @ 0x14034bf78\n// > GJBaseGameLayer::activateSFXEditTrigger @ 0x14034c12f\n// > GJBaseGameLayer::activateSFXEditTrigger @ 0x14034c1d4\n// > LevelEditorLayer::activateTriggerEffect @ 0x1403fc123\n// > <???> @ 0x1409200a8\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:30:45 +0000\n// \n\n// Hidden C++ exception states: #wind=2\n__int64 __fastcall GJBaseGameLayer::addProximityVolumeEffect(__int64 a1, int a2, int a3, __int64 a4)\n{\n  __int64 *v8; // r14\n  __int64 v9; // rdx\n  __int64 v10; // r8\n  __int64 v11; // rcx\n  __int64 v12; // rax\n  __int64 v13; // rbx\n  char *v14; // rax\n  float v15; // xmm0_4\n  _QWORD *v16; // rcx\n  __int128 v18; // [rsp+20h] [rbp-68h] BYREF\n  __int128 v19; // [rsp+30h] [rbp-58h]\n  __int64 v20; // [rsp+40h] [rbp-48h]\n  __int128 v21; // [rsp+48h] [rbp-40h]\n  void *v22; // [rsp+90h] [rbp+8h] BYREF\n\n  v22 = (void *)__PAIR64__(a3, a2);\n  v8 = (__int64 *)(a1 + 1960);\n  sub_140354860(a1 + 1960, &v22);\n  v20 = a4;\n  *(_QWORD *)&v19 = *(_QWORD *)(a4 + 1480);\n  DWORD2(v19) = *(_DWORD *)(a4 + 1688);\n  v9 = *v8;\n  v10 = *(_QWORD *)(*v8 + 8);\n  v11 = 0;\n  v12 = v10;\n  while ( !*(_BYTE *)(v12 + 25) )\n  {\n    v10 = v12;\n    if ( *(_DWORD *)(v12 + 32) < a2 || *(_DWORD *)(v12 + 32) <= a2 && *(_DWORD *)(v12 + 36) < a3 )\n    {\n      v11 = 0;\n      v12 = *(_QWORD *)(v12 + 16);\n    }\n    else\n    {\n      v11 = 1;\n      v9 = v12;\n      v12 = *(_QWORD *)v12;\n    }\n  }\n  *(_QWORD *)&v21 = v10;\n  DWORD2(v21) = v11;\n  if ( *(_BYTE *)(v9 + 25) || a2 < *(_DWORD *)(v9 + 32) || a2 <= *(_DWORD *)(v9 + 32) && a3 < *(_DWORD *)(v9 + 36) )\n  {\n    if ( v8[1] == 0x3FFFFFFFFFFFFFFLL )\n      sub_14005BD90(v11, v9, v10);\n    v13 = *v8;\n    v14 = (char *)operator new(0x40u);\n    *((_QWORD *)v14 + 4) = v22;\n    *(_OWORD *)(v14 + 40) = v19;\n    *((_QWORD *)v14 + 7) = v20;\n    *(_QWORD *)v14 = v13;\n    *((_QWORD *)v14 + 1) = v13;\n    *((_QWORD *)v14 + 2) = v13;\n    *((_WORD *)v14 + 12) = 0;\n    v18 = v21;\n    v9 = sub_14006A770(v8, (__int64)&v18, (__int64)v14);\n  }\n  v15 = GJBaseGameLayer::volumeForProximityEffect(a1, v9 + 40);\n  v16 = (_QWORD *)qword_14090BF60;\n  if ( !qword_14090BF60 )\n  {\n    v22 = operator new(0x8A8u);\n    qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v22);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);\n    v16 = (_QWORD *)qword_14090BF60;\n  }\n  return FMODAudioEngine::setChannelVolumeMod(v16, a2, a3, v15);\n}", "assembly": "; \n; GJBaseGameLayer::addProximityVolumeEffect from 0x14034c580 to 0x14034c740 (448 bytes)\n; \n; 7 xrefs:\n; > GJBaseGameLayer::processQueuedAudioTriggers @ 0x140345b5e\n; > GJBaseGameLayer::activateSongEditTrigger @ 0x14034baa0\n; > GJBaseGameLayer::activateSFXTrigger @ 0x14034bf78\n; > GJBaseGameLayer::activateSFXEditTrigger @ 0x14034c12f\n; > GJBaseGameLayer::activateSFXEditTrigger @ 0x14034c1d4\n; > LevelEditorLayer::activateTriggerEffect @ 0x1403fc123\n; > <???> @ 0x1409200a8\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:30:45 +0000\n; \nmov     rax, rsp                                                       ; +0x0, 0x14034c580\nmov     [rax+10h], rbx                                                 ; +0x3, 0x14034c583\nmov     [rax+18h], rbp                                                 ; +0x7, 0x14034c587\npush    rsi                                                            ; +0xb, 0x14034c58b\npush    rdi                                                            ; +0xc, 0x14034c58c\npush    r14                                                            ; +0xd, 0x14034c58d\nsub     rsp, 70h                                                       ; +0xf, 0x14034c58f\nmovaps  xmmword ptr [rax-28h], xmm6                                    ; +0x13, 0x14034c593\nmov     rbx, r9                                                        ; +0x17, 0x14034c597\nmov     esi, r8d                                                       ; +0x1a, 0x14034c59a\nmov     edi, edx                                                       ; +0x1d, 0x14034c59d\nmov     rbp, rcx                                                       ; +0x1f, 0x14034c59f\nmov     [rax+8], edx                                                   ; +0x22, 0x14034c5a2\nmov     [rax+0Ch], r8d                                                 ; +0x25, 0x14034c5a5\nlea     r14, [rcx+7A8h]                                                ; +0x29, 0x14034c5a9\nlea     rdx, [rax+8]                                                   ; +0x30, 0x14034c5b0\nmov     rcx, r14                                                       ; +0x34, 0x14034c5b4\ncall    sub_140354860                                                  ; +0x37, 0x14034c5b7\nmov     [rsp+88h+var_48], rbx                                          ; +0x3c, 0x14034c5bc\nmov     eax, [rbx+5C8h]                                                ; +0x41, 0x14034c5c1\nmov     dword ptr [rsp+88h+var_58], eax                                ; +0x47, 0x14034c5c7\nmov     eax, [rbx+5CCh]                                                ; +0x4b, 0x14034c5cb\nmov     dword ptr [rsp+88h+var_58+4], eax                              ; +0x51, 0x14034c5d1\nmov     eax, [rbx+698h]                                                ; +0x55, 0x14034c5d5\nmov     dword ptr [rsp+88h+var_58+8], eax                              ; +0x5b, 0x14034c5db\nmov     rdx, [r14]                                                     ; +0x5f, 0x14034c5df\nmov     r8, [rdx+8]                                                    ; +0x62, 0x14034c5e2\nxor     ecx, ecx                                                       ; +0x66, 0x14034c5e6\nmov     rax, r8                                                        ; +0x68, 0x14034c5e8\ncmp     [r8+19h], cl                                                   ; +0x6b, 0x14034c5eb\njnz     short loc_14034C619                                            ; +0x6f, 0x14034c5ef\nmov     r8, rax                                                        ; +0x71, 0x14034c5f1\ncmp     [rax+20h], edi                                                 ; +0x74, 0x14034c5f4\njl      short loc_14034C60D                                            ; +0x77, 0x14034c5f7\njg      short loc_14034C600                                            ; +0x79, 0x14034c5f9\ncmp     [rax+24h], esi                                                 ; +0x7b, 0x14034c5fb\njl      short loc_14034C60D                                            ; +0x7e, 0x14034c5fe\nmov     ecx, 1                                                         ; +0x80, 0x14034c600\nmov     rdx, rax                                                       ; +0x85, 0x14034c605\nmov     rax, [rax]                                                     ; +0x88, 0x14034c608\njmp     short loc_14034C613                                            ; +0x8b, 0x14034c60b\nxor     ecx, ecx                                                       ; +0x8d, 0x14034c60d\nmov     rax, [rax+10h]                                                 ; +0x8f, 0x14034c60f\ncmp     byte ptr [rax+19h], 0                                          ; +0x93, 0x14034c613\njz      short loc_14034C5F1                                            ; +0x97, 0x14034c617\nmov     qword ptr [rsp+88h+var_40], r8                                 ; +0x99, 0x14034c619\nmov     dword ptr [rsp+88h+var_40+8], ecx                              ; +0x9e, 0x14034c61e\nmov     eax, dword ptr [rsp+88h+var_40+0Ch]                            ; +0xa2, 0x14034c622\nmov     dword ptr [rsp+88h+var_40+0Ch], eax                            ; +0xa6, 0x14034c626\ncmp     byte ptr [rdx+19h], 0                                          ; +0xaa, 0x14034c62a\njnz     short loc_14034C644                                            ; +0xae, 0x14034c62e\ncmp     edi, [rdx+20h]                                                 ; +0xb0, 0x14034c630\njl      short loc_14034C644                                            ; +0xb3, 0x14034c633\njg      loc_14034C6C4                                                  ; +0xb5, 0x14034c635\ncmp     esi, [rdx+24h]                                                 ; +0xbb, 0x14034c63b\njge     loc_14034C6C4                                                  ; +0xbe, 0x14034c63e\nmov     rax, 3FFFFFFFFFFFFFFh                                          ; +0xc4, 0x14034c644\ncmp     [r14+8], rax                                                   ; +0xce, 0x14034c64e\njz      loc_14034C73A                                                  ; +0xd2, 0x14034c652\nmov     rbx, [r14]                                                     ; +0xd8, 0x14034c658\nmov     qword ptr [rsp+88h+var_68], r14                                ; +0xdb, 0x14034c65b\nmov     qword ptr [rsp+88h+var_68+8], 0                                ; +0xe0, 0x14034c660\nmov     ecx, 40h ; '@'; Size                                           ; +0xe9, 0x14034c669\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xee, 0x14034c66e\nmov     r8, rax                                                        ; +0xf3, 0x14034c673\nmov     rax, [rsp+88h+arg_0]                                           ; +0xf6, 0x14034c676\nmov     [r8+20h], rax                                                  ; +0xfe, 0x14034c67e\nmovups  xmm0, [rsp+88h+var_58]                                         ; +0x102, 0x14034c682\nmovups  xmmword ptr [r8+28h], xmm0                                     ; +0x107, 0x14034c687\nmovsd   xmm1, [rsp+88h+var_48]                                         ; +0x10c, 0x14034c68c\nmovsd   qword ptr [r8+38h], xmm1                                       ; +0x112, 0x14034c692\nmov     [r8], rbx                                                      ; +0x118, 0x14034c698\nmov     [r8+8], rbx                                                    ; +0x11b, 0x14034c69b\nmov     [r8+10h], rbx                                                  ; +0x11f, 0x14034c69f\nmov     word ptr [r8+18h], 0                                           ; +0x123, 0x14034c6a3\nmovups  xmm0, [rsp+88h+var_40]                                         ; +0x12a, 0x14034c6aa\nmovaps  [rsp+88h+var_68], xmm0                                         ; +0x12f, 0x14034c6af\nlea     rdx, [rsp+88h+var_68]                                          ; +0x134, 0x14034c6b4\nmov     rcx, r14                                                       ; +0x139, 0x14034c6b9\ncall    sub_14006A770                                                  ; +0x13c, 0x14034c6bc\nmov     rdx, rax                                                       ; +0x141, 0x14034c6c1\nadd     rdx, 28h ; '('                                                 ; +0x144, 0x14034c6c4\nmov     rcx, rbp                                                       ; +0x148, 0x14034c6c8\ncall    GJBaseGameLayer__volumeForProximityEffect                      ; +0x14b, 0x14034c6cb\nmovaps  xmm6, xmm0                                                     ; +0x150, 0x14034c6d0\nmov     rcx, cs:qword_14090BF60                                        ; +0x153, 0x14034c6d3\ntest    rcx, rcx                                                       ; +0x15a, 0x14034c6da\njnz     short loc_14034C714                                            ; +0x15d, 0x14034c6dd\nmov     ecx, 8A8h; Size                                                ; +0x15f, 0x14034c6df\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x164, 0x14034c6e4\nmov     [rsp+88h+arg_0], rax                                           ; +0x169, 0x14034c6e9\nmov     rcx, rax                                                       ; +0x171, 0x14034c6f1\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0x174, 0x14034c6f4\nnop                                                                    ; +0x179, 0x14034c6f9\nmov     cs:qword_14090BF60, rax                                        ; +0x17a, 0x14034c6fa\nmov     rcx, [rax]                                                     ; +0x181, 0x14034c701\nmov     rdx, [rcx+48h]                                                 ; +0x184, 0x14034c704\nmov     rcx, rax                                                       ; +0x188, 0x14034c708\ncall    rdx                                                            ; +0x18b, 0x14034c70b\nmov     rcx, cs:qword_14090BF60                                        ; +0x18d, 0x14034c70d\nmovaps  xmm3, xmm6                                                     ; +0x194, 0x14034c714\nmov     r8d, esi                                                       ; +0x197, 0x14034c717\nmov     edx, edi                                                       ; +0x19a, 0x14034c71a\nlea     r11, [rsp+88h+var_18]                                          ; +0x19c, 0x14034c71c\nmov     rbx, [r11+28h]                                                 ; +0x1a1, 0x14034c721\nmov     rbp, [r11+30h]                                                 ; +0x1a5, 0x14034c725\nmovaps  xmm6, [rsp+88h+var_28]                                         ; +0x1a9, 0x14034c729\nmov     rsp, r11                                                       ; +0x1ae, 0x14034c72e\npop     r14                                                            ; +0x1b1, 0x14034c731\npop     rdi                                                            ; +0x1b3, 0x14034c733\npop     rsi                                                            ; +0x1b4, 0x14034c734\njmp     FMODAudioEngine__setChannelVolumeMod                           ; +0x1b5, 0x14034c735\ncall    sub_14005BD90                                                  ; +0x1ba, 0x14034c73a\nalign 20h                                                              ; +0x1bf, 0x14034c73f", "xrefs": ["GJBaseGameLayer::processQueuedAudioTriggers @ 0x140345b5e", "GJBaseGameLayer::activateSongEditTrigger @ 0x14034baa0", "GJBaseGameLayer::activateSFXTrigger @ 0x14034bf78", "GJBaseGameLayer::activateSFXEditTrigger @ 0x14034c12f", "GJBaseGameLayer::activateSFXEditTrigger @ 0x14034c1d4", "LevelEditorLayer::activateTriggerEffect @ 0x1403fc123", "<???> @ 0x1409200a8"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}