[Sony Xperia 1 Questions & Answers] munjeni:
This tells everything:

From i d a can't see 1046b but see the same function at the bottom (ghidra output)

void sub_4DDE4()
{
int v0; // w0
__int64 v1; // x3
__int64 v2; // x4
__int64 v3; // x5
__int64 v4; // x6
__int64 v5; // x7
__int64 v6; // x0
__int64 v7; // x1
const char *v8; // x0
__int64 v9; // x2
__int64 v10; // x0
char v11; // zf
int v12; // w0
__int64 v13; // x0
__int64 v14; // x0
unsigned int v15; // w1
__int64 v16; // x2
__int64 v17; // x3
_DWORD *v18; // x4
__int64 v19; // x5
__int64 v20; // x6
__int64 v21; // x7
signed int v22; // [xsp+4h] [xbp-2Ch]

sub_440B4();
if ( v0 )
{
sub_4DF70();
v7 = v6;
v8 = "[ERROR @ %s:%d]:\nFailed to get size of TA_DK_NUMBER_UNIT\n";
v9 = 303i64;
}
else
{
if ( v22 < 1 )
goto LABEL_4;
sub_44318();
if ( !v12 )
goto LABEL_4;
sub_4DF70();
v7 = v13;
v8 = "[ERROR @ %s:%d]:\nFailed to delete DK\n";
v9 = 310i64;
}
sub_589A0(v8, v7, v9, v1, v2, v3, v4, v5);
LABEL_4:
sub_4DF5C();
if ( !v11 )
{
sub_14468(v10);
sub_4DE94(v14, v15, v16, v17, v18, v19, v20, v21);
}
}

sub_4110C();
[B][COLOR="Red"]sub_4DDE4();[/COLOR][/B]
if ( v0 )
{
sub_41100();
sub_589A0("[ERROR @ %s:%d]:\nUnable to delete dk\n", v1, 1438i64, v2, v3, v4, v5, v6);
goto LABEL_10;
}
sub_3ED48();
if ( !v7 )
{
sub_41100();
sub_589A0("[ERROR @ %s:%d]:\nFailed to delete user sensitive partitions\n", v18, 1443i64, v19, v20, v21, v22, v23);
goto LABEL_10;
}
sub_3EE20();
if ( v8 )
{
sub_41100();
v15 = v14;
v16 = "[ERROR @ %s:%d]:\nFailed to reset rollback counters, error:%d\n";
v17 = 1451i64;
}
else
{
sub_3EDF0();
if ( !v24 )
goto LABEL_10;
sub_41100();
v15 = v25;
v16 = "[ERROR @ %s:%d]:\n[B][COLOR="Red"]Failed to lock the bootloader: [/COLOR][/B]%d\n";
v17 = 1457i64;
}

ghidra

ulonglong FUN_0005dde4(void)

{
bool in_ZR;
undefined uVar1;
ulonglong uVar2;
undefined8 extraout_x0;
undefined8 local_28;
undefined8 extraout_x0_00;
undefined8 uVar3;
undefined *puVar4;
undefined uVar5;
undefined8 in_x3;
undefined7 uVar6;
undefined uVar7;
undefined8 in_x4;
undefined7 uVar8;
undefined uVar9;
undefined8 in_x5;
undefined7 uVar10;
undefined uVar11;
undefined8 in_x6;
undefined7 uVar12;
undefined uVar13;
undefined8 in_x7;
undefined7 uVar14;
ulonglong uVar15;
undefined in_stack_ffffffffffffffd0;
undefined uVar16;
int local_2c;

uVar14 = (undefined7)((ulonglong)in_x7 >> 8);
uVar13 = (undefined)in_x7;
uVar12 = (undefined7)((ulonglong)in_x6 >> 8);
uVar11 = (undefined)in_x6;
uVar10 = (undefined7)((ulonglong)in_x5 >> 8);
uVar9 = (undefined)in_x5;
uVar8 = (undefined7)((ulonglong)in_x4 >> 8);
uVar7 = (undefined)in_x4;
uVar6 = (undefined7)((ulonglong)in_x3 >> 8);
uVar5 = (undefined)in_x3;
puVar4 = &stack0xffffffffffffffd4;
uVar3 = 0x1046b;
local_28 = DAT_000a90c0;
uVar2 = FUN_000540b4(2);
uVar16 = (undefined)local_2c;
uVar1 = (undefined)uVar2;
if ((int)uVar2 == 0) {
in_ZR = local_2c == 1;
if (local_2c < 1) {
uVar15 = 0;
goto LAB_0005de34;
}
[COLOR="Blue"][B] uVar3 = 0x1046b; // drm key unit[/B][/COLOR]
[COLOR="Red"] uVar2 = FUN_00054318(2); // partition 2
uVar1 = (undefined)uVar2;
uVar15 = uVar2 & 0xffffffff;
if ((int)uVar2 == 0) goto LAB_0005de34;
FUN_0005df70(uVar2,uVar3,puVar4,CONCAT71(uVar6,uVar5),CONCAT71(uVar8,uVar7),
CONCAT71(uVar10,uVar9),CONCAT71(uVar12,uVar11),CONCAT71(uVar14,uVar13));
_uVar1 = "[ERROR @ %s:%d]:\nFailed to delete DK\n";[/COLOR]
puVar4 = (undefined *)0x136;
uVar3 = extraout_x0_00;
}
else {
uVar15 = uVar2 & 0xffffffff;
FUN_0005df70(uVar2,uVar3,puVar4,CONCAT71(uVar6,uVar5),CONCAT71(uVar8,uVar7),
CONCAT71(uVar10,uVar9),CONCAT71(uVar12,uVar11),CONCAT71(uVar14,uVar13));
_uVar1 = "[ERROR @ %s:%d]:\nFailed to get size of TA_DK_NUMBER_UNIT\n";
puVar4 = (undefined *)0x12f;
uVar3 = extraout_x0;
}
uVar1 = FUN_000689a0(_uVar1,uVar3,puVar4,CONCAT71(uVar6,uVar5),CONCAT71(uVar8,uVar7),
CONCAT71(uVar10,uVar9),CONCAT71(uVar12,uVar11),CONCAT71(uVar14,uVar13));
LAB_0005de34:
local_28 = FUN_0005df5c(uVar1,(char)uVar3,(char)puVar4,uVar5,uVar7,uVar9,uVar11,uVar13,
in_stack_ffffffffffffffd0,uVar16,local_28);
if (in_ZR) {
return uVar15;
}
// WARNING: Subroutine does not return
FUN_00024468(local_28,uVar3,puVar4,CONCAT71(uVar6,uVar5),CONCAT71(uVar8,uVar7),
CONCAT71(uVar10,uVar9),CONCAT71(uVar12,uVar11),CONCAT71(uVar14,uVar13));
}

Its very evidently that function sub_4DDE4 is called at the start of lock function, I can tell that drm key is bye bye after you unlock phone, curently I'm unable to figure out what is done with oem lock command & why widevine keys is back but definitelly drm key is lost forever, indication for that is message inside service menu "is even unlocked = yes" !

So how lock is done, in short:

1. drm key bye bye

2. user sensitive partitions deleted (thats why device no more boot & must use sony pc companion in order to repair)

3. rollback counter reset

4. bootloader locked