Your question is inconsistent:
Here you have numbers:
num=123456789123654258
...
braCode=123,
cusCode=4567891,
curCode=23,
ledcode=6542,
subCode=58,
and here it is strings:
bracode = num.Substring(0,3)
subCode= num.Substring(16);
and you don't claim any problem, which is surprising with C# !
In the 8 lines of code, only 1 can compile, just because of the endings.
If:
bracode = num.Substring(0,3)
works, you know the solution, the next will be
cusCode = num.Substring(3,7)
Otherwise the easiest is to break the number starting by the least significant digits
subcode= num % 100
tmp= num / 100
ledcode= tmp % 10000
tmp= tmp / 10000
...