; loadScript(char const*)
EXPORT _Z10loadScriptPKc
_Z10loadScriptPKc
var_220= -0x220
dest= -0x21C
.text:00098A20 ; loadScript(char const*)
.text:00098A20 EXPORT _Z10loadScriptPKc
.text:00098A20 _Z10loadScriptPKc ; CODE XREF: LoadScriptAndCall(lua_State *)+18p
.text:00098A20 ; initScript(ScriptAPI *)+8Cp ...
.text:00098A20
.text:00098A20 var_220 = -0x220
.text:00098A20 dest = -0x21C
.text:00098A20 var_11C = -0x11C
.text:00098A20 var_1C = -0x1C
.text:00098A20
.text:00098A20 F0 B5 PUSH {R4-R7,LR}
.text:00098A22 47 46 MOV R7, R8
.text:00098A24 80 B4 PUSH {R7}
.text:00098A26 29 4C LDR R4, =0xFFFFFDF8
.text:00098A28 29 4F LDR R7, =(__stack_chk_guard_ptr - 0x1291E0)
.text:00098A2A 80 46 MOV R8, R0
.text:00098A2C A5 44 ADD SP, R4
.text:00098A2E 29 4C LDR R4, =($_GLOBAL_OFFSET_TABLE_ - 0x98A38)
.text:00098A30 41 AD ADD R5, SP, #0x220+var_11C
.text:00098A32 28 1C MOVS R0, R5
.text:00098A34 7C 44 ADD R4, PC ; $_GLOBAL_OFFSET_TABLE_
.text:00098A36 E3 59 LDR R3, [R4,R7] ; __stack_chk_guard
.text:00098A38 41 46 MOV R1, R8
.text:00098A3A 1B 68 LDR R3, [R3]
.text:00098A3C 81 93 STR R3, [SP,#0x220+var_1C]
.text:00098A3E F8 F7 AD FC BL _Z20getPacketLuaFileNamePcPKc ; getPacketLuaFileName(char *,char const*)
.text:00098A42 00 23 MOVS R3, #0
.text:00098A44 28 1C MOVS R0, R5
.text:00098A46 69 46 MOV R1, SP
.text:00098A48 00 93 STR R3, [SP,#0x220+var_220]
.text:00098A4A FF F7 8F FF BL _Z17getLuaDataFromZipPKcPm ; getLuaDataFromZip(char const*,ulong *)
.text:00098A4E 05 1E SUBS R5, R0, #0
.text:00098A50 02 D0 BEQ loc_98A58
.text:00098A52 00 9A LDR R2, [SP,#0x220+var_220]
.text:00098A54 00 2A CMP R2, #0
.text:00098A56 2B D1 BNE loc_98AB0
.text:00098A58 loc_98A58 ; CODE XREF: loadScript(char const*)+30j
.text:00098A58 1F 4A LDR R2, =(aSdcardClient_s - 0x1291E0)
.text:00098A5A 01 AD ADD R5, SP, #0x220+dest
.text:00098A5C 2B 1C MOVS R3, R5
.text:00098A5E A2 18 ADDS R2, R4, R2 ; "sdcard/client_script/script/"
.text:00098A60 43 CA LDMIA R2!, {R0,R1,R6}
.text:00098A62 43 C3 STMIA R3!, {R0,R1,R6}
.text:00098A64 43 CA LDMIA R2!, {R0,R1,R6}
.text:00098A66 43 C3 STMIA R3!, {R0,R1,R6}
.text:00098A68 11 68 LDR R1, [R2]
.text:00098A6A 28 1C MOVS R0, R5 ; dest
.text:00098A6C 19 60 STR R1, [R3]
.text:00098A6E 12 79 LDRB R2, [R2,#4]
.text:00098A70 41 46 MOV R1, R8 ; src
.text:00098A72 1A 71 STRB R2, [R3,#4]
.text:00098A74 DB F7 58 E8 BLX strcat
.text:00098A78 28 1C MOVS R0, R5 ; s
.text:00098A7A DB F7 C8 E8 BLX strlen
.text:00098A7E 17 49 LDR R1, =(a_lua - 0x1291E0)
.text:00098A80 05 22 MOVS R2, #5 ; n
.text:00098A82 28 18 ADDS R0, R5, R0 ; dest
.text:00098A84 61 18 ADDS R1, R4, R1 ; ".lua"
.text:00098A86 DB F7 02 E8 BLX memcpy
.text:00098A8A 15 4B LDR R3, =(iLua_state_ptr - 0x1291E0)
.text:00098A8C 29 1C MOVS R1, R5
.text:00098A8E E3 58 LDR R3, [R4,R3] ; iLua_state
.text:00098A90 18 68 LDR R0, [R3]
.text:00098A92 DB F7 AC E9 BLX luaL_loadfile
.text:00098A96 06 1C ADDS R6, R0, #0
arm指令不是很懂,在里面可以看到解析的算法吗?
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!