Function at 0x10012ba4
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
sub esp, 0x85c
lea ebp, [esp - 4]
mov eax, dword [0x10274398]
xor eax, ebp
mov dword [ebp + 0x85c], eax
push 0x2c
mov eax, 0x101ece1c
call fcn.101d1901
mov eax, dword [ebp + 0x868]
push str.SeDebugPrivilege
mov dword [ebp - 0x2c], eax
call fcn.1001295a
mov dword [esp], str.Kernel32.DLL
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov edi, eax
test edi, edi
je 0x10012da4
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CreateToolhelp32Snapshot
push edi
call esi
push str.Process32FirstW
push edi
mov dword [ebp - 0x10], eax
call esi
push str.Process32NextW
push edi
mov ebx, eax
call esi
push str.Module32FirstW
push edi
mov dword [ebp - 0x1c], eax
call esi
cmp dword [ebp - 0x1c], 0
mov dword [ebp - 0x28], eax
je 0x10012da4
test ebx, ebx
je 0x10012da4
cmp dword [ebp - 0x10], 0
je 0x10012da4
test eax, eax
je 0x10012da4
push 0
push 2
call dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
je 0x10012f00
lea ecx, [ebp + 0x428]
push ecx
push eax
mov dword [ebp + 0x428], 0x22c
call ebx
jmp 0x10012d89
push dword [ebp + 0x430]
xor ebx, ebx
push 8
call dword [ebp - 0x10]
mov dword [ebp - 0x24], eax
cmp eax, 0xffffffff
je 0x10012d37
lea ecx, [ebp]
push ecx
push eax
mov dword [ebp], 0x428
call dword [ebp - 0x28]
test eax, eax
je 0x10012d2a
cmp word [ebp + 0x220], bx
je 0x10012d2a
lea eax, [ebp + 0x220]
push closesocket
push eax
call fcn.1001661b
mov esi, eax
lea eax, [ebp + 0x44c]
push closesocket
push eax
call fcn.1001661b
add esp, 0x10
cmp esi, eax
jl 0x10012d2a
sub esi, eax
lea eax, [ebp + esi*2 + 0x220]
push eax
lea eax, [ebp + 0x44c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x10012d2a
lea eax, [ebp + 0x220]
push eax
inc ebx
call fcn.10012a87
pop ecx
push dword [ebp + 0x86c]
lea eax, [ebp + 0x220]
push eax
push dword [ebp + 0x444]
push dword [ebp + 0x440]
push dword [ebp + 0x43c]
push dword [ebp + 0x430]
call dword [ebp - 0x2c]
mov edi, eax
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jne 0x10012d6e
lea eax, [ebp + 0x44c]
push eax
call fcn.10012a87
pop ecx
push dword [ebp + 0x86c]
lea eax, [ebp + 0x44c]
push eax
push dword [ebp + 0x444]
push dword [ebp + 0x440]
push dword [ebp + 0x43c]
push dword [ebp + 0x430]
call dword [ebp - 0x2c]
mov edi, eax
test edi, edi
je 0x10012d93
lea eax, [ebp + 0x428]
push eax
push dword [ebp - 0x14]
mov dword [ebp + 0x428], 0x22c
call dword [ebp - 0x1c]
mov edi, eax
test edi, edi
jne 0x10012c73
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
jmp 0x10012f02
lea ecx, [ebp - 0x38]
call fcn.1000a196
xor edi, edi
push str.PSAPI.DLL
lea ecx, [ebp - 0x38]
mov dword [ebp - 4], edi
call fcn.1000a1cf
lea ecx, [ebp - 0x38]
test eax, eax
je 0x10012ef7
push str.EnumProcesses
call fcn.1000a26f
push str.EnumProcessModules
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x14], eax
call fcn.1000a26f
push str.GetModuleFileNameExW
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x1c], eax
call fcn.1000a26f
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x14], edi
je 0x10012ef4
cmp dword [ebp - 0x1c], edi
je 0x10012ef4
cmp eax, edi
je 0x10012ef4
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [ebp - 0x18], 0x400
test edi, edi
je 0x10012e37
push edi
push 0
call esi
push eax
call ebx
mov eax, dword [ebp - 0x18]
add eax, eax
mov dword [ebp - 0x18], eax
push dword [ebp - 0x18]
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x10012ef4
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x18]
push edi
call dword [ebp - 0x14]
test eax, eax
je 0x10012eec
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x18]
je 0x10012e23
shr dword [ebp - 0x20], 2
and dword [ebp - 0x10], 0
cmp dword [ebp - 0x20], 0
jbe 0x10012f6a
xor eax, eax
push 0x206
push eax
mov word [ebp + 0x654], ax
lea eax, [ebp + 0x656]
push eax
call fcn.101d19d0
mov eax, dword [ebp - 0x10]
add esp, 0xc
push dword [edi + eax*4]
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x10012f3b
lea ecx, [ebp - 0x18]
push ecx
push 4
lea ecx, [ebp - 0x24]
push ecx
push eax
call dword [ebp - 0x1c]
test eax, eax
je 0x10012f32
push 0x104
lea eax, [ebp + 0x654]
push eax
push dword [ebp - 0x24]
push dword [ebp - 0x14]
call dword [ebp - 0x28]
test eax, eax
jne 0x10012f25
mov word [ebp + 0x654], ax
jmp 0x10012f32
push edi
push 0
call esi
push eax
call ebx
lea ecx, [ebp - 0x38]
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 + 0x85c]
xor ecx, ebp
call fcn.101d14d7
add ebp, 0x860
leave
ret
lea eax, [ebp + 0x654]
push eax
call fcn.10012a87
pop ecx
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 0x86c]
lea eax, [ebp + 0x654]
push eax
mov eax, dword [ebp - 0x10]
push 0xffffffffffffffff
push 0
push 0
push dword [edi + eax*4]
call dword [ebp - 0x2c]
test eax, eax
je 0x10012f6a
inc dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x20]
jb 0x10012e7c
push edi
push 0
call esi
push eax
call ebx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x38]
call fcn.1000a2e5
jmp 0x10012d9c