Function at 0x100591b
Capabilities:
Get user security identifier

Disassembly:
push 0x85c
mov eax, 0x1008488
call fcn.01007475
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x14]
mov dword [ebp - 0x844], eax
mov eax, dword [ebp + 0x10]
xor ebx, ebx
mov dword [ebp - 0x834], ecx
mov dword [ebp - 0x830], eax
mov dword [ebp - 0x840], edx
cmp ecx, ebx
je 0x1005c12
cmp word [ecx], bx
je 0x1005c12
cmp eax, ebx
je 0x1005c12
cmp edx, ebx
je 0x1005c12
push 8
mov dword [eax], ebx
pop ecx
push dword [ebp - 0x834]
xor eax, eax
lea edi, [ebp - 0x868]
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x828]
mov byte [ebp - 0x818], bl
mov byte [ebp - 0x817], bl
mov byte [ebp - 0x816], bl
mov byte [ebp - 0x815], bl
mov byte [ebp - 0x814], bl
mov byte [ebp - 0x813], 5
mov byte [ebp - 0x820], bl
mov byte [ebp - 0x81f], bl
mov byte [ebp - 0x81e], bl
mov byte [ebp - 0x81d], bl
mov byte [ebp - 0x81c], bl
mov byte [ebp - 0x81b], 1
xor esi, esi
mov dword [ebp - 0x824], ebx
mov byte [ebp - 0x82c], bl
mov dword [edx], 1
call fcn.01006d76
lea ecx, [ebp - 0x828]
mov dword [ebp - 4], ebx
call sub.MFC42u.dll_CString::MakeLower
push 0x1001d78
lea ecx, [ebp - 0x828]
call fcn.0100271c
test eax, eax
jne 0x1005a2d
push 0x20
lea esi, [ebp - 0x818]
mov byte [ebp - 0x82c], 2
pop eax
mov dword [ebp - 0x864], 0x220
jmp 0x1005a9c
push 0x1001d98
lea ecx, [ebp - 0x828]
call fcn.0100271c
test eax, eax
jne 0x1005a50
lea esi, [ebp - 0x820]
mov byte [ebp - 0x82c], 1
jmp 0x1005a9c
push 0x1001f2c
lea ecx, [ebp - 0x828]
call fcn.0100271c
test eax, eax
jne 0x1005a68
push 0x12
jmp 0x1005a7e
push 0x1001f14
lea ecx, [ebp - 0x828]
call fcn.0100271c
test eax, eax
jne 0x1005a8e
push 4
mov byte [ebp - 0x82c], 1
lea esi, [ebp - 0x818]
pop eax
jmp 0x1005a9c
mov eax, dword [ebp - 0x840]
mov dword [eax], ebx
mov eax, dword [ebp - 0x868]
mov ecx, dword [ebp - 0x840]
cmp dword [ecx], ebx
je 0x1005ae9
push dword [ebp - 0x830]
push dword [ebp - 0x84c]
push dword [ebp - 0x850]
push dword [ebp - 0x854]
push dword [ebp - 0x858]
push dword [ebp - 0x85c]
push dword [ebp - 0x860]
push dword [ebp - 0x864]
push eax
push dword [ebp - 0x82c]
push esi
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
jmp 0x1005ba0
mov esi, dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
lea eax, [ebp - 0x848]
push eax
lea eax, [ebp - 0x83c]
push eax
lea eax, [ebp - 0x810]
push eax
lea eax, [ebp - 0x838]
push eax
mov eax, dword [ebp - 0x830]
push dword [eax]
mov edi, 0x400
push dword [ebp - 0x834]
mov dword [ebp - 0x838], ebx
push dword [ebp - 0x844]
mov dword [ebp - 0x83c], edi
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x824], eax
cmp eax, 0x7a
jne 0x1005bb0
push dword [ebp - 0x838]
mov dword [ebp - 0x824], ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, dword [ebp - 0x830]
mov dword [ecx], eax
cmp eax, ebx
jne 0x1005b6f
mov dword [ebp - 0x824], 8
jmp 0x1005bba
lea ecx, [ebp - 0x848]
push ecx
lea ecx, [ebp - 0x83c]
push ecx
lea ecx, [ebp - 0x810]
push ecx
lea ecx, [ebp - 0x838]
push ecx
push eax
push dword [ebp - 0x834]
mov dword [ebp - 0x83c], edi
push dword [ebp - 0x844]
call esi
test eax, eax
jne 0x1005beb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x824], eax
mov esi, dword [ebp - 0x824]
cmp esi, ebx
je 0x1005beb
mov esi, dword [ebp - 0x830]
mov eax, dword [esi]
cmp eax, ebx
je 0x1005be1
mov ecx, dword [ebp - 0x840]
push eax
cmp dword [ecx], ebx
je 0x1005bd9
call dword [sym.imp.ADVAPI32.dll_FreeSid]
jmp 0x1005bdf
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [esi], ebx
mov esi, dword [ebp - 0x824]
cmp esi, ebx
jg 0x1005bf3
mov esi, dword [ebp - 0x824]
jmp 0x1005bff
and esi, 0xffff
or esi, 0x80070000
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x828]
call sub.MFC42u.dll_CString::CString
mov eax, esi
jmp 0x1005c17
mov eax, 0x80070057
call fcn.010074c9
ret 0x10