Function at 0x39db51422
Capabilities:
Allocate or change rwx memory
Enumerate pe sections
Execute shellcode via indirect call

Disassembly:
push rbp
push rbx
sub rsp, 0x148
lea rbp, [rsp + 0x80]
mov qword [rbp + 0xe0], rcx
mov dword [rbp + 0xe8], edx
mov ebx, dword [rbp + 0xe8]
mov rax, qword [sym.imp.KERNEL32.dll_GetProcessHeap]
call rax
mov r8, rbx
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_HeapAlloc]
call rax
mov qword [rbp + 0x78], rax
cmp qword [rbp + 0x78], 0
jne 0x39db51478
mov eax, 0
jmp 0x39db51a0a
mov edx, dword [rbp + 0xe8]
mov rax, qword [rbp + 0x78]
mov r8, rdx
mov rdx, qword [rbp + 0xe0]
mov rcx, rax
call sym.memcpy
cmp qword [rbp + 0x78], 0xffffffffffffffff
je 0x39db514a2
cmp qword [rbp + 0x78], 0
jne 0x39db514ac
mov eax, 0
jmp 0x39db51a0a
mov rax, qword [rbp + 0x78]
mov rcx, rax
call sym.load.dll_GetImageSize_void_
mov qword [rbp - 0x30], rax
lea rcx, str.ntdll.dll
mov rax, qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call rax
lea rdx, str.NtAllocateVirtualMemory
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp + 0x70], rax
mov qword [rbp - 0x38], 0
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call rax
mov rcx, rax
lea rdx, [rbp - 0x30]
lea rax, [rbp - 0x38]
mov dword [rsp + 0x28], 0x40
mov dword [rsp + 0x20], 0x3000
mov r10, qword [rbp + 0x70]
mov r9, rdx
mov r8d, 0
mov rdx, rax
call r10
mov dword [rbp + 0x6c], eax
cmp dword [rbp + 0x6c], 0
jns 0x39db51535
mov eax, 0
jmp 0x39db51a0a
mov rax, qword [rbp - 0x38]
test rax, rax
jne 0x39db51548
mov eax, 0
jmp 0x39db51a0a
mov rax, qword [rbp + 0x78]
mov qword [rbp + 0x60], rax
mov rax, qword [rbp + 0x60]
mov eax, dword [rax + 0x3c]
movsxd rdx, eax
mov rax, qword [rbp + 0x60]
add rax, rdx
mov qword [rbp + 0x58], rax
mov rax, qword [rbp + 0x58]
movzx eax, word [rax + 0x14]
movzx edx, ax
mov rax, qword [rbp + 0x58]
add rax, rdx
add rax, 0x18
mov qword [rbp + 0x50], rax
mov rax, qword [rbp - 0x38]
mov rcx, rax
mov rax, qword [rbp + 0x58]
mov rdx, qword [rax + 0x30]
mov rax, rcx
sub rax, rdx
mov qword [rbp + 0x48], rax
mov rax, qword [rbp - 0x38]
mov rdx, rax
mov rax, qword [rbp + 0x58]
mov qword [rax + 0x30], rdx
mov rax, qword [rbp + 0x58]
mov eax, dword [rax + 0x54]
mov ecx, eax
mov rax, qword [rbp - 0x38]
mov rdx, qword [rbp + 0x78]
mov r8, rcx
mov rcx, rax
call sym.memcpy
mov rax, qword [rbp + 0x58]
mov rax, qword [rax + 0xb0]
mov qword [rbp - 0x40], rax
mov rax, qword [rbp + 0x58]
mov rax, qword [rax + 0x90]
mov qword [rbp - 0x48], rax
mov qword [rbp + 0xb8], 0
mov qword [rbp + 0xb0], 0
mov dword [rbp + 0xac], 0
mov rax, qword [rbp + 0x58]
movzx eax, word [rax + 6]
movzx eax, ax
cmp dword [rbp + 0xac], eax
jge 0x39db516e1
mov eax, dword [rbp + 0xac]
movsxd rdx, eax
mov rax, rdx
shl rax, 2
add rax, rdx
shl rax, 3
mov rdx, rax
mov rax, qword [rbp + 0x50]
add rax, rdx
mov qword [rbp + 0x40], rax
mov edx, dword [rbp - 0x40]
mov rax, qword [rbp + 0x40]
mov eax, dword [rax + 0xc]
cmp edx, eax
jb 0x39db5166d
mov edx, dword [rbp - 0x40]
mov rax, qword [rbp + 0x40]
mov ecx, dword [rax + 0xc]
mov rax, qword [rbp + 0x40]
mov eax, dword [rax + 8]
add eax, ecx
cmp edx, eax
jae 0x39db5166d
mov rax, qword [rbp + 0x40]
mov qword [rbp + 0xb8], rax
mov edx, dword [rbp - 0x48]
mov rax, qword [rbp + 0x40]
mov eax, dword [rax + 0xc]
cmp edx, eax
jb 0x39db5169d
mov edx, dword [rbp - 0x48]
mov rax, qword [rbp + 0x40]
mov ecx, dword [rax + 0xc]
mov rax, qword [rbp + 0x40]
mov eax, dword [rax + 8]
add eax, ecx
cmp edx, eax
jae 0x39db5169d
mov rax, qword [rbp + 0x40]
mov qword [rbp + 0xb0], rax
mov rax, qword [rbp + 0x40]
mov eax, dword [rax + 0x10]
mov ecx, eax
mov rax, qword [rbp + 0x40]
mov eax, dword [rax + 0x14]
mov edx, eax
mov rax, qword [rbp + 0x78]
add rax, rdx
mov rdx, rax
mov rax, qword [rbp + 0x40]
mov eax, dword [rax + 0xc]
mov r8d, eax
mov rax, qword [rbp - 0x38]
add rax, r8
mov r8, rcx
mov rcx, rax
call sym.memcpy
add dword [rbp + 0xac], 1
jmp 0x39db51601
cmp qword [rbp + 0xb8], 0
jne 0x39db516f5
mov eax, 0
jmp 0x39db51a0a
cmp qword [rbp + 0xb0], 0
jne 0x39db51709
mov eax, 0
jmp 0x39db51a0a
mov qword [rbp + 0xa0], 0
mov eax, dword [rbp - 0x3c]
mov eax, eax
cmp qword [rbp + 0xa0], rax
jae 0x39db51814
mov rax, qword [rbp + 0xb8]
mov eax, dword [rax + 0x14]
mov edx, eax
mov rax, qword [rbp + 0x78]
add rdx, rax
mov rax, qword [rbp + 0xa0]
add rax, rdx
mov qword [rbp + 0x38], rax
add qword [rbp + 0xa0], 8
mov rax, qword [rbp + 0x38]
mov eax, dword [rax + 4]
mov eax, eax
sub rax, 8
shr rax, 1
mov qword [rbp + 0x30], rax
mov qword [rbp + 0x98], 0
mov rax, qword [rbp + 0x98]
cmp rax, qword [rbp + 0x30]
jae 0x39db51714
mov rax, qword [rbp + 0xb8]
mov eax, dword [rax + 0x14]
mov edx, eax
mov rax, qword [rbp + 0x78]
add rdx, rax
mov rax, qword [rbp + 0xa0]
add rax, rdx
mov qword [rbp + 0x28], rax
add qword [rbp + 0xa0], 2
mov rax, qword [rbp + 0x28]
movzx eax, byte [rax + 1]
and eax, 0xfffffff0
test al, al
je 0x39db51806
mov rax, qword [rbp + 0x38]
mov eax, dword [rax]
mov edx, eax
mov rax, qword [rbp - 0x38]
add rdx, rax
mov rax, qword [rbp + 0x28]
movzx eax, word [rax]
and ax, 0xfff
movzx eax, ax
add rax, rdx
mov qword [rbp + 0x20], rax
mov qword [rbp - 0x50], 0
mov rax, qword [rbp + 0x20]
mov rax, qword [rax]
mov qword [rbp - 0x50], rax
mov rdx, qword [rbp - 0x50]
mov rax, qword [rbp + 0x48]
add rax, rdx
mov qword [rbp - 0x50], rax
mov rax, qword [rbp + 0x20]
mov rdx, qword [rbp - 0x50]
mov qword [rax], rdx
jmp 0x39db51807
nop
add qword [rbp + 0x98], 1
jmp 0x39db5176e
mov rax, qword [rbp + 0x58]
mov eax, dword [rax + 0x90]
mov edx, eax
mov rax, qword [rbp - 0x38]
add rax, rdx
mov qword [rbp + 0x90], rax
cmp qword [rbp + 0x90], 0
jne 0x39db51842
mov eax, 0
jmp 0x39db51a0a
mov rax, qword [rbp + 0x90]
mov eax, dword [rax + 0xc]
test eax, eax
je 0x39db5194e
mov rax, qword [rbp + 0x90]
mov eax, dword [rax + 0xc]
mov edx, eax
mov rax, qword [rbp - 0x38]
add rax, rdx
mov qword [rbp + 0x18], rax
mov rax, qword [rbp + 0x18]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_LoadLibraryA]
call rax
mov qword [rbp + 0x10], rax
mov rax, qword [rbp + 0x90]
mov eax, dword [rax + 0x10]
mov edx, eax
mov rax, qword [rbp - 0x38]
add rax, rdx
mov qword [rbp + 0x88], rax
mov rax, qword [rbp + 0x88]
mov rax, qword [rax]
test rax, rax
je 0x39db51941
mov rax, qword [rbp + 0x88]
mov rax, qword [rax]
test rax, rax
jns 0x39db518f5
mov rax, qword [rbp + 0x88]
mov rax, qword [rax]
and eax, 0xffff
mov dword [rbp - 4], eax
mov eax, dword [rbp - 4]
movzx eax, ax
mov rdx, rax
mov rax, qword [rbp + 0x10]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov rdx, rax
mov rax, qword [rbp + 0x88]
mov qword [rax], rdx
jmp 0x39db51934
mov rax, qword [rbp + 0x88]
mov rdx, qword [rax]
mov rax, qword [rbp - 0x38]
add rax, rdx
mov qword [rbp + 8], rax
mov rax, qword [rbp + 8]
lea rdx, [rax + 2]
mov rax, qword [rbp + 0x10]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetProcAddress]
call rax
mov qword [rbp], rax
mov rax, qword [rbp + 0x88]
mov rdx, qword [rbp]
mov qword [rax], rdx
add qword [rbp + 0x88], 8
jmp 0x39db51899
add qword [rbp + 0x90], 0x14
jmp 0x39db51842
mov rax, qword [rbp + 0x78]
mov rcx, rax
call sym.load.dll_HasCallbacks_void_
test eax, eax
setne al
test al, al
je 0x39db519c9
mov rax, qword [rbp + 0x58]
mov eax, dword [rax + 0xd0]
mov edx, eax
mov rax, qword [rbp - 0x38]
add rax, rdx
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x10]
mov rax, qword [rax + 0x18]
mov qword [rbp + 0x80], rax
mov rax, qword [rbp + 0x80]
mov rax, qword [rax]
test rax, rax
je 0x39db519c9
mov rax, qword [rbp + 0x80]
mov rax, qword [rax]
mov qword [rbp - 0x18], rax
mov rax, qword [rbp + 0x78]
mov r9, qword [rbp - 0x18]
mov r8d, 0
mov edx, 1
mov rcx, rax
call r9
add qword [rbp + 0x80], 8
jmp 0x39db51989
mov rax, qword [rbp + 0x58]
mov eax, dword [rax + 0x28]
mov edx, eax
mov rax, qword [rbp - 0x38]
add rax, rdx
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x38]
mov r9, qword [rbp - 0x20]
mov r8d, 0
mov edx, 1
mov rcx, rax
call r9
mov dword [rbp - 0x24], eax
cmp dword [rbp - 0x24], 0
jne 0x39db51a06
mov eax, 0
jmp 0x39db51a0a
mov rax, qword [rbp - 0x38]
add rsp, 0x148
pop rbx
pop rbp
ret