Function at 0x404610
Capabilities:
Attach user process memory

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x40ebe8
push 0x40ced0
mov eax, dword fs:[0]
push eax
add esp, 0xffffff3c
mov eax, dword [0x40f018]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
cmp dword [ebp + 8], 0
je 0x404660
call dword [sym.imp.ntoskrnl.exe_IoGetCurrentProcess]
cmp dword [ebp + 8], eax
je 0x404660
mov byte [ebp - 0x36], 1
jmp 0x404664
mov byte [ebp - 0x36], 0
mov al, byte [ebp - 0x36]
mov byte [ebp - 0x37], al
movzx ecx, byte [ebp - 0x37]
test ecx, ecx
je 0x404680
lea edx, [ebp - 0x34]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ntoskrnl.exe_KeStackAttachProcess]
mov byte [ebp - 0x35], 0
xor ecx, ecx
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], ecx
lea edx, [ebp - 0x4c]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.00404260
mov byte [ebp - 0x35], al
movzx ecx, byte [ebp - 0x35]
test ecx, ecx
je 0x404b5c
mov dword [ebp - 4], 0
mov dword [ebp - 0xd0], 1
mov dword [ebp - 0xd4], 4
cmp dword [ebp + 0x10], 0
je 0x4046db
mov edx, dword [ebp + 0x10]
mov dword [edx], 0
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 0x50]
sub ecx, 1
mov dword [ebp - 0x50], ecx
cmp dword [ebp - 0x50], 6
ja case.default.0x4046f7
mov edx, dword [ebp - 0x50]
jmp dword [edx*4 + 0x404b90]
cmp dword [ebp + 0x10], 0
je 0x40470d
mov eax, dword [ebp + 0x10]
mov dword [eax], 0x1000
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
and edx, 1
je 0x404734
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
shr ecx, 6
and ecx, 1
jne 0x404734
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
shr eax, 9
and eax, 7
and eax, 4
je 0x404739
jmp case.default.0x4046f7
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx]
and edx, 0xfffff1ff
or edx, 0x200
mov eax, dword [ebp - 0x40]
mov dword [eax], edx
jmp case.default.0x4046f7
cmp dword [ebp + 0x10], 0
je 0x404763
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0x400000
mov edx, dword [ebp - 0x44]
mov eax, dword [edx]
and eax, 1
je 0x40478a
mov ecx, dword [ebp - 0x44]
mov edx, dword [ecx]
shr edx, 6
and edx, 1
jne 0x40478a
mov eax, dword [ebp - 0x44]
mov ecx, dword [eax]
shr ecx, 9
and ecx, 7
and ecx, 4
je 0x40478f
jmp case.default.0x4046f7
mov edx, dword [ebp - 0x44]
mov eax, dword [edx]
and eax, 0xfffff1ff
or eax, 0x200
mov ecx, dword [ebp - 0x44]
mov dword [ecx], eax
jmp case.default.0x4046f7
cmp dword [ebp + 0x10], 0
je 0x4047b7
mov edx, dword [ebp + 0x10]
mov dword [edx], 0x1000
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
and ecx, 1
mov edx, dword [eax + 4]
and edx, 0
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x5c]
or eax, dword [ebp - 0x58]
je 0x40481f
mov ecx, dword [ebp - 0x40]
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
mov cl, 6
call sub.ntoskrnl.exe__aullshr
and eax, 1
and edx, 0
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], edx
mov edx, dword [ebp - 0x64]
or edx, dword [ebp - 0x60]
jne 0x40481f
mov ecx, dword [ebp - 0x40]
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
mov cl, 9
call sub.ntoskrnl.exe__aullshr
and eax, 7
and edx, 0
and eax, 4
and edx, 0
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], edx
mov edx, dword [ebp - 0x6c]
or edx, dword [ebp - 0x68]
je 0x404824
jmp case.default.0x4046f7
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
and ecx, 0xfffff1ff
mov edx, dword [eax + 4]
or ecx, 0x200
mov eax, dword [ebp - 0x40]
mov dword [eax], ecx
mov dword [eax + 4], edx
jmp case.default.0x4046f7
cmp dword [ebp + 0x10], 0
je 0x404854
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0x200000
mov edx, dword [ebp - 0x44]
mov eax, dword [edx]
and eax, 1
mov ecx, dword [edx + 4]
and ecx, 0
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], ecx
mov edx, dword [ebp - 0x74]
or edx, dword [ebp - 0x70]
je 0x4048c2
mov ecx, dword [ebp - 0x44]
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
mov cl, 6
call sub.ntoskrnl.exe__aullshr
and eax, 1
and edx, 0
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], edx
mov edx, dword [ebp - 0x7c]
or edx, dword [ebp - 0x78]
jne 0x4048c2
mov ecx, dword [ebp - 0x44]
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
mov cl, 9
call sub.ntoskrnl.exe__aullshr
and eax, 7
and edx, 0
and eax, 4
and edx, 0
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x80], edx
mov edx, dword [ebp - 0x84]
or edx, dword [ebp - 0x80]
je 0x4048c7
jmp case.default.0x4046f7
mov eax, dword [ebp - 0x44]
mov ecx, dword [eax]
and ecx, 0xfffff1ff
mov edx, dword [eax + 4]
or ecx, 0x200
mov eax, dword [ebp - 0x44]
mov dword [eax], ecx
mov dword [eax + 4], edx
jmp case.default.0x4046f7
cmp dword [ebp + 0x10], 0
je 0x4048f7
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0x1000
mov edx, dword [ebp - 0x40]
mov eax, dword [edx]
and eax, 1
mov ecx, dword [edx + 4]
and ecx, 0
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x88], ecx
mov edx, dword [ebp - 0x8c]
or edx, dword [ebp - 0x88]
je 0x404983
mov ecx, dword [ebp - 0x40]
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
mov cl, 6
call sub.ntoskrnl.exe__aullshr
and eax, 1
and edx, 0
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x90], edx
mov edx, dword [ebp - 0x94]
or edx, dword [ebp - 0x90]
jne 0x404983
mov ecx, dword [ebp - 0x40]
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
mov cl, 9
call sub.ntoskrnl.exe__aullshr
and eax, 7
and edx, 0
and eax, 4
and edx, 0
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x98], edx
mov edx, dword [ebp - 0x9c]
or edx, dword [ebp - 0x98]
je 0x404988
jmp case.default.0x4046f7
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax]
and ecx, 0xfffff1ff
mov edx, dword [eax + 4]
or ecx, 0x200
mov eax, dword [ebp - 0x40]
mov dword [eax], ecx
mov dword [eax + 4], edx
jmp case.default.0x4046f7
cmp dword [ebp + 0x10], 0
je 0x4049b8
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0x200000
mov edx, dword [ebp - 0x44]
mov eax, dword [edx]
and eax, 1
mov ecx, dword [edx + 4]
and ecx, 0
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0xa0], ecx
mov edx, dword [ebp - 0xa4]
or edx, dword [ebp - 0xa0]
je 0x404a44
mov ecx, dword [ebp - 0x44]
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
mov cl, 6
call sub.ntoskrnl.exe__aullshr
and eax, 1
and edx, 0
mov dword [ebp - 0xac], eax
mov dword [ebp - 0xa8], edx
mov edx, dword [ebp - 0xac]
or edx, dword [ebp - 0xa8]
jne 0x404a44
mov ecx, dword [ebp - 0x44]
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
mov cl, 9
call sub.ntoskrnl.exe__aullshr
and eax, 7
and edx, 0
and eax, 4
and edx, 0
mov dword [ebp - 0xb4], eax
mov dword [ebp - 0xb0], edx
mov edx, dword [ebp - 0xb4]
or edx, dword [ebp - 0xb0]
je 0x404a49
jmp case.default.0x4046f7
mov eax, dword [ebp - 0x44]
mov ecx, dword [eax]
and ecx, 0xfffff1ff
mov edx, dword [eax + 4]
or ecx, 0x200
mov eax, dword [ebp - 0x44]
mov dword [eax], ecx
mov dword [eax + 4], edx
jmp case.default.0x4046f7
cmp dword [ebp + 0x10], 0
je 0x404a79
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0x40000000
mov edx, dword [ebp - 0x48]
mov eax, dword [edx]
and eax, 1
mov ecx, dword [edx + 4]
and ecx, 0
mov dword [ebp - 0xbc], eax
mov dword [ebp - 0xb8], ecx
mov edx, dword [ebp - 0xbc]
or edx, dword [ebp - 0xb8]
je 0x404b05
mov ecx, dword [ebp - 0x48]
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
mov cl, 6
call sub.ntoskrnl.exe__aullshr
and eax, 1
and edx, 0
mov dword [ebp - 0xc4], eax
mov dword [ebp - 0xc0], edx
mov edx, dword [ebp - 0xc4]
or edx, dword [ebp - 0xc0]
jne 0x404b05
mov ecx, dword [ebp - 0x48]
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
mov cl, 9
call sub.ntoskrnl.exe__aullshr
and eax, 7
and edx, 0
and eax, 4
and edx, 0
mov dword [ebp - 0xcc], eax
mov dword [ebp - 0xc8], edx
mov edx, dword [ebp - 0xcc]
or edx, dword [ebp - 0xc8]
je 0x404b07
jmp case.default.0x4046f7
mov eax, dword [ebp - 0x48]
mov ecx, dword [eax]
and ecx, 0xfffff1ff
mov edx, dword [eax + 4]
or ecx, 0x200
mov eax, dword [ebp - 0x48]
mov dword [eax], ecx
mov dword [eax + 4], edx
mov ecx, dword [ebp + 0xc]
invlpg byte [ecx]
mov edx, dword [ebp + 0xc]
and edx, 0xfffff000
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x54]
mov ecx, dword [eax]
mov edx, dword [ebp - 0x54]
xchg dword [edx], ecx
mov dword [ebp - 4], 0xfffffffe
jmp 0x404b5c
movzx eax, byte [ebp - 0x37]
test eax, eax
je 0x404b6e
lea ecx, [ebp - 0x34]
push ecx
call dword [sym.imp.ntoskrnl.exe_KeUnstackDetachProcess]
mov al, byte [ebp - 0x35]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0040cda4
mov esp, ebp
pop ebp
ret 0xc