# UI_Window_Setting_BadgeWearWindow_573.luac
; fn @BadgeWearWindow.lua  line 0-0 np=0 va=1 ms=3 code=21 consts=10 upvals=1 protos=3
;   K[0]='BadgeWearWindow'
;   K[1]='setmetatable'
;   K[2]='windowMaskAlpha'
;   K[3]='EWindowMaskAlpha'
;   K[4]='Dark'
;   K[5]='BaseWindow'
;   K[6]='__index'
;   K[7]='BeforeOpenCheck'
;   K[8]='Init'
;   K[9]='OnBtnClick'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  GETTABUP  R2 = _ENV[K3('EWindowMaskAlpha')]
0003  GETTABLE  R2 = R2[K4('Dark')]
0004  SETTABLE  R1[K2('windowMaskAlpha')] = R2
0005  GETTABUP  R2 = _ENV[K5('BaseWindow')]
0006  CALL      R0 = call(R0, 1 args, 2 rets)
0007  SETTABUP  _ENV[K0('BadgeWearWindow')] = R0
0008  GETTABUP  R0 = _ENV[K0('BadgeWearWindow')]
0009  GETTABUP  R1 = _ENV[K0('BadgeWearWindow')]
0010  SETTABLE  R0[K6('__index')] = R1
0011  GETTABUP  R0 = _ENV[K0('BadgeWearWindow')]
0012  CLOSURE   R1 = closure proto0
0013  SETTABLE  R0[K7('BeforeOpenCheck')] = R1
0014  GETTABUP  R0 = _ENV[K0('BadgeWearWindow')]
0015  CLOSURE   R1 = closure proto1
0016  SETTABLE  R0[K8('Init')] = R1
0017  GETTABUP  R0 = _ENV[K0('BadgeWearWindow')]
0018  CLOSURE   R1 = closure proto2
0019  SETTABLE  R0[K9('OnBtnClick')] = R1
0020  RETURN    return R0..R-1
; ---------- proto0 [BeforeOpenCheck] ----------
  ; fn ?  line 7-13 np=2 va=0 ms=4 code=11 consts=2 upvals=1 protos=0
  ;   K[0]='StringUtil'
  ;   K[1]='IsNilOrEmpty'
  ;   upvals: _ENV
  ;   locals: self(0-11), badgeId(0-11)
  0000  GETTABUP  R2 = _ENV[K0('StringUtil')]
  0001  GETTABLE  R2 = R2[K1('IsNilOrEmpty')]
  0002  MOVE      R3 = R0
  0003  CALL      R2 = call(R2, 1 args, 1 rets)
  0004  TEST      if not R2 then   -> -131066
  0005  JMP       (jump)   -> 8
  0006  LOADBOOL  R2 = false
  0007  RETURN    return R2..R1
  0008  LOADBOOL  R2 = true
  0009  RETURN    return R2..R1
  0010  RETURN    return R0..R-1
; ---------- proto1 [Init] ----------
  ; fn ?  line 15-38 np=2 va=0 ms=9 code=97 consts=33 upvals=1 protos=0
  ;   K[0]='m_badgeId'
  ;   K[1]='m_badge3DView'
  ;   K[2]='Init'
  ;   K[3]='m_titleText'
  ;   K[4]='text'
  ;   K[5]='GM'
  ;   K[6]='GameTextModel'
  ;   K[7]='GetText'
  ;   K[8]='_name'
  ;   K[9]='m_descText'
  ;   K[10]='gameObject'
  ;   K[11]='SetActive'
  ;   K[12]='UserProfileModel'
  ;   K[13]='IsPropertyAcquired'
  ;   K[14]='EProfilePropertyType'
  ;   K[15]='Badge'
  ;   K[16]='GetBadge'
  ;   K[17]='m_btn'
  ;   K[18]='SetText'
  ;   K[19]='bt_unequip'
  ;   K[20]='bt_equit'
  ;   K[21]='AlbumActivityModel'
  ;   K[22]='GetActiveModel'
  ;   K[23]='GetType'
  ;   K[24]='_title'
  ;   K[25]='badge_how_to_get'
  ;   K[26]='SetEnabled'
  ;   K[27]='LogWindowAction'
  ;   K[28]='EBIType'
  ;   K[29]='UIActionType'
  ;   K[30]='Open'
  ;   K[31]='EBIReferType'
  ;   K[32]='UserClick'
  ;   upvals: _ENV
  ;   locals: self(0-97), badgeId(0-97), bAlreadyWearing(36-49), ongoingAlbumModel(53-88), albumTitle(63-76)
  0000  SETTABLE  R0[K0('m_badgeId')] = R1
  0001  GETTABLE  R2 = R0[K1('m_badge3DView')]
  0002  SELF      R3 = R2[K2('Init')] (self)
  0003  MOVE      R4 = R0
  0004  CALL      R2 = call(R2, 0 args, 2 rets)
  0005  GETTABLE  R2 = R0[K3('m_titleText')]
  0006  GETTABUP  R3 = _ENV[K5('GM')]
  0007  GETTABLE  R3 = R3[K6('GameTextModel')]
  0008  SELF      R4 = R3[K7('GetText')] (self)
  0009  MOVE      R5 = R0
  0010  LOADK     R6 = K8 '_name'
  0011  CONCAT    R5 = concat(R5..R5)
  0012  CALL      R3 = call(R3, 1 args, 2 rets)
  0013  SETTABLE  R2[K4('text')] = R3
  0014  GETTABLE  R2 = R0[K9('m_descText')]
  0015  GETTABLE  R2 = R2[K10('gameObject')]
  0016  SELF      R3 = R2[K11('SetActive')] (self)
  0017  LOADBOOL  R4 = false
  0018  CALL      R2 = call(R2, 0 args, 2 rets)
  0019  GETTABUP  R2 = _ENV[K5('GM')]
  0020  GETTABLE  R2 = R2[K12('UserProfileModel')]
  0021  SELF      R3 = R2[K13('IsPropertyAcquired')] (self)
  0022  GETTABUP  R4 = _ENV[K14('EProfilePropertyType')]
  0023  GETTABLE  R4 = R4[K15('Badge')]
  0024  MOVE      R5 = R0
  0025  CALL      R2 = call(R2, 1 args, 3 rets)
  0026  TEST      if not R2 then   -> -131044
  0027  JMP       (jump)   -> 50
  0028  GETTABUP  R2 = _ENV[K5('GM')]
  0029  GETTABLE  R2 = R2[K12('UserProfileModel')]
  0030  SELF      R3 = R2[K16('GetBadge')] (self)
  0031  CALL      R2 = call(R2, 1 args, 1 rets)
  0032  EQ        if R1 eq R1   -> -130013
  0033  JMP       (jump)   -> 35
  0034  LOADBOOL  R2 = false
  0035  LOADBOOL  R2 = true
  0036  GETTABLE  R3 = R0[K17('m_btn')]
  0037  SELF      R4 = R3[K18('SetText')] (self)
  0038  GETTABUP  R5 = _ENV[K5('GM')]
  0039  GETTABLE  R5 = R5[K6('GameTextModel')]
  0040  SELF      R6 = R5[K7('GetText')] (self)
  0041  TEST      if not R2 then   -> -131029
  0042  JMP       (jump)   -> 46
  0043  LOADK     R7 = K19 'bt_unequip'
  0044  TEST      if not R7 then   -> -131025
  0045  JMP       (jump)   -> 47
  0046  LOADK     R7 = K20 'bt_equit'
  0047  CALL      R5 = call(R5, -1 args, 2 rets)
  0048  CALL      R3 = call(R3, 0 args, -1 rets)
  0049  JMP       (jump)   -> 88
  0050  GETTABUP  R2 = _ENV[K21('AlbumActivityModel')]
  0051  GETTABLE  R2 = R2[K22('GetActiveModel')]
  0052  CALL      R2 = call(R2, 1 args, 0 rets)
  0053  TEST      if not R2 then   -> -131017
  0054  JMP       (jump)   -> 76
  0055  GETTABUP  R3 = _ENV[K5('GM')]
  0056  GETTABLE  R3 = R3[K6('GameTextModel')]
  0057  SELF      R4 = R3[K7('GetText')] (self)
  0058  SELF      R6 = R2[K23('GetType')] (self)
  0059  CALL      R5 = call(R5, 1 args, 1 rets)
  0060  LOADK     R6 = K24 '_title'
  0061  CONCAT    R5 = concat(R5..R5)
  0062  CALL      R3 = call(R3, 1 args, 2 rets)
  0063  GETTABLE  R4 = R0[K9('m_descText')]
  0064  GETTABUP  R5 = _ENV[K5('GM')]
  0065  GETTABLE  R5 = R5[K6('GameTextModel')]
  0066  SELF      R6 = R5[K7('GetText')] (self)
  0067  LOADK     R7 = K25 'badge_how_to_get'
  0068  MOVE      R8 = R0
  0069  CALL      R5 = call(R5, 1 args, 3 rets)
  0070  SETTABLE  R4[K4('text')] = R5
  0071  GETTABLE  R4 = R0[K9('m_descText')]
  0072  GETTABLE  R4 = R4[K10('gameObject')]
  0073  SELF      R5 = R4[K11('SetActive')] (self)
  0074  LOADBOOL  R6 = true
  0075  CALL      R4 = call(R4, 0 args, 2 rets)
  0076  GETTABLE  R3 = R0[K17('m_btn')]
  0077  SELF      R4 = R3[K26('SetEnabled')] (self)
  0078  LOADBOOL  R5 = false
  0079  CALL      R3 = call(R3, 0 args, 2 rets)
  0080  GETTABLE  R3 = R0[K17('m_btn')]
  0081  SELF      R4 = R3[K18('SetText')] (self)
  0082  GETTABUP  R5 = _ENV[K5('GM')]
  0083  GETTABLE  R5 = R5[K6('GameTextModel')]
  0084  SELF      R6 = R5[K7('GetText')] (self)
  0085  LOADK     R7 = K20 'bt_equit'
  0086  CALL      R5 = call(R5, -1 args, 2 rets)
  0087  CALL      R3 = call(R3, 0 args, -1 rets)
  0088  SELF      R3 = R0[K27('LogWindowAction')] (self)
  0089  GETTABUP  R4 = _ENV[K28('EBIType')]
  0090  GETTABLE  R4 = R4[K29('UIActionType')]
  0091  GETTABLE  R4 = R4[K30('Open')]
  0092  GETTABUP  R5 = _ENV[K31('EBIReferType')]
  0093  GETTABLE  R5 = R5[K32('UserClick')]
  0094  MOVE      R6 = R0
  0095  CALL      R2 = call(R2, 0 args, 4 rets)
  0096  RETURN    return R0..R-1
; ---------- proto2 [OnBtnClick] ----------
  ; fn ?  line 40-49 np=1 va=0 ms=5 code=25 consts=7 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='UserProfileModel'
  ;   K[2]='GetBadge'
  ;   K[3]='m_badgeId'
  ;   K[4]='ChangeBadge'
  ;   K[5]=''
  ;   K[6]='Close'
  ;   upvals: _ENV
  ;   locals: self(0-25), bAlreadyWearing(9-25)
  0000  GETTABUP  R1 = _ENV[K0('GM')]
  0001  GETTABLE  R1 = R1[K1('UserProfileModel')]
  0002  SELF      R2 = R1[K2('GetBadge')] (self)
  0003  CALL      R1 = call(R1, 1 args, 1 rets)
  0004  GETTABLE  R2 = R0[K3('m_badgeId')]
  0005  EQ        if R1 eq R2   -> -130551
  0006  JMP       (jump)   -> 8
  0007  LOADBOOL  R1 = false
  0008  LOADBOOL  R1 = true
  0009  TEST      if not R1 then   -> -131061
  0010  JMP       (jump)   -> 17
  0011  GETTABUP  R2 = _ENV[K0('GM')]
  0012  GETTABLE  R2 = R2[K1('UserProfileModel')]
  0013  SELF      R3 = R2[K4('ChangeBadge')] (self)
  0014  LOADK     R4 = K5 ''
  0015  CALL      R2 = call(R2, 0 args, 2 rets)
  0016  JMP       (jump)   -> 22
  0017  GETTABUP  R2 = _ENV[K0('GM')]
  0018  GETTABLE  R2 = R2[K1('UserProfileModel')]
  0019  SELF      R3 = R2[K4('ChangeBadge')] (self)
  0020  GETTABLE  R4 = R0[K3('m_badgeId')]
  0021  CALL      R2 = call(R2, 0 args, 2 rets)
  0022  SELF      R3 = R0[K6('Close')] (self)
  0023  CALL      R2 = call(R2, 0 args, 1 rets)
  0024  RETURN    return R0..R-1
