Function at 0x18008d850
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 - 0x5f]
sub rsp, 0xb0
mov rax, qword [0x180195040]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov eax, 0x5a4d
mov rdi, rdx
mov rbx, rcx
cmp word [rcx], ax
jne 0x18008ddbe
movsxd rax, dword [rcx + 0x3c]
cmp dword [rax + rcx], 0x4550
jne 0x18008ddbe
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 [rbp - 0x39], rcx
test rcx, rcx
je 0x18008dbd3
mov r14d, dword [rax + rbx + 0x88]
test r14, r14
je 0x18008dbd3
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 0x18008d972
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 0x18008d91f
mov ecx, 0xffffffff
jmp 0x18008d95c
test rax, rax
jne 0x18008d92b
mov ecx, 1
jmp 0x18008d95c
mov r8, rdi
sub r8, rax
nop dword [rax]
nop word [rax + rax]
movzx ecx, byte [r8 + rax]
movzx edx, byte [rax]
lea rax, [rax + 1]
test cl, cl
je 0x18008d954
cmp cl, dl
je 0x18008d940
sub ecx, edx
je 0x18008da98
test ecx, ecx
lea rax, [r11 + 1]
cmovle rax, r10
cmovle r9, r11
mov r10, rax
cmp r9, rax
jne 0x18008d900
movabs r13, 0xdbb52a03a064e0c9
movabs r12, 0x131ec4120905b96e
mov dl, 3
call fcn.18008b850
movabs rcx, 0xcffdb88cc8479600
lea rdx, [rbp - 0x19]
movabs rax, 0xb5955e71cf1498ac
mov r8d, edx
mov qword [rbp - 0x39], rax
mov rax, qword [rbp - 0x39]
mov qword [rbp - 0x19], rax
movabs rax, 0x7770b17d6f25cd01
mov qword [rbp - 0x39], rax
mov rax, qword [rbp - 0x39]
mov qword [rbp - 0x11], rax
movabs rax, 0x705b24bd5cf5d431
mov qword [rbp - 0x39], rax
mov rax, qword [rbp - 0x39]
mov qword [rbp - 9], rax
mov qword [rbp - 0x39], rcx
mov rax, qword [rbp - 0x39]
mov qword [rbp - 1], rax
mov qword [rbp - 0x39], r13
mov rax, qword [rbp - 0x39]
mov qword [rbp + 7], rax
mov qword [rbp - 0x39], r12
mov rax, qword [rbp - 0x39]
mov qword [rbp + 0xf], rax
movabs rax, 0x705b24bd5cf5f40b
mov qword [rbp - 0x39], rax
mov rax, qword [rbp - 0x39]
mov qword [rbp + 0x17], rax
mov qword [rbp - 0x39], rcx
lea rcx, [rbp - 0x19]
mov rax, qword [rbp - 0x39]
movdqa xmm1, xmmword [rbp - 0x19]
xorps xmm1, xmmword [rbp + 7]
movdqa xmm0, xmmword [rbp - 9]
mov qword [rbp + 0x1f], rax
movq rax, xmm1
xorps xmm0, xmmword [rbp + 0x17]
movdqa xmmword [rbp - 0x19], xmm1
movdqa xmmword [rbp - 9], xmm0
test al, al
je 0x18008da5b
nop
inc rcx
mov r8, rcx
cmp byte [rcx], r15b
jne 0x18008da50
sub r8d, edx
mov qword [rsp + 0x20], r15
lea rdx, [rbp - 0x19]
xor r9d, r9d
mov rcx, 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rax, rdi
mov r8d, edi
cmp byte [rdi], r15b
je 0x18008da8d
inc rax
mov r8, rax
cmp byte [rax], r15b
jne 0x18008da82
sub r8d, edi
mov rdx, rdi
jmp 0x18008dda2
movzx eax, word [r12 + r11*2]
mov dl, 1
mov esi, dword [r13 + rax*4]
call fcn.18008b850
movabs rax, 0xbd955e71cf1498ac
lea rdx, [rbp - 0x29]
mov qword [rbp - 0x31], rax
lea rcx, [rbp - 0x29]
mov rax, qword [rbp - 0x31]
movabs r13, 0xdbb52a03a064e0c9
mov qword [rbp - 0x29], rax
movabs r12, 0x131ec4120905b96e
movabs rax, 0x131ee4286d6bcc01
mov r8d, edx
mov qword [rbp - 0x31], rax
mov rax, qword [rbp - 0x31]
mov qword [rbp - 0x21], rax
mov qword [rbp - 0x31], r13
mov rax, qword [rbp - 0x31]
mov qword [rbp - 0x19], rax
mov qword [rbp - 0x31], r12
mov rax, qword [rbp - 0x31]
movdqa xmm0, xmmword [rbp - 0x29]
mov qword [rbp - 0x11], rax
xorps xmm0, xmmword [rbp - 0x19]
movq rax, xmm0
movdqa xmmword [rbp - 0x29], xmm0
test al, al
je 0x18008db2e
inc rcx
mov r8, rcx
cmp byte [rcx], r15b
jne 0x18008db23
sub r8d, edx
mov qword [rsp + 0x20], r15
lea rdx, [rbp - 0x29]
xor r9d, r9d
mov rcx, 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rax, rdi
mov r8d, edi
cmp byte [rdi], r15b
je 0x18008db60
inc rax
mov r8, rax
cmp byte [rax], r15b
jne 0x18008db55
sub r8d, edi
mov qword [rsp + 0x20], r15
xor r9d, r9d
mov rdx, rdi
mov rcx, 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp rsi, r14
jb 0x18008db90
mov rax, rsi
sub rax, r14
cmp rax, qword [rbp - 0x39]
jb 0x18008d986
lea rax, [rsi + rbx]
mov r14, qword [rsp + 0xa8]
mov r13, qword [rsp + 0xe8]
mov r12, qword [rsp + 0xe0]
mov rsi, qword [rsp + 0xd0]
mov r15, qword [rsp + 0xa0]
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.1800f1520
add rsp, 0xb0
pop rdi
pop rbx
pop rbp
ret
mov dl, 3
call fcn.18008b850
mov r14, rax
lea rdx, [rbp + 7]
movabs rax, 0xb3954f6fd5008fa4
movabs r13, 0xdbb52a03a064e0c9
mov qword [rbp - 0x39], rax
movabs r12, 0x131ec4120905b96e
mov rcx, qword [rbp - 0x39]
movabs rax, 0x6b7be47d6725ca0f
mov qword [rbp + 7], rcx
mov r8d, edx
mov qword [rbp - 0x39], rax
movabs rax, 0x527b1ece28879b7b
mov rcx, qword [rbp - 0x39]
mov qword [rbp + 0xf], rcx
mov qword [rbp - 0x39], rax
mov rcx, qword [rbp - 0x39]
mov qword [rbp + 0x17], rcx
movabs rcx, 0xcffdb88cc8479600
mov qword [rbp - 0x39], rcx
mov rax, qword [rbp - 0x39]
mov qword [rbp + 0x1f], rax
mov qword [rbp - 0x39], r13
mov rax, qword [rbp - 0x39]
mov qword [rbp - 0x19], rax
mov qword [rbp - 0x39], r12
mov rax, qword [rbp - 0x39]
mov qword [rbp - 0x11], rax
movabs rax, 0x705b24bd5cf5f40b
mov qword [rbp - 0x39], rax
mov rax, qword [rbp - 0x39]
mov qword [rbp - 9], rax
mov qword [rbp - 0x39], rcx
lea rcx, [rbp + 7]
mov rax, qword [rbp - 0x39]
movdqa xmm1, xmmword [rbp + 7]
xorps xmm1, xmmword [rbp - 0x19]
movdqa xmm0, xmmword [rbp + 0x17]
mov qword [rbp - 1], rax
movq rax, xmm1
xorps xmm0, xmmword [rbp - 9]
movdqa xmmword [rbp + 7], xmm1
movdqa xmmword [rbp + 0x17], xmm0
test al, al
je 0x18008dcbe
inc rcx
mov r8, rcx
cmp byte [rcx], 0
jne 0x18008dcb3
sub r8d, edx
xor r15d, r15d
lea rdx, [rbp + 7]
mov qword [rsp + 0x20], r15
xor r9d, r9d
mov rcx, 0xffffffffffffffff
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 0x18008dd1a
cmp qword [rax + 0x20], rbx
je 0x18008dd16
mov rax, qword [rax]
cmp rax, rcx
jne 0x18008dd06
jmp 0x18008dd1a
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.18008b9c0
movabs rax, 0xdbb52a03a064e0eb
lea rdx, [rbp - 0x29]
mov qword [rbp - 0x39], rax
lea rcx, [rbp - 0x29]
mov rax, qword [rbp - 0x39]
mov r8d, edx
mov qword [rbp - 0x29], rax
mov qword [rbp - 0x39], r12
mov rax, qword [rbp - 0x39]
mov qword [rbp - 0x21], rax
mov qword [rbp - 0x39], r13
mov rax, qword [rbp - 0x39]
mov qword [rbp - 0x19], rax
mov qword [rbp - 0x39], r12
mov rax, qword [rbp - 0x39]
movdqa xmm0, xmmword [rbp - 0x29]
mov qword [rbp - 0x11], rax
xorps xmm0, xmmword [rbp - 0x19]
movq rax, xmm0
movdqa xmmword [rbp - 0x29], xmm0
test al, al
je 0x18008dd9b
nop
inc rcx
mov r8, rcx
cmp byte [rcx], r15b
jne 0x18008dd90
sub r8d, edx
lea rdx, [rbp - 0x29]
xor r9d, r9d
mov qword [rsp + 0x20], r15
mov rcx, 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_WriteFile]
xor eax, eax
jmp 0x18008db94
xor eax, eax
jmp 0x18008dbbc