{"type": "func", "start": 366372, "end": 366484, "name": "sub_59724", "pseudocode": "// \n// sub_59724 from 0x59724 to 0x59794 (112 bytes)\n// \n// 1 xrefs:\n// > FMOD::System::getSpeakerPosition @ 0xb8900\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\nint __fastcall sub_59724(int a1, int a2, _DWORD *a3, _DWORD *a4, _BYTE *a5)\n{\n  int v5; // r5\n\n  v5 = *(_DWORD *)(a1 + 69188);\n  if ( v5 != 5 )\n  {\n    if ( v5 != 4 )\n      goto LABEL_10;\n    if ( (a2 | 1) != 3 )\n    {\n      if ( (a2 | 1) == 5 )\n        a2 -= 2;\n      goto LABEL_10;\n    }\n    return 31;\n  }\n  if ( a2 == 3 )\n    return 31;\n  if ( (a2 | 1) == 5 )\n    --a2;\nLABEL_10:\n  if ( a2 >= *(_DWORD *)(a1 + 1188) )\n    return 31;\n  if ( a3 )\n    *a3 = *(_DWORD *)(a1 + 48 * a2 + 69200);\n  if ( a4 )\n    *a4 = *(_DWORD *)(a1 + 48 * a2 + 69208);\n  if ( a5 )\n    *a5 = *(_BYTE *)(a1 + 48 * a2 + 69232);\n  return 0;\n}", "assembly": "; \n; sub_59724 from 0x59724 to 0x59794 (112 bytes)\n; \n; 1 xrefs:\n; > FMOD::System::getSpeakerPosition @ 0xb8900\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            {R4,R5,R7,LR}                                          ; +0x0, 0x59724\nADD             R7, SP, #8                                             ; +0x2, 0x59726\nLDR             R4, =0x10E44                                           ; +0x4, 0x59728\nLDR             R5, [R0,R4]                                            ; +0x6, 0x5972a\nLDR.W           R4, [R0,#0x4A4]                                        ; +0x8, 0x5972c\nCMP             R5, #5                                                 ; +0xc, 0x59730\nBEQ             loc_59748                                              ; +0xe, 0x59732\nCMP             R5, #4                                                 ; +0x10, 0x59734\nBNE             loc_59756                                              ; +0x12, 0x59736\nORR.W           R5, R1, #1                                             ; +0x14, 0x59738\nCMP             R5, #3                                                 ; +0x18, 0x5973c\nBEQ             loc_59790                                              ; +0x1a, 0x5973e\nCMP             R5, #5                                                 ; +0x1c, 0x59740\nIT EQ                                                                  ; +0x1e, 0x59742\nSUBEQ           R1, #2                                                 ; +0x20, 0x59744\nB               loc_59756                                              ; +0x22, 0x59746\nCMP             R1, #3                                                 ; +0x24, 0x59748\nBEQ             loc_59790                                              ; +0x26, 0x5974a\nORR.W           R5, R1, #1                                             ; +0x28, 0x5974c\nCMP             R5, #5                                                 ; +0x2c, 0x59750\nIT EQ                                                                  ; +0x2e, 0x59752\nSUBEQ           R1, #1                                                 ; +0x30, 0x59754\nCMP             R1, R4                                                 ; +0x32, 0x59756\nBGE             loc_59790                                              ; +0x34, 0x59758\nCBZ             R2, loc_5976A                                          ; +0x36, 0x5975a\nADD.W           R4, R1, R1,LSL#1                                       ; +0x38, 0x5975c\nLDR             R5, =0x10E50                                           ; +0x3c, 0x59760\nADD.W           R4, R0, R4,LSL#4                                       ; +0x3e, 0x59762\nLDR             R4, [R4,R5]                                            ; +0x42, 0x59766\nSTR             R4, [R2]                                               ; +0x44, 0x59768\nLDR             R2, [R7,#-8+arg_0]                                     ; +0x46, 0x5976a\nCBZ             R3, loc_5977C                                          ; +0x48, 0x5976c\nADD.W           R4, R1, R1,LSL#1                                       ; +0x4a, 0x5976e\nLDR             R5, =0x10E58                                           ; +0x4e, 0x59772\nADD.W           R4, R0, R4,LSL#4                                       ; +0x50, 0x59774\nLDR             R4, [R4,R5]                                            ; +0x54, 0x59778\nSTR             R4, [R3]                                               ; +0x56, 0x5977a\nCBZ             R2, loc_5978C                                          ; +0x58, 0x5977c\nADD.W           R1, R1, R1,LSL#1                                       ; +0x5a, 0x5977e\nADD.W           R0, R0, R1,LSL#4                                       ; +0x5e, 0x59782\nLDR             R1, =0x10E70                                           ; +0x62, 0x59786\nLDRB            R0, [R0,R1]                                            ; +0x64, 0x59788\nSTRB            R0, [R2]                                               ; +0x66, 0x5978a\nMOVS            R0, #0                                                 ; +0x68, 0x5978c\nPOP             {R4,R5,R7,PC}                                          ; +0x6a, 0x5978e\nMOVS            R0, #0x1F                                              ; +0x6c, 0x59790\nPOP             {R4,R5,R7,PC}                                          ; +0x6e, 0x59792", "xrefs": ["FMOD::System::getSpeakerPosition @ 0xb8900"], "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"}