{"type": "func", "start": 670980, "end": 671206, "name": "sub_A3D04", "pseudocode": "// \n// sub_A3D04 from 0xa3d04 to 0xa3de6 (226 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0xa3d02\n// > sub_A3C1E @ 0xa3c92\n// > sub_A4A74 @ 0xa4a78\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_A3D04(int a1, int a2, float a3, int a4)\n{\n  float *v5; // r6\n  int result; // r0\n  float v9; // r0\n  float v10; // s4\n  int v11; // r1\n  int v12; // [sp+4h] [bp-1Ch] BYREF\n\n  v5 = (float *)(a1 + 1840);\n  switch ( a2 )\n  {\n    case 0:\n      *v5 = a3;\n      goto LABEL_18;\n    case 1:\n      *(float *)(a1 + 1844) = a3;\n      goto LABEL_18;\n    case 2:\n      *(float *)(a1 + 1848) = a3;\n      goto LABEL_18;\n    case 3:\n      *(float *)(a1 + 1852) = a3;\n      goto LABEL_18;\n    case 4:\n      *(float *)(a1 + 1856) = a3;\n      goto LABEL_18;\n    case 5:\n      *(float *)(a1 + 1860) = a3;\n      goto LABEL_18;\n    case 6:\n      *(float *)(a1 + 1864) = a3;\n      goto LABEL_18;\n    case 7:\n      *(float *)(a1 + 1868) = a3;\n      goto LABEL_18;\n    case 8:\n      *(float *)(a1 + 1872) = a3;\n      goto LABEL_18;\n    case 9:\n      *(float *)(a1 + 1876) = a3;\n      goto LABEL_18;\n    case 10:\n      *(float *)(a1 + 1880) = a3;\n      goto LABEL_18;\n    case 11:\n      *(float *)(a1 + 1884) = a3;\n      goto LABEL_18;\n    case 12:\n      *(float *)(a1 + 1888) = a3;\n      v9 = powf(10.0, a3 * 0.05);\n      v10 = 0.0;\n      if ( a3 > -80.0 )\n        v10 = v9;\n      v5[13] = v10;\nLABEL_18:\n      if ( !a4\n        || (result = sub_61E9C(*(_DWORD *)(a1 + 128), &v12, 8, 1)) == 0\n        && (*(_BYTE *)v12 = 7,\n            v11 = v12,\n            *(_DWORD *)(v12 + 4) = a1,\n            (result = sub_61F04(*(_DWORD *)(a1 + 128), v11, 1)) == 0) )\n      {\n        result = 0;\n      }\n      break;\n    default:\n      result = 31;\n      break;\n  }\n  return result;\n}", "assembly": "; \n; sub_A3D04 from 0xa3d04 to 0xa3de6 (226 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0xa3d02\n; > sub_A3C1E @ 0xa3c92\n; > sub_A4A74 @ 0xa4a78\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-R7,LR}                                             ; +0x0, 0xa3d04\nADD             R7, SP, #0xC                                           ; +0x2, 0xa3d06\nPUSH.W          {R11}                                                  ; +0x4, 0xa3d08\nVPUSH           {D7-D8}                                                ; +0x8, 0xa3d0c\nCMP             R1, #0xC; switch 13 cases                              ; +0xc, 0xa3d10\nBHI             def_A3D20; jumptable 000A3D20 default case             ; +0xe, 0xa3d12\nMOV             R4, R0                                                 ; +0x10, 0xa3d14\nADD.W           R6, R0, #0x730                                         ; +0x12, 0xa3d16\nMOV             R5, R3                                                 ; +0x16, 0xa3d1a\nVMOV            S16, R2                                                ; +0x18, 0xa3d1c\nTBB.W           [PC,R1]; switch jump                                   ; +0x1c, 0xa3d20\nDCB 7; jump table for switch statement                                 ; +0x20, 0xa3d24\nDCB 0xC                                                                ; +0x21, 0xa3d25\nDCB 0xF                                                                ; +0x22, 0xa3d26\nDCB 0x12                                                               ; +0x23, 0xa3d27\nDCB 0x15                                                               ; +0x24, 0xa3d28\nDCB 0x18                                                               ; +0x25, 0xa3d29\nDCB 0x1B                                                               ; +0x26, 0xa3d2a\nDCB 0x1E                                                               ; +0x27, 0xa3d2b\nDCB 0x21                                                               ; +0x28, 0xa3d2c\nDCB 0x24                                                               ; +0x29, 0xa3d2d\nDCB 0x27                                                               ; +0x2a, 0xa3d2e\nDCB 0x2A                                                               ; +0x2b, 0xa3d2f\nDCB 0x2D                                                               ; +0x2c, 0xa3d30\nALIGN 2                                                                ; +0x2d, 0xa3d31\nVSTR            S16, [R6]; jumptable 000A3D20 case 0                   ; +0x2e, 0xa3d32\nB               loc_A3DB2                                              ; +0x32, 0xa3d36\nMOVS            R0, #0x1F; jumptable 000A3D20 default case             ; +0x34, 0xa3d38\nB               loc_A3DDC                                              ; +0x36, 0xa3d3a\nVSTR            S16, [R6,#4]; jumptable 000A3D20 case 1                ; +0x38, 0xa3d3c\nB               loc_A3DB2                                              ; +0x3c, 0xa3d40\nVSTR            S16, [R6,#8]; jumptable 000A3D20 case 2                ; +0x3e, 0xa3d42\nB               loc_A3DB2                                              ; +0x42, 0xa3d46\nVSTR            S16, [R6,#0xC]; jumptable 000A3D20 case 3              ; +0x44, 0xa3d48\nB               loc_A3DB2                                              ; +0x48, 0xa3d4c\nVSTR            S16, [R6,#0x10]; jumptable 000A3D20 case 4             ; +0x4a, 0xa3d4e\nB               loc_A3DB2                                              ; +0x4e, 0xa3d52\nVSTR            S16, [R6,#0x14]; jumptable 000A3D20 case 5             ; +0x50, 0xa3d54\nB               loc_A3DB2                                              ; +0x54, 0xa3d58\nVSTR            S16, [R6,#0x18]; jumptable 000A3D20 case 6             ; +0x56, 0xa3d5a\nB               loc_A3DB2                                              ; +0x5a, 0xa3d5e\nVSTR            S16, [R6,#0x1C]; jumptable 000A3D20 case 7             ; +0x5c, 0xa3d60\nB               loc_A3DB2                                              ; +0x60, 0xa3d64\nVSTR            S16, [R6,#0x20]; jumptable 000A3D20 case 8             ; +0x62, 0xa3d66\nB               loc_A3DB2                                              ; +0x66, 0xa3d6a\nVSTR            S16, [R6,#0x24]; jumptable 000A3D20 case 9             ; +0x68, 0xa3d6c\nB               loc_A3DB2                                              ; +0x6c, 0xa3d70\nVSTR            S16, [R6,#0x28]; jumptable 000A3D20 case 10            ; +0x6e, 0xa3d72\nB               loc_A3DB2                                              ; +0x72, 0xa3d76\nVSTR            S16, [R6,#0x2C]; jumptable 000A3D20 case 11            ; +0x74, 0xa3d78\nB               loc_A3DB2                                              ; +0x78, 0xa3d7c\nVLDR            S0, =0.05; jumptable 000A3D20 case 12                  ; +0x7a, 0xa3d7e\nLDR             R0, flt_A3DEC; x                                       ; +0x7e, 0xa3d82\nVMUL.F32        S0, S16, S0                                            ; +0x80, 0xa3d84\nVSTR            S16, [R6,#0x30]                                        ; +0x84, 0xa3d88\nVMOV            R1, S0; y                                              ; +0x88, 0xa3d8c\nBLX             powf                                                   ; +0x8c, 0xa3d90\nVLDR            S2, =-80.0                                             ; +0x90, 0xa3d94\nVMOV            S0, R0                                                 ; +0x94, 0xa3d98\nVLDR            S4, =0.0                                               ; +0x98, 0xa3d9c\nVCMPE.F32       S16, S2                                                ; +0x9c, 0xa3da0\nVMRS            APSR_nzcv, FPSCR                                       ; +0xa0, 0xa3da4\nIT GT                                                                  ; +0xa4, 0xa3da8\nVMOVGT.F32      S4, S0                                                 ; +0xa6, 0xa3daa\nVSTR            S4, [R6,#0x34]                                         ; +0xaa, 0xa3dae\nCBZ             R5, loc_A3DDA                                          ; +0xae, 0xa3db2\nLDR.W           R0, [R4,#0x80]                                         ; +0xb0, 0xa3db4\nADD             R1, SP, #8+var_4                                       ; +0xb4, 0xa3db8\nMOVS            R2, #8                                                 ; +0xb6, 0xa3dba\nMOVS            R3, #1                                                 ; +0xb8, 0xa3dbc\nBL              sub_61E9C                                              ; +0xba, 0xa3dbe\nCBNZ            R0, loc_A3DDC                                          ; +0xbe, 0xa3dc2\nLDR             R0, [SP,#8+var_4]                                      ; +0xc0, 0xa3dc4\nMOVS            R1, #7                                                 ; +0xc2, 0xa3dc6\nMOVS            R2, #1                                                 ; +0xc4, 0xa3dc8\nSTRB            R1, [R0]                                               ; +0xc6, 0xa3dca\nLDR             R1, [SP,#8+var_4]                                      ; +0xc8, 0xa3dcc\nSTR             R4, [R1,#4]                                            ; +0xca, 0xa3dce\nLDR.W           R0, [R4,#0x80]                                         ; +0xcc, 0xa3dd0\nBL              sub_61F04                                              ; +0xd0, 0xa3dd4\nCBNZ            R0, loc_A3DDC                                          ; +0xd4, 0xa3dd8\nMOVS            R0, #0                                                 ; +0xd6, 0xa3dda\nVPOP            {D7-D8}                                                ; +0xd8, 0xa3ddc\nPOP.W           {R11}                                                  ; +0xdc, 0xa3de0\nPOP             {R4-R7,PC}                                             ; +0xe0, 0xa3de4", "xrefs": ["<???> @ 0xa3d02", "sub_A3C1E @ 0xa3c92", "sub_A4A74 @ 0xa4a78"], "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"}