Function at 0x10031f33
Capabilities:
Get user security identifier

Disassembly:
push 0x20
mov eax, 0x100767fb
call fcn.100751fa
xor esi, esi
mov dword [ebp - 0x14], esi
xor ebx, ebx
inc ebx
mov dword [ebp - 4], ebx
mov eax, dword [ebp + 8]
cmp dword [eax - 0xc], esi
jne 0x10031f83
push str.Empty_user_name_specified.
push dword [0x100ea064]
mov ecx, 0x100ea05c
call sub.mfc90u.dll_CStringArray::SetAtGrow
lea ecx, [ebp + 8]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp + 0xc]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
xor eax, eax
call fcn.100752d2
ret 8
lea ecx, [ebp - 0x10]
call dword [0x10096f98]
mov byte [ebp - 4], 2
mov eax, dword [ebp + 0xc]
cmp dword [eax - 0xc], esi
je 0x10031fbe
lea eax, [ebp + 0xc]
push eax
lea edi, [ebp - 0x18]
call fcn.1003239d
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 3
call dword [0x10096f88]
mov ecx, edi
mov byte [ebp - 4], 2
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], esi
cmp dword [eax - 0xc], esi
jne 0x10031fde
push esi
lea ecx, [ebp - 0x24]
call dword [0x10096f84]
mov dword [ebp - 0x14], ebx
jmp 0x10031fe1
lea eax, [ebp - 0x10]
mov eax, dword [eax]
mov ebx, dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x1c]
push ecx
push esi
lea ecx, [ebp - 0x20]
push ecx
push esi
push dword [ebp + 8]
push eax
call ebx
test byte [ebp - 0x14], 1
mov edi, eax
je 0x10032012
and dword [ebp - 0x14], 0xfffffffe
lea ecx, [ebp - 0x24]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
cmp edi, esi
jne 0x10032183
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x10032057
push eax
call fcn.1003240c
mov edi, eax
cmp edi, esi
je 0x10032049
push edi
push dword [0x100ea064]
mov ecx, 0x100ea05c
call sub.mfc90u.dll_CStringArray::SetAtGrow
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea ecx, [ebp - 0x10]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
jmp 0x10031f67
push dword [ebp - 0x20]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 8
call esi
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call edi
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x1003208b
push str.Failed_to_allocate_memory_for_SID_buffer.
push dword [0x100ea064]
mov ecx, 0x100ea05c
call sub.mfc90u.dll_CStringArray::SetAtGrow
jmp 0x10032049
mov eax, dword [ebp - 0x1c]
add eax, eax
push eax
push 8
call esi
push eax
call edi
mov edi, eax
mov dword [ebp - 0x2c], edi
test edi, edi
jne 0x100320c5
push str.Failed_to_allocate_memory_for_domain_name_buffer.
push dword [0x100ea064]
mov ecx, 0x100ea05c
call sub.mfc90u.dll_CStringArray::SetAtGrow
push dword [ebp - 0x18]
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x10032049
mov eax, dword [ebp - 0x10]
cmp dword [eax - 0xc], 0
jne 0x100320df
push 0
lea ecx, [ebp - 0x24]
call dword [0x10096f84]
or dword [ebp - 0x14], 2
jmp 0x100320e2
lea eax, [ebp - 0x10]
mov eax, dword [eax]
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x1c]
push ecx
push edi
lea ecx, [ebp - 0x20]
push ecx
push dword [ebp - 0x18]
push dword [ebp + 8]
push eax
call ebx
test byte [ebp - 0x14], 2
mov ebx, eax
je 0x1003210b
lea ecx, [ebp - 0x24]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
test ebx, ebx
jne 0x10032177
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.1003240c
mov edi, eax
test edi, edi
je 0x10032139
push edi
push dword [0x100ea064]
mov ecx, 0x100ea05c
call sub.mfc90u.dll_CStringArray::SetAtGrow
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x18]
push 0
call esi
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call edi
push dword [ebp - 0x2c]
push 0
call esi
push eax
call edi
xor esi, esi
lea ecx, [ebp - 0x10]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp + 8]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [ebp + 0xc]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov eax, esi
jmp 0x10031f7b
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp - 0x18]
jmp 0x10032155