.text:00439770 AdjustStartingStatsByYouthDescription proc near ; CODE XREF: CreateOrLoadPlayer+581p .text:00439770 mov eax, PlayerClass .text:00439775 push esi .text:00439776 push edi .text:00439777 mov edi, pcBarbarian .text:0043977C cmp eax, edi ; Compare Two Operands .text:0043977E jnz short loc_43978E ; Jump if Not Zero (ZF=0) .text:00439780 push 2 ; Max .text:00439782 call Random ; Call Procedure .text:00439787 add esp, 4 ; Add .text:0043978A mov esi, eax .text:0043978C jmp short loc_4397A3 ; Jump .text:0043978E ; --------------------------------------------------------------------------- .text:0043978E .text:0043978E loc_43978E: ; CODE XREF: AdjustStartingStatsByYouthDescription+Ej .text:0043978E ; AdjustStartingStatsByYouthDescription+31j .text:0043978E push 8 ; Max .text:00439790 call Random ; Call Procedure .text:00439795 mov esi, eax .text:00439797 mov eax, dword_4FE1B4 .text:0043979C add esp, 4 ; Add .text:0043979F cmp esi, eax ; Compare Two Operands .text:004397A1 jz short loc_43978E ; Jump if Zero (ZF=1) .text:004397A3 .text:004397A3 loc_4397A3: ; CODE XREF: AdjustStartingStatsByYouthDescription+1Cj .text:004397A3 call GetCursorX ; Call Procedure .text:004397A8 test eax, eax ; Logical Compare .text:004397AA jle short loc_4397B6 ; Jump if Less or Equal (ZF=1 | SF!=OF) .text:004397AC push 0Ah .text:004397AE call WriteCharRedraw ; Call Procedure .text:004397B3 add esp, 4 ; Add .text:004397B6 .text:004397B6 loc_4397B6: ; CODE XREF: AdjustStartingStatsByYouthDescription+3Aj .text:004397B6 cmp PlayerClass, edi ; Compare Two Operands .text:004397BC jnz short loc_4397C7 ; Jump if Not Zero (ZF=0) .text:004397BE mov eax, YouthBarbDescript[esi*4] .text:004397C5 jmp short loc_4397CE ; Jump .text:004397C7 ; --------------------------------------------------------------------------- .text:004397C7 .text:004397C7 loc_4397C7: ; CODE XREF: AdjustStartingStatsByYouthDescription+4Cj .text:004397C7 mov eax, YouthDescription[esi*4] .text:004397CE .text:004397CE loc_4397CE: ; CODE XREF: AdjustStartingStatsByYouthDescription+55j .text:004397CE push eax .text:004397CF push offset a___S ; "___%s" .text:004397D4 call sub_41DD30 ; Call Procedure .text:004397D9 add esp, 8 ; Add .text:004397DC cmp esi, 7 ; Compare Two Operands .text:004397DF mov dword_5FFF20, esi .text:004397E5 ja loc_4399DB ; Jump if Above (CF=0 & ZF=0) .text:004397EB jmp ds:off_4399E0[esi*4] ; Indirect Near Jump .text:004397F2 .text:004397F2 loc_4397F2: ; DATA XREF: .text:004399E0o .text:004397F2 mov eax, PlayerClass .text:004397F7 push 1 ; StatDelta .text:004397F9 cmp eax, edi ; Compare Two Operands .text:004397FB jnz short loc_43981C ; Jump if Not Zero (ZF=0) .text:004397FD push sLearning ; StatNr .text:004397FF call IncStat ; Modify sLearning .text:00439804 push 2 ; StatDelta .text:00439806 push sToughness ; StatNr .text:00439808 call IncStat ; Modify sToughness .text:0043980D push 2 ; StatDelta .text:0043980F push sCharisma ; StatNr .text:00439811 call IncStat ; Modify sCharisma .text:00439816 add esp, 18h ; Add .text:00439819 pop edi .text:0043981A pop esi .text:0043981B retn ; StatDelta .text:0043981C ; --------------------------------------------------------------------------- .text:0043981C .text:0043981C loc_43981C: ; CODE XREF: AdjustStartingStatsByYouthDescription+8Bj .text:0043981C push sStrength ; Barbarian .text:0043981E call IncStat ; Modify sStrength .text:00439823 push -1 ; StatDelta .text:00439825 push sLearning ; StatNr .text:00439827 call IncStat ; Modify sLearning .text:0043982C push 1 ; StatDelta .text:0043982E push sDexterity ; StatNr .text:00439830 call IncStat ; Modify sDexterity .text:00439835 push 1 ; StatDelta .text:00439837 push sToughness ; StatNr .text:00439839 call IncStat ; Modify sToughness .text:0043983E add esp, 20h ; Add .text:00439841 pop edi .text:00439842 pop esi .text:00439843 retn ; Return Near from Procedure .text:00439844 ; --------------------------------------------------------------------------- .text:00439844 .text:00439844 loc_439844: ; DATA XREF: .text:004399E4o .text:00439844 mov eax, PlayerClass .text:00439849 push 2 ; Max .text:0043984B cmp eax, edi ; Compare Two Operands .text:0043984D jnz short loc_4398C1 ; Jump if Not Zero (ZF=0) .text:0043984F call Random ; Call Procedure .text:00439854 inc eax ; Increment by 1 .text:00439855 push eax ; StatDelta .text:00439856 push sStrength ; StatNr .text:00439858 call IncStat ; Modify sStrength .text:0043985D push 2 ; Max .text:0043985F call Random ; Call Procedure .text:00439864 inc eax ; Increment by 1 .text:00439865 push eax ; StatDelta .text:00439866 push sDexterity ; StatNr .text:00439868 call IncStat ; Modify sDexterity .text:0043986D push 2 ; Max .text:0043986F call Random ; Call Procedure .text:00439874 inc eax ; Increment by 1 .text:00439875 push eax ; StatDelta .text:00439876 push sToughness ; StatNr .text:00439878 call IncStat ; Modify sToughness .text:0043987D push 2 ; Max .text:0043987F call Random ; Call Procedure .text:00439884 inc eax ; Increment by 1 .text:00439885 push eax ; StatDelta .text:00439886 push sPerception ; StatNr .text:00439888 call IncStat ; Modify sPerception .text:0043988D push -3 ; StatDelta .text:0043988F push sMana ; StatNr .text:00439891 call IncStat ; Modify sMana .text:00439896 push 3 ; Max .text:00439898 call Random ; Call Procedure .text:0043989D neg eax ; Two's Complement Negation .text:0043989F push eax ; StatDelta .text:004398A0 push sCharisma ; StatNr .text:004398A2 call IncStat ; Modify sCharisma .text:004398A7 add esp, 44h ; Add .text:004398AA push 3 ; Max .text:004398AC call Random ; Call Procedure .text:004398B1 neg eax ; Two's Complement Negation .text:004398B3 push eax ; StatDelta .text:004398B4 push sLearning ; StatNr .text:004398B6 call IncStat ; Modify sLearning .text:004398BB add esp, 0Ch ; Add .text:004398BE pop edi .text:004398BF pop esi .text:004398C0 retn ; StatDelta .text:004398C1 ; --------------------------------------------------------------------------- .text:004398C1 .text:004398C1 loc_4398C1: ; CODE XREF: AdjustStartingStatsByYouthDescription+DDj .text:004398C1 push sLearning ; Barbarian .text:004398C3 call IncStat ; Modify sLearning .text:004398C8 push -2 ; StatDelta .text:004398CA push sCharisma ; StatNr .text:004398CC call IncStat ; Modify sCharisma .text:004398D1 push 1 ; StatDelta .text:004398D3 push sToughness ; StatNr .text:004398D5 call IncStat ; Modify sToughness .text:004398DA push 2 ; Max .text:004398DC call Random ; Call Procedure .text:004398E1 push eax ; StatDelta .text:004398E2 push sWillpower ; StatNr .text:004398E4 call IncStat ; Modify sWillpower .text:004398E9 add esp, 24h ; Add .text:004398EC pop edi .text:004398ED pop esi .text:004398EE retn ; Return Near from Procedure .text:004398EF ; --------------------------------------------------------------------------- .text:004398EF .text:004398EF loc_4398EF: ; DATA XREF: .text:004399E8o .text:004398EF xor esi, esi ; Logical Exclusive OR .text:004398F1 .text:004398F1 loc_4398F1: ; CODE XREF: AdjustStartingStatsByYouthDescription+1A9j .text:004398F1 push 2 ; Max .text:004398F3 call Random ; Call Procedure .text:004398F8 add esp, 4 ; Add .text:004398FB test eax, eax ; Logical Compare .text:004398FD jz short loc_439915 ; Jump if Zero (ZF=1) .text:004398FF push 5 ; Max .text:00439901 call Random ; Call Procedure .text:00439906 or ecx, -1 ; Logical Inclusive OR .text:00439909 sub ecx, eax ; Integer Subtraction .text:0043990B push ecx ; StatDelta .text:0043990C push esi ; StatNr .text:0043990D call IncStat ; Call Procedure .text:00439912 add esp, 0Ch ; Add .text:00439915 .text:00439915 loc_439915: ; CODE XREF: AdjustStartingStatsByYouthDescription+18Dj .text:00439915 inc esi ; Increment by 1 .text:00439916 cmp esi, 9 ; Compare Two Operands .text:00439919 jl short loc_4398F1 ; Jump if Less (SF!=OF) .text:0043991B pop edi .text:0043991C pop esi .text:0043991D retn ; Return Near from Procedure .text:0043991E ; --------------------------------------------------------------------------- .text:0043991E .text:0043991E loc_43991E: ; DATA XREF: .text:004399ECo .text:0043991E push 4 ; Max .text:00439920 call Random ; Call Procedure .text:00439925 inc eax ; Increment by 1 .text:00439926 push eax ; StatDelta .text:00439927 push sCharisma ; StatNr .text:00439929 call IncStat ; Modify sCharisma .text:0043992E push 2 ; Max .text:00439930 call Random ; Call Procedure .text:00439935 push eax ; StatDelta .text:00439936 push sWillpower ; StatNr .text:00439938 call IncStat ; Modify sWillpower .text:0043993D push 2 ; Max .text:0043993F call Random ; Call Procedure .text:00439944 push eax ; StatDelta .text:00439945 push sStrength ; StatNr .text:00439947 call IncStat ; Modify sStrength .text:0043994C push 3 ; Max .text:0043994E call Random ; Call Procedure .text:00439953 neg eax ; Two's Complement Negation .text:00439955 push eax ; StatDelta .text:00439956 push sLearning ; StatNr .text:00439958 call IncStat ; Modify sLearning .text:0043995D add esp, 30h ; Add .text:00439960 pop edi .text:00439961 pop esi .text:00439962 retn ; Return Near from Procedure .text:00439963 ; --------------------------------------------------------------------------- .text:00439963 .text:00439963 loc_439963: ; DATA XREF: .text:004399F0o .text:00439963 push 1 ; StatDelta .text:00439965 push sStrength ; StatNr .text:00439967 call IncStat ; Modify sStrength .text:0043996C push 1 ; StatDelta .text:0043996E push sWillpower ; StatNr .text:00439970 call IncStat ; Modify sWillpower .text:00439975 push 1 ; StatDelta .text:00439977 push sDexterity ; StatNr .text:00439979 call IncStat ; Modify sDexterity .text:0043997E push 1 ; StatDelta .text:00439980 push sToughness ; StatNr .text:00439982 call IncStat ; Modify sToughness .text:00439987 push -1 ; StatDelta .text:00439989 push sLearning ; StatNr .text:0043998B call IncStat ; Modify sLearning .text:00439990 push -2 ; StatDelta .text:00439992 push sCharisma ; StatNr .text:00439994 call IncStat ; Modify sCharisma .text:00439999 add esp, 30h ; Add .text:0043999C pop edi .text:0043999D pop esi .text:0043999E retn ; Return Near from Procedure .text:0043999F ; --------------------------------------------------------------------------- .text:0043999F .text:0043999F loc_43999F: ; DATA XREF: .text:004399F4o .text:0043999F push -2 ; StatDelta .text:004399A1 push sLearning ; StatNr .text:004399A3 call IncStat ; Modify sLearning .text:004399A8 add esp, 8 ; Add .text:004399AB pop edi .text:004399AC pop esi .text:004399AD retn ; Return Near from Procedure .text:004399AE ; --------------------------------------------------------------------------- .text:004399AE .text:004399AE loc_4399AE: ; DATA XREF: .text:004399F8o .text:004399AE push 1 ; StatDelta .text:004399B0 push sLearning ; StatNr .text:004399B2 call IncStat ; Modify sLearning .text:004399B7 push 1 ; StatDelta .text:004399B9 push sMana ; StatNr .text:004399BB call IncStat ; Modify sMana .text:004399C0 add esp, 10h ; Add .text:004399C3 pop edi .text:004399C4 pop esi .text:004399C5 retn ; Return Near from Procedure .text:004399C6 ; --------------------------------------------------------------------------- .text:004399C6 .text:004399C6 loc_4399C6: ; DATA XREF: .text:004399FCo .text:004399C6 push 2 ; StatDelta .text:004399C8 push sCharisma ; StatNr .text:004399CA call IncStat ; Modify sCharisma .text:004399CF push 1 ; StatDelta .text:004399D1 push sLearning ; StatNr .text:004399D3 call IncStat ; Modify sLearning .text:004399D8 add esp, 10h ; Add .text:004399DB .text:004399DB loc_4399DB: ; CODE XREF: AdjustStartingStatsByYouthDescription+75j .text:004399DB pop edi .text:004399DC pop esi .text:004399DD retn ; Return Near from Procedure .text:004399DD AdjustStartingStatsByYouthDescription endp ; sp = 38h .text:004399DD .text:004399DD ; --------------------------------------------------------------------------- .text:004399DE db 8Bh, 0FFh .text:004399E0 off_4399E0 dd offset loc_4397F2 ; DATA XREF: AdjustStartingStatsByYouthDescription+7Br .text:004399E4 dd offset loc_439844 .text:004399E8 dd offset loc_4398EF .text:004399EC dd offset loc_43991E .text:004399F0 dd offset loc_439963 .text:004399F4 dd offset loc_43999F .text:004399F8 dd offset loc_4399AE .text:004399FC dd offset loc_4399C6 .data:004FD414 YouthDescription dd 4FEFF8h ; DATA XREF: AdjustStartingStatsByYouthDescription+57r .data:004FD414 ; "As a youth you spent a lot of time in t"... .data:004FD418 dd offset aInYourYouthYouWork ; "In your youth you worked a lot to becom"... .data:004FD41C dd offset aInYourYouthYouBeca ; "In your youth you became seriously ill "... .data:004FD420 dd offset aDuringYourYouthYou ; "During your youth you had a lot of fun "... .data:004FD424 dd offset aInYourYouthYouEnjo ; "In your youth you enjoyed competition a"... .data:004FD428 dd offset aDuringYourYouthY_0 ; "During your youth you were very lazy. Y"... .data:004FD42C dd offset aAsAKidYouOftenWatc ; "As a kid you often watched the adult ad"... .data:004FD430 dd offset aDuringYourYouthY_1 ; "During your youth you embarked on many "... .data:004FD434 YouthBarbDescript dd 4FEB80h ; DATA XREF: AdjustStartingStatsByYouthDescription+4Er .data:004FD434 ; "During your youth you traveled to nearb"... .data:004FD438 dd offset aInYourYouthYouStri ; "In your youth you strived very hard to "...