Function at 0x12ffa170
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 0x12ffa522
cmp dword [esp + 0x890], ebx
je 0x12ffa522
mov ebp, dword [esp + 0x894]
cmp ebp, ebx
je 0x12ffa522
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, eax
push str.LoadLibraryA
push esi
call fcn.12f73ba0
add esp, 8
cmp eax, ebx
mov dword [esp + 0x10], eax
jne 0x12ffa1de
push str.LoadLibraryA
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
mov dword [esp + 0x10], eax
je 0x12ffa522
push edi
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x30d]
mov byte [esp + 0x30c], bl
push 0xff
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x310]
push ebp
push eax
call fcn.12f5c9d0
mov eax, dword [0x131ca6c8]
add esp, 0xc
cmp eax, ebx
jne 0x12ffa295
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 [0x131ca6c8], 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 0x12ffa286
lea eax, [esp + 0x28]
push eax
push str.SeDebugPrivilege
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x12ffa286
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 0x12ffa295
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 0xb2
xor eax, eax
lea edi, [esp + 0x44]
mov dword [esp + 0x40], ebx
rep stosd dword es:[edi], eax
push 0x13183a2c
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
call fcn.12ffa080
push 0x13183a14
mov esi, eax
call fcn.12ffa080
mov ebp, eax
push 0x13183848
mov dword [esp + 0x44], ebp
call fcn.12ffa080
push 0x1318383c
mov edi, eax
call fcn.12ffa080
push 0x131839f8
mov dword [esp + 0x24], eax
call fcn.12ffa080
push 0x13183acc
mov dword [esp + 0x30], eax
call fcn.12ffa080
push 0x13183ab8
mov dword [esp + 0x50], eax
call fcn.12ffa080
add esp, 0x1c
cmp esi, ebx
mov dword [esp + 0x3c], eax
je 0x12ffa513
cmp ebp, ebx
je 0x12ffa513
cmp edi, ebx
je 0x12ffa513
cmp dword [esp + 0x10], ebx
je 0x12ffa513
cmp dword [esp + 0x18], ebx
je 0x12ffa513
mov ecx, dword [esp + 0x34]
cmp ecx, ebx
je 0x12ffa513
cmp eax, ebx
je 0x12ffa513
mov ebp, dword [esp + 0x894]
push ebp
call ecx
lea eax, [esp + 0x40]
mov dword [esp + 0x40], 0x10007
push eax
push ebp
call esi
test eax, eax
je 0x12ffa4f6
mov ecx, dword [esp + 0x890]
push 0x40
push 0x3000
push 0x480
push ebx
push ecx
call edi
mov ebp, eax
cmp ebp, ebx
je 0x12ffa4f6
lea edx, [esp + 0x30c]
lea eax, [esp + 0x40c]
test edx, edx
je 0x12ffa3fd
mov ecx, 0x40
lea esi, [esp + 0x30c]
lea edi, [esp + 0x48c]
lea eax, [ebp + 0x80]
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x40d], eax
lea eax, [ebp + 5]
cmp eax, ebx
mov byte [esp + 0x40c], 0x68
jne 0x12ffa3de
lea eax, [esp + 0x411]
mov ecx, dword [esp + 0x14]
mov byte [esp + 0x411], 0xe8
sub ecx, eax
lea eax, [esp + 0x416]
sub ecx, 5
mov dword [esp + 0x412], ecx
mov ecx, dword [esp + 0xf0]
mov edx, dword [esp + 0xe4]
mov byte [eax], 0xb8
mov dword [eax + 1], ecx
add eax, 5
mov ecx, dword [esp + 0xec]
mov byte [eax], 0xbb
inc eax
mov dword [eax], edx
add eax, 4
mov edx, dword [esp + 0xe8]
mov byte [eax], 0xb9
inc eax
mov dword [eax], ecx
add eax, 4
mov ecx, dword [esp + 0xe0]
mov byte [eax], 0xba
inc eax
mov dword [eax], edx
add eax, 4
mov edx, dword [esp + 0xdc]
mov byte [eax], 0xbe
inc eax
mov dword [eax], ecx
add eax, 4
mov ecx, dword [esp + 0xf4]
mov byte [eax], 0xbf
inc eax
mov dword [eax], edx
add eax, 4
mov edx, dword [esp + 0x104]
mov byte [eax], 0xbd
inc eax
mov dword [eax], ecx
add eax, 4
mov byte [eax], 0xbc
inc eax
lea ecx, [eax + 4]
mov dword [eax], edx
mov eax, ecx
lea edx, [esp + 0x40c]
sub eax, edx
add eax, ebp
jne 0x12ffa48e
mov eax, ecx
mov edx, dword [esp + 0xf8]
mov esi, dword [esp + 0x890]
sub edx, eax
mov byte [ecx], 0xe9
sub edx, 5
lea eax, [esp + 0x20]
mov dword [ecx + 1], edx
push eax
lea ecx, [esp + 0x410]
push 0x480
push ecx
push ebp
push esi
mov dword [esp + 0x10c], ebp
call dword [esp + 0x24]
test eax, eax
je 0x12ffa4f6
push 0x480
push ebp
push esi
call dword [esp + 0x24]
test eax, eax
je 0x12ffa4f6
mov eax, dword [esp + 0x894]
lea edx, [esp + 0x40]
push edx
push eax
call dword [esp + 0x40]
test eax, eax
je 0x12ffa4f6
mov dword [esp + 0x1c], 1
mov ecx, dword [esp + 0x894]
push ecx
call dword [esp + 0x40]
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