Function at 0x10012e26
Capabilities:
Get user security identifier
Link many functions at runtime

Disassembly:
mov eax, 0x100487b0
call fcn.100464e0
mov eax, 0x2290
call fcn.100467d0
push ebx
xor ebx, ebx
test byte [0x10060cc8], 1
push esi
push edi
mov dword [ebp - 0x34], ebx
jne 0x10012e71
mov al, byte [ebp + 0xb]
or byte [0x10060cc8], 1
push ebx
mov ecx, 0x10060cd0
mov byte [0x10060cd0], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push 0x100131e7
call fcn.100463d2
pop ecx
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x2c], ebx
mov byte [ebp - 0x68], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov al, byte [ebp + 0xb]
push 1
pop esi
lea ecx, [ebp - 0x58]
push ebx
mov dword [ebp - 4], esi
mov byte [ebp - 0x58], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
cmp dword [0x10060cd8], ebx
mov byte [ebp - 4], 2
jne 0x10013190
push str.Kernel32.dll
lea ecx, [ebp - 0x10]
call sub.MFC42u.DLL_CString::CString_2
lea eax, [ebp - 0x10]
push esi
push eax
mov byte [ebp - 4], 3
call fcn.10001217
pop ecx
mov dword [ebp - 0x28], eax
pop ecx
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x10]
call sub.MFC42u.DLL_CString::CString
cmp dword [ebp - 0x28], ebx
je 0x10013190
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.ProcessIdToSessionId
push dword [ebp - 0x28]
mov dword [ebp - 0x1c], eax
call edi
cmp eax, ebx
je 0x1001316e
lea ecx, [ebp - 0x24]
push ecx
push dword [ebp - 0x1c]
call eax
test eax, eax
je 0x1001316e
push str.Wtsapi32.dll
lea ecx, [ebp - 0x10]
call sub.MFC42u.DLL_CString::CString_2
lea eax, [ebp - 0x10]
push esi
push eax
mov byte [ebp - 4], 4
call fcn.10001217
pop ecx
mov dword [ebp - 0x14], eax
pop ecx
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x10]
call sub.MFC42u.DLL_CString::CString
cmp dword [ebp - 0x14], ebx
je 0x1001316e
push str.WTSQuerySessionInformationW
push dword [ebp - 0x14]
call edi
mov esi, eax
cmp esi, ebx
je 0x1001316e
push str.WTSFreeMemory
push dword [ebp - 0x14]
call edi
cmp eax, ebx
mov dword [ebp - 0x10], eax
je 0x1001316e
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x18]
push eax
push 5
push dword [ebp - 0x24]
push ebx
call esi
cmp eax, ebx
je 0x1001316e
mov eax, dword [ebp - 0x18]
cmp eax, ebx
je 0x1001316e
mov esi, dword [sym.imp.MSVCRT.dll_wcslen]
push eax
mov dword [ebp - 0x1c], eax
call esi
pop ecx
push eax
lea ecx, [ebp - 0x68]
push dword [ebp - 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
push dword [ebp - 0x18]
call dword [ebp - 0x10]
push str.WTSQuerySessionInformationW
mov dword [ebp - 0x18], ebx
push dword [ebp - 0x14]
call edi
cmp eax, ebx
je 0x1001316e
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x18]
push ecx
push 7
push dword [ebp - 0x24]
push ebx
call eax
cmp eax, ebx
je 0x1001316e
mov edi, dword [ebp - 0x18]
cmp edi, ebx
je 0x1001316e
push edi
call esi
pop ecx
push eax
push edi
lea ecx, [ebp - 0x58]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
push dword [ebp - 0x18]
call dword [ebp - 0x10]
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x48]
mov byte [ebp - 0x48], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
lea eax, [ebp - 0x58]
push 0x1005cd28
push eax
lea eax, [ebp - 0x8c]
push eax
mov byte [ebp - 4], 5
call sub.MSVCP60.dll_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____cdecl_std::operator_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_short_int_const__
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 6
push ecx
push eax
lea eax, [ebp - 0x7c]
push eax
call sub.MSVCP60.dll_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int_____cdecl_std::operator_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const__
add esp, 0x18
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
mov byte [ebp - 4], 7
push dword [ecx]
lea ecx, [ebp - 0x48]
push ebx
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], 6
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push 1
lea ecx, [ebp - 0x8c]
mov byte [ebp - 4], 5
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov ecx, 0x800
xor eax, eax
lea edi, [ebp - 0x229a]
mov word [ebp - 0x229c], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x82
xor eax, eax
lea edi, [ebp - 0x296]
mov word [ebp - 0x298], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x30], 0x1000
cmp eax, ebx
mov dword [ebp - 0x38], 0x105
jne 0x100130cb
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
lea ecx, [ebp - 0x6c]
push ecx
lea ecx, [ebp - 0x38]
push ecx
lea ecx, [ebp - 0x298]
push ecx
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x229c]
push ecx
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
cmp eax, ebx
je 0x1001315f
push str.Advapi32.dll
lea ecx, [ebp - 0x10]
call sub.MFC42u.DLL_CString::CString_2
lea eax, [ebp - 0x10]
push 1
push eax
mov byte [ebp - 4], 8
call fcn.10001217
pop ecx
mov dword [ebp - 0x20], eax
pop ecx
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x10]
call sub.MFC42u.DLL_CString::CString
cmp dword [ebp - 0x20], ebx
je 0x1001315f
push str.ConvertSidToStringSidW
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x1001315f
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [ebp - 0x229c]
push ecx
call eax
mov edi, dword [ebp - 0x1c]
push edi
call esi
pop ecx
push eax
push edi
mov ecx, 0x10060cd0
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 1
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 2
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push dword [ebp - 0x28]
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
call esi
cmp dword [ebp - 0x14], ebx
je 0x10013183
push dword [ebp - 0x14]
call esi
cmp dword [ebp - 0x20], ebx
je 0x1001318d
push dword [ebp - 0x20]
call esi
push 1
pop esi
mov edi, dword [ebp + 8]
mov al, byte [0x10060cd0]
push ebx
mov ecx, edi
mov byte [edi], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
mov ecx, edi
push dword [eax]
push ebx
push 0x10060cd0
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_int__unsigned_int_]
mov dword [ebp - 0x34], esi
push esi
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
push esi
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], bl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Tidy_bool_]
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret