.text:00439A00 AdjustStartingStatsByYoungAdultDescript proc near ; CODE XREF: CreateOrLoadPlayer+586p .text:00439A00 mov eax, PlayerClass .text:00439A05 push ebx .text:00439A06 mov ebx, pcBarbarian .text:00439A0B push esi .text:00439A0C cmp eax, ebx ; Compare Two Operands .text:00439A0E jnz short loc_439A1E ; Jump if Not Zero (ZF=0) .text:00439A10 push 2 ; Max .text:00439A12 call Random ; Call Procedure .text:00439A17 add esp, 4 ; Add .text:00439A1A mov esi, eax .text:00439A1C jmp short loc_439A41 ; Jump .text:00439A1E ; --------------------------------------------------------------------------- .text:00439A1E .text:00439A1E loc_439A1E: ; CODE XREF: AdjustStartingStatsByYoungAdultDescript+Ej .text:00439A1E ; AdjustStartingStatsByYoungAdultDescript+31j ... .text:00439A1E push 8 ; Max .text:00439A20 call Random ; Call Procedure .text:00439A25 mov esi, eax .text:00439A27 mov eax, dword_4FE1B8 .text:00439A2C add esp, 4 ; Add .text:00439A2F cmp esi, eax ; Compare Two Operands .text:00439A31 jz short loc_439A1E ; Jump if Zero (ZF=1) .text:00439A33 cmp PlayerClass, pcPaladin ; Compare Two Operands .text:00439A3A jnz short loc_439A41 ; Jump if Not Zero (ZF=0) .text:00439A3C cmp esi, 3 ; Compare Two Operands .text:00439A3F jz short loc_439A1E ; Jump if Zero (ZF=1) .text:00439A41 .text:00439A41 loc_439A41: ; CODE XREF: AdjustStartingStatsByYoungAdultDescript+1Cj .text:00439A41 ; AdjustStartingStatsByYoungAdultDescript+3Aj .text:00439A41 call GetCursorX ; Call Procedure .text:00439A46 test eax, eax ; Logical Compare .text:00439A48 jle short loc_439A54 ; Jump if Less or Equal (ZF=1 | SF!=OF) .text:00439A4A push 0Ah .text:00439A4C call WriteCharRedraw ; Call Procedure .text:00439A51 add esp, 4 ; Add .text:00439A54 .text:00439A54 loc_439A54: ; CODE XREF: AdjustStartingStatsByYoungAdultDescript+48j .text:00439A54 cmp PlayerClass, ebx ; Compare Two Operands .text:00439A5A jnz short loc_439A65 ; Jump if Not Zero (ZF=0) .text:00439A5C mov eax, YoungAdultBarbDescript[esi*4] .text:00439A63 jmp short loc_439A6C ; Jump .text:00439A65 ; --------------------------------------------------------------------------- .text:00439A65 .text:00439A65 loc_439A65: ; CODE XREF: AdjustStartingStatsByYoungAdultDescript+5Aj .text:00439A65 mov eax, YoungAdultDescription[esi*4] .text:00439A6C .text:00439A6C loc_439A6C: ; CODE XREF: AdjustStartingStatsByYoungAdultDescript+63j .text:00439A6C push eax .text:00439A6D push offset a___S ; "___%s" .text:00439A72 call sub_41DD30 ; Call Procedure .text:00439A77 add esp, 8 ; Add .text:00439A7A cmp esi, 7 ; Compare Two Operands .text:00439A7D mov dword_5FFF24, esi .text:00439A83 ja loc_439B14 ; Jump if Above (CF=0 & ZF=0) .text:00439A89 jmp ds:off_439C28[esi*4] ; Indirect Near Jump .text:00439A90 .text:00439A90 loc_439A90: ; DATA XREF: .text:00439C28o .text:00439A90 cmp PlayerClass, ebx ; Compare Two Operands .text:00439A96 jnz short loc_439AAD ; Jump if Not Zero (ZF=0) .text:00439A98 push 3 ; Max .text:00439A9A call Random ; Call Procedure .text:00439A9F inc eax ; Increment by 1 .text:00439AA0 push eax ; StatDelta .text:00439AA1 push sWillpower ; StatNr .text:00439AA3 call IncStat ; Modify sWillpower .text:00439AA8 add esp, 0Ch ; Add .text:00439AAB jmp short loc_439B18 ; Jump .text:00439AAD ; --------------------------------------------------------------------------- .text:00439AAD .text:00439AAD loc_439AAD: ; CODE XREF: AdjustStartingStatsByYoungAdultDescript+96j .text:00439AAD push 2 ; Max .text:00439AAF call Random ; Call Procedure .text:00439AB4 neg eax ; Two's Complement Negation .text:00439AB6 push eax ; StatDelta .text:00439AB7 push sLearning ; StatNr .text:00439AB9 call IncStat ; Modify sLearning .text:00439ABE push 2 ; Max .text:00439AC0 call Random ; Call Procedure .text:00439AC5 push eax ; StatDelta .text:00439AC6 push sWillpower ; StatNr .text:00439AC8 call IncStat ; Modify sWillpower .text:00439ACD add esp, 18h ; Add .text:00439AD0 jmp short loc_439B18 ; Jump .text:00439AD2 ; --------------------------------------------------------------------------- .text:00439AD2 .text:00439AD2 loc_439AD2: ; DATA XREF: .text:00439C2Co .text:00439AD2 cmp PlayerClass, ebx ; Compare Two Operands .text:00439AD8 jnz short loc_439AFB ; Jump if Not Zero (ZF=0) .text:00439ADA push -3 ; StatDelta .text:00439ADC push sCharisma ; StatNr .text:00439ADE call IncStat ; Modify sCharisma .text:00439AE3 push 1 ; StatDelta .text:00439AE5 push sStrength ; StatNr .text:00439AE7 call IncStat ; Modify sStrength .text:00439AEC push 2 ; StatDelta .text:00439AEE push sToughness ; StatNr .text:00439AF0 call IncStat ; Modify sToughness .text:00439AF5 add esp, 18h ; Add .text:00439AF8 pop esi .text:00439AF9 pop ebx .text:00439AFA retn ; Return Near from Procedure .text:00439AFB ; --------------------------------------------------------------------------- .text:00439AFB .text:00439AFB loc_439AFB: ; CODE XREF: AdjustStartingStatsByYoungAdultDescript+D8j .text:00439AFB xor esi, esi ; Set esi to 0 .text:00439AFD .text:00439AFD loc_439AFD: ; CODE XREF: AdjustStartingStatsByYoungAdultDescript+112j .text:00439AFD push 2 ; Max .text:00439AFF call Random ; Call Procedure .text:00439B04 push eax ; StatDelta .text:00439B05 push esi ; StatNr .text:00439B06 call IncStat ; Call Procedure .text:00439B0B add esp, 0Ch ; Add .text:00439B0E inc esi ; Increment by 1 .text:00439B0F cmp esi, 9 ; Compare Two Operands .text:00439B12 jl short loc_439AFD ; Jump if Less (SF!=OF) .text:00439B14 .text:00439B14 loc_439B14: ; CODE XREF: AdjustStartingStatsByYoungAdultDescript+83j .text:00439B14 test esi, esi ; Logical Compare .text:00439B16 jnz short loc_439B4A ; Jump if Not Zero (ZF=0) .text:00439B18 .text:00439B18 loc_439B18: ; CODE XREF: AdjustStartingStatsByYoungAdultDescript+ABj .text:00439B18 ; AdjustStartingStatsByYoungAdultDescript+D0j .text:00439B18 mov eax, PlayerClass .text:00439B1D cmp eax, ebx ; Compare Two Operands .text:00439B1F jz short loc_439B4A ; Jump if Zero (ZF=1) .text:00439B21 cmp eax, pcAssassin ; Compare Two Operands .text:00439B24 jz short loc_439B30 ; Jump if Zero (ZF=1) .text:00439B26 cmp eax, pcArcher ; Compare Two Operands .text:00439B29 mov esi, offset NullString .text:00439B2E jnz short loc_439B35 ; Jump if Not Zero (ZF=0) .text:00439B30 .text:00439B30 loc_439B30: ; CODE XREF: AdjustStartingStatsByYoungAdultDescript+124j .text:00439B30 mov esi, offset aN ; "n" .text:00439B35 .text:00439B35 loc_439B35: ; CODE XREF: AdjustStartingStatsByYoungAdultDescript+12Ej .text:00439B35 push eax ; Class_ .text:00439B36 call GetClassNameStr ; Call Procedure .text:00439B3B push eax .text:00439B3C push esi .text:00439B3D push offset aYouDecidedToBe ; "You decided to become a%s %s.\n" .text:00439B42 call sub_41DD30 ; Call Procedure .text:00439B47 add esp, 10h ; Add .text:00439B4A .text:00439B4A loc_439B4A: ; CODE XREF: AdjustStartingStatsByYoungAdultDescript+116j .text:00439B4A ; AdjustStartingStatsByYoungAdultDescript+11Fj .text:00439B4A pop esi .text:00439B4B pop ebx .text:00439B4C retn ; Return Near from Procedure .text:00439B4D ; --------------------------------------------------------------------------- .text:00439B4D .text:00439B4D loc_439B4D: ; DATA XREF: .text:00439C30o .text:00439B4D push 2 ; Max .text:00439B4F call Random ; Call Procedure .text:00439B54 push eax ; StatDelta .text:00439B55 push sStrength ; StatNr .text:00439B57 call IncStat ; Modify sStrength .text:00439B5C push 4 ; Max .text:00439B5E call Random ; Call Procedure .text:00439B63 inc eax ; Increment by 1 .text:00439B64 push eax ; StatDelta .text:00439B65 push sLearning ; StatNr .text:00439B67 call IncStat ; Modify sLearning .text:00439B6C push 1 ; StatDelta .text:00439B6E push sToughness ; StatNr .text:00439B70 call IncStat ; Modify sToughness .text:00439B75 add esp, 20h ; Add .text:00439B78 pop esi .text:00439B79 pop ebx .text:00439B7A retn ; Return Near from Procedure .text:00439B7B ; --------------------------------------------------------------------------- .text:00439B7B .text:00439B7B loc_439B7B: ; DATA XREF: .text:00439C34o .text:00439B7B push 1 ; StatDelta .text:00439B7D push sWillpower ; StatNr .text:00439B7F call IncStat ; Modify sWillpower .text:00439B84 push 3 ; StatDelta .text:00439B86 push sToughness ; StatNr .text:00439B88 call IncStat ; Modify sToughness .text:00439B8D push 4 ; Max .text:00439B8F call Random ; Call Procedure .text:00439B94 or ecx, -1 ; Logical Inclusive OR .text:00439B97 sub ecx, eax ; Integer Subtraction .text:00439B99 push ecx ; StatDelta .text:00439B9A push sCharisma ; StatNr .text:00439B9C call IncStat ; Modify sCharisma .text:00439BA1 add esp, 1Ch ; Add .text:00439BA4 pop esi .text:00439BA5 pop ebx .text:00439BA6 retn ; Return Near from Procedure .text:00439BA7 ; --------------------------------------------------------------------------- .text:00439BA7 .text:00439BA7 loc_439BA7: ; DATA XREF: .text:00439C38o .text:00439BA7 push 3 ; StatDelta .text:00439BA9 push sWillpower ; StatNr .text:00439BAB call IncStat ; Modify sWillpower .text:00439BB0 add esp, 8 ; Add .text:00439BB3 pop esi .text:00439BB4 pop ebx .text:00439BB5 retn ; Return Near from Procedure .text:00439BB6 ; --------------------------------------------------------------------------- .text:00439BB6 .text:00439BB6 loc_439BB6: ; DATA XREF: .text:00439C3Co .text:00439BB6 push 1 ; StatDelta .text:00439BB8 push sLearning ; StatNr .text:00439BBA call IncStat ; Modify sLearning .text:00439BBF add esp, 8 ; Add .text:00439BC2 pop esi .text:00439BC3 pop ebx .text:00439BC4 retn ; Return Near from Procedure .text:00439BC5 ; --------------------------------------------------------------------------- .text:00439BC5 .text:00439BC5 loc_439BC5: ; DATA XREF: .text:00439C40o .text:00439BC5 push 2 ; Max .text:00439BC7 call Random ; Call Procedure .text:00439BCC add esp, 4 ; Add .text:00439BCF test eax, eax ; Logical Compare .text:00439BD1 jz short loc_439BE0 ; Jump if Zero (ZF=1) .text:00439BD3 push 1 ; StatDelta .text:00439BD5 push sStrength ; StatNr .text:00439BD7 call IncStat ; Modify sStrength .text:00439BDC push -1 .text:00439BDE jmp short loc_439BEB ; Jump .text:00439BE0 ; --------------------------------------------------------------------------- .text:00439BE0 .text:00439BE0 loc_439BE0: ; CODE XREF: AdjustStartingStatsByYoungAdultDescript+1D1j .text:00439BE0 push -1 ; StatDelta .text:00439BE2 push sStrength ; StatNr .text:00439BE4 call IncStat ; Modify sStrength .text:00439BE9 push 1 ; StatDelta .text:00439BEB .text:00439BEB loc_439BEB: ; CODE XREF: AdjustStartingStatsByYoungAdultDescript+1DEj .text:00439BEB push sLearning ; StatNr .text:00439BED call IncStat ; Modify sLearning .text:00439BF2 add esp, 10h ; Add .text:00439BF5 push 1 ; StatDelta .text:00439BF7 push sToughness ; StatNr .text:00439BF9 call IncStat ; Modify sToughness .text:00439BFE add esp, 8 ; Add .text:00439C01 pop esi .text:00439C02 pop ebx .text:00439C03 retn ; Return Near from Procedure .text:00439C04 ; --------------------------------------------------------------------------- .text:00439C04 .text:00439C04 loc_439C04: ; DATA XREF: .text:00439C44o .text:00439C04 push 1 ; StatDelta .text:00439C06 push sDexterity ; StatNr .text:00439C08 call IncStat ; Modify sDexterity .text:00439C0D push 1 ; StatDelta .text:00439C0F push sMana ; StatNr .text:00439C11 call IncStat ; Modify sMana .text:00439C16 push 2 ; StatDelta .text:00439C18 push sLearning ; StatNr .text:00439C1A call IncStat ; Modify sLearning .text:00439C1F add esp, 18h ; Add .text:00439C22 pop esi .text:00439C23 pop ebx .text:00439C24 retn ; Return Near from Procedure .text:00439C24 AdjustStartingStatsByYoungAdultDescript endp ; sp = 30h .text:00439C24 .text:00439C24 ; --------------------------------------------------------------------------- .text:00439C25 db 8Dh, 49h, 0 .text:00439C28 off_439C28 dd offset loc_439A90 ; DATA XREF: AdjustStartingStatsByYoungAdultDescript+89r .text:00439C2C dd offset loc_439AD2 .text:00439C30 dd offset loc_439B4D .text:00439C34 dd offset loc_439B7B .text:00439C38 dd offset loc_439BA7 .text:00439C3C dd offset loc_439BB6 .text:00439C40 dd offset loc_439BC5 .text:00439C44 dd offset loc_439C04 .data:004FD43C YoungAdultDescription dd 4FEA1Ch ; DATA XREF: AdjustStartingStatsByClass3?+65r .data:004FD43C ; "As a young adult you spent a lot of tim"... .data:004FD440 dd offset aYourPathWasAlwaysC ; "Your path was always clearly lying befo"... .data:004FD444 dd offset aAsAYoungAdultYouLe ; "As a young adult you left your home bec"... .data:004FD448 dd offset aYourYoungAdulthood ; "Your young adulthood was characterized "... .data:004FD44C dd offset aYourLifeAsAYoungAd ; "Your life as a young adult was characte"... .data:004FD450 dd offset aAsAYoungAdultYouWe ; "As a young adult you were a credit to y"... .data:004FD454 dd offset aAsAYoungAdultYouHa ; "As a young adult you had to work a lot "... .data:004FD458 dd offset aAsAYoungAdultYouTr ; "As a young adult you tried many occupat"... .data:004FD45C YoungAdultBarbDescript dd offset aAsAYoungAdultYouMo ; DATA XREF: AdjustStartingStatsByClass3?+5Cr .data:004FD45C ; sub_43D970+Er .data:004FD45C ; "As a young adult you more and more sepa"... .data:004FD460 dd offset aAsAYoungAdultYourF ; "As a young adult your family was killed"...