Function at 0x408618
Capabilities:
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffbc
push ebx
push esi
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0040354c
xor eax, eax
push ebp
push 0x40883d
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, 0x400
call fcn.00402494
mov dword [ebp - 8], eax
mov eax, 0x400
call fcn.00402494
mov dword [ebp - 0x10], eax
mov eax, 0x400
call fcn.00402494
mov edi, eax
mov dword [ebp - 0x18], 0x400
lea eax, [ebp - 4]
mov ecx, dword [ebp - 4]
mov edx, 0x408854
call fcn.004033a8
xor eax, eax
mov dword [0x40c804], eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x10]
push eax
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 8]
push eax
push 0x408858
mov eax, dword [ebp - 4]
call fcn.0040355c
push eax
call sub.advapi32.dll_LookupAccountNameA
test eax, eax
je 0x408810
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_GetSidIdentifierAuthority
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_GetSidSubAuthorityCount
movzx eax, byte [eax]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
dec eax
test eax, eax
jl 0x4086f0
inc eax
mov dword [ebp - 0x24], eax
xor ebx, ebx
lea esi, [ebp - 0x44]
push ebx
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_GetSidSubAuthority
mov eax, dword [eax]
mov dword [esi], eax
inc ebx
add esi, 4
dec dword [ebp - 0x24]
jne 0x4086d9
xor ebx, ebx
mov dword [ebp - 0x18], 0x400
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x30]
push eax
lea eax, [ebx + 0x1f4]
push eax
mov eax, dword [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x3c]
push eax
mov eax, dword [ebp - 0x40]
push eax
mov eax, dword [ebp - 0x44]
push eax
mov al, byte [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.advapi32.dll_AllocateAndInitializeSid
test eax, eax
je 0x408780
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x10]
push eax
lea eax, [ebp - 0x18]
push eax
push edi
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
call fcn.0040355c
push eax
call sub.advapi32.dll_LookupAccountSidA
test eax, eax
jne 0x408763
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_FreeSid
jmp 0x408780
mov edx, dword [ebp - 0x14]
mov eax, edi
call fcn.004085dc
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_FreeSid
inc ebx
cmp ebx, 0xa
jne 0x4086f2
xor ebx, ebx
mov dword [ebp - 0x18], 0x400
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x30]
push eax
lea eax, [ebx + 0x3e8]
push eax
mov eax, dword [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x3c]
push eax
mov eax, dword [ebp - 0x40]
push eax
mov eax, dword [ebp - 0x44]
push eax
mov al, byte [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.advapi32.dll_AllocateAndInitializeSid
test eax, eax
je 0x408810
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x10]
push eax
lea eax, [ebp - 0x18]
push eax
push edi
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
call fcn.0040355c
push eax
call sub.advapi32.dll_LookupAccountSidA
test eax, eax
jne 0x4087f3
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_FreeSid
jmp 0x408810
mov edx, dword [ebp - 0x14]
mov eax, edi
call fcn.004085dc
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_FreeSid
inc ebx
cmp ebx, 0x64
jne 0x408782
mov eax, dword [ebp - 8]
call fcn.004024b4
mov eax, dword [ebp - 0x10]
call fcn.004024b4
mov eax, edi
call fcn.004024b4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x408844
lea eax, [ebp - 4]
call fcn.0040311c
ret