Function at 0x14005a3f0
Capabilities:
Allocate or change rwx memory
Parse pe header
Resolve function by parsing pe exports

Disassembly:
mov r11, rsp
mov dword [r11 + 0x18], r8d
mov qword [r11 + 0x10], rdx
mov qword [r11 + 8], rcx
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xa0
mov r12, rdx
mov rdx, rcx
xor r13d, r13d
mov qword [r11 - 0x80], r13
mov esi, r13d
mov qword [r11 - 0x78], r13
xor cl, cl
mov byte [r11 + 0x20], cl
mov byte [rsp + 0x30], cl
mov eax, r13d
mov qword [rdx], r13
mov r15, r12
mov qword [r11 - 0x80], r12
mov ecx, 0x5a4d
cmp word [r12], cx
jne 0x14005a4ae
movsxd rsi, dword [r12 + 0x3c]
add rsi, r12
mov qword [r11 - 0x78], rsi
cmp dword [rsi], 0x4550
jne 0x14005a4ae
test byte [rsi + 0x38], 1
jne 0x14005a4ae
cmp dword [rsi + 0xfc], r13d
je 0x14005a478
cmp dword [rsi + 0xf8], r13d
je 0x14005a478
mov cl, 1
jmp 0x14005a47a
xor cl, cl
mov byte [rsp + 0xf8], cl
mov byte [rsp + 0x30], cl
mov ecx, 0x8664
mov ebx, 0x2000
mov edi, 0xc000007b
cmp word [rsi + 4], cx
je 0x14005a4a1
mov eax, 0x4000000e
jmp 0x14005a4ba
test word [rsi + 0x16], bx
jne 0x14005a4be
mov eax, 0xc00000bb
jmp 0x14005a4ba
mov edi, 0xc000007b
mov eax, edi
mov ebx, 0x2000
mov dword [rsp + 0x34], eax
jmp 0x14005a4ef
test eax, eax
js 0x14005aa68
cmp eax, 0x4000000e
je 0x14005aa68
mov edx, dword [rsi + 0x50]
mov r9d, 4
mov r8d, 0x1000
mov rcx, qword [rsi + 0x30]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r14, rax
mov qword [rsp + 0x50], rax
test rax, rax
jne 0x14005a54d
test byte [rsi + 0x5e], 0x40
je 0x14005a54d
mov edx, dword [rsi + 0x50]
lea r9d, [rax + 4]
mov r8d, ebx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r14, rax
mov qword [rsp + 0x50], rax
test rax, rax
je 0x14005a58c
mov ecx, dword [0x14070a084]
lea edx, [rcx + 0x39]
add edx, dword [rsi + 0x54]
lea eax, [rcx - 1]
not eax
and rdx, rax
mov r9d, 4
mov r8d, 0x1000
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rcx, r14
test rax, rax
jne 0x14005a596
xor edx, edx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 0xc0000017
jmp 0x14005aa68
movsxd rax, dword [r15 + 0x3c]
add rax, r14
mov qword [rsp + 0x38], rax
mov r8d, dword [rsi + 0x54]
mov rdx, r15
call fcn.1401378a0
mov r10, qword [rsp + 0x38]
mov qword [r10 + 0x30], r14
mov ebx, dword [rsi + 0x54]
add rbx, r14
mov qword [rsp + 0x40], rbx
mov qword [rbx + 8], r13
mov qword [rbx + 0x18], r13
mov qword [rbx + 0x20], r13
mov qword [rbx + 0x28], r13
mov dword [rbx + 0x34], r13d
mov qword [rbx + 0x10], r14
mov eax, dword [rsp + 0xf0]
mov dword [rbx + 0x30], eax
movabs rax, 0xaabbcc11ffee00
mov qword [rbx], rax
mov eax, dword [rsi + 0x54]
mov dword [rbx + 8], eax
mov qword [rbx + 0x18], r12
movzx eax, word [r10 + 0x14]
add rax, 0x28
mov r15d, r13d
cmp r13w, word [r10 + 6]
jae 0x14005a67c
lea rbx, [rax + r10]
mov ecx, dword [r10 + 0x38]
lea edx, [rcx + 1]
add edx, dword [rbx - 8]
neg ecx
and edx, ecx
cmp edx, dword [rbx]
jb 0x14005aa5e
mov ecx, dword [rbx - 4]
add rcx, qword [r10 + 0x30]
mov r9d, 4
mov r8d, 0x1000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
test rax, rax
je 0x14005a705
mov ecx, dword [rbx]
test ecx, ecx
je 0x14005a661
mov r8d, ecx
mov edx, dword [rbx + 4]
add rdx, r12
mov rcx, rax
call fcn.1401378a0
inc r15d
add rbx, 0x28
mov r10, qword [rsp + 0x38]
movzx eax, word [r10 + 6]
cmp r15d, eax
jb 0x14005a612
mov rbx, qword [rsp + 0x40]
mov r11, qword [r10 + 0x30]
sub r11, qword [rsi + 0x30]
je 0x14005a744
mov eax, dword [r10 + 0xb0]
lea r8, [r14 + rax]
cmp dword [r10 + 0xb4], 0
je 0x14005a744
test eax, eax
je 0x14005a744
cmp dword [r8], 0
jbe 0x14005a744
nop word [rax + rax]
lea r9, [r8 + 8]
mov r10d, r13d
mov ecx, dword [r8 + 4]
lea eax, [rcx - 8]
test eax, 0xfffffffe
jbe 0x14005a734
nop word [rax + rax]
movzx eax, word [r9]
mov ecx, eax
shr ecx, 0xc
cmp ecx, 3
je 0x14005a70f
cmp ecx, 0xa
jne 0x14005a71f
and eax, 0xfff
mov edx, dword [r8]
lea rcx, [r14 + rax]
add qword [rdx + rcx], r11
jmp 0x14005a71f
mov edi, 0xc0000017
jmp 0x14005aa5e
and eax, 0xfff
mov edx, dword [r8]
lea rcx, [r14 + rax]
add dword [rdx + rcx], r11d
inc r10d
add r9, 2
mov ecx, dword [r8 + 4]
lea eax, [rcx - 8]
shr eax, 1
cmp r10d, eax
jb 0x14005a6e0
mov eax, ecx
add r8, rax
cmp dword [r8], 0
ja 0x14005a6c0
mov r10, qword [rsp + 0x38]
mov r15, r13
lea rcx, [r10 + 0x90]
xor r12d, r12d
mov eax, r12d
mov qword [rsp + 0x68], rax
mov edi, r12d
mov dword [rsp + 0x34], r12d
test rcx, rcx
je 0x14005a782
cmp dword [rcx + 4], eax
je 0x14005a782
mov r15d, dword [rcx]
add r15, qword [r10 + 0x30]
mov qword [rsp + 0x88], r15
mov rax, r15
mov qword [rsp + 0x68], rax
test rax, rax
je 0x14005a79f
cmp dword [rax + 0xc], edi
je 0x14005a79f
inc r13d
mov dword [rsp + 0x70], r13d
add rax, 0x14
mov qword [rsp + 0x68], rax
jmp 0x14005a787
test r15, r15
je 0x14005a8cd
test r13d, r13d
je 0x14005a8cd
mov esi, r13d
mov eax, 8
mul rsi
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.140134664
mov qword [rbx + 0x20], rax
test rax, rax
jne 0x14005a7e6
mov edi, 0xc0000017
mov dword [rsp + 0x34], edi
jmp 0x14005aa5e
lea r8, [rsi*8]
xor edx, edx
mov rcx, rax
call fcn.140137f50
mov eax, r12d
mov dword [rsp + 0x48], eax
cmp eax, r13d
jae 0x14005a8c5
mov ecx, dword [r15 + 0xc]
add rcx, r14
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov r12, rax
test rax, rax
jne 0x14005a827
mov edi, 0xc0000135
jmp 0x14005a8c1
mov ecx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x20]
mov qword [rax + rcx*8], r12
inc dword [rbx + 0x28]
mov eax, dword [r15]
test eax, eax
je 0x14005a842
mov ecx, dword [r15 + 0x10]
jmp 0x14005a848
mov eax, dword [r15 + 0x10]
mov ecx, eax
mov ebx, eax
add rbx, r14
mov qword [rsp + 0x78], rbx
mov esi, ecx
add rsi, r14
mov qword [rsp + 0x80], rsi
nop
mov rax, qword [rbx]
test rax, rax
je 0x14005a8a5
jns 0x14005a86f
movzx edx, ax
jmp 0x14005a876
lea rdx, [r14 + 2]
add rdx, rax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsi], rax
test rax, rax
jne 0x14005a88e
mov edi, 0xc0000139
jmp 0x14005a8c1
add rbx, 8
mov qword [rsp + 0x78], rbx
add rsi, 8
mov qword [rsp + 0x80], rsi
jmp 0x14005a860
mov eax, dword [rsp + 0x48]
inc eax
add r15, 0x14
mov qword [rsp + 0x88], r15
mov rbx, qword [rsp + 0x40]
jmp 0x14005a7fb
mov dword [rsp + 0x34], edi
xor r12d, r12d
mov r10, qword [rsp + 0x38]
mov r11, 0xffffffffffffffff
mov rsi, qword [rsp + 0x40]
movzx r15d, byte [rsp + 0xf8]
mov r13, qword [rsp + 0xe0]
jmp 0x14005a917
test edi, edi
jns 0x14005a95d
mov ebx, r12d
cmp dword [rsi + 0x28], 0
jbe 0x14005a947
nop dword [rax]
nop dword [rax + rax]
mov eax, ebx
mov rcx, qword [rsi + 0x20]
mov rcx, qword [rcx + rax*8]
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
inc ebx
cmp ebx, dword [rsi + 0x28]
jb 0x14005a930
mov rcx, qword [rsi + 0x20]
call fcn.14013466c
mov qword [rsi + 0x20], r12
mov dword [rsi + 0x28], r12d
jmp 0x14005aa5e
movzx ebx, word [r10 + 0x14]
add rbx, 0x20
cmp r12w, word [r10 + 6]
jae 0x14005aa4d
add rbx, r10
lea rsi, [0x1406fdc48]
nop dword [rax + rax]
mov r9d, dword [rbx + 4]
add r9, r14
mov qword [rsp + 0x90], r9
mov ecx, dword [r10 + 0x38]
mov edx, dword [rbx]
inc rdx
add rdx, rcx
lea rax, [rcx - 1]
not rax
and rdx, rax
mov qword [rsp + 0x40], rdx
mov r8d, dword [rbx + 0x1c]
bt r8d, 0x19
jae 0x14005a9cb
test r15b, r15b
jne 0x14005a9cb
mov r8d, 0x4000
mov rcx, r9
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x14005aa2c
mov rcx, r8
shr rcx, 0x1d
and ecx, 1
mov rax, r8
shr rax, 0x1e
and eax, 1
lea rcx, [rax + rcx*2]
mov rax, r8
shr rax, 0x1f
lea rcx, [rax + rcx*2]
mov r9d, dword [rsi + rcx*4]
bts r9d, 9
and r8d, 0x4000000
cmove r9d, dword [rsi + rcx*4]
lea rax, [rsp + 0xf8]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0x90]
mov rcx, r11
call qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
mov edi, eax
test eax, eax
js 0x14005aa4d
inc r12d
add rbx, 0x28
mov r10, qword [rsp + 0x38]
movzx eax, word [r10 + 6]
cmp r12d, eax
mov r11, 0xffffffffffffffff
jb 0x14005a980
test edi, edi
js 0x14005aa5e
mov qword [r13], r14
jmp 0x14005aa66
mov rcx, r14
call fcn.14005aa90
mov eax, edi
add rsp, 0xa0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret