Function at 0x410680
Capabilities:
Access pe header

Disassembly:
mov byte [rsp + 0x20], r9b
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x110
mov dword [rsp + 0x58], 0
mov rcx, qword [rsp + 0x130]
call sub.ntoskrnl.exe_RtlImageNtHeader
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
jne 0x4106c3
jmp 0x410acb
lea r9, [rsp + 0x58]
mov r8w, 9
mov dl, 1
mov rcx, qword [rsp + 0x130]
call sub.ntoskrnl.exe_RtlImageDirectoryEntryToData
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
jne 0x4106ee
jmp 0x410acb
mov rax, qword [rsp + 0x128]
movzx eax, byte [rax + 0x58]
test eax, eax
jne 0x41095c
mov rax, qword [rsp + 0x50]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
jne 0x410724
mov rax, qword [rsp + 0x40]
mov rax, qword [rax]
mov qword [rsp + 0xc8], rax
jmp 0x410733
mov rax, qword [rsp + 0x40]
mov eax, dword [rax]
mov qword [rsp + 0xc8], rax
cmp qword [rsp + 0xc8], 0
je 0x41095c
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x60], 0x1000
mov dword [rsp + 0x68], 0xc0000225
movzx eax, byte [rsp + 0x138]
test eax, eax
je 0x410845
mov qword [rsp + 0x78], 0
lea rax, [rsp + 0x80]
mov rdi, rax
xor eax, eax
mov ecx, 0x28
rep stosb byte [rdi], al
mov qword [rsp + 0xa8], 0
lea rax, [rsp + 0xb0]
mov rdi, rax
xor eax, eax
mov ecx, 8
rep stosb byte [rdi], al
mov rcx, qword [rsp + 0x120]
call sub.ntoskrnl.exe_PsGetProcessId
mov qword [rsp + 0x88], rax
mov qword [rsp + 0x78], 0
mov byte [rsp + 0xa0], 1
mov byte [rsp + 0xa1], 1
mov qword [rsp + 0x98], 0x1000
mov qword [rsp + 0x90], 4
mov rax, qword [rsp + 0x70]
and rax, 0xfff
mov rcx, qword [rsp + 0x60]
lea rax, [rax + rcx + 0xfff]
shr rax, 0xc
shl eax, 0xc
mov eax, eax
mov qword [rsp + 0x80], rax
lea r8, [rsp + 0xa8]
lea rdx, [rsp + 0x78]
mov rcx, qword [rsp + 0x120]
call fcn.004136a0
mov dword [rsp + 0x68], eax
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0x70], rax
jmp 0x410872
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], 0x1000
lea r9, [rsp + 0x60]
xor r8d, r8d
lea rdx, [rsp + 0x70]
mov rcx, 0xffffffffffffffff
call sub.ntoskrnl.exe_ZwAllocateVirtualMemory
mov dword [rsp + 0x68], eax
cmp dword [rsp + 0x68], 0
jl 0x41095c
mov rax, qword [rsp + 0x128]
mov rcx, qword [rax + 0x18]
call sub.ntoskrnl.exe_PsGetThreadTeb
mov qword [rsp + 0xb8], rax
mov rax, qword [rsp + 0x128]
mov rcx, qword [rax]
call sub.ntoskrnl.exe_PsGetProcessWow64Process
test rax, rax
je 0x4108fe
mov rax, qword [rsp + 0xb8]
mov ecx, dword [rsp + 0x70]
mov dword [rax + 0x202c], ecx
mov rax, qword [rsp + 0x50]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
jne 0x4108df
mov rax, qword [rsp + 0x40]
mov rax, qword [rax]
mov qword [rsp + 0xd0], rax
jmp 0x4108ee
mov rax, qword [rsp + 0x40]
mov eax, dword [rax]
mov qword [rsp + 0xd0], rax
mov rax, qword [rsp + 0x70]
mov ecx, dword [rsp + 0xd0]
mov dword [rax], ecx
jmp 0x410950
mov rax, qword [rsp + 0xb8]
mov rcx, qword [rsp + 0x70]
mov qword [rax + 0x58], rcx
mov rax, qword [rsp + 0x50]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
jne 0x410931
mov rax, qword [rsp + 0x40]
mov rax, qword [rax]
mov qword [rsp + 0xd8], rax
jmp 0x410940
mov rax, qword [rsp + 0x40]
mov eax, dword [rax]
mov qword [rsp + 0xd8], rax
mov rax, qword [rsp + 0x70]
mov rcx, qword [rsp + 0xd8]
mov qword [rax], rcx
mov rax, qword [rsp + 0x128]
mov byte [rax + 0x58], 1
mov rax, qword [rsp + 0x50]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
jne 0x41097f
mov rax, qword [rsp + 0x40]
mov rax, qword [rax + 0x18]
mov qword [rsp + 0xe0], rax
jmp 0x41098f
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 0xc]
mov qword [rsp + 0xe0], rax
mov rax, qword [rsp + 0xe0]
mov qword [rsp + 0x48], rax
jmp 0x4109e0
mov rax, qword [rsp + 0x50]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
jne 0x4109bc
mov qword [rsp + 0xe8], 8
jmp 0x4109c8
mov qword [rsp + 0xe8], 4
mov rax, qword [rsp + 0xe8]
mov rcx, qword [rsp + 0x48]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x50]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
jne 0x410a02
mov rax, qword [rsp + 0x48]
mov rax, qword [rax]
mov qword [rsp + 0xf0], rax
jmp 0x410a11
mov rax, qword [rsp + 0x48]
mov eax, dword [rax]
mov qword [rsp + 0xf0], rax
cmp qword [rsp + 0xf0], 0
je 0x410acb
mov rax, qword [rsp + 0x50]
movzx eax, word [rax + 0x18]
cmp eax, 0x20b
jne 0x410a42
mov rax, qword [rsp + 0x48]
mov rax, qword [rax]
mov qword [rsp + 0xf8], rax
jmp 0x410a51
mov rax, qword [rsp + 0x48]
mov eax, dword [rax]
mov qword [rsp + 0xf8], rax
mov rax, qword [rsp + 0xf8]
mov qword [rsp + 0xc0], rax
movzx eax, byte [0x00445b98]
test eax, eax
jne 0x410a79
mov dword [rsp + 0x100], 1
jmp 0x410a84
mov dword [rsp + 0x100], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 1
mov rax, qword [rsp + 0x130]
mov qword [rsp + 0x20], rax
mov r9d, 3
mov r8, qword [rsp + 0xc0]
mov rdx, qword [rsp + 0x128]
movzx ecx, byte [rsp + 0x100]
call fcn.00412db0
jmp 0x41099e
add rsp, 0x110
pop rdi
ret