Function at 0x100396c0
Capabilities:
Get session user name

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x378
mov eax, dword [0x101a49d4]
xor eax, esp
mov dword [esp + 0x374], eax
push esi
push edi
lea eax, [esp + 0x14]
mov dword [esp + 0x18], 0
push eax
lea eax, [esp + 0x174]
mov dword [esp + 0x18], 0x101
mov edi, ecx
push eax
mov dword [esp + 0x28], edi
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
mov dword [esp + 0x50], 0
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 7
test eax, eax
je 0x1003974a
lea ecx, [esp + 0x170]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10039730
sub ecx, edx
lea eax, [esp + 0x170]
sar ecx, 1
push ecx
push eax
jmp 0x10039762
xor ecx, ecx
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10039750
sub ecx, edx
sar ecx, 1
push ecx
push 0
lea ecx, [esp + 0x58]
call fcn.10051fd0
lea ecx, [esp + 0x50]
push ecx
lea eax, [esp + 0x6c]
push eax
push ecx
lea ecx, [esp + 0x30]
call fcn.100518d0
lea ecx, [esp + 0x50]
call fcn.10024ce0
push 0
push 0
lea eax, [esp + 0x24]
mov dword [esp + 0x1c], 0
push eax
push 0
push 0
push 4
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
test eax, eax
jne 0x100398d7
mov esi, dword [esp + 0x24]
cmp esi, dword [esp + 0x28]
je 0x10039897
lea edi, [esp + 0x90]
push 0x20
lea eax, [esp + 0x54]
push 0
push eax
call fcn.1011ce00
add esp, 0xc
mov dword [esp + 0x50], 0x10000000
cmp dword [esi + 0x14], 8
mov eax, esi
mov dword [esp + 0x54], 3
mov dword [esp + 0x58], 3
mov dword [esp + 0x64], 1
mov dword [esp + 0x68], 2
jb 0x10039808
mov eax, dword [esi]
movups xmm0, xmmword [esp + 0x50]
mov dword [esp + 0x6c], eax
lea eax, [esp + 0x30]
push 0x20
movups xmmword [edi - 0x20], xmm0
push 0
movups xmm0, xmmword [esp + 0x68]
push eax
movups xmmword [edi - 0x10], xmm0
call fcn.1011ce00
add esp, 0xc
mov dword [esp + 0x30], 0
cmp dword [esi + 0x14], 8
mov eax, esi
mov dword [esp + 0x34], 2
mov dword [esp + 0x38], 3
mov dword [esp + 0x44], 1
mov dword [esp + 0x48], 2
jb 0x10039861
mov eax, dword [esi]
movups xmm0, xmmword [esp + 0x30]
mov dword [esp + 0x4c], eax
add esi, 0x18
mov eax, dword [esp + 0x14]
movups xmmword [edi], xmm0
add eax, 2
movups xmm0, xmmword [esp + 0x40]
mov dword [esp + 0x14], eax
movups xmmword [edi + 0x10], xmm0
add edi, 0x40
cmp esi, dword [esp + 0x28]
jne 0x100397c5
mov edi, dword [esp + 0x20]
jmp 0x10039899
xor eax, eax
lea ecx, [esp + 0x18]
push ecx
push dword [esp + 0x20]
lea ecx, [esp + 0x78]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
test eax, eax
jne 0x100398c4
push eax
push dword [esp + 0x1c]
push eax
push eax
push 4
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x100398d3
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor esi, esi
jmp 0x10039920
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x100398e6
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, dword [0x101aba00]
sub esp, 0x18
mov ecx, esp
push 0x34
push str.48965456456456465654errorFailed_to_set_permissions.
mov dword [ecx], 0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0xf
call fcn.10056190
mov ecx, esi
call fcn.10023aa0
add esp, 0x18
mov esi, 1
lea ecx, [esp + 0x24]
call fcn.10055820
mov ecx, dword [esp + 0x37c]
mov eax, esi
pop edi
pop esi
xor ecx, esp
call fcn.1011a2e1
mov esp, ebp
pop ebp
ret