{"type": "func", "start": 353312, "end": 353438, "name": "sub_56420", "pseudocode": "// \n// sub_56420 from 0x56420 to 0x5649e (126 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x5641e\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_56420(int a1, int a2, int a3, int a4, _DWORD *a5, int a6)\n{\n  void *v9; // r1\n\n  if ( !a2 || !a3 && !a5 )\n    return 31;\n  if ( a3 )\n  {\n    v9 = *(void **)(a2 + 16);\n    if ( !v9 )\n      v9 = &unk_2191F;\n    sub_BE220(a3, v9, a4);\n  }\n  if ( a5 )\n  {\n    switch ( a6 )\n    {\n      case 1:\n        *a5 = (unsigned int)(float)((float)((float)*(unsigned int *)(a2 + 24) * 1000.0) / *(float *)(a1 + 80));\n        break;\n      case 4:\n        sub_4C6EA(*(_DWORD *)(a2 + 24), a5, *(_DWORD *)(a1 + 76), *(_DWORD *)(a1 + 24));\n        break;\n      case 2:\n        *a5 = *(_DWORD *)(a2 + 24);\n        break;\n    }\n  }\n  return 0;\n}", "assembly": "; \n; sub_56420 from 0x56420 to 0x5649e (126 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x5641e\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, 0x56420\nADD             R7, SP, #0xC                                           ; +0x2, 0x56422\nPUSH.W          {R11}                                                  ; +0x4, 0x56424\nSUB             SP, SP, #8                                             ; +0x8, 0x56428\nCBZ             R1, loc_56436                                          ; +0xa, 0x5642a\nLDR             R4, [R7,#-0x10+arg_0]                                  ; +0xc, 0x5642c\nMOV             R5, R1                                                 ; +0xe, 0x5642e\nMOV             R6, R0                                                 ; +0x10, 0x56430\nCBNZ            R2, loc_5643A                                          ; +0x12, 0x56432\nCBNZ            R4, loc_5643A                                          ; +0x14, 0x56434\nMOVS            R0, #0x1F                                              ; +0x16, 0x56436\nB               loc_56496                                              ; +0x18, 0x56438\nCBZ             R2, loc_5644C                                          ; +0x1a, 0x5643a\nLDR             R1, [R5,#0x10]                                         ; +0x1c, 0x5643c\nCBNZ            R1, loc_56444                                          ; +0x1e, 0x5643e\nLDR             R1, =(unk_2191F - 0x56446)                             ; +0x20, 0x56440\nADD             R1, PC; unk_2191F                                      ; +0x22, 0x56442\nMOV             R0, R2                                                 ; +0x24, 0x56444\nMOV             R2, R3                                                 ; +0x26, 0x56446\nBL              sub_BE220                                              ; +0x28, 0x56448\nCBZ             R4, loc_56494                                          ; +0x2c, 0x5644c\nLDR             R0, [R7,#-0x10+arg_4]                                  ; +0x2e, 0x5644e\nCMP             R0, #1                                                 ; +0x30, 0x56450\nBEQ             loc_56474                                              ; +0x32, 0x56452\nCMP             R0, #4                                                 ; +0x34, 0x56454\nBEQ             loc_56462                                              ; +0x36, 0x56456\nCMP             R0, #2                                                 ; +0x38, 0x56458\nITT EQ                                                                 ; +0x3a, 0x5645a\nLDREQ           R0, [R5,#0x18]                                         ; +0x3c, 0x5645c\nSTREQ           R0, [R4]                                               ; +0x3e, 0x5645e\nB               loc_56494                                              ; +0x40, 0x56460\nLDR             R3, [R6,#0x18]                                         ; +0x42, 0x56462\nMOVS            R1, #1                                                 ; +0x44, 0x56464\nLDR             R2, [R6,#0x4C]                                         ; +0x46, 0x56466\nLDR             R0, [R5,#0x18]                                         ; +0x48, 0x56468\nSTR             R1, [SP,#8+var_8]                                      ; +0x4a, 0x5646a\nMOV             R1, R4                                                 ; +0x4c, 0x5646c\nBL              sub_4C6EA                                              ; +0x4e, 0x5646e\nB               loc_56494                                              ; +0x52, 0x56472\nVLDR            S0, [R5,#0x18]                                         ; +0x54, 0x56474\nVLDR            S2, =1000.0                                            ; +0x58, 0x56478\nVCVT.F32.U32    S0, S0                                                 ; +0x5c, 0x5647c\nVMUL.F32        S0, S0, S2                                             ; +0x60, 0x56480\nVLDR            S2, [R6,#0x50]                                         ; +0x64, 0x56484\nVDIV.F32        S0, S0, S2                                             ; +0x68, 0x56488\nVCVT.U32.F32    S0, S0                                                 ; +0x6c, 0x5648c\nVSTR            S0, [R4]                                               ; +0x70, 0x56490\nMOVS            R0, #0                                                 ; +0x74, 0x56494\nADD             SP, SP, #8                                             ; +0x76, 0x56496\nPOP.W           {R11}                                                  ; +0x78, 0x56498\nPOP             {R4-R7,PC}                                             ; +0x7c, 0x5649c", "xrefs": ["<???> @ 0x5641e"], "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"}