Function at 0x408090
Capabilities:
Attach user process memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 0x18], 0
xor eax, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0
je 0x4080e2
cmp dword [ebp + 0xc], 1
jb 0x4080e2
cmp dword [ebp + 0xc], 0xa
ja 0x4080e2
movzx ecx, byte [ebp + 0x10]
test ecx, ecx
je 0x4080d1
movzx edx, byte [ebp + 0x10]
cmp edx, 1
jne 0x4080e2
movzx eax, byte [ebp + 0x14]
test eax, eax
je 0x4080e9
movzx ecx, byte [ebp + 0x14]
cmp ecx, 1
je 0x4080e9
xor eax, eax
jmp 0x408284
movzx edx, byte [ebp + 0x10]
cmp edx, 1
jne 0x408103
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [0x41445c]
push ecx
call dword [sym.imp.ntoskrnl.exe_KeStackAttachProcess]
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00401af0
test eax, eax
jne 0x40811b
xor eax, eax
jmp 0x408284
cmp dword [0x4144bc], 0
jne 0x408174
push 0x48
push 0
call dword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov dword [0x4144bc], eax
cmp dword [0x4144bc], 0
jne 0x408156
movzx ecx, byte [ebp + 0x10]
cmp ecx, 1
jne 0x40814f
lea edx, [ebp - 0x18]
push edx
call dword [sym.imp.ntoskrnl.exe_KeUnstackDetachProcess]
xor eax, eax
jmp 0x408284
push 0x48
push 0
mov eax, dword [0x4144bc]
push eax
call sub.ntoskrnl.exe_memset
add esp, 0xc
mov ecx, dword [0x4144bc]
push ecx
call fcn.00405c00
push 0x24
push 0
call dword [sym.imp.ntoskrnl.exe_ExAllocatePool]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x4081a1
movzx edx, byte [ebp + 0x10]
cmp edx, 1
jne 0x40819a
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.ntoskrnl.exe_KeUnstackDetachProcess]
xor eax, eax
jmp 0x408284
xor ecx, ecx
mov edx, dword [ebp - 0x1c]
mov dword [edx], ecx
mov dword [edx + 4], ecx
mov dword [edx + 8], ecx
mov dword [edx + 0xc], ecx
mov dword [edx + 0x10], ecx
mov dword [edx + 0x14], ecx
mov dword [edx + 0x18], ecx
mov dword [edx + 0x1c], ecx
mov dword [edx + 0x20], ecx
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp + 8]
mov dword [eax + 8], ecx
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp + 0xc]
mov dword [edx + 0xc], eax
mov ecx, dword [ebp - 0x1c]
mov dl, byte [ebp + 0x10]
mov byte [ecx + 0x10], dl
mov eax, dword [ebp - 0x1c]
mov cl, byte [ebp + 0x14]
mov byte [eax + 0x18], cl
mov edx, dword [0x4144bc]
mov eax, dword [edx + 8]
add eax, 1
mov ecx, dword [0x4144bc]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 0x1c]
mov eax, dword [0x4144bc]
mov ecx, dword [eax + 8]
mov dword [edx + 0x14], ecx
mov edx, dword [0x4144bc]
mov eax, dword [edx + 0xc]
add eax, 1
mov ecx, dword [0x4144bc]
mov dword [ecx + 0xc], eax
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [0x4144bc]
push eax
call fcn.00407200
movzx ecx, byte [ebp + 0x14]
test ecx, ecx
jne 0x408239
mov edx, dword [ebp + 8]
mov dword [ebp - 0x20], edx
movzx eax, byte [ebp + 0x14]
cmp eax, 1
jne 0x408254
mov ecx, dword [ebp + 8]
sub ecx, dword [0x414408]
add ecx, dword [0x414410]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x1c]
add ecx, 0x19
push ecx
call sub.ntoskrnl.exe_memcpy
add esp, 0xc
movzx edx, byte [ebp + 0x10]
cmp edx, 1
jne 0x40827e
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.ntoskrnl.exe_KeUnstackDetachProcess]
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx + 0x14]
mov esp, ebp
pop ebp
ret 0x10