Function at 0x48757c
Capabilities:
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffcc
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x48787e
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 9], 0
xor eax, eax
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 4]
mov edx, dword [edx]
call fcn.00406240
mov eax, dword [ebp - 4]
xor edx, edx
call fcn.004061ec
cmp dword [ebp - 0x28], 0
jne 0x4875d1
cmp dword [ebp - 8], 0
je 0x487860
xor eax, eax
mov dword [ebp - 0x24], eax
cmp dword [ebp - 8], 0
je 0x487705
mov dword [ebp - 0x10], pe_nt_image_headers32
mov eax, dword [ebp - 0x10]
call fcn.0040303c
mov dword [ebp - 0x24], eax
xor eax, eax
push ebp
push 0x4876de
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x24]
push eax
push 1
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_GetTokenInformation
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 9], al
cmp byte [ebp - 9], 0
jne 0x48765b
call sub.kernel32.dll_GetLastError
cmp eax, 0x7a
jne 0x48765b
lea eax, [ebp - 0x24]
mov edx, dword [ebp - 0x10]
call fcn.00403088
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x24]
push eax
push 1
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_GetTokenInformation
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 9], al
cmp byte [ebp - 9], 0
je 0x4876d4
xor eax, eax
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x24]
mov eax, dword [eax]
push eax
call sub.advapi32.dll_ConvertSidToStringSidW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 9], al
mov eax, dword [ebp - 0x24]
call fcn.00403070
xor eax, eax
mov dword [ebp - 0x24], eax
cmp byte [ebp - 9], 0
je 0x4876d4
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x2c]
call fcn.00406398
xor eax, eax
push ebp
push 0x4876bd
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_LocalFree
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4876c7
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x487860
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4876ec
cmp byte [ebp - 9], 0
jne 0x487705
cmp dword [ebp - 0x24], 0
je 0x487705
mov eax, dword [ebp - 0x24]
call fcn.00403070
xor eax, eax
mov dword [ebp - 0x24], eax
cmp byte [ebp - 9], 0
jne 0x48781d
xor eax, eax
push ebp
push 0x487816
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x18], eax
xor eax, eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
push 0
lea eax, [ebp - 0x10]
push eax
push 0
mov eax, dword [ebp - 0x28]
call fcn.00406278
push eax
push 0
call sub.advapi32.dll_LookupAccountNameW
cmp dword [ebp - 0x10], 0
jbe 0x4877f9
mov eax, dword [ebp - 0x10]
call fcn.0040303c
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x18]
inc edx
lea eax, [ebp - 0x14]
call fcn.00406568
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x48778e
mov eax, dword [ebp - 0x30]
sub eax, 0xa
cmp word [eax], 2
je 0x48778e
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 0x14]
call fcn.00405658
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x4877a5
mov eax, dword [ebp - 0x34]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x14]
call fcn.00406278
mov edx, dword [ebp - 0x34]
add edx, edx
xor ecx, ecx
call fcn.00403678
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x14]
call fcn.00406278
push eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x28]
call fcn.00406278
push eax
push 0
call sub.advapi32.dll_LookupAccountNameW
test eax, eax
jne 0x487802
mov eax, dword [ebp - 0x20]
call fcn.00403070
xor eax, eax
mov dword [ebp - 0x20], eax
mov byte [ebp - 9], 0
jmp 0x487802
mov byte [ebp - 9], 0
xor eax, eax
mov dword [ebp - 0x20], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x48781d
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
ret
cmp dword [ebp - 0x24], 0
je 0x487860
xor eax, eax
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x24]
push eax
call sub.advapi32.dll_ConvertSidToStringSidW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 9], al
cmp byte [ebp - 9], 0
je 0x487858
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x2c]
call fcn.00406398
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_LocalFree
mov eax, dword [ebp - 0x24]
call fcn.00403070
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x487885
lea eax, [ebp - 0x28]
call fcn.004061dc
lea eax, [ebp - 0x14]
call fcn.004061dc
ret