Function at 0x1400d133c
Capabilities:
Allocate or change rwx memory
Enumerate pe sections
Parse pe header

Disassembly:
mov byte [rsp + 0x10], dl
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x168
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
xor r12d, r12d
mov rbp, rax
test rax, rax
je 0x1400d15b3
mov ebx, 0x5a4d
cmp word [rax], bx
jne 0x1400d15b3
movsxd rdi, dword [rax + 0x3c]
mov r13d, 0x4550
add rdi, rax
cmp dword [rdi], r13d
jne 0x1400d15b3
movzx r14d, word [rdi + 0x14]
add r14, 0x18
mov dword [rsp + 0x1c0], 0x104
add r14, rdi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r9, [rsp + 0x1c0]
xor edx, edx
mov rcx, rax
lea r8, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_QueryFullProcessImageNameA]
mov qword [rsp + 0x30], r12
lea r8d, [r12 + 1]
mov dword [rsp + 0x28], 0x80
lea rcx, [rsp + 0x50]
xor r9d, r9d
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r15, rax
mov qword [rsp + 0x48], rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x1400d15b3
mov qword [rsp + 0x28], r12
lea r8d, [r12 + 2]
xor r9d, r9d
mov dword [rsp + 0x20], r12d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
test rax, rax
je 0x1400d15aa
xor r9d, r9d
mov qword [rsp + 0x20], r12
xor r8d, r8d
lea edx, [r12 + 4]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rsi, rax
test rax, rax
je 0x1400d15b3
cmp word [rax], bx
jne 0x1400d15a1
movsxd rbx, dword [rax + 0x3c]
add rbx, rax
cmp dword [rbx], r13d
jne 0x1400d15a1
mov eax, dword [rdi + 8]
cmp dword [rbx + 8], eax
jne 0x1400d15a1
movzx ecx, word [rbx + 6]
cmp cx, word [rdi + 6]
jne 0x1400d15a1
movzx r13d, word [rbx + 0x14]
xor eax, eax
add r13, 0x18
mov edi, eax
add r13, rbx
cmp ax, cx
jae 0x1400d158a
mov rdx, qword [rsp + 0x1b0]
mov rcx, r14
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
xor r8d, r8d
test eax, eax
jne 0x1400d14c3
test dword [r14 + 0x24], 0x20000000
jne 0x1400d14da
movzx eax, word [rbx + 6]
inc edi
add r14, 0x28
add r13, 0x28
cmp edi, eax
jl 0x1400d14a2
jmp 0x1400d158a
mov edx, dword [r14 + 0x10]
mov ebx, r8d
test edx, edx
je 0x1400d158a
mov r15b, byte [rsp + 0x1b8]
mov eax, dword [r13 + 0x14]
mov r10d, dword [r14 + 0xc]
mov edi, ebx
add rax, rdi
add r10, rdi
add r10, rbp
mov cl, byte [rax + rsi]
mov eax, edx
mov byte [rsp + 0x1c0], cl
cmp byte [r10], cl
je 0x1400d1579
test r15b, r15b
je 0x1400d1576
mov edx, 1
mov dword [rsp + 0x1c8], 0x40
lea r9, [rsp + 0x40]
mov rcx, r10
lea r8d, [rdx + 0x3f]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [r14 + 0xc]
lea r9, [rsp + 0x1c8]
mov cl, byte [rsp + 0x1c0]
add rax, rdi
mov edx, 1
mov byte [rax + rbp], cl
mov ecx, dword [r14 + 0xc]
mov r8d, dword [rsp + 0x40]
add rcx, rdi
add rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [r14 + 0x10]
xor r8d, r8d
mov r12b, 1
inc ebx
mov edx, eax
cmp ebx, eax
jb 0x1400d14f1
mov r15, qword [rsp + 0x48]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, r12b
jmp 0x1400d15b5
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
add rsp, 0x168
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret