Function at 0x40f410
Capabilities:
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x425ad0
mov eax, dword fs:[0]
push eax
sub esp, 0xec
mov eax, dword [0x444624]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0xec], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xd0], eax
mov dword [ebp - 0xe0], 0
mov dword [ebp - 0xd4], 0
call fcn.0040fb90
mov esi, eax
cmp esi, 0xffffffff
je 0x40f87c
mov ecx, dword [0x445f28]
mov dword [ebp - 4], 0
test ecx, ecx
jne 0x40f4a4
push str.WTSQuerySessionInformationW
push str.Wtsapi32.dll
call fcn.0040f9d0
add esp, 8
mov ecx, 0x445f28
xchg dword [ecx], eax
mov ecx, dword [0x445f28]
lea eax, [ebp - 0xe0]
push eax
lea eax, [ebp - 0xd4]
push eax
push 5
push esi
push 0
call ecx
mov dword [ebp - 4], 0xffffffff
test eax, eax
je 0x40f87c
mov esi, dword [ebp - 0xd4]
lea eax, [ebp - 0xe8]
mov dword [ebp - 0xe8], 0x40ffa0
mov dword [ebp - 0xf8], esi
mov dword [ebp - 0xf4], eax
mov byte [ebp - 0xf0], 1
push 0x14
mov dword [ebp - 4], 1
call fcn.004127fe
mov edi, eax
add esp, 4
mov dword [ebp - 0xe4], edi
test edi, edi
je 0x40f530
mov eax, dword [ebp - 0xe8]
mov dword [edi + 4], 1
mov dword [edi + 8], 1
mov dword [edi], vtable.._AV___Ref_count_resource_PA_WP6GXPAX__E_std__.0
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], esi
jmp 0x40f532
xor edi, edi
lea eax, [ebp - 0xe4]
mov dword [ebp - 4], 0xffffffff
push eax
lea eax, [ebp - 0xd8]
mov dword [ebp - 0xdc], 0
push eax
push 0
lea eax, [ebp - 0xdc]
mov dword [ebp - 0xd8], 0
push eax
push 0
push dword [ebp - 0xd4]
mov dword [ebp - 0xe4], 1
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x40f590
xor esi, esi
jmp 0x40f853
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
call ebx
mov ecx, dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp - 0xdc]
mov dword [ebp - 0x34], ecx
mov cl, byte [ebp - 0xc9]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], vtable.std::_Func_impl_no_alloc_class_std::_Binder_struct_std::_Unforced__int____stdcall___void___unsigned_long_int__void____void___int__struct_std::_Ph_1__const____int__void__.0
mov byte [ebp - 0x30], cl
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x14], eax
call ebx
lea ecx, [ebp - 0x38]
push ecx
push esi
push 8
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
lea ecx, [ebp - 0xc8]
call fcn.004012d0
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x40f5fa
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
lea eax, [ebp - 0x38]
cmp ecx, eax
setne al
push eax
call edx
call ebx
mov ecx, dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x38]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0xd8]
mov dword [ebp - 0x34], ecx
mov cl, byte [ebp - 0xc9]
mov dword [ebp - 0x38], vtable.std::_Func_impl_no_alloc_class_std::_Binder_struct_std::_Unforced__int____stdcall___void___unsigned_long_int__void____void___int__struct_std::_Ph_1__const____int__wchar_t__.0
mov byte [ebp - 0x30], cl
lea esi, [eax + eax]
mov dword [ebp - 0x2c], 0
call ebx
lea ecx, [ebp - 0x38]
push ecx
push esi
push 8
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
lea ecx, [ebp - 0x98]
call fcn.004012d0
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x40f661
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
lea eax, [ebp - 0x38]
cmp ecx, eax
setne al
push eax
call edx
mov eax, dword [ebp - 0xa0]
test eax, eax
je 0x40f7ac
mov ecx, dword [ebp - 0x70]
test ecx, ecx
je 0x40f7ac
lea edx, [ebp - 0xe4]
push edx
lea edx, [ebp - 0xd8]
push edx
push ecx
lea ecx, [ebp - 0xdc]
push ecx
push eax
push dword [ebp - 0xd4]
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
je 0x40f7ac
call ebx
mov ecx, dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 0x34], ecx
mov cl, byte [ebp - 0xc9]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x38]
push eax
mov byte [ebp - 0x30], cl
lea ecx, [ebp - 0x68]
push 0
mov dword [ebp - 0x38], vtable.std::_Func_impl_no_alloc_class_std::_Binder_struct_std::_Unforced__int____stdcall___void___unsigned_long_int__void____void___int__struct_std::_Ph_1__const____int__wchar_t__.0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x14], eax
call fcn.004012d0
lea ecx, [ebp - 0x38]
call fcn.00402630
cmp dword [ebp - 0xec], 0
je 0x40f73b
mov esi, dword [ebp - 0xe0]
call ebx
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
lea ecx, [ebp - 0x68]
call fcn.00408040
mov ecx, dword [ebp - 0x40]
test ecx, ecx
jne 0x40f714
xor esi, esi
jmp 0x40f764
push dword [ebp - 0xe0]
push dword [ebp - 0xd4]
push ecx
call fcn.00413b20
mov edx, dword [ebp - 0xec]
add esp, 0xc
mov eax, dword [ebp - 0x40]
xor ecx, ecx
mov dword [ebp - 0x40], ecx
mov dword [edx], eax
jmp 0x40f73e
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0xd0]
test edx, edx
je 0x40f754
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x70], 0
mov dword [edx], eax
mov esi, dword [ebp - 0xa0]
mov dword [ebp - 0xa0], 0
mov dword [ebp - 4], 4
test ecx, ecx
je 0x40f78c
mov dword [ebp - 0xd0], ecx
mov ecx, dword [ebp - 0x44]
test ecx, ecx
je 0x40f89a
mov eax, dword [ecx]
lea edx, [ebp - 0xd0]
push edx
call dword [eax + 8]
mov ecx, dword [ebp - 0x44]
test ecx, ecx
je 0x40f7ae
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
lea eax, [ebp - 0x68]
cmp ecx, eax
setne al
push eax
call edx
mov dword [ebp - 0x44], 0
jmp 0x40f7ae
xor esi, esi
mov ecx, dword [ebp - 0x70]
mov dword [ebp - 4], 5
test ecx, ecx
je 0x40f7d9
mov dword [ebp - 0xd0], ecx
mov ecx, dword [ebp - 0x74]
test ecx, ecx
je 0x40f89f
mov eax, dword [ecx]
lea edx, [ebp - 0xd0]
push edx
call dword [eax + 8]
mov ecx, dword [ebp - 0x74]
test ecx, ecx
je 0x40f7fa
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
lea eax, [ebp - 0x98]
cmp ecx, eax
setne al
push eax
call edx
mov dword [ebp - 0x74], 0
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 4], 6
test eax, eax
je 0x40f82b
mov ecx, dword [ebp - 0xa4]
mov dword [ebp - 0xd0], eax
test ecx, ecx
je 0x40f8a4
mov eax, dword [ecx]
lea edx, [ebp - 0xd0]
push edx
call dword [eax + 8]
mov ecx, dword [ebp - 0xa4]
test ecx, ecx
je 0x40f853
mov edx, dword [ecx]
lea eax, [ebp - 0xc8]
cmp ecx, eax
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
mov dword [ebp - 0xa4], 0
test edi, edi
je 0x40f878
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [edi + 4], eax
jne 0x40f878
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lock xadd dword [edi + 8], ebx
dec ebx
jne 0x40f878
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 4]
mov eax, esi
jmp 0x40f87e
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call int.0041284a
mov esp, ebp
pop ebp
ret
call fcn.00412550
call fcn.00412550
call fcn.00412550
int3