Been picking up on this.
Wanted to see where the
StrongLight gets enabled on the drone (when Doc tinkers on B12 to equip it with UV light).
And here it is, in the latest version (ImageBase = 0000000140000000):
Code: Select all
00000001410CE060 | 48:895C24 10 | MOV QWORD PTR SS:[RSP+10],RBX | rcx == BP_Drone_C /Game/Map/_MainGame/BaseMap.BaseMap:PersistentLevel.BP_Drone_C_2147479143
00000001410CE065 | 57 | PUSH RDI |
00000001410CE066 | 48:83EC 20 | SUB RSP,20 |
00000001410CE06A | 0FB681 E1030000 | MOVZX EAX,BYTE PTR DS:[RCX+3E1] | 0x3E1 == BoolProperty /Script/Hk_project.Drone:m_isStrongLightUnlocked
00000001410CE071 | 0FB6FA | MOVZX EDI,DL |
00000001410CE074 | 48:8BD9 | MOV RBX,RCX |
00000001410CE077 | 3AD0 | CMP DL,AL |
00000001410CE079 | 74 3D | JE stray-win64-shipping1.1410CE0B8 |
00000001410CE07B | 84D2 | TEST DL,DL |
00000001410CE07D | 75 32 | JNE stray-win64-shipping1.1410CE0B1 |
00000001410CE07F | 3891 E0030000 | CMP BYTE PTR DS:[RCX+3E0],DL | 0x3E0 == BoolProperty /Script/Hk_project.Drone:m_isLightUnlocked
00000001410CE085 | 74 2A | JE stray-win64-shipping1.1410CE0B1 |
00000001410CE087 | 84C0 | TEST AL,AL |
00000001410CE089 | 74 26 | JE stray-win64-shipping1.1410CE0B1 |
00000001410CE08B | 41:B8 01000000 | MOV R8D,1 |
00000001410CE091 | 48:8D15 080AC102 | LEA RDX,QWORD PTR DS:[143CDEAA0] | "StrongLightOff"
00000001410CE098 | 48:8D4C24 30 | LEA RCX,QWORD PTR SS:[RSP+30] |
00000001410CE09D | E8 1E482400 | CALL stray-win64-shipping1.1413128C0 |
00000001410CE0A2 | 48:8B8B 00040000 | MOV RCX,QWORD PTR DS:[RBX+400] | [rcx+0x400] == HierarchicalStateMachine /Game/Map/_MainGame/BaseMap.BaseMap:PersistentLevel.BP_Drone_C_2147479143.StateMachine
00000001410CE0A9 | 48:8B10 | MOV RDX,QWORD PTR DS:[RAX] |
00000001410CE0AC | E8 9F9E81FF | CALL stray-win64-shipping1.1408E7F50 |
00000001410CE0B1 | 40:88BB E1030000 | MOV BYTE PTR DS:[RBX+3E1],DIL | 0x3E1 == BoolProperty /Script/Hk_project.Drone:m_isStrongLightUnlocked
00000001410CE0B8 | 48:8B5C24 38 | MOV RBX,QWORD PTR SS:[RSP+38] |
00000001410CE0BD | 48:83C4 20 | ADD RSP,20 |
00000001410CE0C1 | 5F | POP RDI |
00000001410CE0C2 | C3 | RET |
There are several functions operating enable/disable of the various Torch types, among which this one:
Code: Select all
00000001410F9E10 | 48:895C24 08 | MOV QWORD PTR SS:[RSP+8],RBX |
00000001410F9E15 | 57 | PUSH RDI |
00000001410F9E16 | 48:83EC 20 | SUB RSP,20 |
00000001410F9E1A | 48:8BFA | MOV RDI,RDX | rdx:EntryPoint
00000001410F9E1D | E8 3E25AF01 | CALL stray-win64-shipping1.142BEC360 |
00000001410F9E22 | 48:8BC8 | MOV RCX,RAX | rax:EntryPoint
00000001410F9E25 | 48:8BD8 | MOV RBX,RAX | rax:EntryPoint
00000001410F9E28 | E8 63180200 | CALL stray-win64-shipping1.14111B690 |
00000001410F9E2D | 84C0 | TEST AL,AL |
00000001410F9E2F | 0F85 B0000000 | JNE stray-win64-shipping1.1410F9EE5 |
00000001410F9E35 | 48:8BCB | MOV RCX,RBX |
00000001410F9E38 | E8 E3270200 | CALL stray-win64-shipping1.14111C620 |
00000001410F9E3D | 41:B0 01 | MOV R8B,1 |
00000001410F9E40 | 48:8BC8 | MOV RCX,RAX | rax:EntryPoint
00000001410F9E43 | 41:0FB6D0 | MOVZX EDX,R8B |
00000001410F9E47 | E8 44010100 | CALL stray-win64-shipping1.141109F90 |
00000001410F9E4C | 48:8BCB | MOV RCX,RBX |
00000001410F9E4F | E8 3C240200 | CALL stray-win64-shipping1.14111C290 |
00000001410F9E54 | 80B8 E1030000 00 | CMP BYTE PTR DS:[RAX+3E1],0 |
00000001410F9E5B | 0F84 84000000 | JE stray-win64-shipping1.1410F9EE5 |
00000001410F9E61 | 48:8D05 C88EBE02 | LEA RAX,QWORD PTR DS:[143CE2D30] | rax:EntryPoint, 0000000143CE2D30:L"Disable Torchlight"
00000001410F9E68 | 48:3947 28 | CMP QWORD PTR DS:[RDI+28],RAX | rax:EntryPoint
00000001410F9E6C | 74 61 | JE stray-win64-shipping1.1410F9ECF |
00000001410F9E6E | 8B4F 34 | MOV ECX,DWORD PTR DS:[RDI+34] |
00000001410F9E71 | 33D2 | XOR EDX,EDX |
00000001410F9E73 | 8957 30 | MOV DWORD PTR DS:[RDI+30],EDX |
00000001410F9E76 | 83F9 13 | CMP ECX,13 |
00000001410F9E79 | 74 14 | JE stray-win64-shipping1.1410F9E8F |
00000001410F9E7B | BA 13000000 | MOV EDX,13 |
00000001410F9E80 | 48:8D4F 28 | LEA RCX,QWORD PTR DS:[RDI+28] |
00000001410F9E84 | E8 07E774FF | CALL stray-win64-shipping1.140848590 |
00000001410F9E89 | 8B57 30 | MOV EDX,DWORD PTR DS:[RDI+30] |
00000001410F9E8C | 8B4F 34 | MOV ECX,DWORD PTR DS:[RDI+34] |
00000001410F9E8F | 8D42 13 | LEA EAX,QWORD PTR DS:[RDX+13] |
00000001410F9E92 | 8947 30 | MOV DWORD PTR DS:[RDI+30],EAX |
00000001410F9E95 | 3BC1 | CMP EAX,ECX |
00000001410F9E97 | 7E 09 | JLE stray-win64-shipping1.1410F9EA2 |
00000001410F9E99 | 48:8D4F 28 | LEA RCX,QWORD PTR DS:[RDI+28] |
00000001410F9E9D | E8 EEE174FF | CALL stray-win64-shipping1.140848090 |
00000001410F9EA2 | 48:8B4F 28 | MOV RCX,QWORD PTR DS:[RDI+28] |
00000001410F9EA6 | 0F1005 838EBE02 | MOVUPS XMM0,XMMWORD PTR DS:[143CE2D30] | 0000000143CE2D30:L"Disable Torchlight"
00000001410F9EAD | 0F1101 | MOVUPS XMMWORD PTR DS:[RCX],XMM0 |
00000001410F9EB0 | 0F100D 898EBE02 | MOVUPS XMM1,XMMWORD PTR DS:[143CE2D40] | 0000000143CE2D40:L"Torchlight"
00000001410F9EB7 | 0F1149 10 | MOVUPS XMMWORD PTR DS:[RCX+10],XMM1 |
00000001410F9EBB | 8B05 8F8EBE02 | MOV EAX,DWORD PTR DS:[143CE2D50] | 0000000143CE2D50:L"ht"
00000001410F9EC1 | 8941 20 | MOV DWORD PTR DS:[RCX+20],EAX |
00000001410F9EC4 | 0FB705 898EBE02 | MOVZX EAX,WORD PTR DS:[143CE2D54] |
00000001410F9ECB | 66:8941 24 | MOV WORD PTR DS:[RCX+24],AX |
00000001410F9ECF | 48:8B8F D0000000 | MOV RCX,QWORD PTR DS:[RDI+D0] |
00000001410F9ED6 | 48:8B5C24 30 | MOV RBX,QWORD PTR SS:[RSP+30] |
00000001410F9EDB | 48:83C4 20 | ADD RSP,20 |
00000001410F9EDF | 5F | POP RDI |
00000001410F9EE0 | E9 4BEBFFFF | JMP stray-win64-shipping1.1410F8A30 |
00000001410F9EE5 | 48:8BCB | MOV RCX,RBX |
00000001410F9EE8 | E8 A3230200 | CALL stray-win64-shipping1.14111C290 |
00000001410F9EED | 48:8BC8 | MOV RCX,RAX | rax:EntryPoint
00000001410F9EF0 | 80B8 E1030000 00 | CMP BYTE PTR DS:[RAX+3E1],0 |
00000001410F9EF7 | 74 70 | JE stray-win64-shipping1.1410F9F69 |
00000001410F9EF9 | 33D2 | XOR EDX,EDX |
00000001410F9EFB | E8 6041FDFF | CALL stray-win64-shipping1.1410CE060 |
00000001410F9F00 | 48:8D05 518EBE02 | LEA RAX,QWORD PTR DS:[143CE2D58] | rax:EntryPoint, 0000000143CE2D58:L"Enable Torchlight"
00000001410F9F07 | 48:3947 28 | CMP QWORD PTR DS:[RDI+28],RAX | rax:EntryPoint
00000001410F9F0B | 0F84 CD000000 | JE stray-win64-shipping1.1410F9FDE |
00000001410F9F11 | 8B4F 34 | MOV ECX,DWORD PTR DS:[RDI+34] |
00000001410F9F14 | 33D2 | XOR EDX,EDX |
00000001410F9F16 | 8957 30 | MOV DWORD PTR DS:[RDI+30],EDX |
00000001410F9F19 | 83F9 12 | CMP ECX,12 |
00000001410F9F1C | 74 14 | JE stray-win64-shipping1.1410F9F32 |
00000001410F9F1E | BA 12000000 | MOV EDX,12 |
00000001410F9F23 | 48:8D4F 28 | LEA RCX,QWORD PTR DS:[RDI+28] |
00000001410F9F27 | E8 64E674FF | CALL stray-win64-shipping1.140848590 |
00000001410F9F2C | 8B57 30 | MOV EDX,DWORD PTR DS:[RDI+30] |
00000001410F9F2F | 8B4F 34 | MOV ECX,DWORD PTR DS:[RDI+34] |
00000001410F9F32 | 8D42 12 | LEA EAX,QWORD PTR DS:[RDX+12] |
00000001410F9F35 | 8947 30 | MOV DWORD PTR DS:[RDI+30],EAX |
00000001410F9F38 | 3BC1 | CMP EAX,ECX |
00000001410F9F3A | 7E 09 | JLE stray-win64-shipping1.1410F9F45 |
00000001410F9F3C | 48:8D4F 28 | LEA RCX,QWORD PTR DS:[RDI+28] |
00000001410F9F40 | E8 4BE174FF | CALL stray-win64-shipping1.140848090 |
00000001410F9F45 | 48:8B4F 28 | MOV RCX,QWORD PTR DS:[RDI+28] |
00000001410F9F49 | 0F1005 088EBE02 | MOVUPS XMM0,XMMWORD PTR DS:[143CE2D58] | 0000000143CE2D58:L"Enable Torchlight"
00000001410F9F50 | 0F1101 | MOVUPS XMMWORD PTR DS:[RCX],XMM0 |
00000001410F9F53 | 0F100D 0E8EBE02 | MOVUPS XMM1,XMMWORD PTR DS:[143CE2D68] | 0000000143CE2D68:L"orchlight"
00000001410F9F5A | 0F1149 10 | MOVUPS XMMWORD PTR DS:[RCX+10],XMM1 |
00000001410F9F5E | 8B05 148EBE02 | MOV EAX,DWORD PTR DS:[143CE2D78] |
00000001410F9F64 | 8941 20 | MOV DWORD PTR DS:[RCX+20],EAX |
00000001410F9F67 | EB 75 | JMP stray-win64-shipping1.1410F9FDE |
00000001410F9F69 | B2 01 | MOV DL,1 |
00000001410F9F6B | E8 F040FDFF | CALL stray-win64-shipping1.1410CE060 |
00000001410F9F70 | 48:8D05 B98DBE02 | LEA RAX,QWORD PTR DS:[143CE2D30] | rax:EntryPoint, 0000000143CE2D30:L"Disable Torchlight"
00000001410F9F77 | 48:3947 28 | CMP QWORD PTR DS:[RDI+28],RAX | rax:EntryPoint
00000001410F9F7B | 74 61 | JE stray-win64-shipping1.1410F9FDE |
00000001410F9F7D | 8B4F 34 | MOV ECX,DWORD PTR DS:[RDI+34] |
00000001410F9F80 | 33D2 | XOR EDX,EDX |
00000001410F9F82 | 8957 30 | MOV DWORD PTR DS:[RDI+30],EDX |
00000001410F9F85 | 83F9 13 | CMP ECX,13 |
00000001410F9F88 | 74 14 | JE stray-win64-shipping1.1410F9F9E |
00000001410F9F8A | BA 13000000 | MOV EDX,13 |
00000001410F9F8F | 48:8D4F 28 | LEA RCX,QWORD PTR DS:[RDI+28] |
00000001410F9F93 | E8 F8E574FF | CALL stray-win64-shipping1.140848590 |
00000001410F9F98 | 8B57 30 | MOV EDX,DWORD PTR DS:[RDI+30] |
00000001410F9F9B | 8B4F 34 | MOV ECX,DWORD PTR DS:[RDI+34] |
00000001410F9F9E | 8D42 13 | LEA EAX,QWORD PTR DS:[RDX+13] |
00000001410F9FA1 | 8947 30 | MOV DWORD PTR DS:[RDI+30],EAX |
00000001410F9FA4 | 3BC1 | CMP EAX,ECX |
00000001410F9FA6 | 7E 09 | JLE stray-win64-shipping1.1410F9FB1 |
00000001410F9FA8 | 48:8D4F 28 | LEA RCX,QWORD PTR DS:[RDI+28] |
00000001410F9FAC | E8 DFE074FF | CALL stray-win64-shipping1.140848090 |
00000001410F9FB1 | 48:8B4F 28 | MOV RCX,QWORD PTR DS:[RDI+28] |
00000001410F9FB5 | 0F1005 748DBE02 | MOVUPS XMM0,XMMWORD PTR DS:[143CE2D30] | 0000000143CE2D30:L"Disable Torchlight"
00000001410F9FBC | 0F1101 | MOVUPS XMMWORD PTR DS:[RCX],XMM0 |
00000001410F9FBF | 0F100D 7A8DBE02 | MOVUPS XMM1,XMMWORD PTR DS:[143CE2D40] | 0000000143CE2D40:L"Torchlight"
00000001410F9FC6 | 0F1149 10 | MOVUPS XMMWORD PTR DS:[RCX+10],XMM1 |
00000001410F9FCA | 8B05 808DBE02 | MOV EAX,DWORD PTR DS:[143CE2D50] | 0000000143CE2D50:L"ht"
00000001410F9FD0 | 8941 20 | MOV DWORD PTR DS:[RCX+20],EAX |
00000001410F9FD3 | 0FB705 7A8DBE02 | MOVZX EAX,WORD PTR DS:[143CE2D54] |
00000001410F9FDA | 66:8941 24 | MOV WORD PTR DS:[RCX+24],AX |
00000001410F9FDE | 48:8B9F D0000000 | MOV RBX,QWORD PTR DS:[RDI+D0] |
00000001410F9FE5 | 48:8D5424 40 | LEA RDX,QWORD PTR SS:[RSP+40] | rdx:EntryPoint
00000001410F9FEA | 48:895C24 40 | MOV QWORD PTR SS:[RSP+40],RBX |
00000001410F9FEF | 48:8D4B 78 | LEA RCX,QWORD PTR DS:[RBX+78] |
00000001410F9FF3 | E8 384E7AFF | CALL stray-win64-shipping1.14089EE30 |
00000001410F9FF8 | 48:8BBB C0000000 | MOV RDI,QWORD PTR DS:[RBX+C0] |
00000001410F9FFF | 48:6383 C8000000 | MOVSXD RAX,DWORD PTR DS:[RBX+C8] | rax:EntryPoint
00000001410FA006 | 48:8D1CC7 | LEA RBX,QWORD PTR DS:[RDI+RAX*8] |
00000001410FA00A | 48:3BFB | CMP RDI,RBX |
00000001410FA00D | 74 12 | JE stray-win64-shipping1.1410FA021 |
00000001410FA00F | 90 | NOP |
00000001410FA010 | 48:8B0F | MOV RCX,QWORD PTR DS:[RDI] |
00000001410FA013 | E8 18EAFFFF | CALL stray-win64-shipping1.1410F8A30 |
00000001410FA018 | 48:83C7 08 | ADD RDI,8 |
00000001410FA01C | 48:3BFB | CMP RDI,RBX |
00000001410FA01F | 75 EF | JNE stray-win64-shipping1.1410FA010 |
00000001410FA021 | 48:8B5C24 30 | MOV RBX,QWORD PTR SS:[RSP+30] |
00000001410FA026 | 48:83C4 20 | ADD RSP,20 |
00000001410FA02A | 5F | POP RDI |
00000001410FA02B | C3 | RET |
So you can call it like this, assuming your __this (rcx) is
BP_Drone_C:
Code: Select all
00000001410F9EF0 | 80B8 E1030000 00 | CMP BYTE PTR DS:[RAX+3E1],0 |
00000001410F9EF7 | 74 70 | JE stray-win64-shipping1.1410F9F69 |
00000001410F9EF9 | 33D2 | XOR EDX,EDX |
00000001410F9EFB | E8 6041FDFF | CALL stray-win64-shipping1.1410CE060 |
00000001410F9F00 | 48:8D05 518EBE02 | LEA RAX,QWORD PTR DS:[143CE2D58] | rax:EntryPoint, 0000000143CE2D58:L"Enable Torchlight"
If we call stray-win64-shipping1.1410CE060 = MyFunction, then: MyFunction( 0 ) = Enable; MyFunction( 1 ) = Disable. Or was it the other way around?
The normal light is called
WeakLight.