rendered paste body.text:004053E0 ; =============== S U B R O U T I N E =======================================
.text:004053E0
.text:004053E0 ; Attributes: bp-based frame
.text:004053E0
.text:004053E0 sub_4053E0 proc near ; CODE XREF: sub_406490+14Cp
.text:004053E0
.text:004053E0 var_458 = byte ptr -458h
.text:004053E0 var_454 = dword ptr -454h
.text:004053E0 var_44C = dword ptr -44Ch
.text:004053E0 var_448 = dword ptr -448h
.text:004053E0 var_440 = dword ptr -440h
.text:004053E0 var_43C = dword ptr -43Ch
.text:004053E0 var_435 = byte ptr -435h
.text:004053E0 var_434 = dword ptr -434h
.text:004053E0 var_430 = dword ptr -430h
.text:004053E0 var_42C = byte ptr -42Ch
.text:004053E0 var_428 = byte ptr -428h
.text:004053E0 var_324 = byte ptr -324h
.text:004053E0 var_224 = byte ptr -224h
.text:004053E0 Buffer = byte ptr -124h
.text:004053E0 var_24 = byte ptr -24h
.text:004053E0 var_14 = byte ptr -14h
.text:004053E0 var_4 = dword ptr -4
.text:004053E0
.text:004053E0 push ebp
.text:004053E1 mov ebp, esp
.text:004053E3 sub esp, 458h
.text:004053E9 mov eax, dword_95E574
.text:004053EE xor eax, ebp
.text:004053F0 mov [ebp+var_4], eax
.text:004053F3 call sub_402260
.text:004053F8 neg al
.text:004053FA sbb eax, eax
.text:004053FC neg eax
.text:004053FE add eax, 1
.text:00405401 mov [ebp+var_440], eax
.text:00405407 xor ecx, ecx
.text:00405409 lea esp, [esp+0]
.text:00405410
.text:00405410 loc_405410: ; CODE XREF: sub_4053E0+40j
.text:00405410 mov byte_95E16C[ecx], 0
.text:00405417 add ecx, 10h
.text:0040541A cmp ecx, 140h
.text:00405420 jb short loc_405410
.text:00405422 test al, 2
.text:00405424
.text:00405424 loc_405424: ; DATA XREF: .rdata:0092DF34o
.text:00405424 jz short loc_40543E
.text:00405426 push offset aLocale ; "locale"
.text:0040542B call sub_5A2AF0
.text:00405430 mov eax, [eax+20h]
.text:00405433 add esp, 4
.text:00405436 mov [ebp+var_430], eax
.text:0040543C jmp short loc_405448
.text:0040543E ; ---------------------------------------------------------------------------
.text:0040543E
.text:0040543E loc_40543E: ; CODE XREF: sub_4053E0:loc_405424j
.text:0040543E mov [ebp+var_430], offset asc_8C2110 ; "----"
.text:00405448
.text:00405448 loc_405448: ; CODE XREF: sub_4053E0+5Cj
.text:00405448 push ebx
.text:00405449 push esi
.text:0040544A push edi
.text:0040544B call sub_4F9680
.text:00405450 mov ecx, [ebp+var_430]
.text:00405456 push eax
.text:00405457 push ecx
.text:00405458 lea ecx, [ebp+var_458]
.text:0040545E call sub_405160
.text:00405463 mov edi, 40h
.text:00405468 xor ebx, ebx
.text:0040546A cmp dword_95E2D8, edi
.text:00405470 jnb short loc_4054AE
.text:00405472 cmp dword_95E2D4, edi
.text:00405478 jnb short loc_4054AE
.text:0040547A mov ecx, dword_95E2E0
.text:00405480 test ecx, ecx
.text:00405482 jnz short loc_405491
.text:00405484 push edi
.text:00405485 mov ecx, offset off_95E2D0
.text:0040548A call sub_80E080
.text:0040548F mov ecx, eax
.text:00405491
.text:00405491 loc_405491: ; CODE XREF: sub_4053E0+A2j
.text:00405491 xor edx, edx
.text:00405493 mov eax, edi
.text:00405495 div ecx
.text:00405497 mov esi, edi
.text:00405499 test edx, edx
.text:0040549B jz short loc_4054A3
.text:0040549D sub ecx, edx
.text:0040549F add ecx, edi
.text:004054A1 mov esi, ecx
.text:004054A3
.text:004054A3 loc_4054A3: ; CODE XREF: sub_4053E0+BBj
.text:004054A3 push esi
.text:004054A4 mov ecx, offset off_95E2D0
.text:004054A9 call sub_538F00
.text:004054AE
.text:004054AE loc_4054AE: ; CODE XREF: sub_4053E0+90j
.text:004054AE ; sub_4053E0+98j
.text:004054AE mov eax, [ebp+var_44C]
.text:004054B4 test eax, eax
.text:004054B6 mov ecx, edi
.text:004054B8 mov dword_95E2D8, ecx
.text:004054BE mov dword ptr [ebp+var_42C], edi
.text:004054C4 jbe loc_4055BB
.text:004054CA lea edx, ds:0FFFFFFFCh[eax*4]
.text:004054D1 lea esi, [eax-1]
.text:004054D4 mov [ebp+var_434], edx
.text:004054DA mov [ebp+var_43C], eax
.text:004054E0 jmp short loc_4054EE
.text:004054E2 ; ---------------------------------------------------------------------------
.text:004054E2
.text:004054E2 loc_4054E2: ; CODE XREF: sub_4053E0+1D5j
.text:004054E2 mov eax, [ebp+var_44C]
.text:004054E8 mov ecx, dword_95E2D8
.text:004054EE
.text:004054EE loc_4054EE: ; CODE XREF: sub_4053E0+100j
.text:004054EE cmp ebx, ecx
.text:004054F0 jb short loc_40552F
.text:004054F2 mov eax, off_95E2D0
.text:004054F7 mov edx, [eax+4]
.text:004054FA push ecx
.text:004054FB push ebx ; char
.text:004054FC push offset aIndex0x08xArra ; "index (0x%08X), array size (0x%08X)"
.text:00405501 push 1 ; int
.text:00405503 push 1 ; uExitCode
.text:00405505 mov ecx, offset off_95E2D0
.text:0040550A call edx
.text:0040550C push eax ; char *
.text:0040550D mov eax, off_95E2D0
.text:00405512 mov edx, [eax]
.text:00405514 mov ecx, offset off_95E2D0
.text:00405519 call edx
.text:0040551B push eax ; int
.text:0040551C push 85100080h ; int
.text:00405521 call sub_5651D0
.text:00405526 mov eax, [ebp+var_44C]
.text:0040552C add esp, 20h
.text:0040552F
.text:0040552F loc_40552F: ; CODE XREF: sub_4053E0+110j
.text:0040552F cmp esi, eax
.text:00405531 mov ecx, dword_95E2DC
.text:00405537 lea edi, [ecx+ebx*4]
.text:0040553A jb short loc_405577
.text:0040553C mov edx, [ebp+var_454]
.text:00405542 push eax
.text:00405543 mov eax, [edx+4]
.text:00405546 push esi ; char
.text:00405547 push offset aIndex0x08xArra ; "index (0x%08X), array size (0x%08X)"
.text:0040554C push 1 ; int
.text:0040554E push 1 ; uExitCode
.text:00405550 lea ecx, [ebp+var_454]
.text:00405556 call eax
.text:00405558 mov edx, [ebp+var_454]
.text:0040555E push eax ; char *
.text:0040555F mov eax, [edx]
.text:00405561 lea ecx, [ebp+var_454]
.text:00405567 call eax
.text:00405569 push eax ; int
.text:0040556A push 85100080h ; int
.text:0040556F call sub_5651D0
.text:00405574 add esp, 20h
.text:00405577
.text:00405577 loc_405577: ; CODE XREF: sub_4053E0+15Aj
.text:00405577 mov ecx, dword ptr [ebp+var_42C]
.text:0040557D mov edx, [ebp+var_448]
.text:00405583 mov eax, [ebp+var_434]
.text:00405589 push edi
.text:0040558A push 0
.text:0040558C push ecx
.text:0040558D mov ecx, [edx+eax]
.text:00405590 push ecx
.text:00405591 call sub_568A60
.text:00405596 test eax, eax
.text:00405598 jz short loc_4055A4
.text:0040559A add ebx, 1
.text:0040559D add dword ptr [ebp+var_42C], 1
.text:004055A4
.text:004055A4 loc_4055A4: ; CODE XREF: sub_4053E0+1B8j
.text:004055A4 sub [ebp+var_434], 4
.text:004055AB sub esi, 1
.text:004055AE sub [ebp+var_43C], 1
.text:004055B5 jnz loc_4054E2
.text:004055BB
.text:004055BB loc_4055BB: ; CODE XREF: sub_4053E0+E4j
.text:004055BB mov edi, dword ptr [ebp+var_42C]
.text:004055C1 mov [ebp+var_43C], ebx
.text:004055C7 xor esi, esi
.text:004055C9 lea esp, [esp+0]
.text:004055D0
.text:004055D0 loc_4055D0: ; CODE XREF: sub_4053E0+229j
.text:004055D0 cmp dword_95E164[esi], 3
.text:004055D7 jnz short loc_405600
.text:004055D9 mov edx, off_95E160[esi]
.text:004055DF mov ecx, [ebp+var_430]
.text:004055E5 push edi
.text:004055E6 push edx
.text:004055E7 call sub_4047A0
.text:004055EC add esp, 8
.text:004055EF test al, al
.text:004055F1 jz short loc_405600
.text:004055F3 add ebx, 1
.text:004055F6 mov byte_95E16C[esi], 1
.text:004055FD add edi, 1
.text:00405600
.text:00405600 loc_405600: ; CODE XREF: sub_4053E0+1F7j
.text:00405600 ; sub_4053E0+211j
.text:00405600 add esi, 10h
.text:00405603 cmp esi, 140h
.text:00405609 jb short loc_4055D0
.text:0040560B cmp [ebp+var_43C], 0
.text:00405612 mov dword ptr [ebp+var_42C], 0
.text:0040561C jbe loc_4057D6
.text:00405622
.text:00405622 loc_405622: ; CODE XREF: sub_4053E0+3F0j
.text:00405622 mov eax, dword_95E2D8
.text:00405627 cmp dword ptr [ebp+var_42C], eax
.text:0040562D jb short loc_40566E
.text:0040562F mov edx, off_95E2D0
.text:00405635 push eax
.text:00405636 mov eax, dword ptr [ebp+var_42C]
.text:0040563C push eax ; char
.text:0040563D mov eax, [edx+4]
.text:00405640 push offset aIndex0x08xArra ; "index (0x%08X), array size (0x%08X)"
.text:00405645 push 1 ; int
.text:00405647 push 1 ; uExitCode
.text:00405649 mov ecx, offset off_95E2D0
.text:0040564E call eax
.text:00405650 mov edx, off_95E2D0
.text:00405656 push eax ; char *
.text:00405657 mov eax, [edx]
.text:00405659 mov ecx, offset off_95E2D0
.text:0040565E call eax
.text:00405660 push eax ; int
.text:00405661 push 85100080h ; int
.text:00405666 call sub_5651D0
.text:0040566B add esp, 20h
.text:0040566E
.text:0040566E loc_40566E: ; CODE XREF: sub_4053E0+24Dj
.text:0040566E mov ecx, dword_95E2DC
.text:00405674 mov edx, dword ptr [ebp+var_42C]
.text:0040567A mov eax, [ecx+edx*4]
.text:0040567D mov [ebp+var_434], eax
.text:00405683 xor esi, esi
.text:00405685 jmp short loc_405690
.text:00405685 ; ---------------------------------------------------------------------------
.text:00405687 align 10h
.text:00405690
.text:00405690 loc_405690: ; CODE XREF: sub_4053E0+2A5j
.text:00405690 ; sub_4053E0+3D5j
.text:00405690 cmp dword_95E164[esi], 3
.text:00405697 jnz loc_4057AC
.text:0040569D cmp byte_95E16C[esi], 0
.text:004056A4 jnz short loc_405712
.text:004056A6 mov ecx, [ebp+var_430]
.text:004056AC push 7FFFFFFFh ; size_t
.text:004056B1 push offset aZhcn ; "zhCN"
.text:004056B6 push ecx ; char *
.text:004056B7 call sub_565490
.text:004056BC test eax, eax
.text:004056BE jz short loc_405712
.text:004056C0 mov edx, [ebp+var_430]
.text:004056C6 push 7FFFFFFFh ; size_t
.text:004056CB push offset aEncn ; "enCN"
.text:004056D0 push edx ; char *
.text:004056D1 call sub_565490
.text:004056D6 test eax, eax
.text:004056D8 jz short loc_405712
.text:004056DA mov eax, [ebp+var_430]
.text:004056E0 push 7FFFFFFFh ; size_t
.text:004056E5 push offset aZhtw ; "zhTW"
.text:004056EA push eax ; char *
.text:004056EB call sub_565490
.text:004056F0 test eax, eax
.text:004056F2 jz short loc_405712
.text:004056F4 mov ecx, [ebp+var_430]
.text:004056FA push 7FFFFFFFh ; size_t
.text:004056FF push offset aEntw ; "enTW"
.text:00405704 push ecx ; char *
.text:00405705 call sub_565490
.text:0040570A test eax, eax
.text:0040570C jnz loc_4057AC
.text:00405712
.text:00405712 loc_405712: ; CODE XREF: sub_4053E0+2C4j
.text:00405712 ; sub_4053E0+2DEj ...
.text:00405712 mov edx, off_95E160[esi]
.text:00405718 push 100h
.text:0040571D push edx
.text:0040571E lea eax, [ebp+Buffer]
.text:00405724 push eax
.text:00405725 call sub_5656E0
.text:0040572A lea ecx, [ebp+Buffer]
.text:00405730 push ecx
.text:00405731 call sub_565790
.text:00405736 lea edx, [ebp+Buffer]
.text:0040573C sub edx, 4
.text:0040573F mov byte ptr [eax+edx], 0
.text:00405743 mov eax, dword_95E2D8
.text:00405748 cmp ebx, eax
.text:0040574A jb short loc_405783
.text:0040574C push eax
.text:0040574D mov eax, off_95E2D0
.text:00405752 mov edx, [eax+4]
.text:00405755 push ebx ; char
.text:00405756 push offset aIndex0x08xArra ; "index (0x%08X), array size (0x%08X)"
.text:0040575B push 1 ; int
.text:0040575D push 1 ; uExitCode
.text:0040575F mov ecx, offset off_95E2D0
.text:00405764 call edx
.text:00405766 push eax ; char *
.text:00405767 mov eax, off_95E2D0
.text:0040576C mov edx, [eax]
.text:0040576E mov ecx, offset off_95E2D0
.text:00405773 call edx
.text:00405775 push eax ; int
.text:00405776 push 85100080h ; int
.text:0040577B call sub_5651D0
.text:00405780 add esp, 20h
.text:00405783
.text:00405783 loc_405783: ; CODE XREF: sub_4053E0+36Aj
.text:00405783 mov eax, dword_95E2DC
.text:00405788 mov edx, [ebp+var_434]
.text:0040578E lea eax, [eax+ebx*4]
.text:00405791 push eax
.text:00405792 push 0
.text:00405794 push edi
.text:00405795 lea ecx, [ebp+Buffer]
.text:0040579B push ecx
.text:0040579C push edx
.text:0040579D call sub_568B10
.text:004057A2 test eax, eax
.text:004057A4 jz short loc_4057AC
.text:004057A6 add ebx, 1
.text:004057A9 add edi, 1
.text:004057AC
.text:004057AC loc_4057AC: ; CODE XREF: sub_4053E0+2B7j
.text:004057AC ; sub_4053E0+32Cj ...
.text:004057AC add esi, 10h
.text:004057AF cmp esi, 140h
.text:004057B5 jb loc_405690
.text:004057BB mov eax, dword ptr [ebp+var_42C]
.text:004057C1 add eax, 1
.text:004057C4 cmp eax, [ebp+var_43C]
.text:004057CA mov dword ptr [ebp+var_42C], eax
.text:004057D0 jb loc_405622
.text:004057D6
.text:004057D6 loc_4057D6: ; CODE XREF: sub_4053E0+23Cj
.text:004057D6 xor esi, esi
.text:004057D8 mov dword_C2B94C, ebx
.text:004057DE mov dword ptr [ebp+var_42C], 3Fh
.text:004057E8 mov dword_C2B950, ebx
.text:004057EE mov [ebp+var_434], esi
.text:004057F4
.text:004057F4 loc_4057F4: ; CODE XREF: sub_4053E0+58Ej
.text:004057F4 mov eax, dword_95E2D8
.text:004057F9 cmp ebx, eax
.text:004057FB jb short loc_405834
.text:004057FD push eax
.text:004057FE mov eax, off_95E2D0
.text:00405803 mov edx, [eax+4]
.text:00405806 push ebx ; char
.text:00405807 push offset aIndex0x08xArra ; "index (0x%08X), array size (0x%08X)"
.text:0040580C push 1 ; int
.text:0040580E push 1 ; uExitCode
.text:00405810 mov ecx, offset off_95E2D0
.text:00405815 call edx
.text:00405817 push eax ; char *
.text:00405818 mov eax, off_95E2D0
.text:0040581D mov edx, [eax]
.text:0040581F mov ecx, offset off_95E2D0
.text:00405824 call edx
.text:00405826 push eax ; int
.text:00405827 push 85100080h ; int
.text:0040582C call sub_5651D0
.text:00405831 add esp, 20h
.text:00405834
.text:00405834 loc_405834: ; CODE XREF: sub_4053E0+41Bj
.text:00405834 mov eax, dword_95E2DC
.text:00405839 mov dword ptr [eax+ebx*4], 0
.text:00405840 mov eax, dword_95E164[esi]
.text:00405846 cmp eax, 3
.text:00405849 jnz short loc_405853
.text:0040584B add ebx, 1
.text:0040584E jmp loc_40595F
.text:00405853 ; ---------------------------------------------------------------------------
.text:00405853
.text:00405853 loc_405853: ; CODE XREF: sub_4053E0+469j
.text:00405853 mov ecx, [ebp+var_440]
.text:00405859 cmp eax, 2
.text:0040585C setz [ebp+var_435]
.text:00405863 test dword_95E168[esi], ecx
.text:00405869 jz loc_40594E
.text:0040586F mov edx, dword ptr [ebp+var_42C]
.text:00405875 mov eax, off_95E160[esi]
.text:0040587B mov ecx, [ebp+var_430]
.text:00405881 push edx
.text:00405882 push eax
.text:00405883 call sub_4047A0
.text:00405888 add esp, 8
.text:0040588B test al, al
.text:0040588D jnz loc_40594E
.text:00405893 cmp [ebp+var_435], al
.text:00405899 jnz loc_40594E
.text:0040589F push 100h ; nSize
.text:004058A4 lea ecx, [ebp+Buffer]
.text:004058AA push ecx ; lpBuffer
.text:004058AB call sub_563A70
.text:004058B0 push eax ; dwMessageId
.text:004058B1 call sub_564350
.text:004058B6 mov eax, off_95E160[esi]
.text:004058BC mov edi, [ebp+var_430]
.text:004058C2 push 104h
.text:004058C7 xor ecx, ecx
.text:004058C9 lea esi, [ebp+var_428]
.text:004058CF call sub_402170
.text:004058D4 mov eax, [ebp+var_434]
.text:004058DA mov ecx, off_95E160[eax]
.text:004058E0 lea edx, [ebp+Buffer]
.text:004058E6 push edx
.text:004058E7 push ecx
.text:004058E8 push offset aFailedToOpen_0 ; "Failed to open archive %s: %s"
.text:004058ED lea edx, [ebp+var_224]
.text:004058F3 push 100h
.text:004058F8 push edx
.text:004058F9 call sub_5659D0
.text:004058FE add esp, 18h
.text:00405901 push 7FFFFFFFh
.text:00405906 push offset aMissingOrCorru ; "Missing or corrupted data"
.text:0040590B lea eax, [ebp+var_324]
.text:00405911 push eax
.text:00405912 call sub_5656E0
.text:00405917 lea ecx, [ebp+var_324]
.text:0040591D push ecx
.text:0040591E lea edx, [ebp+var_224]
.text:00405924 push edx
.text:00405925 push 0
.text:00405927 push 2
.text:00405929 call sub_42E9C0
.text:0040592E add esp, 4
.text:00405931 push eax
.text:00405932 call sub_42EA40
.text:00405937 add esp, 10h
.text:0040593A call sub_563A70
.text:0040593F push eax
.text:00405940 call loc_571320
.text:00405945 mov esi, [ebp+var_434]
.text:0040594B add esp, 4
.text:0040594E
.text:0040594E loc_40594E: ; CODE XREF: sub_4053E0+489j
.text:0040594E ; sub_4053E0+4ADj ...
.text:0040594E add ebx, 1
.text:00405951 sub dword ptr [ebp+var_42C], 1
.text:00405958 mov byte_95E16C[esi], 1
.text:0040595F
.text:0040595F loc_40595F: ; CODE XREF: sub_4053E0+46Ej
.text:0040595F add esi, 10h
.text:00405962 cmp esi, 140h
.text:00405968 mov [ebp+var_434], esi
.text:0040596E jb loc_4057F4
.text:00405974 cmp ebx, dword_95E2D8
.text:0040597A jbe short loc_4059E1
.text:0040597C cmp ebx, dword_95E2D4
.text:00405982 jbe short loc_4059E1
.text:00405984 mov ecx, dword_95E2E0
.text:0040598A test ecx, ecx
.text:0040598C jnz short loc_4059C4
.text:0040598E cmp ebx, 40h
.text:00405991 mov ecx, ebx
.text:00405993 jnb short loc_4059B5
.text:00405995 lea eax, [ebx-1]
.text:00405998 and eax, ebx
.text:0040599A jz short loc_4059A9
.text:0040599C lea esp, [esp+0]
.text:004059A0
.text:004059A0 loc_4059A0: ; CODE XREF: sub_4053E0+5C7j
.text:004059A0 mov ecx, eax
.text:004059A2 lea eax, [ecx-1]
.text:004059A5 and eax, ecx
.text:004059A7 jnz short loc_4059A0
.text:004059A9
.text:004059A9 loc_4059A9: ; CODE XREF: sub_4053E0+5BAj
.text:004059A9 cmp ecx, 1
.text:004059AC jnb short loc_4059C4
.text:004059AE mov ecx, 1
.text:004059B3 jmp short loc_4059C4
.text:004059B5 ; ---------------------------------------------------------------------------
.text:004059B5
.text:004059B5 loc_4059B5: ; CODE XREF: sub_4053E0+5B3j
.text:004059B5 mov dword_95E2E0, 40h
.text:004059BF mov ecx, 40h
.text:004059C4
.text:004059C4 loc_4059C4: ; CODE XREF: sub_4053E0+5ACj
.text:004059C4 ; sub_4053E0+5CCj ...
.text:004059C4 xor edx, edx
.text:004059C6 mov eax, ebx
.text:004059C8 div ecx
.text:004059CA mov esi, ebx
.text:004059CC test edx, edx
.text:004059CE jz short loc_4059D6
.text:004059D0 sub ecx, edx
.text:004059D2 add ecx, ebx
.text:004059D4 mov esi, ecx
.text:004059D6
.text:004059D6 loc_4059D6: ; CODE XREF: sub_4053E0+5EEj
.text:004059D6 push esi
.text:004059D7 mov ecx, offset off_95E2D0
.text:004059DC call sub_538F00
.text:004059E1
.text:004059E1 loc_4059E1: ; CODE XREF: sub_4053E0+59Aj
.text:004059E1 ; sub_4053E0+5A2j
.text:004059E1 push 0Dh
.text:004059E3 mov dword_95E2D8, ebx
.text:004059E9 call sub_404920
.text:004059EE test eax, eax
.text:004059F0 setnz al
.text:004059F3 mov byte_C2B92D, al
.text:004059F8 call sub_7B8CE0
.text:004059FD mov edi, eax
.text:004059FF push offset aWow_ini ; "Wow.ini"
.text:00405A04 push edi
.text:00405A05 call sub_7B94E0
.text:00405A0A add esp, 0Ch
.text:00405A0D test eax, eax
.text:00405A0F jz loc_405B61
.text:00405A15 push 0
.text:00405A17 push offset dword_C2B8EC
.text:00405A1C push offset aRegion ; "Region"
.text:00405A21 push offset aWowConfig ; "WoW Config"
.text:00405A26 push edi
.text:00405A27 call sub_7B8EE0
.text:00405A2C push 0
.text:00405A2E push 10h
.text:00405A30 lea ecx, [ebp+var_24]
.text:00405A33 push ecx
.text:00405A34 push offset aLanguage ; "Language"
.text:00405A39 push offset aWowConfig ; "WoW Config"
.text:00405A3E push edi
.text:00405A3F call sub_7B8FA0
.text:00405A44 add esp, 2Ch
.text:00405A47 test eax, eax
.text:00405A49 jz loc_405B61
.text:00405A4F push 0
.text:00405A51 push 10h
.text:00405A53 lea edx, [ebp+var_14]
.text:00405A56 push edx
.text:00405A57 push offset aCountry ; "Country"
.text:00405A5C push offset aWowConfig ; "WoW Config"
.text:00405A61 push edi
.text:00405A62 call sub_7B8FA0
.text:00405A67 add esp, 18h
.text:00405A6A test eax, eax
.text:00405A6C jz loc_405B61
.text:00405A72 lea eax, [ebp+var_14]
.text:00405A75 push eax
.text:00405A76 lea ecx, [ebp+var_24]
.text:00405A79 push ecx
.text:00405A7A push offset aSS ; "%s%s"
.text:00405A7F push 5
.text:00405A81 push offset byte_C2B970
.text:00405A86 call sub_5659D0
.text:00405A8B add esp, 14h
.text:00405A8E xor eax, eax
.text:00405A90 mov esi, offset byte_C2B970
.text:00405A95 xor ecx, ecx
.text:00405A97
.text:00405A97 loc_405A97: ; CODE XREF: sub_4053E0+6CEj
.text:00405A97 mov dl, [esi]
.text:00405A99 test dl, dl
.text:00405A9B jz short loc_405AB0
.text:00405A9D movsx edx, dl
.text:00405AA0 shl eax, 8
.text:00405AA3 add ecx, 1
.text:00405AA6 add eax, edx
.text:00405AA8 add esi, 1
.text:00405AAB cmp ecx, 4
.text:00405AAE jb short loc_405A97
.text:00405AB0
.text:00405AB0 loc_405AB0: ; CODE XREF: sub_4053E0+6BBj
.text:00405AB0 push 7FFFFFFFh ; size_t
.text:00405AB5 push offset byte_C2B970 ; char *
.text:00405ABA push offset aEngb ; "enGB"
.text:00405ABF mov dword_EDD3E4, eax
.text:00405AC4 call sub_565490
.text:00405AC9 test eax, eax
.text:00405ACB setz bl
.text:00405ACE xor esi, esi
.text:00405AD0
.text:00405AD0 loc_405AD0: ; CODE XREF: sub_4053E0+730j
.text:00405AD0 mov eax, off_98C5E0[esi*4]
.text:00405AD7 push 7FFFFFFFh ; size_t
.text:00405ADC push eax ; char *
.text:00405ADD push offset byte_C2B970 ; char *
.text:00405AE2 call sub_565490
.text:00405AE7 test eax, eax
.text:00405AE9 jz short loc_405B14
.text:00405AEB test bl, bl
.text:00405AED jz short loc_405B0A
.text:00405AEF mov ecx, off_98C5E0[esi*4]
.text:00405AF6 push 7FFFFFFFh ; size_t
.text:00405AFB push ecx ; char *
.text:00405AFC push offset aEnus ; "enUS"
.text:00405B01 call sub_565490
.text:00405B06 test eax, eax
.text:00405B08 jz short loc_405B14
.text:00405B0A
.text:00405B0A loc_405B0A: ; CODE XREF: sub_4053E0+70Dj
.text:00405B0A add esi, 1
.text:00405B0D cmp esi, 9
.text:00405B10 jl short loc_405AD0
.text:00405B12 jmp short loc_405B61
.text:00405B14 ; ---------------------------------------------------------------------------
.text:00405B14
.text:00405B14 loc_405B14: ; CODE XREF: sub_4053E0+709j
.text:00405B14 ; sub_4053E0+728j
.text:00405B14 cmp esi, 8
.text:00405B17 mov dword_DA3BA0, esi
.text:00405B1D jz short loc_405B23
.text:00405B1F push 0
.text:00405B21 jmp short loc_405B25
.text:00405B23 ; ---------------------------------------------------------------------------
.text:00405B23
.text:00405B23 loc_405B23: ; CODE XREF: sub_4053E0+73Dj
.text:00405B23 push 1
.text:00405B25
.text:00405B25 loc_405B25: ; CODE XREF: sub_4053E0+741j
.text:00405B25 call sub_4C96F0
.text:00405B2A add esp, 4
.text:00405B2D test byte ptr [ebp+var_440], 1
.text:00405B34 jz short loc_405B61
.text:00405B36 push offset aLocale ; "locale"
.text:00405B3B call sub_5A2AF0
.text:00405B40 add esp, 4
.text:00405B43 push 1
.text:00405B45 push 0
.text:00405B47 push 0
.text:00405B49 push 1
.text:00405B4B push offset byte_C2B970
.text:00405B50 mov ecx, eax
.text:00405B52 call sub_5A2580
.text:00405B57 mov [ebp+var_430], offset byte_C2B970
.text:00405B61
.text:00405B61 loc_405B61: ; CODE XREF: sub_4053E0+62Fj
.text:00405B61 ; sub_4053E0+669j ...
.text:00405B61 push edi
.text:00405B62 call sub_7B7C30
.text:00405B67 mov edx, [ebp+var_430]
.text:00405B6D push edx
.text:00405B6E call sub_402440
.text:00405B73 add esp, 8
.text:00405B76 lea ecx, [ebp+var_458]
.text:00405B7C call sub_404510
.text:00405B81 mov ecx, [ebp+var_4]
.text:00405B84 pop edi
.text:00405B85 pop esi
.text:00405B86 xor ecx, ebp
.text:00405B88 pop ebx
.text:00405B89 call sub_40AFDA
.text:00405B8E mov esp, ebp
.text:00405B90 pop ebp
.text:00405B91 retn
.text:00405B91 sub_4053E0 endp
.text:00405B91
.text:00405B91 ; ---------------------------------------------------------------------------
.text:00405B92 align 10h