# Model_CDN_CDNDownloader_145.luac
; fn @CDNDownloader.lua  line 0-0 np=0 va=1 ms=2 code=34 consts=16 upvals=1 protos=9
;   K[0]='CDNDownloader'
;   K[1]='DEFAULT_TIME_OUT'
;   K[2]=15000
;   K[3]='__index'
;   K[4]='Create'
;   K[5]='CDNDownloader'
;   K[6]='_Init'
;   K[7]='CanSend'
;   K[8]='StartDownload'
;   K[9]='_DownloadToFile'
;   K[10]='CDNDownloader'
;   K[11]='_DownloadToMemory'
;   K[12]='CDNDownloader'
;   K[13]='_OnDownloadFinished'
;   K[14]='_CheckDownloadedFileValid'
;   K[15]='TryFallbackRequest'
;   upvals: _ENV
0000  NEWTABLE  R0 = {} (0 items)
0001  SETTABLE  R0[K1('DEFAULT_TIME_OUT')] = K2(15000)
0002  SETTABUP  _ENV[K0('CDNDownloader')] = R0
0003  GETTABUP  R0 = _ENV[K0('CDNDownloader')]
0004  GETTABUP  R1 = _ENV[K0('CDNDownloader')]
0005  SETTABLE  R0[K3('__index')] = R1
0006  GETTABUP  R0 = _ENV[K0('CDNDownloader')]
0007  CLOSURE   R1 = closure proto0
0008  SETTABLE  R0[K4('Create')] = R1
0009  GETTABUP  R0 = _ENV[K5('CDNDownloader')]
0010  CLOSURE   R1 = closure proto1
0011  SETTABLE  R0[K6('_Init')] = R1
0012  GETTABUP  R0 = _ENV[K5('CDNDownloader')]
0013  CLOSURE   R1 = closure proto2
0014  SETTABLE  R0[K7('CanSend')] = R1
0015  GETTABUP  R0 = _ENV[K5('CDNDownloader')]
0016  CLOSURE   R1 = closure proto3
0017  SETTABLE  R0[K8('StartDownload')] = R1
0018  GETTABUP  R0 = _ENV[K5('CDNDownloader')]
0019  CLOSURE   R1 = closure proto4
0020  SETTABLE  R0[K9('_DownloadToFile')] = R1
0021  GETTABUP  R0 = _ENV[K10('CDNDownloader')]
0022  CLOSURE   R1 = closure proto5
0023  SETTABLE  R0[K11('_DownloadToMemory')] = R1
0024  GETTABUP  R0 = _ENV[K12('CDNDownloader')]
0025  CLOSURE   R1 = closure proto6
0026  SETTABLE  R0[K13('_OnDownloadFinished')] = R1
0027  GETTABUP  R0 = _ENV[K12('CDNDownloader')]
0028  CLOSURE   R1 = closure proto7
0029  SETTABLE  R0[K14('_CheckDownloadedFileValid')] = R1
0030  GETTABUP  R0 = _ENV[K12('CDNDownloader')]
0031  CLOSURE   R1 = closure proto8
0032  SETTABLE  R0[K15('TryFallbackRequest')] = R1
0033  RETURN    return R0..R-1
; ---------- proto0 [Create] ----------
  ; fn ?  line 6-10 np=3 va=0 ms=9 code=11 consts=3 upvals=1 protos=0
  ;   K[0]='setmetatable'
  ;   K[1]='CDNDownloader'
  ;   K[2]='_Init'
  ;   upvals: _ENV
  ;   locals: strUrl(0-11), strSavePath(0-11), callback(0-11), downloader(4-11)
  0000  GETTABUP  R3 = _ENV[K0('setmetatable')]
  0001  NEWTABLE  R4 = {} (0 items)
  0002  GETTABUP  R5 = _ENV[K1('CDNDownloader')]
  0003  CALL      R3 = call(R3, 1 args, 2 rets)
  0004  SELF      R5 = R3[K2('_Init')] (self)
  0005  MOVE      R6 = R0
  0006  MOVE      R7 = R0
  0007  MOVE      R8 = R0
  0008  CALL      R4 = call(R4, 0 args, 4 rets)
  0009  RETURN    return R3..R2
  0010  RETURN    return R0..R-1
; ---------- proto1 [_Init] ----------
  ; fn ?  line 12-18 np=4 va=0 ms=4 code=6 consts=7 upvals=0 protos=0
  ;   K[0]='m_strUrl'
  ;   K[1]='m_strSavePath'
  ;   K[2]='m_funcCallback'
  ;   K[3]='m_bFlying'
  ;   K[4]=false
  ;   K[5]='m_startTime'
  ;   K[6]=0
  ;   locals: self(0-6), strUrl(0-6), strSavePath(0-6), callback(0-6)
  0000  SETTABLE  R0[K0('m_strUrl')] = R1
  0001  SETTABLE  R0[K1('m_strSavePath')] = R2
  0002  SETTABLE  R0[K2('m_funcCallback')] = R3
  0003  SETTABLE  R0[K3('m_bFlying')] = K4(false)
  0004  SETTABLE  R0[K5('m_startTime')] = K6(0)
  0005  RETURN    return R0..R-1
; ---------- proto2 [CanSend] ----------
  ; fn ?  line 20-22 np=1 va=0 ms=2 code=4 consts=1 upvals=0 protos=0
  ;   K[0]='m_bFlying'
  ;   locals: self(0-4)
  0000  GETTABLE  R1 = R0[K0('m_bFlying')]
  0001  NOT       R1 = not R0
  0002  RETURN    return R1..R0
  0003  RETURN    return R0..R-1
; ---------- proto3 [StartDownload] ----------
  ; fn ?  line 24-48 np=1 va=0 ms=9 code=53 consts=21 upvals=1 protos=1
  ;   K[0]='m_strSavePath'
  ;   K[1]='SafeCall'
  ;   K[2]='StringUtil'
  ;   K[3]='IsNilOrEmpty'
  ;   K[4]='m_funcCallback'
  ;   K[5]='Failed to get temp file with '
  ;   K[6]='m_strSavePath'
  ;   K[7]='m_bFlying'
  ;   K[8]=true
  ;   K[9]='m_startTime'
  ;   K[10]='NetTimeStamp'
  ;   K[11]='Create'
  ;   K[12]='EBIType'
  ;   K[13]='NetworkCheckAction'
  ;   K[14]='StartCDNDownload'
  ;   K[15]='GM'
  ;   K[16]='BIManager'
  ;   K[17]='LogNet'
  ;   K[18]='bIsLoading'
  ;   K[19]='_DownloadToFile'
  ;   K[20]='_DownloadToMemory'
  ;   upvals: _ENV
  ;   locals: self(0-53), tempFilePath(1-53), func(5-22)
  0000  LOADNIL   R1..R1 = nil
  0001  GETTABLE  R2 = R0[K0('m_strSavePath')]
  0002  TEST      if not R2 then   -> -131068
  0003  JMP       (jump)   -> 22
  0004  CLOSURE   R2 = closure proto0
  0005  GETTABUP  R3 = _ENV[K1('SafeCall')]
  0006  MOVE      R4 = R0
  0007  CALL      R3 = call(R3, 0 args, 1 rets)
  0008  GETTABUP  R3 = _ENV[K2('StringUtil')]
  0009  GETTABLE  R3 = R3[K3('IsNilOrEmpty')]
  0010  MOVE      R4 = R0
  0011  CALL      R3 = call(R3, 1 args, 1 rets)
  0012  TEST      if not R3 then   -> -131058
  0013  JMP       (jump)   -> 22
  0014  GETTABLE  R3 = R0[K4('m_funcCallback')]
  0015  LOADBOOL  R4 = false
  0016  MOVE      R5 = R0
  0017  LOADK     R6 = K5 'Failed to get temp file with '
  0018  GETTABLE  R7 = R0[K6('m_strSavePath')]
  0019  CONCAT    R6 = concat(R6..R6)
  0020  CALL      R3 = call(R3, 0 args, 3 rets)
  0021  RETURN    return R0..R-1
  0022  SETTABLE  R0[K7('m_bFlying')] = K8(true)
  0023  GETTABUP  R2 = _ENV[K10('NetTimeStamp')]
  0024  GETTABLE  R2 = R2[K11('Create')]
  0025  GETTABUP  R3 = _ENV[K12('EBIType')]
  0026  GETTABLE  R3 = R3[K13('NetworkCheckAction')]
  0027  GETTABLE  R3 = R3[K14('StartCDNDownload')]
  0028  CALL      R2 = call(R2, 1 args, 1 rets)
  0029  SETTABLE  R0[K9('m_startTime')] = R2
  0030  GETTABUP  R2 = _ENV[K15('GM')]
  0031  GETTABLE  R2 = R2[K16('BIManager')]
  0032  SELF      R3 = R2[K17('LogNet')] (self)
  0033  GETTABUP  R4 = _ENV[K12('EBIType')]
  0034  GETTABLE  R4 = R4[K13('NetworkCheckAction')]
  0035  GETTABLE  R4 = R4[K14('StartCDNDownload')]
  0036  GETTABLE  R5 = R0[K6('m_strSavePath')]
  0037  LOADNIL   R6..R6 = nil
  0038  GETTABLE  R8 = R0[K18('bIsLoading')]
  0039  CALL      R2 = call(R2, 0 args, 6 rets)
  0040  GETTABUP  R2 = _ENV[K2('StringUtil')]
  0041  GETTABLE  R2 = R2[K3('IsNilOrEmpty')]
  0042  MOVE      R3 = R0
  0043  CALL      R2 = call(R2, 1 args, 1 rets)
  0044  TEST      if not R2 then   -> -131025
  0045  JMP       (jump)   -> 50
  0046  SELF      R3 = R0[K19('_DownloadToFile')] (self)
  0047  MOVE      R4 = R0
  0048  CALL      R2 = call(R2, 0 args, 2 rets)
  0049  JMP       (jump)   -> 52
  0050  SELF      R3 = R0[K20('_DownloadToMemory')] (self)
  0051  CALL      R2 = call(R2, 0 args, 1 rets)
  0052  RETURN    return R0..R-1
  ; ---------- proto0 [] ----------
    ; fn ?  line 27-29 np=0 va=0 ms=2 code=6 consts=3 upvals=3 protos=0
    ;   K[0]='CDNWriter'
    ;   K[1]='GetTempFilePath'
    ;   K[2]='m_strSavePath'
    ;   upvals: tempFilePath, _ENV, self
    0000  GETTABUP  R0 = _ENV[K0('CDNWriter')]
    0001  GETTABLE  R0 = R0[K1('GetTempFilePath')]
    0002  GETTABUP  R1 = self[K2('m_strSavePath')]
    0003  CALL      R0 = call(R0, 1 args, 1 rets)
    0004  SETUPVAL  tempFilePath = R0
    0005  RETURN    return R0..R-1
; ---------- proto4 [_DownloadToFile] ----------
  ; fn ?  line 50-105 np=2 va=0 ms=8 code=32 consts=17 upvals=1 protos=1
  ;   K[0]='CSNetLibManager'
  ;   K[1]='CreateFileDownloader'
  ;   K[2]='m_strUrl'
  ;   K[3]='CDNDownloader'
  ;   K[4]='DEFAULT_TIME_OUT'
  ;   K[5]=2
  ;   K[6]='SetHeader'
  ;   K[7]='NetworkConfig'
  ;   K[8]='AcceptEncodingKey'
  ;   K[9]='gzip, deflate'
  ;   K[10]='ContentTypeKey'
  ;   K[11]='application/octet-stream'
  ;   K[12]='bIsLoading'
  ;   K[13]='SetLogAll'
  ;   K[14]='SetLogFail'
  ;   K[15]='SetCallback'
  ;   K[16]='Send'
  ;   upvals: _ENV
  ;   locals: self(0-32), tempFilePath(0-32), reqCtx(8-32)
  0000  GETTABUP  R2 = _ENV[K0('CSNetLibManager')]
  0001  SELF      R3 = R2[K1('CreateFileDownloader')] (self)
  0002  MOVE      R4 = R0
  0003  GETTABLE  R5 = R0[K2('m_strUrl')]
  0004  GETTABUP  R6 = _ENV[K3('CDNDownloader')]
  0005  GETTABLE  R6 = R6[K4('DEFAULT_TIME_OUT')]
  0006  LOADK     R7 = K5 2
  0007  CALL      R2 = call(R2, 1 args, 5 rets)
  0008  SELF      R4 = R2[K6('SetHeader')] (self)
  0009  GETTABUP  R5 = _ENV[K7('NetworkConfig')]
  0010  GETTABLE  R5 = R5[K8('AcceptEncodingKey')]
  0011  LOADK     R6 = K9 'gzip, deflate'
  0012  CALL      R3 = call(R3, 0 args, 3 rets)
  0013  SELF      R4 = R2[K6('SetHeader')] (self)
  0014  GETTABUP  R5 = _ENV[K7('NetworkConfig')]
  0015  GETTABLE  R5 = R5[K10('ContentTypeKey')]
  0016  LOADK     R6 = K11 'application/octet-stream'
  0017  CALL      R3 = call(R3, 0 args, 3 rets)
  0018  GETTABLE  R3 = R0[K12('bIsLoading')]
  0019  TEST      if not R3 then   -> -131051
  0020  JMP       (jump)   -> 24
  0021  SELF      R4 = R2[K13('SetLogAll')] (self)
  0022  CALL      R3 = call(R3, 0 args, 1 rets)
  0023  JMP       (jump)   -> 26
  0024  SELF      R4 = R2[K14('SetLogFail')] (self)
  0025  CALL      R3 = call(R3, 0 args, 1 rets)
  0026  SELF      R4 = R2[K15('SetCallback')] (self)
  0027  CLOSURE   R5 = closure proto0
  0028  CALL      R3 = call(R3, 0 args, 2 rets)
  0029  SELF      R4 = R2[K16('Send')] (self)
  0030  CALL      R3 = call(R3, 0 args, 1 rets)
  0031  RETURN    return R0..R-1
  ; ---------- proto0 [] ----------
    ; fn ?  line 63-102 np=0 va=0 ms=6 code=68 consts=25 upvals=4 protos=1
    ;   K[0]='GM'
    ;   K[1]=nil
    ;   K[2]='m_reqCtx'
    ;   K[3]='Rcode'
    ;   K[4]='ResultCode'
    ;   K[5]='Succeeded'
    ;   K[6]='CDNResourceManager'
    ;   K[7]='IsDownloadingDownloader'
    ;   K[8]='CDNWriter'
    ;   K[9]='ReplaceFile'
    ;   K[10]='m_strSavePath'
    ;   K[11]='File'
    ;   K[12]='Exists'
    ;   K[13]='Delete'
    ;   K[14]='MaxRetry'
    ;   K[15]=0
    ;   K[16]=1
    ;   K[17]='Retain'
    ;   K[18]='Send'
    ;   K[19]='CDNDownloader'
    ;   K[20]='TryFallbackRequest'
    ;   K[21]='_OnDownloadFinished'
    ;   K[22]='tostring'
    ;   K[23]=','
    ;   K[24]='ErrorMsg'
    ;   upvals: _ENV, self, reqCtx, tempFilePath
    ;   locals: callback(19-25)
    0000  GETTABUP  R0 = _ENV[K0('GM')]
    0001  EQ        if R0 eq K1(nil)   -> -130812
    0002  JMP       (jump)   -> 4
    0003  RETURN    return R0..R-1
    0004  GETUPVAL  R0 = _ENV
    0005  SETTABUP  self[K2('m_reqCtx')] = R0
    0006  GETTABUP  R0 = reqCtx[K3('Rcode')]
    0007  GETTABUP  R1 = _ENV[K4('ResultCode')]
    0008  GETTABLE  R1 = R1[K5('Succeeded')]
    0009  EQ        if R0 eq R1   -> -131060
    0010  JMP       (jump)   -> 37
    0011  GETTABUP  R0 = _ENV[K0('GM')]
    0012  GETTABLE  R0 = R0[K6('CDNResourceManager')]
    0013  SELF      R1 = R0[K7('IsDownloadingDownloader')] (self)
    0014  GETUPVAL  R2 = _ENV
    0015  CALL      R0 = call(R0, 1 args, 2 rets)
    0016  TEST      if not R0 then   -> -131054
    0017  JMP       (jump)   -> 26
    0018  CLOSURE   R0 = closure proto0
    0019  GETTABUP  R1 = _ENV[K8('CDNWriter')]
    0020  GETTABLE  R1 = R1[K9('ReplaceFile')]
    0021  GETTABUP  R2 = self[K10('m_strSavePath')]
    0022  GETUPVAL  R3 = _ENV
    0023  MOVE      R4 = R0
    0024  CALL      R1 = call(R1, 0 args, 3 rets)
    0025  JMP       (jump)   -> 67
    0026  GETTABUP  R0 = _ENV[K11('File')]
    0027  GETTABLE  R0 = R0[K12('Exists')]
    0028  GETUPVAL  R1 = _ENV
    0029  CALL      R0 = call(R0, 1 args, 1 rets)
    0030  TEST      if not R0 then   -> -131040
    0031  JMP       (jump)   -> 67
    0032  GETTABUP  R0 = _ENV[K11('File')]
    0033  GETTABLE  R0 = R0[K13('Delete')]
    0034  GETUPVAL  R1 = _ENV
    0035  CALL      R0 = call(R0, 0 args, 1 rets)
    0036  JMP       (jump)   -> 67
    0037  GETTABUP  R0 = reqCtx[K14('MaxRetry')]
    0038  LT        if R0 lt R0   -> 7720
    0039  JMP       (jump)   -> 50
    0040  GETTABUP  R0 = reqCtx[K14('MaxRetry')]
    0041  SUB       R0 = K16(1) sub R0
    0042  SETTABUP  reqCtx[K14('MaxRetry')] = R0
    0043  GETUPVAL  R0 = _ENV
    0044  SELF      R1 = R0[K17('Retain')] (self)
    0045  CALL      R0 = call(R0, 0 args, 1 rets)
    0046  GETUPVAL  R0 = _ENV
    0047  SELF      R1 = R0[K18('Send')] (self)
    0048  CALL      R0 = call(R0, 0 args, 1 rets)
    0049  JMP       (jump)   -> 67
    0050  GETTABUP  R0 = _ENV[K19('CDNDownloader')]
    0051  GETTABLE  R0 = R0[K20('TryFallbackRequest')]
    0052  GETUPVAL  R1 = _ENV
    0053  CALL      R0 = call(R0, 1 args, 1 rets)
    0054  TEST      if not R0 then   -> -131016
    0055  JMP       (jump)   -> 57
    0056  RETURN    return R0..R-1
    0057  GETUPVAL  R0 = _ENV
    0058  SELF      R1 = R0[K21('_OnDownloadFinished')] (self)
    0059  LOADBOOL  R2 = false
    0060  GETTABUP  R3 = _ENV[K22('tostring')]
    0061  GETTABUP  R4 = reqCtx[K3('Rcode')]
    0062  CALL      R3 = call(R3, 1 args, 1 rets)
    0063  LOADK     R4 = K23 ','
    0064  GETTABUP  R5 = reqCtx[K24('ErrorMsg')]
    0065  CONCAT    R3 = concat(R3..R3)
    0066  CALL      R0 = call(R0, 0 args, 3 rets)
    0067  RETURN    return R0..R-1
    ; ---------- proto0 [] ----------
      ; fn ?  line 71-83 np=2 va=0 ms=9 code=51 consts=14 upvals=2 protos=0
      ;   K[0]='_CheckDownloadedFileValid'
      ;   K[1]='m_strSavePath'
      ;   K[2]='_OnDownloadFinished'
      ;   K[3]='Log'
      ;   K[4]='Info'
      ;   K[5]='CDNDownloader Write File '
      ;   K[6]='Success '
      ;   K[7]='Failed '
      ;   K[8]='CDNDownloader zip content is '
      ;   K[9]='table'
      ;   K[10]='concat'
      ;   K[11]='strFileContent'
      ;   K[12]=', '
      ;   K[13]='CDNDownloader Write File Failed '
      ;   upvals: self, _ENV
      ;   locals: bSuccess(0-51), strErr(0-51), valid(6-38), errInfo(6-38)
      0000  TEST      if not R0 then   -> -131070
      0001  JMP       (jump)   -> 39
      0002  GETUPVAL  R2 = self
      0003  SELF      R3 = R2[K0('_CheckDownloadedFileValid')] (self)
      0004  GETTABUP  R4 = self[K1('m_strSavePath')]
      0005  CALL      R2 = call(R2, 2 args, 2 rets)
      0006  GETUPVAL  R4 = self
      0007  SELF      R5 = R4[K2('_OnDownloadFinished')] (self)
      0008  MOVE      R6 = R0
      0009  MOVE      R7 = R0
      0010  CALL      R4 = call(R4, 0 args, 3 rets)
      0011  GETTABUP  R4 = _ENV[K3('Log')]
      0012  GETTABLE  R4 = R4[K4('Info')]
      0013  LOADK     R5 = K5 'CDNDownloader Write File '
      0014  TEST      if not R2 then   -> -131056
      0015  JMP       (jump)   -> 19
      0016  LOADK     R6 = K6 'Success '
      0017  TEST      if not R6 then   -> -131052
      0018  JMP       (jump)   -> 20
      0019  LOADK     R6 = K7 'Failed '
      0020  GETTABUP  R7 = self[K1('m_strSavePath')]
      0021  CONCAT    R5 = concat(R5..R5)
      0022  CALL      R4 = call(R4, 0 args, 1 rets)
      0023  TEST      if not R2 then   -> -131047
      0024  JMP       (jump)   -> 50
      0025  GETTABUP  R4 = _ENV[K3('Log')]
      0026  GETTABLE  R4 = R4[K4('Info')]
      0027  LOADK     R5 = K8 'CDNDownloader zip content is '
      0028  GETTABUP  R6 = _ENV[K9('table')]
      0029  GETTABLE  R6 = R6[K10('concat')]
      0030  GETTABUP  R7 = self[K11('strFileContent')]
      0031  TEST      if not R7 then   -> -131038
      0032  JMP       (jump)   -> 34
      0033  NEWTABLE  R7 = {} (0 items)
      0034  LOADK     R8 = K12 ', '
      0035  CALL      R6 = call(R6, 1 args, 2 rets)
      0036  CONCAT    R5 = concat(R5..R5)
      0037  CALL      R4 = call(R4, 0 args, 1 rets)
      0038  JMP       (jump)   -> 50
      0039  GETUPVAL  R2 = self
      0040  SELF      R3 = R2[K2('_OnDownloadFinished')] (self)
      0041  MOVE      R4 = R0
      0042  MOVE      R5 = R0
      0043  CALL      R2 = call(R2, 0 args, 3 rets)
      0044  GETTABUP  R2 = _ENV[K3('Log')]
      0045  GETTABLE  R2 = R2[K4('Info')]
      0046  LOADK     R3 = K13 'CDNDownloader Write File Failed '
      0047  GETTABUP  R4 = self[K1('m_strSavePath')]
      0048  CONCAT    R3 = concat(R3..R3)
      0049  CALL      R2 = call(R2, 0 args, 1 rets)
      0050  RETURN    return R0..R-1
; ---------- proto5 [_DownloadToMemory] ----------
  ; fn ?  line 107-170 np=1 va=0 ms=7 code=36 consts=19 upvals=1 protos=2
  ;   K[0]='CSNetLibManager'
  ;   K[1]='CreateGeneralHttpRequest'
  ;   K[2]='m_strUrl'
  ;   K[3]='GET'
  ;   K[4]='CDNDownloader'
  ;   K[5]='DEFAULT_TIME_OUT'
  ;   K[6]=2
  ;   K[7]='SetHeader'
  ;   K[8]='NetworkConfig'
  ;   K[9]='AcceptEncodingKey'
  ;   K[10]='gzip, deflate'
  ;   K[11]='ContentTypeKey'
  ;   K[12]='application/octet-stream'
  ;   K[13]='bIsLoading'
  ;   K[14]='SetLogAll'
  ;   K[15]='SetLogFail'
  ;   K[16]='SetCheckResponse'
  ;   K[17]='SetCallback'
  ;   K[18]='Send'
  ;   upvals: _ENV
  ;   locals: self(0-36), reqCtx(8-36), body(27-36), mapData(27-36)
  0000  GETTABUP  R1 = _ENV[K0('CSNetLibManager')]
  0001  SELF      R2 = R1[K1('CreateGeneralHttpRequest')] (self)
  0002  GETTABLE  R3 = R0[K2('m_strUrl')]
  0003  LOADK     R4 = K3 'GET'
  0004  GETTABUP  R5 = _ENV[K4('CDNDownloader')]
  0005  GETTABLE  R5 = R5[K5('DEFAULT_TIME_OUT')]
  0006  LOADK     R6 = K6 2
  0007  CALL      R1 = call(R1, 1 args, 5 rets)
  0008  SELF      R3 = R1[K7('SetHeader')] (self)
  0009  GETTABUP  R4 = _ENV[K8('NetworkConfig')]
  0010  GETTABLE  R4 = R4[K9('AcceptEncodingKey')]
  0011  LOADK     R5 = K10 'gzip, deflate'
  0012  CALL      R2 = call(R2, 0 args, 3 rets)
  0013  SELF      R3 = R1[K7('SetHeader')] (self)
  0014  GETTABUP  R4 = _ENV[K8('NetworkConfig')]
  0015  GETTABLE  R4 = R4[K11('ContentTypeKey')]
  0016  LOADK     R5 = K12 'application/octet-stream'
  0017  CALL      R2 = call(R2, 0 args, 3 rets)
  0018  GETTABLE  R2 = R0[K13('bIsLoading')]
  0019  TEST      if not R2 then   -> -131051
  0020  JMP       (jump)   -> 24
  0021  SELF      R3 = R1[K14('SetLogAll')] (self)
  0022  CALL      R2 = call(R2, 0 args, 1 rets)
  0023  JMP       (jump)   -> 26
  0024  SELF      R3 = R1[K15('SetLogFail')] (self)
  0025  CALL      R2 = call(R2, 0 args, 1 rets)
  0026  LOADNIL   R2..R2 = nil
  0027  SELF      R5 = R1[K16('SetCheckResponse')] (self)
  0028  CLOSURE   R6 = closure proto0
  0029  CALL      R4 = call(R4, 0 args, 2 rets)
  0030  SELF      R5 = R1[K17('SetCallback')] (self)
  0031  CLOSURE   R6 = closure proto1
  0032  CALL      R4 = call(R4, 0 args, 2 rets)
  0033  SELF      R5 = R1[K18('Send')] (self)
  0034  CALL      R4 = call(R4, 0 args, 1 rets)
  0035  RETURN    return R0..R-1
  ; ---------- proto0 [] ----------
    ; fn ?  line 121-139 np=0 va=0 ms=2 code=35 consts=15 upvals=4 protos=0
    ;   K[0]='GM'
    ;   K[1]=nil
    ;   K[2]='math'
    ;   K[3]='floor'
    ;   K[4]='Status'
    ;   K[5]=100
    ;   K[6]=2
    ;   K[7]='RespBody'
    ;   K[8]='Bytes'
    ;   K[9]=0
    ;   K[10]='Invalid response body'
    ;   K[11]='GetResponseString'
    ;   K[12]='json'
    ;   K[13]='decode'
    ;   K[14]='Malformed response body'
    ;   upvals: _ENV, reqCtx, body, mapData
    0000  GETTABUP  R0 = _ENV[K0('GM')]
    0001  EQ        if R0 eq K1(nil)   -> -130812
    0002  JMP       (jump)   -> 5
    0003  LOADNIL   R0..R0 = nil
    0004  RETURN    return R0..R-1
    0005  GETTABUP  R0 = _ENV[K2('math')]
    0006  GETTABLE  R0 = R0[K3('floor')]
    0007  GETTABUP  R1 = reqCtx[K4('Status')]
    0008  DIV       R1 = K5(100) div R1
    0009  CALL      R0 = call(R0, 1 args, 1 rets)
    0010  EQ        if R0 eq K6(2)   -> -130798
    0011  JMP       (jump)   -> 32
    0012  GETTABUP  R0 = reqCtx[K7('RespBody')]
    0013  GETTABLE  R0 = R0[K8('Bytes')]
    0014  EQ        if R0 eq K9(0)   -> -130791
    0015  JMP       (jump)   -> 18
    0016  LOADK     R0 = K10 'Invalid response body'
    0017  RETURN    return R0..R-1
    0018  GETUPVAL  R0 = _ENV
    0019  SELF      R1 = R0[K11('GetResponseString')] (self)
    0020  CALL      R0 = call(R0, 1 args, 1 rets)
    0021  SETUPVAL  _ENV = R0
    0022  GETTABUP  R0 = _ENV[K12('json')]
    0023  GETTABLE  R0 = R0[K13('decode')]
    0024  GETUPVAL  R1 = _ENV
    0025  CALL      R0 = call(R0, 1 args, 1 rets)
    0026  SETUPVAL  _ENV = R0
    0027  GETUPVAL  R0 = _ENV
    0028  EQ        if R0 eq K1(nil)   -> -130785
    0029  JMP       (jump)   -> 32
    0030  LOADK     R0 = K14 'Malformed response body'
    0031  RETURN    return R0..R-1
    0032  LOADNIL   R0..R0 = nil
    0033  RETURN    return R0..R-1
    0034  RETURN    return R0..R-1
  ; ---------- proto1 [] ----------
    ; fn ?  line 142-167 np=0 va=0 ms=6 code=49 consts=18 upvals=4 protos=0
    ;   K[0]='GM'
    ;   K[1]=nil
    ;   K[2]='m_reqCtx'
    ;   K[3]='Rcode'
    ;   K[4]='ResultCode'
    ;   K[5]='Succeeded'
    ;   K[6]='_OnDownloadFinished'
    ;   K[7]=''
    ;   K[8]='MaxRetry'
    ;   K[9]=0
    ;   K[10]=1
    ;   K[11]='Retain'
    ;   K[12]='Send'
    ;   K[13]='CDNDownloader'
    ;   K[14]='TryFallbackRequest'
    ;   K[15]='tostring'
    ;   K[16]=','
    ;   K[17]='ErrorMsg'
    ;   upvals: _ENV, self, reqCtx, body
    0000  GETTABUP  R0 = _ENV[K0('GM')]
    0001  EQ        if R0 eq K1(nil)   -> -130812
    0002  JMP       (jump)   -> 4
    0003  RETURN    return R0..R-1
    0004  GETUPVAL  R0 = _ENV
    0005  SETTABUP  self[K2('m_reqCtx')] = R0
    0006  GETTABUP  R0 = reqCtx[K3('Rcode')]
    0007  GETTABUP  R1 = _ENV[K4('ResultCode')]
    0008  GETTABLE  R1 = R1[K5('Succeeded')]
    0009  EQ        if R0 eq R1   -> -131060
    0010  JMP       (jump)   -> 18
    0011  GETUPVAL  R0 = _ENV
    0012  SELF      R1 = R0[K6('_OnDownloadFinished')] (self)
    0013  LOADBOOL  R2 = true
    0014  LOADK     R3 = K7 ''
    0015  GETUPVAL  R4 = _ENV
    0016  CALL      R0 = call(R0, 0 args, 4 rets)
    0017  RETURN    return R0..R-1
    0018  GETTABUP  R0 = reqCtx[K8('MaxRetry')]
    0019  LT        if R0 lt R0   -> 4629
    0020  JMP       (jump)   -> 31
    0021  GETTABUP  R0 = reqCtx[K8('MaxRetry')]
    0022  SUB       R0 = K10(1) sub R0
    0023  SETTABUP  reqCtx[K8('MaxRetry')] = R0
    0024  GETUPVAL  R0 = _ENV
    0025  SELF      R1 = R0[K11('Retain')] (self)
    0026  CALL      R0 = call(R0, 0 args, 1 rets)
    0027  GETUPVAL  R0 = _ENV
    0028  SELF      R1 = R0[K12('Send')] (self)
    0029  CALL      R0 = call(R0, 0 args, 1 rets)
    0030  RETURN    return R0..R-1
    0031  GETTABUP  R0 = _ENV[K13('CDNDownloader')]
    0032  GETTABLE  R0 = R0[K14('TryFallbackRequest')]
    0033  GETUPVAL  R1 = _ENV
    0034  CALL      R0 = call(R0, 1 args, 1 rets)
    0035  TEST      if not R0 then   -> -131035
    0036  JMP       (jump)   -> 38
    0037  RETURN    return R0..R-1
    0038  GETUPVAL  R0 = _ENV
    0039  SELF      R1 = R0[K6('_OnDownloadFinished')] (self)
    0040  LOADBOOL  R2 = false
    0041  GETTABUP  R3 = _ENV[K15('tostring')]
    0042  GETTABUP  R4 = reqCtx[K3('Rcode')]
    0043  CALL      R3 = call(R3, 1 args, 1 rets)
    0044  LOADK     R4 = K16 ','
    0045  GETTABUP  R5 = reqCtx[K17('ErrorMsg')]
    0046  CONCAT    R3 = concat(R3..R3)
    0047  CALL      R0 = call(R0, 0 args, 3 rets)
    0048  RETURN    return R0..R-1
; ---------- proto6 [_OnDownloadFinished] ----------
  ; fn ?  line 172-185 np=4 va=0 ms=12 code=41 consts=15 upvals=1 protos=0
  ;   K[0]='m_bFlying'
  ;   K[1]=false
  ;   K[2]='m_startTime'
  ;   K[3]='EndAndGetDur'
  ;   K[4]='m_funcCallback'
  ;   K[5]='GM'
  ;   K[6]='BIManager'
  ;   K[7]='LogNet'
  ;   K[8]='EBIType'
  ;   K[9]='NetworkCheckAction'
  ;   K[10]='CDNDownloadSuccess'
  ;   K[11]='strFileKey'
  ;   K[12]='m_reqCtx'
  ;   K[13]='bIsLoading'
  ;   K[14]='CDNDownloadFailed'
  ;   upvals: _ENV
  ;   locals: self(0-41), bSuccess(0-41), errorMsg(0-41), fileContent(0-41), timeInterval(4-41)
  0000  SETTABLE  R0[K0('m_bFlying')] = K1(false)
  0001  GETTABLE  R4 = R0[K2('m_startTime')]
  0002  SELF      R5 = R4[K3('EndAndGetDur')] (self)
  0003  CALL      R4 = call(R4, 1 args, 1 rets)
  0004  TEST      if not R1 then   -> -131066
  0005  JMP       (jump)   -> 24
  0006  GETTABLE  R5 = R0[K4('m_funcCallback')]
  0007  LOADBOOL  R6 = true
  0008  MOVE      R7 = R0
  0009  MOVE      R8 = R0
  0010  MOVE      R9 = R0
  0011  CALL      R5 = call(R5, 0 args, 4 rets)
  0012  GETTABUP  R5 = _ENV[K5('GM')]
  0013  GETTABLE  R5 = R5[K6('BIManager')]
  0014  SELF      R6 = R5[K7('LogNet')] (self)
  0015  GETTABUP  R7 = _ENV[K8('EBIType')]
  0016  GETTABLE  R7 = R7[K9('NetworkCheckAction')]
  0017  GETTABLE  R7 = R7[K10('CDNDownloadSuccess')]
  0018  GETTABLE  R8 = R0[K11('strFileKey')]
  0019  GETTABLE  R9 = R0[K12('m_reqCtx')]
  0020  MOVE      R10 = R0
  0021  GETTABLE  R11 = R0[K13('bIsLoading')]
  0022  CALL      R5 = call(R5, 0 args, 6 rets)
  0023  JMP       (jump)   -> 40
  0024  GETTABLE  R5 = R0[K4('m_funcCallback')]
  0025  LOADBOOL  R6 = false
  0026  MOVE      R7 = R0
  0027  MOVE      R8 = R0
  0028  CALL      R5 = call(R5, 0 args, 3 rets)
  0029  GETTABUP  R5 = _ENV[K5('GM')]
  0030  GETTABLE  R5 = R5[K6('BIManager')]
  0031  SELF      R6 = R5[K7('LogNet')] (self)
  0032  GETTABUP  R7 = _ENV[K8('EBIType')]
  0033  GETTABLE  R7 = R7[K9('NetworkCheckAction')]
  0034  GETTABLE  R7 = R7[K14('CDNDownloadFailed')]
  0035  MOVE      R8 = R0
  0036  GETTABLE  R9 = R0[K12('m_reqCtx')]
  0037  MOVE      R10 = R0
  0038  GETTABLE  R11 = R0[K13('bIsLoading')]
  0039  CALL      R5 = call(R5, 0 args, 6 rets)
  0040  RETURN    return R0..R-1
; ---------- proto7 [_CheckDownloadedFileValid] ----------
  ; fn ?  line 187-227 np=2 va=0 ms=18 code=119 consts=31 upvals=1 protos=0
  ;   K[0]='File'
  ;   K[1]='Exists'
  ;   K[2]='no file'
  ;   K[3]='CDNResourceManager'
  ;   K[4]='GetFileNameByFileKey'
  ;   K[5]='StringUtil'
  ;   K[6]='EndWith'
  ;   K[7]='zip'
  ;   K[8]='ZipHelper'
  ;   K[9]='UnZip'
  ;   K[10]='FileUtils'
  ;   K[11]='CdnPath'
  ;   K[12]='strFileContent'
  ;   K[13]='ipairs'
  ;   K[14]='_CheckDownloadedFileValid'
  ;   K[15]='GetCdnPath'
  ;   K[16]=','
  ;   K[17]='json'
  ;   K[18]='json.bytes'
  ;   K[19]='GM'
  ;   K[20]='ResourceLoader'
  ;   K[21]='LoadCDNFileByFullPath'
  ;   K[22]='IsNilOrEmpty'
  ;   K[23]='decode'
  ;   K[24]='wrote json invalid: '
  ;   K[25]='lua'
  ;   K[26]='lua.bytes'
  ;   K[27]='LuaManager'
  ;   K[28]='CheckLuaValid'
  ;   K[29]='wrote lua invalid: '
  ;   K[30]='Delete'
  ;   upvals: _ENV
  ;   locals: self(0-119), strPath(0-119), valid(10-119), info(11-119), fileName(15-119), extension(15-119), contentList(35-62), contentValid(36-62), errInfo(36-62), (for generator)(39-62), (for state)(39-62), (for control)(39-62), _(40-60), contentPath(40-60), text(72-88)
  0000  GETTABUP  R2 = _ENV[K0('File')]
  0001  GETTABLE  R2 = R2[K1('Exists')]
  0002  MOVE      R3 = R0
  0003  CALL      R2 = call(R2, 1 args, 1 rets)
  0004  TEST      if not R2 then   -> -131065
  0005  JMP       (jump)   -> 9
  0006  LOADBOOL  R2 = false
  0007  LOADK     R3 = K2 'no file'
  0008  RETURN    return R2..R1
  0009  LOADBOOL  R2 = true
  0010  LOADNIL   R3..R3 = nil
  0011  GETTABUP  R4 = _ENV[K3('CDNResourceManager')]
  0012  GETTABLE  R4 = R4[K4('GetFileNameByFileKey')]
  0013  MOVE      R5 = R0
  0014  CALL      R4 = call(R4, 2 args, 1 rets)
  0015  GETTABUP  R6 = _ENV[K5('StringUtil')]
  0016  GETTABLE  R6 = R6[K6('EndWith')]
  0017  MOVE      R7 = R0
  0018  LOADK     R8 = K7 'zip'
  0019  CALL      R6 = call(R6, 1 args, 2 rets)
  0020  TEST      if not R6 then   -> -131050
  0021  JMP       (jump)   -> 63
  0022  GETTABUP  R6 = _ENV[K8('ZipHelper')]
  0023  GETTABLE  R6 = R6[K9('UnZip')]
  0024  MOVE      R7 = R0
  0025  GETTABUP  R8 = _ENV[K10('FileUtils')]
  0026  GETTABLE  R8 = R8[K11('CdnPath')]
  0027  CALL      R6 = call(R6, 1 args, 2 rets)
  0028  MOVE      R2 = R0
  0029  TEST      if not R2 then   -> -131041
  0030  JMP       (jump)   -> 103
  0031  GETTABLE  R6 = R0[K12('strFileContent')]
  0032  TEST      if not R6 then   -> -131037
  0033  JMP       (jump)   -> 35
  0034  NEWTABLE  R6 = {} (0 items)
  0035  LOADNIL   R7..R7 = nil
  0036  GETTABUP  R9 = _ENV[K13('ipairs')]
  0037  MOVE      R10 = R0
  0038  CALL      R9 = call(R9, 3 args, 1 rets)
  0039  JMP       (jump)   -> 60
  0040  SELF      R15 = R0[K14('_CheckDownloadedFileValid')] (self)
  0041  GETTABUP  R16 = _ENV[K3('CDNResourceManager')]
  0042  GETTABLE  R16 = R16[K15('GetCdnPath')]
  0043  MOVE      R17 = R0
  0044  CALL      R16 = call(R16, -1 args, 1 rets)
  0045  CALL      R14 = call(R14, 2 args, -1 rets)
  0046  MOVE      R8 = R0
  0047  MOVE      R7 = R0
  0048  TEST      if not R7 then   -> -131021
  0049  JMP       (jump)   -> 60
  0050  LOADBOOL  R2 = false
  0051  TEST      if not R3 then   -> -131019
  0052  JMP       (jump)   -> 59
  0053  MOVE      R14 = R0
  0054  LOADK     R15 = K16 ','
  0055  MOVE      R16 = R0
  0056  CONCAT    R14 = concat(R14..R14)
  0057  TESTSET   if R1 then R3   -> -123844
  0058  JMP       (jump)   -> 60
  0059  MOVE      R3 = R0
  0060  TFORCALL  tforcall R9
  0061  TFORLOOP  tforloop R11(sBx=-22)   -> 40
  0062  JMP       (jump)   -> 103
  0063  EQ        if R1 eq K17('json')   -> -128174
  0064  JMP       (jump)   -> 67
  0065  EQ        if R0 eq K18('json.bytes')   -> -128171
  0066  JMP       (jump)   -> 89
  0067  GETTABUP  R6 = _ENV[K19('GM')]
  0068  GETTABLE  R6 = R6[K20('ResourceLoader')]
  0069  SELF      R7 = R6[K21('LoadCDNFileByFullPath')] (self)
  0070  MOVE      R8 = R0
  0071  CALL      R6 = call(R6, 1 args, 2 rets)
  0072  GETTABUP  R7 = _ENV[K5('StringUtil')]
  0073  GETTABLE  R7 = R7[K22('IsNilOrEmpty')]
  0074  MOVE      R8 = R0
  0075  CALL      R7 = call(R7, 1 args, 1 rets)
  0076  TEST      if not R7 then   -> -130993
  0077  JMP       (jump)   -> 84
  0078  GETTABUP  R7 = _ENV[K17('json')]
  0079  GETTABLE  R7 = R7[K23('decode')]
  0080  MOVE      R8 = R0
  0081  CALL      R7 = call(R7, 1 args, 1 rets)
  0082  TEST      if not R7 then   -> -130987
  0083  JMP       (jump)   -> 103
  0084  LOADBOOL  R2 = false
  0085  LOADK     R7 = K24 'wrote json invalid: '
  0086  MOVE      R8 = R0
  0087  CONCAT    R3 = concat(R3..R7)
  0088  JMP       (jump)   -> 103
  0089  EQ        if R1 eq K25('lua')   -> -128140
  0090  JMP       (jump)   -> 93
  0091  EQ        if R0 eq K26('lua.bytes')   -> -128137
  0092  JMP       (jump)   -> 103
  0093  GETTABUP  R6 = _ENV[K27('LuaManager')]
  0094  SELF      R7 = R6[K28('CheckLuaValid')] (self)
  0095  MOVE      R8 = R0
  0096  CALL      R6 = call(R6, 1 args, 2 rets)
  0097  MOVE      R2 = R0
  0098  TEST      if not R2 then   -> -130971
  0099  JMP       (jump)   -> 103
  0100  LOADK     R6 = K29 'wrote lua invalid: '
  0101  MOVE      R7 = R0
  0102  CONCAT    R3 = concat(R3..R6)
  0103  TEST      if not R2 then   -> -130966
  0104  JMP       (jump)   -> 115
  0105  GETTABUP  R6 = _ENV[K0('File')]
  0106  GETTABLE  R6 = R6[K1('Exists')]
  0107  MOVE      R7 = R0
  0108  CALL      R6 = call(R6, 1 args, 1 rets)
  0109  TEST      if not R6 then   -> -130961
  0110  JMP       (jump)   -> 115
  0111  GETTABUP  R6 = _ENV[K0('File')]
  0112  GETTABLE  R6 = R6[K30('Delete')]
  0113  MOVE      R7 = R0
  0114  CALL      R6 = call(R6, 0 args, 1 rets)
  0115  MOVE      R6 = R0
  0116  MOVE      R7 = R0
  0117  RETURN    return R6..R5
  0118  RETURN    return R0..R-1
; ---------- proto8 [TryFallbackRequest] ----------
  ; fn ?  line 229-235 np=1 va=0 ms=6 code=16 consts=7 upvals=1 protos=0
  ;   K[0]='GameConfig'
  ;   K[1]='IsTestMode'
  ;   K[2]='GM'
  ;   K[3]='HttpManager'
  ;   K[4]='TryFallbackRequest'
  ;   K[5]='207.90.252.34'
  ;   K[6]='https://cdn-ga.mergecola.com'
  ;   upvals: _ENV
  ;   locals: reqCtx(0-16)
  0000  GETTABUP  R1 = _ENV[K0('GameConfig')]
  0001  GETTABLE  R1 = R1[K1('IsTestMode')]
  0002  CALL      R1 = call(R1, 1 args, 0 rets)
  0003  TEST      if not R1 then   -> -131067
  0004  JMP       (jump)   -> 7
  0005  LOADBOOL  R1 = false
  0006  RETURN    return R1..R0
  0007  GETTABUP  R1 = _ENV[K2('GM')]
  0008  GETTABLE  R1 = R1[K3('HttpManager')]
  0009  SELF      R2 = R1[K4('TryFallbackRequest')] (self)
  0010  MOVE      R3 = R0
  0011  LOADK     R4 = K5 '207.90.252.34'
  0012  LOADK     R5 = K6 'https://cdn-ga.mergecola.com'
  0013  TAILCALL  tailcall(R1, 0)
  0014  RETURN    return R1..R0
  0015  RETURN    return R0..R-1
