Function at 0x1004ca20
Capabilities:
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1022717d
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x5c
mov eax, dword [0x102db080]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
cmp dword [ebp + 0xc], 0
je 0x1004ca86
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x38]
add ecx, 2
mov dword [ebp - 0x48], ecx
mov edx, dword [ebp - 0x38]
mov ax, word [edx]
mov word [ebp - 0x3c], ax
add dword [ebp - 0x38], 2
cmp word [ebp - 0x3c], 0
jne 0x1004ca64
mov ecx, dword [ebp - 0x38]
sub ecx, dword [ebp - 0x48]
sar ecx, 1
mov dword [ebp - 0x4c], ecx
jne 0x1004ca8d
xor al, al
jmp 0x1004cc52
mov byte [ebp - 0x31], 0
mov dword [ebp - 4], 0
xor edx, edx
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], edx
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x28]
push ecx
call fcn.1004cd80
add esp, 8
mov byte [ebp - 0x32], al
movzx edx, byte [ebp - 0x32]
test edx, edx
je 0x1004cc33
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x2c]
push ecx
lea edx, [ebp - 0x28]
push edx
push 1
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_LsaLookupNames]
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
jne 0x1004cc13
cmp dword [ebp - 0x2c], 0
je 0x1004cc13
mov ecx, dword [ebp - 0x2c]
cmp dword [ecx], 0
jbe 0x1004cc13
mov edx, 0xc
imul eax, edx, 0
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 4]
mov eax, dword [edx + eax + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jbe 0x1004cc13
lfence
push 0xc
lea ecx, [ebp - 0x20]
call fcn.1004c4a0
lea ecx, [ebp - 0x39]
call sym.inst_sam.dll_protected:_void___thiscall_boost::serialization::singleton_class_boost::serialization::extended_type_info_typeid_class_CSamCfg__::constructor_void_
push eax
mov ecx, dword [ebp - 0x40]
add ecx, 4
push ecx
lea ecx, [ebp - 0x20]
call fcn.1004e440
mov dword [ebp - 0x68], eax
mov byte [ebp - 4], 1
lfence
mov edx, 0xc
imul eax, edx, 0
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + 4]
mov eax, dword [edx + eax + 8]
mov dword [ebp - 0x54], eax
push 0
lea ecx, [ebp - 0x20]
call fcn.1004e3e0
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x54]
push ecx
mov edx, dword [ebp - 0x58]
push edx
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.ADVAPI32.dll_CopySid]
push 0
lea ecx, [ebp - 0x20]
call fcn.1004e3e0
push eax
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthorityCount]
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 0x44]
movzx edx, byte [ecx]
mov dword [ebp - 0x5c], edx
mov eax, dword [ebp - 0x44]
mov cl, byte [eax]
add cl, 1
mov edx, dword [ebp - 0x44]
mov byte [edx], cl
push 0
lea ecx, [ebp - 0x20]
call fcn.1004e3e0
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x5c]
push eax
mov ecx, dword [ebp - 0x60]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
mov dword [ebp - 0x64], eax
mov edx, dword [ebp - 0x64]
mov dword [edx], 0
push str.SeServiceLogonRight
push 0
lea ecx, [ebp - 0x20]
call fcn.1004e3e0
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.1004cc70
add esp, 0xc
mov byte [ebp - 0x33], al
mov cl, byte [ebp - 0x33]
mov byte [ebp - 0x31], cl
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x20]
call fcn.10081f10
cmp dword [ebp - 0x30], 0
je 0x1004cc23
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_LsaFreeMemory]
cmp dword [ebp - 0x2c], 0
je 0x1004cc33
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_LsaFreeMemory]
jmp 0x1004cc3f
mov dword [ebp - 4], 0xffffffff
jmp 0x1004cc4f
mov al, byte [ebp - 0x31]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.100b9f43
mov esp, ebp
pop ebp
ret