Function at 0x40838c
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.00403520
xor eax, eax
push ebp
push 0x4085b1
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, 0x4085c8
call fcn.0040337c
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 0x4085cc
mov eax, dword [ebp - 4]
call fcn.00403530
push eax
call sub.advapi32.dll_LookupAccountNameA
test eax, eax
je 0x408584
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 0x408464
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 0x40844d
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 0x4084f4
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.00403530
push eax
call sub.advapi32.dll_LookupAccountSidA
test eax, eax
jne 0x4084d7
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_FreeSid
jmp 0x4084f4
mov edx, dword [ebp - 0x14]
mov eax, edi
call fcn.00408350
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_FreeSid
inc ebx
cmp ebx, 0xa
jne 0x408466
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 0x408584
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.00403530
push eax
call sub.advapi32.dll_LookupAccountSidA
test eax, eax
jne 0x408567
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_FreeSid
jmp 0x408584
mov edx, dword [ebp - 0x14]
mov eax, edi
call fcn.00408350
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_FreeSid
inc ebx
cmp ebx, 0x64
jne 0x4084f6
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 0x4085b8
lea eax, [ebp - 4]
call fcn.0040311c
ret