Function at 0x401c80
Capabilities:
Block operations on executable memory pages using arbitrary code guard
Get system information on windows
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x318
mov eax, dword [0x421040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
push 0
push 0x80
push 3
push 0
push 0
mov edi, ecx
mov dword [ebp - 0x30c], eax
mov ecx, dword [ebp + 8]
mov esi, edx
push 0
push ecx
mov dword [ebp - 0x318], esi
mov dword [ebp - 0x310], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x401ce9
pop edi
pop esi
mov dword [ebx], 1
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040476d
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x310]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401d00
sub ecx, edx
mov dword [ebp - 0x2e8], 0
sar ecx, 1
xorps xmm0, xmm0
movups xmmword [ebp - 0x308], xmm0
movups xmmword [ebp - 0x2f8], xmm0
lea eax, [ecx*2 + 2]
mov dword [ebp - 0x314], eax
lea eax, [ebp - 0x308]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov eax, dword [ebp - 0x304]
test eax, eax
je 0x402192
cmp dword ds:[ebp - 0x2ec], 0
je 0x402192
push 4
push 0x3000
push eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [0x42245c], eax
nop dword [eax]
test eax, eax
jne 0x401d9d
pop edi
pop esi
mov dword [ebx], 3
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040476d
mov esp, ebp
pop ebp
ret
push 4
push 0x3000
push dword [ebp - 0x304]
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [0x422684], eax
test eax, eax
jne 0x401de9
push 0x8000
push eax
push dword [0x42245c]
mov dword [ebx], 4
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040476d
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push dword [ebp - 0x314]
push dword [ebp - 0x310]
push dword [0x42245c]
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x402151
mov eax, dword ds:[ebp - 0x314]
cmp dword [ebp - 8], eax
jne 0x402151
push dword [ebp - 0x304]
push dword [0x42245c]
push edi
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
push 0x2c8
lea eax, [ebp - 0x2e0]
push 0
push eax
call fcn.00406450
add esp, 0xc
mov dword [ebp - 0x2e4], 0x100001
lea eax, [ebp - 0x2e4]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
jne 0x401eae
push 0x8000
push eax
push dword [0x42245c]
mov dword [ebx], 6
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
push dword [0x422684]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040476d
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x22c]
mov eax, dword [0x422684]
push str.LoadLibraryW
push str.Kernel32.dll
mov dword [ebp - 0x22c], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [0x42245c]
mov dword [0x42191d], eax
lea eax, [ebp - 0xc]
push eax
push 0x16
push 0x421910
push dword [0x422684]
mov dword [0x421911], esi
push edi
mov dword [0x421918], ecx
mov dword [ebp - 0xc], 0
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x402110
cmp dword [ebp - 0xc], 0x16
jne 0x402110
push dword [ebp - 0x304]
push dword [0x422684]
push edi
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
push 2
push dword [ebp - 0x304]
mov dword [ebp - 0x14], 0
push dword [0x42245c]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov esi, eax
lea eax, [ebp - 0x14]
push eax
push 0x10
push dword [ebp - 0x304]
push dword [0x422684]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test esi, esi
je 0x4020c9
nop dword [eax + eax]
test eax, eax
je 0x4020c9
push 4
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 1
push eax
push 2
call dword [sym.imp.KERNEL32.dll_SetProcessMitigationPolicy]
nop dword [eax]
test eax, eax
jne 0x401fed
mov eax, dword ds:[ebp - 0x30c]
push 0x8000
push 0
push dword [0x42245c]
mov dword [eax], 2
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
push dword [0x422684]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040476d
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x318]
lea eax, [ebp - 0x2e4]
push eax
push esi
mov dword [ebp - 0x2e4], 0x100001
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
jne 0x402059
mov eax, dword [ebp - 0x30c]
push 0x8000
push 0
push dword [0x42245c]
mov dword [eax], 3
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
push dword [0x422684]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040476d
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 1
je 0x4020b2
mov eax, dword [ebp - 0x30c]
push 0x8000
push 0
push dword [0x42245c]
mov dword [eax], 4
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
push dword [0x422684]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040476d
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040476d
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x30c]
push 0x8000
push 0
push dword [0x42245c]
mov dword [eax], 1
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
push dword [0x422684]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040476d
mov esp, ebp
pop ebp
ret
push 0x8000
push 0
push dword [0x42245c]
mov dword [ebx], 7
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
push dword [0x422684]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040476d
mov esp, ebp
pop ebp
ret
push 0x8000
push 0
push dword [0x42245c]
mov dword [ebx], 5
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x8000
push 0
push dword [0x422684]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040476d
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
mov dword [ebx], 2
xor ecx, ebp
pop ebx
call fcn.0040476d
mov esp, ebp
pop ebp
ret