Function at 0x10017ce
Capabilities:
Check for peb beingdebugged flag
Check systemkerneldebuggerinformation
Create thread
Get system information on windows
Query environment variable
Query or enumerate registry value
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
xor ebx, ebx
push edi
push ebx
lea eax, [ebp - 2]
push 2
push eax
push 0x23
mov dword [ebp - 0xc], ebx
call dword [sym.imp.NTDLL.DLL_NtQuerySystemInformation]
cmp byte [ebp - 2], bl
jne 0x10172a6
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
cmp byte [eax + 2], bl
jne 0x10172a6
call fcn.010019e9
test eax, eax
mov edi, 0x400
je 0x10172d5
mov esi, dword [sym.imp.KERNEL32.DLL_ExitProcess]
call fcn.01001a19
push dword [ebp + 8]
call fcn.01001ba8
test eax, eax
je 0x10172e3
cmp dword [0x1021034], ebx
jne 0x1001840
call fcn.01001e0d
call fcn.01001edf
test eax, eax
je 0x10172eb
call fcn.0100200f
test eax, eax
je 0x10172f7
mov esi, dword [0x1021030]
lea eax, [ebp - 8]
push eax
push 0x20019
push ebx
push 0x1008b78
push 0x80000002
call dword [sym.imp.ADVAPI32.DLL_RegOpenKeyExW]
test eax, eax
je 0x1017303
mov eax, dword [esi + 8]
mov edi, dword [sym.imp.USER32.DLL_SetThreadDesktop]
push dword [eax + 0x14]
call edi
push ebx
push dword [0x1021038]
push ebx
push ebx
push esi
call fcn.0100267a
cmp dword [0x102103c], ebx
je 0x10018ac
call fcn.0100297f
push esi
call fcn.01002a40
test eax, eax
je 0x1017342
call fcn.01002d9e
test eax, eax
je 0x1017342
call fcn.01002dc4
test eax, eax
je 0x1017342
mov eax, dword [esi + 8]
push dword [eax + 0x14]
call edi
cmp dword [0x102103c], ebx
je 0x10018e9
call fcn.01002dd9
call fcn.01003232
test eax, eax
je 0x1017352
call fcn.0100328f
test eax, eax
je 0x1017362
push 0x8001
call dword [sym.imp.KERNEL32.DLL_SetErrorMode]
mov dword [esi + 0x54], eax
cmp dword [0x102103c], ebx
je 0x100191e
call fcn.01003d16
push esi
call fcn.01003e11
push esi
call fcn.01003e3e
cmp dword [0x102103c], ebx
je 0x100195f
lea eax, [ebp - 0x18]
push eax
push ebx
push ebx
push fcn.01004c31
push ebx
push ebx
call dword [sym.imp.KERNEL32.DLL_CreateThread]
mov edi, eax
cmp edi, ebx
je 0x1017372
push 0xfffffffffffffff1
push edi
call dword [sym.imp.KERNEL32.DLL_SetThreadPriority]
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push 0x208
push 0x40
call dword [sym.imp.KERNEL32.DLL_LocalAlloc]
mov edi, eax
cmp edi, ebx
je 0x101737d
cmp dword [esi + 0x30], ebx
push 0x104
push edi
jne 0x101738d
push 0x1008b1c
push 0x1008b48
push 0x1008b34
call dword [sym.imp.KERNEL32.DLL_GetProfileStringW]
push edi
push esi
call fcn.01004120
test eax, eax
je 0x101739d
push edi
call dword [sym.imp.KERNEL32.DLL_LocalFree]
push esi
call fcn.01004596
test eax, eax
je 0x10173ad
push esi
call fcn.0100467a
call fcn.01004868
push 0xf
push 0x1008b58
push ebx
push ebx
push 1
push 0x1017895
call fcn.010047e5
push esi
call fcn.01004a23
jmp 0x10173bd
push 0x1016fc3
call dword [sym.imp.KERNEL32.DLL_SetUnhandledExceptionFilter]
mov eax, 0xea60
push ebx
push eax
push eax
push ebx
push 0x101724a
push ebx
mov dword [0x1022ea8], 1
call dword [sym.imp.KERNEL32.DLL_SetTimerQueueTimer]
jmp 0x1001806
mov esi, dword [sym.imp.KERNEL32.DLL_ExitProcess]
push edi
call esi
jmp 0x100181e
push edi
call esi
jmp 0x1001833
push 0x401
call esi
jmp 0x100184d
push 0x407
call esi
jmp 0x100185a
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 4
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x14]
push eax
push ebx
push 0x100b48c
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.DLL_RegQueryValueExW]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.DLL_RegCloseKey]
push 1
pop eax
cmp dword [ebp - 0xc], eax
jne 0x1001882
mov dword [esi + 0x30], eax
jmp 0x1001882
push 0x40a
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
push 0x40a
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
push 0x403
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
push ebx
call fcn.01004c31
jmp 0x100195f
push 0x40a
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
push 0x100c4c0
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
jmp 0x100199a
push 0x402
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
push 0x408
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
cmp dword [0x102104c], ebx
je 0x1017403
mov eax, dword [esi + 0x38]
cmp eax, 5
je 0x10173d7
cmp eax, 0xb
je 0x10173d7
cmp eax, 0xa
jne 0x10173de
push eax
push esi
call fcn.010113f6
cmp dword [0x102103c], ebx
je 0x10173ef
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.DLL_SleepEx]
push 0x405
call dword [sym.imp.KERNEL32.DLL_ExitProcess]
push dword [esi + 0x38]
push esi
call fcn.010113f6
jmp 0x10173ef