Function at 0x1004c700
Capabilities:
Get user security identifier
Manipulate user privileges

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10227145
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0xa0
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 + 8], 0
je 0x1004c769
mov eax, dword [ebp + 8]
mov dword [ebp - 0x68], eax
mov ecx, dword [ebp - 0x68]
add ecx, 2
mov dword [ebp - 0x74], ecx
mov edx, dword [ebp - 0x68]
mov ax, word [edx]
mov word [ebp - 0x70], ax
add dword [ebp - 0x68], 2
cmp word [ebp - 0x70], 0
jne 0x1004c747
mov ecx, dword [ebp - 0x68]
sub ecx, dword [ebp - 0x74]
sar ecx, 1
mov dword [ebp - 0x78], ecx
jne 0x1004c773
mov eax, 0xa0
jmp 0x1004ca03
mov dword [ebp - 0x60], 0x507
mov dword [ebp - 4], 0
xor edx, edx
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x4c], edx
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x5c], 0
lea eax, [ebp - 0x5c]
push eax
push 0x810
lea ecx, [ebp - 0x50]
push ecx
push 0
call dword [sym.imp.ADVAPI32.dll_LsaOpenPolicy]
mov dword [ebp - 0x6c], eax
cmp dword [ebp - 0x6c], 0
jne 0x1004c9d4
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x5c]
push eax
call fcn.1004ca20
add esp, 8
mov byte [ebp - 0x61], al
movzx ecx, byte [ebp - 0x61]
test ecx, ecx
jne 0x1004c9c1
mov dword [ebp - 0x20], 7
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
lea edx, [ebp - 0x20]
push edx
lea eax, [ebp - 0x1c]
push eax
push 0
lea ecx, [ebp - 0x18]
push ecx
push 0
mov edx, dword [ebp + 8]
push edx
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
cmp dword [ebp - 0x18], 0
jbe 0x1004c9b6
push 0xc
lea ecx, [ebp - 0x2c]
call fcn.1004c4a0
lea ecx, [ebp - 0x6d]
call sym.inst_sam.dll_protected:_void___thiscall_boost::serialization::singleton_class_boost::serialization::extended_type_info_typeid_class_CSamCfg__::constructor_void_
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x7c]
push ecx
mov edx, dword [ebp - 0x80]
push edx
lea ecx, [ebp - 0x2c]
call fcn.1004e440
mov dword [ebp - 0xa4], eax
mov byte [ebp - 4], 1
push 0xc
lea ecx, [ebp - 0x38]
call fcn.1004c4a0
lea ecx, [ebp - 0x6e]
call sym.inst_sam.dll_protected:_void___thiscall_boost::serialization::singleton_class_boost::serialization::extended_type_info_typeid_class_CSamCfg__::constructor_void_
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x88], eax
mov ecx, dword [ebp - 0x84]
push ecx
mov edx, dword [ebp - 0x88]
push edx
lea ecx, [ebp - 0x38]
call fcn.1004e540
mov dword [ebp - 0xa8], eax
mov byte [ebp - 4], 2
push 0
lea ecx, [ebp - 0x38]
call fcn.1004e480
mov dword [ebp - 0x8c], eax
push 0
lea ecx, [ebp - 0x2c]
call fcn.1004e3e0
mov dword [ebp - 0x90], eax
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x8c]
push edx
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x90]
push ecx
mov edx, dword [ebp + 8]
push edx
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
je 0x1004c993
push 0
lea ecx, [ebp - 0x2c]
call fcn.1004e3e0
mov dword [ebp - 0x94], eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x98], eax
push 0x102afdd0
mov ecx, dword [ebp - 0x94]
push ecx
mov edx, dword [ebp - 0x98]
push edx
call fcn.1004cc70
add esp, 0xc
mov byte [ebp - 0x62], al
movzx eax, byte [ebp - 0x62]
test eax, eax
jne 0x1004c980
push 0x102afdf8
lea ecx, [ebp - 0x58]
push ecx
call fcn.1004cd80
add esp, 8
push 0
lea ecx, [ebp - 0x2c]
call fcn.1004e3e0
mov dword [ebp - 0x9c], eax
mov edx, dword [ebp - 0x5c]
mov dword [ebp - 0xa0], edx
push 1
lea eax, [ebp - 0x58]
push eax
mov ecx, dword [ebp - 0x9c]
push ecx
mov edx, dword [ebp - 0xa0]
push edx
call dword [sym.imp.ADVAPI32.dll_LsaAddAccountRights]
mov dword [ebp - 0x6c], eax
cmp dword [ebp - 0x6c], 0
jne 0x1004c971
mov dword [ebp - 0x60], 0
jmp 0x1004c97e
mov eax, dword [ebp - 0x6c]
push eax
call dword [sym.imp.ADVAPI32.dll_LsaNtStatusToWinError]
mov dword [ebp - 0x60], eax
jmp 0x1004c987
mov dword [ebp - 0x60], 0
mov dword [ebp - 0xac], 0
jmp 0x1004c99c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x60], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x38]
call fcn.1004e4e0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c]
call fcn.10081f10
jmp 0x1004c9bf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x60], eax
jmp 0x1004c9c8
mov dword [ebp - 0x60], 0
mov ecx, dword [ebp - 0x5c]
push ecx
call dword [sym.imp.ADVAPI32.dll_LsaClose]
jmp 0x1004c9e1
mov edx, dword [ebp - 0x6c]
push edx
call dword [sym.imp.ADVAPI32.dll_LsaNtStatusToWinError]
mov dword [ebp - 0x60], eax
jmp 0x1004c9f0
mov dword [ebp - 4], 0xffffffff
jmp 0x1004ca00
mov eax, dword [ebp - 0x60]
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