Function at 0x451060
Capabilities:
Acquire debug privileges
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4da8f0
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x52ad60]
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 edi, ecx
push 0x51875c
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x58], edi
call fcn.00403720
lea eax, [ebp - 0x48]
push eax
mov ecx, edi
mov dword [ebp - 4], 0
call fcn.004335c0
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x48]
add edx, 0xfffffff0
or ebx, 0xffffffff
lea ecx, [edx + 0xc]
mov eax, ebx
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x4510d2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [edi + 0xc], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0
mov eax, dword [0x52a6d0]
mov ecx, 0x52a6d0
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x30], eax
mov eax, str._tarted
mov byte [ebp - 4], 3
test eax, 0xffff0000
jne 0x451132
movzx esi, ax
mov ecx, esi
call fcn.00405570
test eax, eax
je 0x45113f
push esi
push eax
lea ecx, [ebp - 0x30]
call fcn.00404ab0
jmp 0x45113f
push str._tarted
lea ecx, [ebp - 0x30]
call fcn.00404510
push str.Ctor
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 4
call fcn.00403720
mov byte [ebp - 4], 5
mov eax, dword [0x52a6d0]
mov ecx, 0x52a6d0
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x30]
push eax
lea edx, [ebp - 0x38]
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 6
call fcn.00431540
add esp, 4
mov byte [ebp - 4], 7
mov ecx, dword [edi + 8]
test ecx, ecx
je 0x451198
push 0
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [edi + 4]
push eax
call fcn.004018e0
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0x34]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4511b8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [esi - 0x10]
mov byte [ebp - 4], 5
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4511d5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x3c]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4511f5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x451215
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [0x52fdac], 0
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x2c], 0
jne 0x451256
push str.Advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
je 0x451249
push str.OpenProcessToken
push eax
call esi
mov dword [0x52fdac], eax
jmp 0x45124e
mov eax, dword [0x52fdac]
test eax, eax
je 0x4515b1
lea eax, [ebp - 0x2c]
push eax
push 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [0x52fdac]
test eax, eax
je 0x4515b1
lea eax, [ebp - 0x18]
push eax
push str.SeDebugPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x4515b1
mov eax, dword [ebp - 0x18]
push 0
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x14]
push 0
push 0
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x28]
push eax
push 0
push dword [ebp - 0x2c]
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x1c], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x4513b0
push str.Succe__fully_ch_nged_token_privilege_
lea ecx, [ebp - 0x34]
call fcn.004037d0
push str.Ctor
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 8
call fcn.00403720
mov byte [ebp - 4], 9
mov eax, dword [0x52a6d0]
mov ecx, 0x52a6d0
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x34]
push eax
lea edx, [ebp - 0x3c]
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 0xa
call fcn.00431540
add esp, 4
mov byte [ebp - 4], 0xb
mov ecx, dword [edi + 8]
test ecx, ecx
je 0x451327
push 0
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [edi + 4]
push eax
call fcn.004018e0
mov byte [ebp - 4], 0xa
mov edx, dword [ebp - 0x38]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x451347
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 9
mov edx, dword [ebp - 0x3c]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x451367
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 8
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x451387
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x34]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4515b1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4515b1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4513c5
movzx esi, si
or esi, 0x80070000
push str.Error:
lea ecx, [ebp - 0x38]
call fcn.004037d0
push str.F_i1ed_to_change_token_privi1ege_
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0xc
call fcn.004037d0
push str.Ctor
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0xd
call fcn.00403720
mov edx, esi
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0xe
call fcn.004315e0
mov esi, eax
mov byte [ebp - 4], 0xf
mov edx, dword [0x52a6d0]
mov ecx, 0x52a6d0
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x30]
push eax
lea edx, [ebp - 0x34]
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 0x10
call fcn.00431540
push 0x52fb0c
mov edx, eax
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 0x11
call fcn.00431540
lea ecx, [ebp - 0x38]
push ecx
mov edx, eax
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 0x12
call fcn.00431540
push esi
mov edx, eax
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 0x13
call fcn.00431540
add esp, 0x10
mov esi, eax
mov byte [ebp - 4], 0x14
mov ecx, dword [edi]
push esi
call fcn.00403880
mov ecx, dword [edi + 8]
test ecx, ecx
je 0x45148b
push 2
push esi
lea eax, [ebp - 0x3c]
push eax
lea eax, [edi + 4]
push eax
call fcn.004018e0
mov byte [ebp - 4], 0x13
mov edx, dword [ebp - 0x4c]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4514ab
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x12
mov edx, dword [ebp - 0x50]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4514cb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x11
mov edx, dword [ebp - 0x54]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4514eb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x10
mov edx, dword [ebp - 0x44]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x45150b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xf
mov edx, dword [ebp - 0x34]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x45152b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xe
mov edx, dword [ebp - 0x40]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x45154b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xd
mov edx, dword [ebp - 0x3c]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x45156b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xc
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x45158b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x38]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4515ab
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.Kernel32
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [edi + 0x10], eax
test eax, eax
je 0x451720
mov eax, dword [0x52a6d0]
mov ecx, 0x52a6d0
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x30], eax
mov eax, str.Loaded_Kernel32
mov byte [ebp - 4], 0x15
test eax, 0xffff0000
jne 0x451613
movzx ecx, ax
call fcn.00405570
test eax, eax
je 0x451620
mov edx, str.Loaded_Kernel32
movzx ecx, dx
push ecx
push eax
lea ecx, [ebp - 0x30]
call fcn.00404ab0
jmp 0x451620
push str.Loaded_Kernel32
lea ecx, [ebp - 0x30]
call fcn.00404510
push str.Ctor
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 0x16
call fcn.00403720
mov byte [ebp - 4], 0x17
mov eax, dword [0x52a6d0]
mov ecx, 0x52a6d0
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x30]
push eax
lea edx, [ebp - 0x38]
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0x18
call fcn.00431540
add esp, 4
mov byte [ebp - 4], 0x19
mov ecx, dword [edi + 8]
test ecx, ecx
je 0x451679
push 0
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [edi + 4]
push eax
call fcn.004018e0
mov byte [ebp - 4], 0x18
mov edx, dword [ebp - 0x40]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x451699
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x17
mov edx, dword [ebp - 0x38]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4516b9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x16
mov edx, dword [ebp - 0x34]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4516d9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4516f9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x5186dc
push dword [edi + 0x10]
call esi
push 0x518818
push dword [edi + 0x10]
mov dword [edi + 0x14], eax
call esi
push 0x518828
push dword [edi + 0x10]
mov dword [edi + 0x18], eax
call esi
mov dword [edi + 0x1c], eax
cmp dword [edi + 0x14], 0
je 0x451736
cmp dword [edi + 0x18], 0
je 0x451736
cmp dword [edi + 0x1c], 0
jne 0x4518e1
mov eax, dword [0x52a6d0]
mov ecx, 0x52a6d0
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x30], eax
mov eax, str.Couldnt_find_ToolHelp_functions
mov byte [ebp - 4], 0x1a
test eax, 0xffff0000
jne 0x451779
movzx ecx, ax
call fcn.00405570
test eax, eax
je 0x451786
mov edx, str.Couldnt_find_ToolHelp_functions
movzx ecx, dx
push ecx
push eax
lea ecx, [ebp - 0x30]
call fcn.00404ab0
jmp 0x451786
push str.Couldnt_find_ToolHelp_functions
lea ecx, [ebp - 0x30]
call fcn.00404510
push str.Ctor
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 0x1b
call fcn.00403720
mov byte [ebp - 4], 0x1c
mov eax, dword [0x52a6d0]
mov ecx, 0x52a6d0
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x30]
push eax
lea edx, [ebp - 0x38]
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 0x1d
call fcn.00431540
add esp, 4
mov dword [ebp - 0x40], eax
mov byte [ebp - 4], 0x1e
mov ecx, dword [edi]
push eax
call fcn.00403880
mov ecx, dword [edi + 8]
test ecx, ecx
je 0x4517ec
push 2
push dword [ebp - 0x40]
lea eax, [ebp - 0x34]
push eax
lea eax, [edi + 4]
push eax
call fcn.004018e0
mov byte [ebp - 4], 0x1d
mov edx, dword [ebp - 0x44]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x45180c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x1c
mov edx, dword [ebp - 0x38]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x45182c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x1b
mov edx, dword [ebp - 0x34]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x45184c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x45186a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [edi + 0x10], 0
je 0x4518e1
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ecx, dword [0x52f408]
mov ebx, eax
mov eax, ecx
imul eax, ecx
imul eax, ecx
cdq
mov ecx, 9
idiv ecx
mov eax, dword [0x52fafc]
mov ecx, 0x807201bf
mov dword [edi + 0xc], ebx
cmp edx, 4
cmove eax, ecx
mov dword [0x52fafc], eax
test ebx, ebx
je 0x4518e1
push str.ZwQuerySystemInformation
push ebx
call esi
push 0x518884
push dword [edi + 0x10]
mov dword [edi + 0x20], eax
call esi
push 0x518894
push dword [edi + 0x10]
mov dword [edi + 0x24], eax
call esi
push 0x5188a0
push dword [edi + 0x10]
mov dword [edi + 0x28], eax
call esi
mov dword [edi + 0x2c], eax
mov eax, edi
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.004b3a11
mov esp, ebp
pop ebp
ret