Function at 0x10020240
Capabilities:
Acquire debug privileges

Disassembly:
push 0xffffffffffffffff
push 0x101e1cd8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x38
push ebx
push ebp
push esi
xor ebx, ebx
push edi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [esp + 0x18]
push ecx
push 8
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x100205ef
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push 1
push str.SeDebugPrivilege
push 0xffffffffffffffff
mov esi, eax
call fcn.10124320
lea edx, [esp + 0x2c]
lea eax, [esp + 0x1c]
push edx
push eax
push 0x40
call fcn.1001ff70
add esp, 0x18
test eax, eax
je 0x100205ef
mov edx, dword [esp + 0x20]
cmp edx, 0x24
jb 0x100205ef
mov ebp, dword [esp + 0x10]
mov dword [esp + 0x1c], ebp
mov ecx, dword [ebp]
cmp ecx, ebx
jbe 0x100202ec
lea eax, [ecx*8]
sub eax, ecx
lea eax, [eax*4 + 0x24]
cmp eax, edx
ja 0x100205f3
xor edx, edx
cmp ecx, ebx
jbe 0x100205f3
lea eax, [ebp + 0x10]
cmp dword [eax - 4], esi
jne 0x10020306
mov edi, dword [esp + 0x18]
cmp dword [eax], edi
je 0x10020313
inc edx
add eax, 0x1c
cmp edx, ecx
jb 0x100202f9
jmp 0x100205f3
mov di, word [eax + 0xa]
xor eax, eax
cmp di, ax
mov dword [esp + 0x24], edi
je 0x100205f3
xor ecx, ecx
mov dword [esp + 0x34], 0x101fa98c
mov dword [esp + 0x38], ecx
mov dword [esp + 0x44], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], eax
mov edx, dword [esp + 0x10]
mov dword [esp + 0x50], eax
xor ebp, ebp
mov eax, dword [edx]
mov dword [esp + 0x14], ebp
test eax, eax
jbe 0x1002048c
mov ecx, dword [esp + 0x1c]
lea eax, [ebp*8]
sub eax, ebp
cmp word [ecx + eax*4 + 0x1a], di
lea esi, [ecx + eax*4 + 8]
jne 0x10020405
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x58]
push edx
mov edx, dword [esi + 8]
push eax
mov eax, dword [esi + 4]
push ecx
push edx
push eax
call fcn.10020110
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x10020405
cmp dword [esp + 0x60], 0x3000
jne 0x10020534
push ebx
call fcn.1001fe90
add esp, 4
cmp eax, 2
je 0x10020417
cmp eax, 1
jne 0x100203fc
mov edi, dword [esp + 0x3c]
mov ebp, dword [esi + 4]
mov esi, dword [esi + 8]
xor ecx, ecx
mov dword [esp + 0x2c], ecx
lea edx, [edi + 1]
mov dword [esp + 0x30], ecx
push 0xffffffffffffffff
push edx
lea ecx, [esp + 0x3c]
call fcn.10021ad0
mov ecx, dword [esp + 0x38]
lea eax, [edi + edi*2]
mov edi, dword [esp + 0x24]
lea edx, [ecx + eax*4]
mov dword [ecx + eax*4], ebp
mov ebp, dword [esp + 0x14]
mov dword [edx + 4], esi
mov dword [edx + 8], ebx
xor ebx, ebx
jmp 0x10020405
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
mov eax, dword [esp + 0x1c]
inc ebp
mov dword [esp + 0x14], ebp
cmp ebp, dword [eax]
jae 0x10020480
jmp 0x10020358
mov eax, dword [0x10282758]
test eax, eax
je 0x10020447
mov ecx, dword [esp + 0x5c]
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
push ecx
push edx
push eax
push ebx
push str.CAdminTokenMgr::GetTokenWithInfo_T_TokenElevationTypeFull___hReturnToken__08x___dwTargetProcessId___d____hTargetHandle__08x____dwSessionId__d_
push str.AdminToken
push 0xffffffffffffffff
push 0x10281ec4
call fcn.100de220
add esp, 0x20
mov eax, dword [esp + 0x3c]
xor ebp, ebp
test eax, eax
jle 0x1002046e
xor esi, esi
mov ecx, dword [esp + 0x38]
mov edx, dword [esi + ecx + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x3c]
inc ebp
add esi, 0xc
cmp ebp, eax
jl 0x10020453
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0x3c]
call fcn.10021ad0
jmp 0x10020534
test ebx, ebx
jne 0x10020534
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
xor ebp, ebp
test eax, eax
jle 0x10020534
xor esi, esi
xor eax, eax
lea edx, [esp + 0x14]
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esi + ecx + 8]
push edx
push eax
call fcn.1001fca0
mov edi, eax
mov eax, dword [0x10282758]
add esp, 0xc
test eax, eax
je 0x100204f6
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x14]
push ecx
mov ecx, dword [esi + eax + 8]
push edx
push edi
push ecx
push ebp
push str.CAdminTokenMgr::GetTokenWithInfo_arrReturnToken__i_d____08x___bInGroup__d____bOwner__d____bEnabled__d_
push str.AdminToken
push 0xffffffffffffffff
push 0x10281ec4
call fcn.100de220
add esp, 0x24
mov ecx, dword [esp + 0x38]
test edi, edi
je 0x10020516
mov eax, dword [esp + 0x14]
test eax, eax
je 0x10020516
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x10020528
test ebx, ebx
jne 0x10020516
mov ebx, dword [esi + ecx + 8]
mov eax, dword [esp + 0x3c]
inc ebp
add esi, 0xc
cmp ebp, eax
jl 0x1002049c
jmp 0x10020534
mov eax, dword [esp + 0x38]
lea edx, [ebp + ebp*2]
mov ebx, dword [eax + edx*4 + 8]
mov eax, dword [esp + 0x3c]
xor edi, edi
cmp eax, edi
mov dword [esp + 0x14], edi
jle 0x100205a9
mov ebp, dword [esp + 0x64]
mov dword [esp + 0x1c], edi
mov ecx, dword [esp + 0x38]
add edi, ecx
mov eax, dword [edi + 8]
cmp ebx, eax
je 0x1002058d
test ebp, ebp
je 0x10020586
mov esi, dword [ebp + 8]
push 0xffffffffffffffff
mov ecx, ebp
lea edx, [esi + 1]
push edx
call fcn.10021ad0
mov ecx, dword [ebp + 4]
lea eax, [esi + esi*2]
lea edx, [ecx + eax*4]
mov eax, dword [edi]
mov dword [edx], eax
mov ecx, dword [edi + 4]
mov dword [edx + 4], ecx
mov eax, dword [edi + 8]
mov dword [edx + 8], eax
jmp 0x1002058d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x3c]
inc eax
add edi, 0xc
cmp eax, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], edi
jl 0x1002054a
mov eax, dword [esp + 0x38]
test eax, eax
je 0x100205c0
push eax
call sub.MFC42u.DLL_operatordelete
add esp, 4
xor eax, eax
mov dword [esp + 0x38], eax
xor ecx, ecx
mov dword [esp + 0x34], 0x101fa98c
mov dword [esp + 0x40], ecx
mov dword [esp + 0x3c], ecx
cmp eax, ecx
mov dword [esp + 0x50], 1
je 0x100205e7
push eax
call sub.MFC42u.DLL_operatordelete
add esp, 4
mov dword [esp + 0x50], 0xffffffff
mov ebp, dword [esp + 0x10]
xor esi, esi
cmp ebp, esi
je 0x10020606
push ebp
call sub.MFC42u.DLL_operatordelete
add esp, 4
mov dword [esp + 0x10], esi
mov eax, dword [esp + 0x18]
cmp eax, esi
je 0x10020619
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x18], esi
cmp dword [0x10282758], esi
je 0x10020673
mov ecx, dword [esp + 0x58]
lea edx, [esp + 0x58]
push ecx
push edx
call fcn.10020690
add esp, 8
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x5c]
mov eax, dword [eax]
push ecx
push edx
push eax
push ebx
push str.CAdminTokenMgr::GetTokenWithInfo_hReturnToken___08x__SID__s___dwSessionId__d____dwIntegrityLevel__d_
push str.AdminToken
push 0xffffffffffffffff
push 0x10281ec4
mov dword [esp + 0x70], 2
call fcn.100de220
add esp, 0x20
lea ecx, [esp + 0x58]
mov dword [esp + 0x50], 0xffffffff
call fcn.10078300
mov ecx, dword [esp + 0x48]
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x44
ret