Function at 0x401730
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x528bbd
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x8611f4]
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 esi, ecx
push str.OpenProcessToken
lea ecx, [ebp - 0x58]
call fcn.00406030
push 0x758ae0
lea ecx, [ebp - 0x3c]
mov dword [ebp - 4], 0
call fcn.00406030
mov dword [ebp - 4], 2
lea eax, [ebp - 0x3c]
cmp dword [ebp - 0x28], 0x10
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmovae eax, dword [ebp - 0x3c]
push eax
call edi
cmp dword [ebp - 0x44], 0x10
lea ecx, [ebp - 0x58]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmovae ecx, dword [ebp - 0x58]
push ecx
push eax
call ebx
lea ecx, [ebp - 0x40]
push ecx
push 0x28
push esi
call eax
mov byte [ebp - 4], 1
mov esi, eax
mov ecx, dword [ebp - 0x28]
cmp ecx, 0x10
jb 0x4017ed
mov edx, dword [ebp - 0x3c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4017e3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40182c
push ecx
push edx
call fcn.005277e2
add esp, 8
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0xf
mov byte [ebp - 0x3c], 0
cmp ecx, 0x10
jb 0x40183c
mov edx, dword [ebp - 0x58]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401832
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401832
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.005277e2
add esp, 8
test esi, esi
je 0x401ab6
push str.LookupPrivilegeValueA
lea ecx, [ebp - 0x58]
call fcn.00406030
push 0x758ae0
lea ecx, [ebp - 0x3c]
mov dword [ebp - 4], 3
call fcn.00406030
mov dword [ebp - 4], 5
lea eax, [ebp - 0x3c]
cmp dword [ebp - 0x28], 0x10
cmovae eax, dword [ebp - 0x3c]
push eax
call edi
cmp dword [ebp - 0x44], 0x10
lea ecx, [ebp - 0x58]
cmovae ecx, dword [ebp - 0x58]
push ecx
push eax
call ebx
lea ecx, [ebp - 0x1c]
push ecx
push str.SeDebugPrivilege
push 0
call eax
mov byte [ebp - 4], 4
mov esi, eax
mov ecx, dword [ebp - 0x28]
cmp ecx, 0x10
jb 0x4018cc
mov edx, dword [ebp - 0x3c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4018c2
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40190b
push ecx
push edx
call fcn.005277e2
add esp, 8
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0xf
mov byte [ebp - 0x3c], 0
cmp ecx, 0x10
jb 0x40191b
mov edx, dword [ebp - 0x58]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401911
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401911
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.005277e2
add esp, 8
test esi, esi
jne 0x401933
push 0xc
call fcn.00527813
add esp, 4
push str.Failed__error_code_22
jmp 0x401ac5
push 0
push 0
push 0x10
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 1
push eax
push 0
push dword [ebp - 0x40]
mov dword [ebp - 0x14], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x40196e
push 0xc
call fcn.00527813
add esp, 4
push str.Failed__error_code_23
jmp 0x401ac5
mov esi, dword [ebp - 0x40]
lea ecx, [ebp - 0x58]
push 0x758b64
call fcn.00406030
push 0x758ae0
lea ecx, [ebp - 0x3c]
mov dword [ebp - 4], 6
call fcn.00406030
mov dword [ebp - 4], 8
lea eax, [ebp - 0x3c]
cmp dword [ebp - 0x28], 0x10
cmovae eax, dword [ebp - 0x3c]
push eax
call edi
cmp dword [ebp - 0x44], 0x10
lea ecx, [ebp - 0x58]
cmovae ecx, dword [ebp - 0x58]
push ecx
push eax
call ebx
push 0
push 0
push 0x10
lea ecx, [ebp - 0x20]
push ecx
push 0
push esi
call eax
mov byte [ebp - 4], 7
mov esi, eax
mov ecx, dword [ebp - 0x28]
cmp ecx, 0x10
jb 0x4019fb
mov edx, dword [ebp - 0x3c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4019f1
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401a3a
push ecx
push edx
call fcn.005277e2
add esp, 8
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0xf
mov byte [ebp - 0x3c], 0
cmp ecx, 0x10
jb 0x401a4a
mov edx, dword [ebp - 0x58]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401a40
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401a40
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.005277e2
add esp, 8
test esi, esi
jne 0x401a5f
push 0xc
call fcn.00527813
add esp, 4
push str.Failed__error_code_22
jmp 0x401ac5
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x514
jne 0x401a98
push 0xc
call fcn.00527813
add esp, 4
mov ecx, eax
push str.Failed__error_code_24
call fcn.00401250
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x5c]
push 0x759618
jmp 0x401ad7
mov al, 1
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 fcn.005277d4
mov esp, ebp
pop ebp
ret
push 0xc
call fcn.00527813
add esp, 4
push str.Failed__error_code_21
mov ecx, eax
call fcn.00401250
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push 0x759618
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3