Function at 0x1030876
Capabilities:
Create pipe
Get common file path
Get hostname
Set environment variable
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x47c
mov eax, dword [0x107342c]
push ebx
xor ebx, ebx
mov dword [ebp - 4], eax
push esi
mov byte [ebp - 0x43c], bl
mov byte [ebp - 0x43b], bl
mov byte [ebp - 0x43a], bl
mov byte [ebp - 0x439], bl
mov byte [ebp - 0x438], bl
mov byte [ebp - 0x437], 5
mov dword [ebp - 0x458], 0x10
mov eax, dword [0x7ffe02d0]
xor esi, esi
shr eax, 4
inc esi
and eax, esi
mov dword [0x1074a14], eax
je 0x1030907
push ebx
push 4
lea eax, [ebp - 0x454]
push eax
push 0x18
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_NtQueryInformationProcess]
test eax, eax
jge 0x10308fa
push 0x400
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ecx, dword [ebp - 0x454]
mov eax, dword [0x1074a14]
jmp 0x1030909
xor ecx, ecx
cmp ecx, ebx
mov dword [0x1074a1c], ecx
jne 0x1030919
mov dword [0x1074a18], esi
cmp dword [0x1074a18], ebx
je 0x1030958
cmp eax, ebx
je 0x1030958
push 0x1074aa0
call dword [sym.imp.ntdll.dll_RtlInitializeCriticalSection]
test eax, eax
jl 0x103096c
push 0x1013f70
push esi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, ebx
mov dword [0x1074424], eax
je 0x103096c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x103096c
mov eax, dword fs:[0x18]
push esi
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_RegisterLogonProcess]
test eax, eax
jne 0x1030973
xor eax, eax
jmp 0x1030cb5
mov eax, dword [ebp + 8]
push edi
push esi
mov dword [0x107447c], eax
call dword [sym.imp.ntdll.dll_RtlLengthRequiredSid]
mov edi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push eax
push 0x40
call edi
cmp eax, ebx
mov dword [0x10749f4], eax
jne 0x103099e
xor eax, eax
jmp 0x1030cb4
push esi
lea ecx, [ebp - 0x43c]
push ecx
push eax
call dword [sym.imp.ntdll.dll_RtlInitializeSid]
push ebx
push dword [0x10749f4]
call dword [sym.imp.ntdll.dll_RtlSubAuthoritySid]
mov dword [eax], 0x12
call fcn.0102838a
cmp eax, esi
mov dword [0x1074484], eax
je 0x1030adc
cmp eax, 4
je 0x1030adc
mov dword [0x1074488], ebx
call fcn.0103c6f9
lea eax, [ebp - 0x458]
push eax
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
test eax, eax
je 0x1030a0a
lea eax, [ebp - 0x24]
push eax
push 0x1011b58
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
cmp dword [0x1074488], ebx
je 0x1030a2b
call fcn.01028989
test eax, eax
jne 0x1030a2b
cmp dword [0x1074484], esi
sete al
push eax
call dword [sym.imp.USERENV.dll_Ordinal_118]
lea eax, [ebp - 0x450]
push eax
mov esi, 0x104
push 0xe
mov dword [ebp - 0x44c], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x1030a8c
lea eax, [ebp - 0x44c]
push eax
lea eax, [ebp - 0x22c]
push eax
push dword [ebp - 0x450]
call dword [sym.imp.USERENV.dll_GetUserProfileDirectoryW]
test eax, eax
je 0x1030a80
lea eax, [ebp - 0x22c]
push eax
push 0x10136d0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push dword [ebp - 0x450]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x44c]
push eax
lea eax, [ebp - 0x22c]
push eax
mov dword [ebp - 0x44c], esi
call dword [sym.imp.USERENV.dll_GetAllUsersProfileDirectoryW]
test eax, eax
je 0x1030abc
lea eax, [ebp - 0x22c]
push eax
push 0x1013f4c
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push ebx
push 4
lea eax, [ebp - 0x45c]
push eax
push 0x1c
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_NtQueryInformationProcess]
test eax, eax
jge 0x1030ae7
mov dword [0x1074468], ebx
jmp 0x1030af7
mov dword [0x1074488], esi
jmp 0x10309e6
xor eax, eax
cmp dword [ebp - 0x45c], ebx
setne al
mov dword [0x1074468], eax
cmp dword [0x1074a18], ebx
je 0x1030b12
push 0x1013494
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [0x107449c], eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
cmp dword [eax + 0x1d4], ebx
jne 0x1030caf
lea eax, [ebp - 0x448]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x12
push 1
lea eax, [ebp - 0x444]
push eax
mov dword [ebp - 0x448], ebx
mov byte [ebp - 0x444], bl
mov byte [ebp - 0x443], bl
mov byte [ebp - 0x442], bl
mov byte [ebp - 0x441], bl
mov byte [ebp - 0x440], bl
mov byte [ebp - 0x43f], 5
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x1030997
push 1
lea eax, [ebp - 0x47c]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
push dword [ebp - 0x448]
je 0x1030bf2
call dword [sym.imp.ntdll.dll_RtlLengthSid]
mov esi, eax
add esi, 0x10
push esi
push 0x40
call edi
mov edi, eax
cmp edi, ebx
je 0x1030bec
push 2
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x1030be5
push dword [ebp - 0x448]
push 0xc0000000
push 2
push edi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x1030be5
push ebx
push edi
xor esi, esi
inc esi
push esi
lea eax, [ebp - 0x47c]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x1030bfd
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x448]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
jmp 0x1030997
lea eax, [ebp - 0x47c]
mov dword [ebp - 0x464], eax
lea eax, [ebp - 0x434]
push 0x1013448
push eax
mov dword [ebp - 0x468], 0xc
mov dword [ebp - 0x460], ebx
mov dword [0x1074a10], ebx
mov dword [0x1074a00], ebx
mov dword [0x1074a04], ebx
mov dword [0x1074a08], ebx
mov dword [0x1074a0c], ebx
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
lea eax, [ebp - 0x468]
push eax
push 0xea60
mov eax, 0x2000
push eax
push eax
push esi
push 6
push 0x40000003
lea eax, [ebp - 0x434]
push eax
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
push edi
mov dword [0x1073338], eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x448]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
push ebx
push esi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
push 0x1074a00
push dword [0x1073338]
mov dword [0x1074a10], eax
call fcn.0102be28
mov dword [0x1074474], eax
call fcn.0103230b
pop edi
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.0103e4d8
leave
ret 4