Function at 0x4034d0
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405456
mov eax, dword fs:[0]
push eax
sub esp, 0x24c
mov eax, dword [0x409008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [ebp + 8], 2
mov edx, dword [ebp + 0xc]
jge 0x40352c
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, str.invalid_args
push 0x403b40
call fcn.004038f0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov eax, 1
jmp 0x403728
mov edx, dword [edx + 4]
mov ecx, edx
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x224], 0xf
mov byte [ebp - 0x238], 0
lea esi, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403550
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x238]
call fcn.00401b20
lea eax, [ebp - 0x254]
mov dword [ebp - 4], 0
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x220]
mov dword [ebp - 0x220], 0
push eax
mov word [ebp - 0x21c], 0x500
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x4035d6
lea eax, [ebp - 0x258]
push eax
push dword [ebp - 0x254]
push 0
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
jne 0x403693
push dword [ebp - 0x254]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
mov dword [ebp - 0x240], 0
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x23c], 7
mov word [ebp - 0x250], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403610
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x250]
call fcn.004037b0
sub esp, 0x18
mov byte [ebp - 4], 1
lea eax, [ebp - 0x238]
mov ecx, esp
push eax
call fcn.00401a60
lea ecx, [ebp - 0x250]
call fcn.00402470
mov byte [ebp - 4], 0
add esp, 0x18
mov edx, dword [ebp - 0x23c]
mov esi, eax
cmp edx, 8
jb 0x4036c0
mov ecx, dword [ebp - 0x250]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4036b6
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4036b6
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
cmp dword [ebp - 0x258], 0
je 0x4035d6
lea ecx, [ebp - 0x238]
call fcn.00402bc0
test al, al
jne 0x4036e8
mov edx, str.registerSNSLinkageUrlScheme___failed
jmp 0x4036c9
push edx
push ecx
call fcn.004046b6
add esp, 8
test esi, esi
je 0x4036e8
mov edx, str.elevateAsAdmin___failed
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push 0x403b40
call fcn.004038f0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov esi, 1
jmp 0x4036ea
xor esi, esi
mov edx, dword [ebp - 0x224]
cmp edx, 0x10
jb 0x403726
mov ecx, dword [ebp - 0x238]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40371c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40371c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004046b6
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004042fa
mov esp, ebp
pop ebp
ret