Function at 0x4d51e0
Capabilities:
Acquire debug privileges

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x87c
push ebx
xor ebx, ebx
push ebp
cmp eax, ebx
push esi
je 0x4d5520
cmp dword [esp + 0x890], ebx
je 0x4d5520
mov ebp, dword [esp + 0x894]
cmp ebp, ebx
je 0x4d5520
push 0x56f63c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, eax
push str.LoadLibraryA
push esi
call fcn.005195d0
add esp, 8
cmp eax, ebx
mov dword [esp + 0x10], eax
jne 0x4d524e
push str.LoadLibraryA
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
mov dword [esp + 0x10], eax
je 0x4d5520
push edi
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x41]
mov byte [esp + 0x40], bl
push 0xff
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x44]
push ebp
push eax
call fcn.0042f020
mov eax, dword [0x59a620]
add esp, 0xc
cmp eax, ebx
jne 0x4d52fc
xor ecx, ecx
lea edx, [esp + 0x10]
mov dword [esp + 0x28], ecx
mov esi, 1
mov dword [esp + 0x2c], ecx
push edx
push 0x28
mov dword [0x59a620], esi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x18], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4d52ed
lea eax, [esp + 0x28]
push eax
push str.SeDebugPrivilege
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x4d52ed
mov edx, dword [esp + 0x10]
push ebx
push ebx
lea ecx, [esp + 0x2c]
push ebx
push ecx
push ebx
push edx
mov dword [esp + 0x3c], esi
mov dword [esp + 0x48], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x4d52fc
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 0xb2
xor eax, eax
lea edi, [esp + 0x5c4]
mov dword [esp + 0x5c0], ebx
rep stosd dword es:[edi], eax
push 0x57dea8
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
call fcn.004d4d30
push 0x57de90
mov esi, eax
call fcn.004d4d30
mov ebp, eax
push 0x57dcd8
mov dword [esp + 0x48], ebp
call fcn.004d4d30
push 0x57dccc
mov edi, eax
call fcn.004d4d30
push 0x57de74
mov dword [esp + 0x24], eax
call fcn.004d4d30
push 0x57df48
mov dword [esp + 0x30], eax
call fcn.004d4d30
push 0x57df34
mov dword [esp + 0x50], eax
call fcn.004d4d30
add esp, 0x1c
cmp esi, ebx
mov dword [esp + 0x38], eax
je 0x4d5511
cmp ebp, ebx
je 0x4d5511
cmp edi, ebx
je 0x4d5511
cmp dword [esp + 0x10], ebx
je 0x4d5511
cmp dword [esp + 0x18], ebx
je 0x4d5511
mov ecx, dword [esp + 0x34]
cmp ecx, ebx
je 0x4d5511
cmp eax, ebx
je 0x4d5511
mov ebp, dword [esp + 0x894]
push ebp
call ecx
lea eax, [esp + 0x5c0]
mov dword [esp + 0x5c0], 0x10007
push eax
push ebp
call esi
test eax, eax
je 0x4d54f4
mov ecx, dword [esp + 0x890]
push 0x40
push 0x3000
push 0x480
push ebx
push ecx
call edi
mov ebp, eax
cmp ebp, ebx
je 0x4d54f4
mov eax, dword [esp + 0x678]
lea ecx, [esp + 0x40]
mov dl, 0x68
mov dword [esp + 0x141], eax
test ecx, ecx
mov byte [esp + 0x140], dl
mov byte [esp + 0x145], 0x9c
mov byte [esp + 0x146], 0x60
lea eax, [esp + 0x147]
je 0x4d5490
mov ecx, 0x40
lea esi, [esp + 0x40]
lea edi, [esp + 0x1c0]
lea eax, [ebp + 0xc]
rep movsd dword es:[edi], dword [esi]
mov byte [esp + 0x147], dl
lea edx, [ebp + 0x80]
cmp eax, ebx
mov dword [esp + 0x148], edx
jne 0x4d5471
lea eax, [esp + 0x14c]
mov ecx, dword [esp + 0x14]
mov byte [esp + 0x14c], pe_nt_image_headers32
sub ecx, eax
lea eax, [esp + 0x151]
sub ecx, 5
mov dword [esp + 0x14d], ecx
mov esi, dword [esp + 0x890]
mov byte [eax], 0x61
mov byte [eax + 1], 0x9d
mov byte [eax + 2], 0xc3
lea eax, [esp + 0x20]
lea ecx, [esp + 0x140]
push eax
push 0x480
push ecx
push ebp
push esi
mov dword [esp + 0x68c], ebp
call dword [esp + 0x24]
test eax, eax
je 0x4d54f4
push 0x480
push ebp
push esi
call dword [esp + 0x24]
test eax, eax
je 0x4d54f4
mov eax, dword [esp + 0x894]
lea edx, [esp + 0x5c0]
push edx
push eax
call dword [esp + 0x44]
test eax, eax
je 0x4d54f4
mov dword [esp + 0x1c], 1
mov ecx, dword [esp + 0x894]
push ecx
call dword [esp + 0x3c]
pop edi
pop esi
mov eax, dword [esp + 0x14]
pop ebp
pop ebx
add esp, 0x87c
ret 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x87c
ret 0xc
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x87c
ret 0xc