Function at 0x18005ef10
Capabilities:
Access peb ldr_data
Parse pe header
Resolve function by parsing pe exports
Write file on windows

Disassembly:
mov r11, rsp
push rbp
push rbx
push rdi
lea rbp, [r11 - 0x28]
sub rsp, 0x110
mov rax, qword [0x180164040]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov eax, 0x5a4d
mov rdi, rdx
mov rbx, rcx
cmp word [rcx], ax
jne 0x18005f4bc
movsxd rax, dword [rcx + 0x3c]
cmp dword [rax + rcx], 0x4550
jne 0x18005f4bc
mov ecx, dword [rax + rcx + 0x8c]
mov qword [r11 + 8], rsi
mov qword [r11 + 0x18], r12
mov qword [r11 + 0x20], r13
mov qword [r11 - 0x20], r14
mov qword [r11 - 0x28], r15
mov qword [rsp + 0x30], rcx
test rcx, rcx
je 0x18005f2ac
mov r14d, dword [rax + rbx + 0x88]
test r14, r14
je 0x18005f2ac
mov esi, dword [r14 + rbx + 0x20]
xor r15d, r15d
mov r12d, dword [r14 + rbx + 0x24]
add rsi, rbx
mov r13d, dword [r14 + rbx + 0x1c]
add r12, rbx
mov r9d, dword [r14 + rbx + 0x18]
add r13, rbx
mov r10d, r15d
test r9, r9
je 0x18005f022
nop word [rax + rax]
mov r11, r9
sub r11, r10
shr r11, 1
add r11, r10
mov eax, dword [rsi + r11*4]
add rax, rbx
test rdi, rdi
jne 0x18005efdd
lea ecx, [rdi - 1]
jmp 0x18005f00c
test rax, rax
jne 0x18005efe7
lea ecx, [rax + 1]
jmp 0x18005f00c
mov r8, rdi
sub r8, rax
nop dword [rax]
movzx ecx, byte [r8 + rax]
movzx edx, byte [rax]
lea rax, [rax + 1]
test cl, cl
je 0x18005f004
cmp cl, dl
je 0x18005eff0
sub ecx, edx
je 0x18005f15b
test ecx, ecx
lea rax, [r11 + 1]
cmovle rax, r10
cmovle r9, r11
mov r10, rax
cmp r9, rax
jne 0x18005efc0
movabs r13, 0x20e93de3f9fbdbe9
movabs r12, 0x5531d84af1ca2ce6
mov dl, 3
call fcn.18005d400
movabs rcx, 0xe6bc37645bd7bfb8
lea rdx, [rsp + 0x70]
movabs rax, 0x4ec94991968ba38c
mov r8d, edx
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x70], rax
movabs rax, 0x315fad2597ea5889
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x78], rax
movabs rax, 0xa19974a58ed0f339
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x80], rax
mov qword [rsp + 0x30], rcx
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x78], rax
mov qword [rsp + 0x30], r13
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x50], rax
mov qword [rsp + 0x30], r12
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x48], rax
movabs rax, 0xa19974a58ed0d303
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x40], rax
mov qword [rsp + 0x30], rcx
lea rcx, [rsp + 0x70]
mov rax, qword [rsp + 0x30]
movdqa xmm1, xmmword [rsp + 0x70]
xorps xmm1, xmmword [rbp - 0x50]
movdqa xmm0, xmmword [rbp - 0x80]
mov qword [rbp - 0x38], rax
movq rax, xmm1
xorps xmm0, xmmword [rbp - 0x40]
movdqa xmmword [rsp + 0x70], xmm1
movdqa xmmword [rbp - 0x80], xmm0
test al, al
je 0x18005f120
inc rcx
mov r8, rcx
cmp byte [rcx], r15b
jne 0x18005f115
xor r9d, r9d
mov qword [rsp + 0x20], r15
sub r8d, edx
lea rdx, [rsp + 0x70]
lea rcx, [r9 - 1]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rax, rdi
mov r8d, edi
cmp byte [rdi], r15b
je 0x18005f150
inc rax
mov r8, rax
cmp byte [rax], r15b
jne 0x18005f145
sub r8d, edi
mov rdx, rdi
jmp 0x18005f4a3
movzx eax, word [r12 + r11*2]
mov dl, 1
mov esi, dword [r13 + rax*4]
call fcn.18005d400
movabs rax, 0x46c94991968ba38c
lea rdx, [rsp + 0x50]
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x50]
mov rax, qword [rsp + 0x38]
movabs r13, 0x20e93de3f9fbdbe9
mov qword [rsp + 0x50], rax
movabs r12, 0x5531d84af1ca2ce6
movabs rax, 0x5531f87095a45989
mov r8d, edx
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x38], r13
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r12
mov rax, qword [rsp + 0x38]
movdqa xmm0, xmmword [rsp + 0x50]
mov qword [rsp + 0x48], rax
xorps xmm0, xmmword [rsp + 0x40]
movq rax, xmm0
movdqa xmmword [rsp + 0x50], xmm0
test al, al
je 0x18005f20b
nop word [rax + rax]
inc rcx
mov r8, rcx
cmp byte [rcx], r15b
jne 0x18005f200
xor r9d, r9d
mov qword [rsp + 0x20], r15
sub r8d, edx
lea rdx, [rsp + 0x50]
lea rcx, [r9 - 1]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rax, rdi
mov r8d, edi
cmp byte [rdi], r15b
je 0x18005f23b
inc rax
mov r8, rax
cmp byte [rax], r15b
jne 0x18005f230
xor r9d, r9d
mov qword [rsp + 0x20], r15
sub r8d, edi
mov rdx, rdi
lea rcx, [r9 - 1]
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp rsi, r14
jb 0x18005f269
mov rax, rsi
sub rax, r14
cmp rax, qword [rsp + 0x30]
jb 0x18005f036
lea rax, [rsi + rbx]
mov r14, qword [rsp + 0x108]
mov r13, qword [rsp + 0x148]
mov r12, qword [rsp + 0x140]
mov rsi, qword [rsp + 0x130]
mov r15, qword [rsp + 0x100]
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.1800c2800
add rsp, 0x110
pop rdi
pop rbx
pop rbp
ret
mov dl, 3
call fcn.18005d400
mov r14, rax
lea rdx, [rbp - 0x70]
movabs rax, 0x48c9588f8c9fb484
movabs r13, 0x20e93de3f9fbdbe9
mov qword [rsp + 0x30], rax
movabs r12, 0x5531d84af1ca2ce6
mov rcx, qword [rsp + 0x30]
movabs rax, 0x2d54f8259fea5f87
mov qword [rbp - 0x70], rcx
mov r8d, edx
mov qword [rsp + 0x30], rax
movabs rax, 0x83b94ed6faa2bc73
mov rcx, qword [rsp + 0x30]
mov qword [rbp - 0x68], rcx
mov qword [rsp + 0x30], rax
mov rcx, qword [rsp + 0x30]
mov qword [rbp - 0x60], rcx
movabs rcx, 0xe6bc37645bd7bfb8
mov qword [rsp + 0x30], rcx
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x58], rax
mov qword [rsp + 0x30], r13
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x30], rax
mov qword [rsp + 0x30], r12
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x28], rax
movabs rax, 0xa19974a58ed0d303
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rbp - 0x20], rax
mov qword [rsp + 0x30], rcx
lea rcx, [rbp - 0x70]
mov rax, qword [rsp + 0x30]
movdqa xmm1, xmmword [rbp - 0x70]
xorps xmm1, xmmword [rbp - 0x30]
movdqa xmm0, xmmword [rbp - 0x60]
mov qword [rbp - 0x18], rax
movq rax, xmm1
xorps xmm0, xmmword [rbp - 0x20]
movdqa xmmword [rbp - 0x70], xmm1
movdqa xmmword [rbp - 0x60], xmm0
test al, al
je 0x18005f3ab
nop dword [rax]
inc rcx
mov r8, rcx
cmp byte [rcx], 0
jne 0x18005f3a0
xor r15d, r15d
sub r8d, edx
xor r9d, r9d
mov qword [rsp + 0x20], r15
lea rdx, [rbp - 0x70]
lea rcx, [r15 - 1]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rdi, qword gs:[0x60]
mov rcx, qword [rdi + 0x110]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, qword [rdi + 0x18]
mov esi, r15d
add rcx, 0x20
mov rax, qword [rcx]
cmp rax, rcx
je 0x18005f404
cmp qword [rax + 0x20], rbx
je 0x18005f400
mov rax, qword [rax]
cmp rax, rcx
jne 0x18005f3f0
jmp 0x18005f404
mov rsi, qword [rax + 0x50]
mov rcx, qword [rdi + 0x110]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rdx, rsi
mov rcx, r14
call fcn.18005d570
movabs rax, 0x20e93de3f9fbdbcb
lea rdx, [rsp + 0x60]
mov qword [rsp + 0x30], rax
lea rcx, [rsp + 0x60]
mov rax, qword [rsp + 0x30]
mov r8d, edx
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x30], r12
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x30], r13
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x30], r12
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x78], rax
movdqa xmm0, xmmword [rsp + 0x70]
xorps xmm0, xmmword [rsp + 0x60]
movq rax, xmm0
movdqa xmmword [rsp + 0x60], xmm0
test al, al
je 0x18005f49b
nop dword [rax]
inc rcx
mov r8, rcx
cmp byte [rcx], r15b
jne 0x18005f490
sub r8d, edx
lea rdx, [rsp + 0x60]
xor r9d, r9d
mov qword [rsp + 0x20], r15
lea rcx, [r9 - 1]
call qword [sym.imp.KERNEL32.dll_WriteFile]
xor eax, eax
jmp 0x18005f26d
xor eax, eax
jmp 0x18005f295