Function at 0x1001491
Capabilities:
Check for peb beingdebugged flag
Check systemkerneldebuggerinformation
Get system information on windows
Move file
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push edi
xor ebx, ebx
xor eax, eax
push ebx
mov byte [ebp - 8], bl
lea edi, [ebp - 7]
stosb byte es:[edi], al
push 2
lea eax, [ebp - 8]
push eax
push 0x23
mov dword [ebp - 0x14], ebx
mov byte [ebp - 1], bl
mov byte [ebp - 2], bl
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x1c], 0x103
mov dword [ebp - 0x10], ebx
call dword [sym.imp.ntdll.dll_NtQuerySystemInformation]
cmp byte [ebp - 8], bl
je 0x1009537
mov byte [ebp - 1], 1
lea eax, [ebp - 0x18]
push eax
push 0x20019
push ebx
push 0x1001530
push 0x80000002
call dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegOpenKeyExW]
push 4
mov dword [ebp - 8], eax
pop edi
cmp eax, ebx
je 0x100954e
cmp byte [ebp + 8], bl
jne 0x100589b
cmp dword [0x10156ac], ebx
jne 0x1005a73
cmp byte [ebp - 2], bl
jne 0x1009584
lea eax, [ebp - 0x14]
push eax
call fcn.01001587
mov eax, dword [ebp - 8]
pop edi
pop ebx
leave
ret 8
cmp dword [0x10156ac], ebx
jne 0x1005a73
mov eax, dword [ebp - 0xc]
cmp eax, ebx
jne 0x1005a6e
mov eax, dword [ebp + 0xc]
cmp eax, ebx
jne 0x1005a6e
cmp byte [ebp - 1], bl
je 0x100151e
mov dword [0x1015108], edi
mov byte [ebp + 0xb], bl
push esi
mov ebx, str.umstartup
call fcn.01003b51
xor esi, esi
cmp dword [0x1015140], esi
jne 0x10058f7
cmp dword [0x1015144], esi
jne 0x10058f7
mov dword [0x1015140], eax
mov dword [0x1015144], edx
lea eax, [ebp - 0x1c]
push eax
push 0xe
push str.umstartup.etl
call fcn.01005a81
test eax, eax
jl 0x1005a68
lea eax, [ebp - 0x10]
push eax
push 0xa
push ebx
call fcn.01005a81
test eax, eax
jl 0x1005a68
mov eax, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x1c]
lea edi, [eax + ebx]
lea edi, [edi + edi + 0x7c]
push edi
lea eax, [ebp - 0x14]
push eax
call fcn.01003bb8
mov dword [ebp - 8], eax
cmp eax, esi
jne 0x1005a68
push 0x78
push esi
mov esi, dword [ebp - 0x14]
push esi
call sub.msvcrt.dll_memset
mov dword [esi], edi
lea edi, [ebx + ebx + 0x7a]
add esp, 0xc
mov dword [esi + 0x2c], 0x20000
mov dword [esi + 0x28], 2
mov dword [esi + 0x6c], 0x78
mov dword [esi + 0x70], edi
mov dword [esi + 0x30], 3
mov dword [esi + 0x34], 0xa
mov dword [esi + 0x40], 0x10000002
cmp dword [0x1015140], 0
jne 0x10059b7
cmp dword [0x1015144], 0
jne 0x10059b7
push str.umstartup.etl
inc ebx
push ebx
lea eax, [esi + 0x78]
push eax
mov dword [esi + 0x3c], 5
mov dword [esi + 0x6c], 0x78
call fcn.01001845
mov eax, dword [ebp - 0x10]
mov ebx, str.umstartup
push ebx
inc eax
mov dword [esi + 0x70], edi
push eax
add edi, esi
push edi
call fcn.01001845
cmp byte [ebp + 0xb], 0
jne 0x1009598
mov eax, dword [0x1015140]
mov ecx, dword [0x1015144]
test eax, eax
jne 0x10095b5
test ecx, ecx
jne 0x10095b5
push 1
push str.umstartup000.etl
push str.umstartup.etl
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push esi
push ebx
push 0x1015140
call dword [sym.imp.ADVAPI32.dll_StartTraceW]
mov eax, dword [0x1015140]
mov ecx, dword [0x1015144]
mov edx, eax
or edx, ecx
je 0x10095c6
mov esi, dword [sym.imp.ADVAPI32.dll_EnableTrace]
push ecx
push eax
push 0x1015220
push dword [0x1015108]
push dword [0x10156e0]
push 1
call esi
push dword [0x1015144]
push dword [0x1015140]
push 0x1015230
push dword [0x1015108]
push dword [0x10156e0]
push 1
call esi
and dword [ebp - 8], 0
pop esi
jmp 0x100151e
mov dword [0x1015108], eax
mov byte [ebp + 0xb], 1
jmp 0x10058cf
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
cmp byte [eax + 2], bl
jne 0x10014d4
jmp 0x10014d8
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x24]
push eax
push ebx
push 0x10095d4
push dword [ebp - 0x18]
mov dword [ebp - 0x20], edi
call dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegQueryValueExW]
push dword [ebp - 0x18]
mov dword [ebp - 8], eax
call dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegCloseKey]
cmp dword [ebp - 8], ebx
sete byte [ebp - 2]
jmp 0x1001500
mov eax, dword [ebp - 0xc]
cmp eax, dword [0x1015108]
jne 0x1005a6e
jmp 0x100151e
cmp byte [ebp - 1], 0
je 0x10059d7
or dword [esi + 0x40], 0x80000
mov dword [esi + 0x44], 5
jmp 0x10059d7
push 2
push esi
push ebx
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_ControlTraceW]
jmp 0x1005a11
mov dword [ebp - 8], 0xd
jmp 0x1005a68