Function at 0x405100
Capabilities:
Get system information on windows
Make suspicious ntquerysysteminformation call

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xac
cmp dword [0x40d1a8], 1
push ebx
push esi
push edi
je 0x40534e
push 0x60
lea eax, [esp + 0x58]
push 0
mov ecx, 0xb
mov esi, str.SystemRoot_system32_
lea edi, [esp + 0x30]
push eax
rep movsd dword es:[edi], dword [esi]
call sub.ntoskrnl.exe_memset
add esp, 0xc
lea ecx, [esp + 0xc]
push ecx
push 0
push 0
push 0xb
mov dword [esp + 0x1c], 0
call sub.ntoskrnl.exe_NtQuerySystemInformation
mov edx, dword [esp + 0xc]
mov ebx, dword [sym.imp.ntoskrnl.exe_ExAllocatePoolWithTag]
push 0x4d6c7431
push edx
push 0
call ebx
mov ecx, dword [esp + 0xc]
mov esi, eax
lea eax, [esp + 0xc]
push eax
push ecx
push esi
push 0xb
call sub.ntoskrnl.exe_NtQuerySystemInformation
test eax, eax
je 0x40518a
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movzx eax, word [esi + 0x1e]
mov edx, dword [esi + 0xc]
mov ecx, dword [esi + 0x10]
mov dword [0x40d4dc], edx
mov dword [0x40d4d8], eax
lea eax, [esi + 0x20]
mov edx, 0x40d3d8
mov dword [0x40d4e0], ecx
sub edx, eax
nop
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4051b0
push 0
push 0
push 0x40d2c0
call dword [sym.imp.ntoskrnl.exe_KeInitializeEvent]
mov edx, dword [0x40d4d8]
lea eax, [edx + 0x40d3d8]
push eax
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.ntoskrnl.exe_RtlInitAnsiString]
push 1
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.ntoskrnl.exe_RtlAnsiStringToUnicodeString]
test eax, eax
jl 0x405181
mov eax, dword [esp + 0x1c]
mov edx, eax
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405200
lea edi, [esp + 0x28]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x405214
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.ntoskrnl.exe_RtlFreeUnicodeString]
lea eax, [esp + 0x28]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405242
sub eax, edx
sar eax, 1
lea edx, [esp + 0x10]
lea ecx, [eax + eax + 2]
push edx
lea eax, [esp + 0x2c]
lea esi, [esp + 0x18]
call fcn.00401cb0
test eax, eax
je 0x405181
push 0x4d6c7431
push 0x20
push 0
call ebx
test eax, eax
je 0x405287
call fcn.00404880
mov edi, eax
jmp 0x405289
xor edi, edi
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push eax
call fcn.004048b0
test eax, eax
je 0x405181
push 0x40d1b4
push str.KdDisableDebugger
push edi
call fcn.00404990
push 0x40d094
push str.KdEnableDebugger
mov esi, eax
push edi
mov dword [0x40d3d4], esi
call fcn.00404990
push 0x40d2b8
push str.IoCreateDriver
mov ebx, eax
push edi
mov dword [0x40d19c], ebx
call fcn.00404990
push 0x40d1a0
push str.KdDebuggerEnabled
push edi
mov dword [0x40d2bc], eax
call fcn.00404990
cmp dword [0x40d1b4], 0
je 0x405181
cmp dword [0x40d094], 0
je 0x405181
cmp dword [0x40d2b8], 0
je 0x405181
mov eax, dword [0x40d4dc]
mov ecx, dword [0x40d2bc]
add dword [0x40d2b8], eax
add dword [0x40d1a0], eax
mov dword [0x40d1b4], esi
mov dword [0x40d094], ebx
mov dword [0x40d740], ecx
mov dword [0x40d1a8], 1
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret