.text:00439580 AdjustStartingStatsByChildDescript proc near ; CODE XREF: CreateOrLoadPlayer+57Cp .text:00439580 mov eax, PlayerClass .text:00439585 push esi .text:00439586 push edi .text:00439587 mov edi, pcBarbarian .text:0043958C cmp eax, edi ; Compare Two Operands .text:0043958E jnz short loc_43959E ; Jump if Not Zero (ZF=0) .text:00439590 push 2 ; Max .text:00439592 call Random ; Call Procedure .text:00439597 add esp, 4 ; Add .text:0043959A mov esi, eax .text:0043959C jmp short loc_4395BB ; Jump .text:0043959E ; --------------------------------------------------------------------------- .text:0043959E .text:0043959E loc_43959E: ; CODE XREF: AdjustStartingStatsByChildDescript+Ej .text:0043959E ; AdjustStartingStatsByChildDescript+31j ... .text:0043959E push 8 ; Max .text:004395A0 call Random ; Call Procedure .text:004395A5 mov esi, eax .text:004395A7 mov eax, MysteryBarbChecksum1 .text:004395AC add esp, 4 ; Add .text:004395AF cmp esi, eax ; Compare Two Operands .text:004395B1 jz short loc_43959E ; Jump if Zero (ZF=1) .text:004395B3 cmp esi, MysteryBarbChecksum2 ; Compare Two Operands .text:004395B9 jz short loc_43959E ; Jump if Zero (ZF=1) .text:004395BB .text:004395BB loc_4395BB: ; CODE XREF: AdjustStartingStatsByChildDescript+1Cj .text:004395BB call GetCursorX ; Call Procedure .text:004395C0 test eax, eax ; Logical Compare .text:004395C2 jle short loc_4395CE ; Jump if Less or Equal (ZF=1 | SF!=OF) .text:004395C4 push 0Ah .text:004395C6 call WriteCharRedraw ; Call Procedure .text:004395CB add esp, 4 ; Add .text:004395CE .text:004395CE loc_4395CE: ; CODE XREF: AdjustStartingStatsByChildDescript+42j .text:004395CE cmp PlayerClass, edi ; Compare Two Operands .text:004395D4 jnz short loc_4395DF ; Jump if Not Zero (ZF=0) .text:004395D6 mov eax, BarbChildDescript[esi*4] .text:004395DD jmp short loc_4395E6 ; Jump .text:004395DF ; --------------------------------------------------------------------------- .text:004395DF .text:004395DF loc_4395DF: ; CODE XREF: AdjustStartingStatsByChildDescript+54j .text:004395DF mov eax, ChildDescription[esi*4] .text:004395E6 .text:004395E6 loc_4395E6: ; CODE XREF: AdjustStartingStatsByChildDescript+5Dj .text:004395E6 push eax .text:004395E7 push offset a___S ; "___%s" .text:004395EC call DisplaySpecialScreen? ; Call Procedure .text:004395F1 add esp, 8 ; Add .text:004395F4 cmp esi, 7 ; Compare Two Operands .text:004395F7 mov dword_5FFF1C, esi .text:004395FD ja loc_439747 ; Jump if Above (CF=0 & ZF=0) .text:00439603 jmp ds:off_43974C[esi*4] ; Indirect Near Jump .text:0043960A .text:0043960A loc_43960A: ; DATA XREF: .text:0043974Co .text:0043960A mov eax, PlayerClass .text:0043960F push 1 ; StatDelta .text:00439611 cmp eax, edi ; Compare Two Operands .text:00439613 jnz short loc_43962B ; Jump if Not Zero (ZF=0) .text:00439615 push sLearning ; StatNr .text:00439617 call IncStat ; Modify sLearning .text:0043961C push -2 ; StatDelta .text:0043961E push sCharisma ; StatNr .text:00439620 call IncStat ; Modify sCharisma .text:00439625 add esp, 10h ; Add .text:00439628 pop edi .text:00439629 pop esi .text:0043962A retn ; StatDelta .text:0043962B ; --------------------------------------------------------------------------- .text:0043962B .text:0043962B loc_43962B: ; CODE XREF: AdjustStartingStatsByChildDescript+93j .text:0043962B push sDexterity ; StatNr .text:0043962D call IncStat ; Modify sDexterity .text:00439632 push -2 ; StatDelta .text:00439634 push sCharisma ; StatNr .text:00439636 call IncStat ; Modify sCharisma .text:0043963B add esp, 10h ; Add .text:0043963E pop edi .text:0043963F pop esi .text:00439640 retn ; Return Near from Procedure .text:00439641 ; --------------------------------------------------------------------------- .text:00439641 .text:00439641 loc_439641: ; DATA XREF: .text:00439750o .text:00439641 cmp PlayerClass, edi ; Compare Two Operands .text:00439647 jnz short loc_439665 ; Jump if Not Zero (ZF=0) .text:00439649 xor esi, esi ; Logical Exclusive OR .text:0043964B .text:0043964B loc_43964B: ; CODE XREF: AdjustStartingStatsByChildDescript+E0j .text:0043964B push 2 ; Max .text:0043964D call Random ; Call Procedure .text:00439652 push eax ; StatDelta .text:00439653 push esi ; StatNr .text:00439654 call IncStat ; Call Procedure .text:00439659 add esp, 0Ch ; Add .text:0043965C inc esi ; Increment by 1 .text:0043965D cmp esi, 9 ; Compare Two Operands .text:00439660 jl short loc_43964B ; Jump if Less (SF!=OF) .text:00439662 pop edi .text:00439663 pop esi .text:00439664 retn ; Return Near from Procedure .text:00439665 ; --------------------------------------------------------------------------- .text:00439665 .text:00439665 loc_439665: ; CODE XREF: AdjustStartingStatsByChildDescript+C7j .text:00439665 xor esi, esi ; Logical Exclusive OR .text:00439667 .text:00439667 loc_439667: ; CODE XREF: AdjustStartingStatsByChildDescript+FCj .text:00439667 push 3 ; Max .text:00439669 call Random ; Call Procedure .text:0043966E push eax ; StatDelta .text:0043966F push esi ; StatNr .text:00439670 call IncStat ; Call Procedure .text:00439675 add esp, 0Ch ; Add .text:00439678 inc esi ; Increment by 1 .text:00439679 cmp esi, 9 ; Compare Two Operands .text:0043967C jl short loc_439667 ; Jump if Less (SF!=OF) .text:0043967E pop edi .text:0043967F pop esi .text:00439680 retn ; Return Near from Procedure .text:00439681 ; --------------------------------------------------------------------------- .text:00439681 .text:00439681 loc_439681: ; DATA XREF: .text:00439754o .text:00439681 push 3 ; Max .text:00439683 call Random ; Call Procedure .text:00439688 inc eax ; Increment by 1 .text:00439689 push eax ; StatDelta .text:0043968A push sLearning ; StatNr .text:0043968C call IncStat ; Modify sLearning .text:00439691 push 3 ; Max .text:00439693 call Random ; Call Procedure .text:00439698 neg eax ; Two's Complement Negation .text:0043969A push eax ; StatDelta .text:0043969B push sToughness ; StatNr .text:0043969D call IncStat ; Modify sToughness .text:004396A2 push 1 ; StatDelta .text:004396A4 push sCharisma ; StatNr .text:004396A6 call IncStat ; Modify sCharisma .text:004396AB add esp, 20h ; Add .text:004396AE pop edi .text:004396AF pop esi .text:004396B0 retn ; Return Near from Procedure .text:004396B1 ; --------------------------------------------------------------------------- .text:004396B1 .text:004396B1 loc_4396B1: ; DATA XREF: .text:00439758o .text:004396B1 xor esi, esi ; Logical Exclusive OR .text:004396B3 .text:004396B3 loc_4396B3: ; CODE XREF: AdjustStartingStatsByChildDescript+14Aj .text:004396B3 push 3 ; Max .text:004396B5 call Random ; Call Procedure .text:004396BA neg eax ; Two's Complement Negation .text:004396BC push eax ; StatDelta .text:004396BD push esi ; StatNr .text:004396BE call IncStat ; -0 to 2 for all stats .text:004396C3 add esp, 0Ch ; Add .text:004396C6 inc esi ; Increment by 1 .text:004396C7 cmp esi, 9 ; Compare Two Operands .text:004396CA jl short loc_4396B3 ; Jump if Less (SF!=OF) .text:004396CC pop edi .text:004396CD mov dword_4FE1B8, 5 ; Another saved value. I am guessing that this is to ; prevent you from getting major negative backstory x2 .text:004396D7 pop esi .text:004396D8 retn ; Return Near from Procedure .text:004396D9 ; --------------------------------------------------------------------------- .text:004396D9 .text:004396D9 loc_4396D9: ; DATA XREF: .text:0043975Co .text:004396D9 mov esi, 3 .text:004396DE .text:004396DE loc_4396DE: ; CODE XREF: AdjustStartingStatsByChildDescript+174j .text:004396DE push 1 ; StatDelta .text:004396E0 push 9 ; Max .text:004396E2 call Random ; Call Procedure .text:004396E7 add esp, 4 ; Add .text:004396EA push eax ; StatNr .text:004396EB call IncStat ; Call Procedure .text:004396F0 add esp, 8 ; Add .text:004396F3 dec esi ; Decrement by 1 .text:004396F4 jnz short loc_4396DE ; Jump if Not Zero (ZF=0) .text:004396F6 pop edi .text:004396F7 pop esi .text:004396F8 retn ; Return Near from Procedure .text:004396F9 ; --------------------------------------------------------------------------- .text:004396F9 .text:004396F9 loc_4396F9: ; DATA XREF: .text:00439760o .text:004396F9 push 1 ; StatDelta .text:004396FB push sToughness ; StatNr .text:004396FD call IncStat ; Modify sToughness .text:00439702 push 1 ; StatDelta .text:00439704 push sStrength ; StatNr .text:00439706 call IncStat ; Modify sStrength .text:0043970B push -2 ; StatDelta .text:0043970D push sLearning ; StatNr .text:0043970F call IncStat ; Modify sLearning .text:00439714 add esp, 18h ; Add .text:00439717 pop edi .text:00439718 pop esi .text:00439719 retn ; Return Near from Procedure .text:0043971A ; --------------------------------------------------------------------------- .text:0043971A .text:0043971A loc_43971A: ; DATA XREF: .text:00439764o .text:0043971A push 2 ; StatDelta .text:0043971C push sCharisma ; StatNr .text:0043971E call IncStat ; Modify sCharisma .text:00439723 push 1 ; StatDelta .text:00439725 push sAppearance ; StatNr .text:00439727 call IncStat ; Modify sAppearance .text:0043972C add esp, 10h ; Add .text:0043972F pop edi .text:00439730 pop esi .text:00439731 retn ; Return Near from Procedure .text:00439732 ; --------------------------------------------------------------------------- .text:00439732 .text:00439732 loc_439732: ; DATA XREF: .text:00439768o .text:00439732 push 2 ; StatDelta .text:00439734 push sLearning ; StatNr .text:00439736 call IncStat ; Modify sLearning .text:0043973B push 1 ; StatDelta .text:0043973D push sMana ; StatNr .text:0043973F call IncStat ; Modify sMana .text:00439744 add esp, 10h ; Add .text:00439747 .text:00439747 loc_439747: ; CODE XREF: AdjustStartingStatsByChildDescript+7Dj .text:00439747 pop edi .text:00439748 pop esi .text:00439749 retn ; Return Near from Procedure .text:00439749 AdjustStartingStatsByChildDescript endp ; sp = 38h .text:00439749 .text:00439749 ; --------------------------------------------------------------------------- .text:0043974A db 8Bh, 0FFh .text:0043974C off_43974C dd offset loc_43960A ; DATA XREF: AdjustStartingStatsByChildDescript+83r .text:00439750 dd offset loc_439641 .text:00439754 dd offset loc_439681 .text:00439758 dd offset loc_4396B1 .text:0043975C dd offset loc_4396D9 .text:00439760 dd offset loc_4396F9 .text:00439764 dd offset loc_43971A .text:00439768 dd offset loc_439732 .text:0043976C db 4 dup(90h) .data:004FD3EC ChildDescription dd 4FF570h ; DATA XREF: AdjustStartingStatsByClass1?+5Fr .data:004FD3EC ; sub_43D910+1Cr .data:004FD3EC ; "As a young child you were often alone. "... .data:004FD3F0 dd offset aAsAChildYourParent ; "As a child your parents cared a lot for"... .data:004FD3F4 dd offset aDuringYourChildhoo ; "During your childhood one of your uncle"... .data:004FD3F8 dd offset aInYourChildhoodYou ; "In your childhood you were tortured by "... .data:004FD3FC dd offset aAsAChildYouLivedTh ; "As a child you lived through happy days"... .data:004FD400 dd offset aAsAChildYouHadToSu ; "As a child you had to survive pretty ha"... .data:004FD404 dd offset aInYourChildhoodY_0 ; "In your childhood you were a credit to "... .data:004FD408 dd offset aInYourChildhoodY_1 ; "In your childhood you were fascinated b"... .data:004FD40C BarbChildDescript dd 4FF10Ch ; DATA XREF: AdjustStartingStatsByClass1?+56r .data:004FD40C ; sub_43D910+Er .data:004FD40C ; "As a child you were not accepted by the"... .data:004FD410 dd offset aAsAChildYouWereVer ; "As a child you were very active and imi"...