Function at 0x10012f83
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
sub esp, 0x630
lea ebp, [esp - 4]
mov eax, dword [0x10274398]
xor eax, ebp
mov dword [ebp + 0x630], eax
push 0x24
mov eax, 0x101ece4c
call fcn.101d1901
mov eax, dword [ebp + 0x640]
push str.SeDebugPrivilege
mov dword [ebp - 0x28], eax
call fcn.1001295a
mov dword [esp], str.Kernel32.DLL
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov edi, eax
test edi, edi
je 0x10013076
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CreateToolhelp32Snapshot
push edi
call esi
push str.Module32FirstW
push edi
mov ebx, eax
call esi
push str.Module32NextW
push edi
mov dword [ebp - 0x14], eax
call esi
mov edi, eax
test edi, edi
je 0x10013076
cmp dword [ebp - 0x14], 0
je 0x10013076
test ebx, ebx
je 0x10013076
push dword [ebp + 0x63c]
push 8
call ebx
mov ebx, eax
cmp ebx, 0xffffffff
je 0x100131a9
lea eax, [ebp]
push eax
mov esi, 0x428
push ebx
mov dword [ebp], esi
call dword [ebp - 0x14]
jmp 0x10013063
lea eax, [ebp + 0x220]
push eax
call fcn.10012a87
pop ecx
push dword [ebp + 0x644]
lea eax, [ebp + 0x220]
push eax
push dword [ebp + 0x1c]
push dword [ebp + 0x63c]
call dword [ebp - 0x28]
test eax, eax
je 0x10013061
lea eax, [ebp]
push eax
push ebx
mov dword [ebp], esi
call edi
jmp 0x10013063
xor eax, eax
test eax, eax
jne 0x1001302b
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
jmp 0x100131ab
lea ecx, [ebp - 0x24]
call fcn.1000a196
xor edi, edi
push str.PSAPI.DLL
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], edi
call fcn.1000a1cf
lea ecx, [ebp - 0x24]
test eax, eax
je 0x100131a0
push str.EnumProcessModules
call fcn.1000a26f
push str.GetModuleFileNameExW
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x2c], eax
call fcn.1000a26f
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x2c], edi
je 0x1001319d
cmp eax, edi
je 0x1001319d
push dword [ebp + 0x63c]
push edi
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x14], eax
cmp eax, edi
je 0x1001319d
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [ebp - 0x10], 0x400
test edi, edi
je 0x1001310d
push edi
push 0
call esi
push eax
call ebx
mov eax, dword [ebp - 0x10]
add eax, eax
mov dword [ebp - 0x10], eax
push dword [ebp - 0x10]
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x10013194
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x10]
push edi
push dword [ebp - 0x14]
call dword [ebp - 0x2c]
test eax, eax
je 0x100131ce
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x10]
je 0x100130f9
shr dword [ebp - 0x18], 2
and dword [ebp - 0x10], 0
cmp dword [ebp - 0x18], 0
jbe 0x10013214
xor eax, eax
push 0x206
push eax
mov word [ebp + 0x428], ax
lea eax, [ebp + 0x42a]
push eax
call fcn.101d19d0
add esp, 0xc
push 0x104
lea eax, [ebp + 0x428]
push eax
mov eax, dword [ebp - 0x10]
push dword [edi + eax*4]
push dword [ebp - 0x14]
call dword [ebp - 0x30]
test eax, eax
jne 0x100131d8
mov word [ebp + 0x428], ax
jmp 0x100131e5
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x24]
or dword [ebp - 4], 0xffffffff
call fcn.1000a2e5
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x630]
xor ecx, ebp
call fcn.101d14d7
add ebp, 0x634
leave
ret
push edi
push 0
call esi
push eax
call ebx
jmp 0x10013194
lea eax, [ebp + 0x428]
push eax
call fcn.10012a87
pop ecx
push dword [ebp + 0x644]
lea eax, [ebp + 0x428]
push eax
mov eax, dword [ebp - 0x10]
push dword [edi + eax*4]
push dword [ebp + 0x63c]
call dword [ebp - 0x28]
test eax, eax
je 0x10013214
inc dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x18]
jb 0x10013151
push edi
push 0
call esi
push eax
call ebx
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.1000a2e5
jmp 0x1001306e