[Sony Tablet S] <robin>:
sames the descramble work done in this:

recovery read 0x400 byte from rom,run this function,and write to desklunvr.zip

not sure what this func do...

.text:000224F4
.text:000224F4 ; =============== S U B R O U T I N E =======================================
.text:000224F4
.text:000224F4
.text:000224F4 descramble1_224F4 ; DATA XREF: .got:0005E544o
.text:000224F4
.text:000224F4 var_5C = -0x5C
.text:000224F4 var_58 = -0x58
.text:000224F4 var_54 = -0x54
.text:000224F4 var_50 = -0x50
.text:000224F4 var_4C = -0x4C
.text:000224F4 var_48 = -0x48
.text:000224F4 var_44 = -0x44
.text:000224F4 var_40 = -0x40
.text:000224F4 var_3C = -0x3C
.text:000224F4 var_38 = -0x38
.text:000224F4 var_34 = -0x34
.text:000224F4 var_30 = -0x30
.text:000224F4 var_2C = -0x2C
.text:000224F4 var_28 = -0x28
.text:000224F4 var_24 = -0x24
.text:000224F4 var_20 = -0x20
.text:000224F4 var_1C = -0x1C
.text:000224F4 var_18 = -0x18
.text:000224F4 var_14 = -0x14
.text:000224F4 var_10 = -0x10
.text:000224F4 var_C = -0xC
.text:000224F4
.text:000224F4 ; FUNCTION CHUNK AT .text:000228D8 SIZE 00000004 BYTES
.text:000224F4
.text:000224F4 PUSH {R4}
.text:000224F6 SUB SP, SP, #0x5C
.text:000224F8 LDR R4, loc_228DC
.text:000224FA ADD R4, PC
.text:000224FC STR R0, [SP,#0xC]
.text:000224FE STR R1, [SP,#8]
.text:00022500 STR R2, [SP,#4]
.text:00022502 MOV.W R3, #0
.text:00022506 STR R3, [SP,#0x50]
.text:00022508 MOV.W R3, #0
.text:0002250C STR R3, [SP,#0x4C]
.text:0002250E MOV.W R3, #0
.text:00022512 STR R3, [SP,#0x48]
.text:00022514 MOV.W R3, #0
.text:00022518 STR R3, [SP,#0x44]
.text:0002251A MOV.W R3, #0
.text:0002251E STR R3, [SP,#0x40]
.text:00022520 MOV R3, 0xAE91FA39
.text:00022528 STR R3, [SP,#0x10]
.text:0002252A MOV R3, 0x2D682474
.text:00022532 STR R3, [SP,#0x4C]
.text:00022534 MOV R3, 0x1E1410AC
.text:0002253C STR R3, [SP,#0x48]
.text:0002253E MOV R3, 0x96807D2A
.text:00022546 STR R3, [SP,#0x44]
.text:00022548 MOV R3, 0x29F145
.text:00022550 STR R3, [SP,#0x40]
.text:00022552 LDR R3, [SP,#8]
.text:00022554 STR R3, [SP,#0x3C]
.text:00022556 MOV R3, 0x5001A130
.text:0002255E STR R3, [SP,#0x38]
.text:00022560 MOV R3, 0x23EC0A8B
.text:00022568 STR R3, [SP,#0x34]
.text:0002256A LDR R3, [SP,#0x3C]
.text:0002256C MVN.W R3, R3
.text:00022570 STR R3, [SP,#0x30]
.text:00022572 LDR R2, [SP,#0x34]
.text:00022574 LDR R3, [SP,#0x30]
.text:00022576 ORRS R3, R2
.text:00022578 STR R3, [SP,#0x34]
.text:0002257A LDR R2, [SP,#0x34]
.text:0002257C MOV R3, 0x10450111
.text:00022584 ANDS R3, R2
.text:00022586 STR R3, [SP,#0x30]
.text:00022588 LDR R2, [SP,#0x38]
.text:0002258A LDR R3, [SP,#0x3C]
.text:0002258C ANDS R3, R2
.text:0002258E STR R3, [SP,#0x34]
.text:00022590 LDR R2, [SP,#0x34]
.text:00022592 MOV R3, 0x41A8A022
.text:0002259A ORRS R3, R2
.text:0002259C STR R3, [SP,#0x34]
.text:0002259E LDR R2, [SP,#0x34]
.text:000225A0 LDR R3, [SP,#0x30]
.text:000225A2 ADDS R3, R2, R3
.text:000225A4 STR R3, [SP,#0x34]
.text:000225A6
.text:000225A6 loc_225A6 ; CODE XREF: .text:000228D6j
.text:000225A6 ; descramble1_224F4+3E6j
.text:000225A6 LDR R2, [SP,#0x34]
.text:000225A8 MOV R3, 0xAE125ED2
.text:000225B0 ADDS R3, R2, R3
.text:000225B2 CMP R3, #5
.text:000225B4 BHI.W loc_227F6
.text:000225B8 ADR R1, 0x225C4
.text:000225BA LDR.W R2, [R1,R3,LSL#2]
.text:000225BE ADD R1, R2
.text:000225C0 BX R1
.text:000225C0 ; ---------------------------------------------------------------------------
.text:000225C2 ALIGN 4
.text:000225C4 DCD 0x19
.text:000225C8 DCD 0x1C9
.text:000225CC DCD 0x221
.text:000225D0 DCD 0x233
.text:000225D4 DCD 0x23D
.text:000225D8 ; ---------------------------------------------------------------------------
.text:000225D8 LSLS R1, R0, #0xA
.text:000225DA MOVS R0, R0
.text:000225DC NOP
.text:000225DE LDR R3, [SP,#0xC]
.text:000225E0 LDR R2, [R3]
.text:000225E2 MOV R3, 0x88E9A4E5
.text:000225EA MUL.W R2, R3, R2
.text:000225EE MOV R3, 0xAE91FA39
.text:000225F6 ADDS R3, R2, R3
.text:000225F8 STR R3, [SP,#0x10]
.text:000225FA LDR R3, [SP,#4]
.text:000225FC LDR R3, [R3]
.text:000225FE MOV.W R2, R3,LSL#2
.text:00022602 LDR R3, loc_228E0
.text:00022604 LDR R3, [R4,R3]
.text:00022606 ADDS R3, R2, R3
.text:00022608 LDR R3, [R3]
.text:0002260A STR R3, [SP,#0x54]
.text:0002260C LDR R2, [SP,#0x54]
.text:0002260E MOV R3, 0x47EFECAB
.text:00022616 MUL.W R1, R3, R2
.text:0002261A LDR R2, [SP,#0x10]
.text:0002261C MOV R3, 0x4D490E26
.text:00022624 MUL.W R3, R3, R2
.text:00022628 MOV R2, 0x9B64BD89
.text:00022630 ADDS R2, R3, R2
.text:00022632 LDR R0, [SP,#0x54]
.text:00022634 MOV R3, 0xB8517B62
.text:0002263C MUL.W R0, R3, R0
.text:00022640 MOV R3, 0xFC54F0B3
.text:00022648 ADDS R3, R0, R3
.text:0002264A ORRS R2, R3
.text:0002264C MOV R3, 0x88E9A4E5
.text:00022654 MUL.W R3, R3, R2
.text:00022658 ADDS R2, R1, R3
.text:0002265A LDR R3, [SP,#0x10]
.text:0002265C ADDS R2, R2, R3
.text:0002265E MOV R3, 0x1DE85463
.text:00022666 ADDS R3, R2, R3
.text:00022668 STR R3, [SP,#0x54]
.text:0002266A LDR R3, [SP,#0x54]
.text:0002266C STR R3, [SP,#0x10]
.text:0002266E LDR R2, [SP,#0x10]
.text:00022670 MOV R3, 0xD95B78ED
.text:00022678 MUL.W R2, R3, R2
.text:0002267C MOV R3, 0xB24DA13B
.text:00022684 ADDS R3, R2, R3
.text:00022686 LDR R2, [SP,#0xC]
.text:00022688 STR R3, [R2]
.text:0002268A LDR R2, [SP,#0x10]
.text:0002268C MOV R3, 0x26A48713
.text:00022694 MUL.W R2, R3, R2
.text:00022698 MOV R3, 0x4DB25EC4
.text:000226A0 ADDS R3, R2, R3
.text:000226A2 MVN.W R3, R3,LSL#24
.text:000226A6 MVN.W R3, R3,LSR#24
.text:000226AA MOV R2, 0x2E345987
.text:000226B2 MUL.W R2, R2, R3
.text:000226B6 MOV R3, 0xFE8D7C54
.text:000226BE ADDS R3, R2, R3
.text:000226C0 STR R3, [SP,#0x54]
.text:000226C2 LDR R3, [SP,#0x54]
.text:000226C4 ADD.W R2, R3, #1
.text:000226C8 MOV R3, 0x4DA1C37
.text:000226D0 MUL.W R3, R3, R2
.text:000226D4 STR R3, [SP,#0x24]
.text:000226D6 MOVW R3, #0xA19E
.text:000226DA STR R3, [SP,#0x20]
.text:000226DC MOV R3, 0xFDBD0000
.text:000226E4 STR R3, [SP,#0x1C]
.text:000226E6 LDR R2, [SP,#0x1C]
.text:000226E8 LDR R3, [SP,#0x24]
.text:000226EA ADDS R2, R2, R3
.text:000226EC MOV R3, 0xA19EFDBD
.text:000226F4 ADDS R3, R2, R3
.text:000226F6 LDR R2, [SP,#0x20]
.text:000226F8 EORS R2, R3
.text:000226FA LDR R3, [SP,#0x1C]
.text:000226FC SUBS R3, R2, R3
.text:000226FE STR R3, [SP,#0x18]
.text:00022700 LDR R3, [SP,#0x20]
.text:00022702 MVN.W R2, R3
.text:00022706 LDR R3, [SP,#0x18]
.text:00022708 EORS R2, R3
.text:0002270A MOV R3, 0xD4F20B34
.text:00022712 EORS R2, R3
.text:00022714 MOV R3, 0xD4F20B34
.text:0002271C ORRS R3, R2
.text:0002271E STR R3, [SP,#0x14]
.text:00022720 LDR R3, [SP,#0x24]
.text:00022722 RSB.W R2, R3, #0
.text:00022726 LDR R3, [SP,#0x14]
.text:00022728 ADD.W R3, R3, #1
.text:0002272C MOV.W R3, R3,LSL#1
.text:00022730 SUBS R2, R2, R3
.text:00022732 MOV R3, 0x129DBE51
.text:0002273A ADDS R3, R2, R3
.text:0002273C STR R3, [SP,#0x54]
.text:0002273E LDR R2, [SP,#0x54]
.text:00022740 MOV R3, 0x20B54F26
.text:00022748 ADDS R3, R2, R3
.text:0002274A MOV.W R2, R3,LSL#1
.text:0002274E MOV R3, 0x561BE9E6
.text:00022756 ANDS R3, R2
.text:00022758 LDR R2, [SP,#0x54]
.text:0002275A SUBS R2, R2, R3
.text:0002275C MOV R3, 0x4BC34419
.text:00022764 ADDS R3, R2, R3
.text:00022766 MOV R2, R3
.text:00022768 LDR R3, [SP,#4]
.text:0002276A STR R2, [R3]
.text:0002276C LDR R3, [SP,#0xC]
.text:0002276E ADD.W R3, R3, #4
.text:00022772 STR R3, [SP,#0xC]
.text:00022774 LDR R3, [SP,#8]
.text:00022776 ADD.W R3, R3, #0xFFFFFFFF
.text:0002277A STR R3, [SP,#8]
.text:0002277C LDR R2, [SP,#0x48]
.text:0002277E MOV R3, 0x964428A5
.text:00022786 EORS R3, R2
.text:00022788 STR R3, [SP,#0x34]
.text:0002278A B loc_228D8
.text:0002278C ; ---------------------------------------------------------------------------
.text:0002278C NOP
.text:0002278E LDR R3, [SP,#8]
.text:00022790 CMP R3, #0
.text:00022792 ITE LE
.text:00022794 MOVLE R3, #0
.text:00022796 MOVGT R3, #1
.text:00022798 STR R3, [SP,#0x38]
.text:0002279A LDR R2, [SP,#0x40]
.text:0002279C MOV R3, 0xBACBF7E8
.text:000227A4 EORS R3, R2
.text:000227A6 STR R3, [SP,#0x30]
.text:000227A8 LDR R2, [SP,#0x40]
.text:000227AA MOV R3, 0xBACBF7F4
.text:000227B2 EORS R3, R2
.text:000227B4 STR R3, [SP,#0x34]
.text:000227B6 LDR R3, [SP,#0x38]
.text:000227B8 CMP R3, #0
.text:000227BA ITE NE
.text:000227BC MOVNE R3, #0
.text:000227BE MOVEQ R3, #1
.text:000227C0 STR R3, [SP,#0x2C]
.text:000227C2 LDR R3, [SP,#0x2C]
.text:000227C4 CMP R3, #0
.text:000227C6 ITE NE
.text:000227C8 MOVNE R3, #0
.text:000227CA MOVEQ R3, #1
.text:000227CC STR R3, [SP,#0x28]
.text:000227CE LDR R3, [SP,#0x28]
.text:000227D0 LDR R2, [SP,#0x30]
.text:000227D2 MUL.W R2, R2, R3
.text:000227D6 LDR R3, [SP,#0x2C]
.text:000227D8 LDR R1, [SP,#0x34]
.text:000227DA MUL.W R3, R1, R3
.text:000227DE ADDS R3, R2, R3
.text:000227E0 STR R3, [SP,#0x34]
.text:000227E2 B loc_228D8
.text:000227E4 ; ---------------------------------------------------------------------------
.text:000227E4 NOP
.text:000227E6 LDR R2, [SP,#0x50]
.text:000227E8 MOV R3, 0xF40FC4AE
.text:000227F0 EORS R3, R2
.text:000227F2 STR R3, [SP,#0x34]
.text:000227F4 B loc_228D8
.text:000227F6 ; ---------------------------------------------------------------------------
.text:000227F6
.text:000227F6 loc_227F6 ; CODE XREF: descramble1_224F4+C0j
.text:000227F6 NOP
.text:000227F8 NOP
.text:000227FA ADD SP, SP, #0x5C
.text:000227FC POP {R4}
.text:000227FE BX LR
.text:000227FE ; End of function descramble1_224F4
.text:000227FE
.text:00022800 ; ---------------------------------------------------------------------------
.text:00022800 NOP
.text:00022802 LDR R2, [SP,#0x50]
.text:00022804 MOV R3, 0x279C241B
.text:0002280C EORS R3, R2
.text:0002280E STR R3, [SP,#0x50]
.text:00022810 LDR R2, [SP,#0x44]
.text:00022812 MOV R3, 0x1D087F49
.text:0002281A ADDS R3, R2, R3
.text:0002281C STR R3, [SP,#0x34]
.text:0002281E LDR R2, [SP,#0x34]
.text:00022820 MOV R3, 0x40000001
.text:00022828 SMULL.W R1, R3, R3, R2
.text:0002282C MOV.W R1, R3,ASR#29
.text:00022830 MOV.W R3, R2,ASR#31
.text:00022834 SUBS R1, R1, R3
.text:00022836 MOV R3, R1
.text:00022838 MOV.W R3, R3,LSL#31
.text:0002283C SUBS R3, R3, R1
.text:0002283E SUBS R3, R2, R3
.text:00022840 STR R3, [SP,#0x34]
.text:00022842 B loc_228D8
.text:00022844 ; ---------------------------------------------------------------------------
.text:00022844 NOP
.text:00022846 LDR R3, [SP,#4]
.text:00022848 LDR R3, [R3]
.text:0002284A UXTB R2, R3
.text:0002284C LDR R3, [SP,#4]
.text:0002284E STR R2, [R3]
.text:00022850 MOV R3, 0x827E4184
.text:00022858 STR R3, [SP,#0x50]
.text:0002285A LDR R2, [SP,#0x4C]
.text:0002285C MOV R3, 0x24857CBB
.text:00022864 ADDS R3, R2, R3
.text:00022866 STR R3, [SP,#0x34]
.text:00022868 LDR R2, [SP,#0x34]
.text:0002286A MOV R3, 0x40000001
.text:00022872 SMULL.W R1, R3, R3, R2
.text:00022876 MOV.W R1, R3,ASR#29
.text:0002287A MOV.W R3, R2,ASR#31
.text:0002287E SUBS R1, R1, R3
.text:00022880 MOV R3, R1
.text:00022882 MOV.W R3, R3,LSL#31
.text:00022886 SUBS R3, R3, R1
.text:00022888 SUBS R3, R2, R3
.text:0002288A STR R3, [SP,#0x34]
.text:0002288C LDR R2, [SP,#0x48]
.text:0002288E MOV R3, 0xD9BD9926
.text:00022896 EORS R3, R2
.text:00022898 STR R3, [SP,#0x48]
.text:0002289A LDR R2, [SP,#0x44]
.text:0002289C MOV R3, 0x9E64A4BD
.text:000228A4 ADDS R3, R2, R3
.text:000228A6 MOV R2, 0x40000001
.text:000228AE SMULL.W R1, R2, R2, R3
.text:000228B2 MOV.W R1, R2,ASR#29
.text:000228B6 MOV.W R2, R3,ASR#31
.text:000228BA SUBS R1, R1, R2
.text:000228BC MOV R2, R1
.text:000228BE MOV.W R2, R2,LSL#31
.text:000228C2 SUBS R2, R2, R1
.text:000228C4 SUBS R3, R3, R2
.text:000228C6 STR R3, [SP,#0x44]
.text:000228C8 LDR R2, [SP,#0x40]
.text:000228CA MOV R3, 0xEB0FA783
.text:000228D2 EORS R3, R2
.text:000228D4 STR R3, [SP,#0x40]
.text:000228D6 B loc_225A6
.text:000228D8 ; ---------------------------------------------------------------------------
.text:000228D8 ; START OF FUNCTION CHUNK FOR descramble1_224F4
.text:000228D8
.text:000228D8 loc_228D8 ; CODE XREF: descramble1_224F4+296j
.text:000228D8 ; descramble1_224F4+2EEj ...
.text:000228D8 NOP
.text:000228DA B loc_225A6
.text:000228DA ; END OF FUNCTION CHUNK FOR descramble1_224F4
.text:000228DC ; ---------------------------------------------------------------------------
.text:000228DC
.text:000228DC loc_228DC ; DATA XREF: descramble1_224F4+4r
.text:000228DC STMIA R1, {R1,R2,R4-R6}
.text:000228DE MOVS R3, R0
.text:000228E0
.text:000228E0 loc_228E0 ; DATA XREF: descramble1_224F4+10Er
.text:000228E0 MRC p15, 6, PC,c8,c15, 7
.text:000228E4

i'am trying port this code to c++,so it can run on windows....