Function at 0x18001d540
Capabilities:
Check mutex on windows
Read file via mapping

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], r8
mov qword [rax + 0x10], rdx
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x1b0
mov qword [rsp + 0x150], 0xfffffffffffffffe
mov qword [rax + 0x20], rbx
mov rbx, r9
mov rdi, rcx
xor eax, eax
mov dword [rsp + 0x30], eax
test rcx, rcx
je 0x18001dc2b
or r15, 0xffffffffffffffff
mov rcx, r15
repne scasw ax, word [rdi]
not rcx
cmp rcx, 1
je 0x18001dc2b
test rdx, rdx
je 0x18001dc2b
mov rcx, r15
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
cmp rcx, 1
je 0x18001dc2b
test r8, r8
je 0x18001dc2b
test rbx, rbx
je 0x18001dc2b
mov rcx, r15
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
cmp rcx, 1
je 0x18001dc2b
lea rcx, section..data
mov rax, qword [section..data]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x58], rax
lea rcx, section..data
mov rax, qword [section..data]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0x58]
mov rcx, rbx
call fcn.18001cdc0
lea rdx, [rsp + 0x158]
lea eax, [r15 + 2]
test rdx, rdx
je 0x18001d654
xor r9d, r9d
lea r8, [rsp + 0x160]
mov edx, eax
lea rcx, [0x18006cf40]
call sub.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW
lea r8, [rsp + 0x58]
lea rdx, [0x18006cfe0]
lea rcx, [rsp + 0x90]
call fcn.180004150
mov r8, qword [rax]
xor edx, edx
lea rcx, [rsp + 0x158]
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov rdi, rax
mov qword [rsp + 0x80], rax
mov rdx, qword [rsp + 0x90]
add rdx, 0xffffffffffffffe8
mov ecx, r15d
lock xadd dword [rdx + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x18001d6ae
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov dword [rsp + 0x48], eax
or edx, 0xffffffff
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp ebx, 0xb7
je 0x18001d732
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rsp + 0x40]
mov ecx, 0xa000
call fcn.18001d440
lea r8, [rsp + 0x40]
lea rdx, [0x18006cfe0]
lea rcx, [rsp + 0x98]
call fcn.180004150
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rax]
mov ecx, 0xa000
call fcn.18001d440
mov rdx, qword [rsp + 0x98]
add rdx, 0xffffffffffffffe8
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x18001d732
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
xor ebx, ebx
nop word [rax + rax]
mov esi, ebx
lea r8, [rsp + 0x40]
lea rdx, [0x18006cfe0]
lea rcx, [rsp + 0x88]
call fcn.180004150
mov r8, qword [rax]
xor edx, edx
lea ecx, [rdx + 6]
call qword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov rbp, rax
mov rdx, qword [rsp + 0x88]
add rdx, 0xffffffffffffffe8
mov ecx, r15d
lock xadd dword [rdx + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x18001d78f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
test rbp, rbp
je 0x18001d9b1
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 6]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov r12, rax
test rax, rax
je 0x18001d9b1
mov rax, qword [rax]
mov qword [rsp + 0x50], rax
mov eax, dword [r12 + 8]
mov dword [rsp + 0x38], eax
mov edi, dword [r12 + 0xc]
lea r14d, [rax - 0x10]
lea rcx, [rsp + 0xf0]
call fcn.18001fd90
nop
mov r8d, r14d
lea rdx, [r12 + 0x10]
lea rcx, [rsp + 0xf0]
call fcn.180021990
mov r9, qword [rsp + 0x200]
mov r8, qword [rsp + 0x1f8]
mov rdx, qword [rsp + 0x1f0]
lea rcx, [rsp + 0xf0]
call fcn.180020640
mov dword [rsp + 0x34], ebx
lea r9, [rsp + 0x34]
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0xf0]
call fcn.180021b40
cmp dword [rsp + 0x34], r14d
ja 0x18001d864
lea r9, [rsp + 0x34]
mov r8d, r14d
lea rdx, [r12 + 0x10]
lea rcx, [rsp + 0xf0]
call fcn.180021b40
mov dword [rsp + 0x30], 1
jmp 0x18001d874
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp edi, eax
mov eax, 1
cmove esi, eax
test esi, esi
je 0x18001d896
mov ecx, r14d
call fcn.180034088
mov rbx, rax
mov r9d, r14d
lea r8, [r12 + 0x10]
mov edx, r14d
mov rcx, rax
call fcn.180034594
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x18001d907
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea r8, [rsp + 0x40]
lea rdx, [0x18006cfe0]
lea rcx, [rsp + 0xa0]
call fcn.180004150
mov ecx, dword [rsp + 0x38]
add ecx, ecx
mov r9d, r14d
mov r8, rbx
mov rdx, qword [rax]
call fcn.18001d440
mov rdx, qword [rsp + 0xa0]
add rdx, 0xffffffffffffffe8
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x18001d907
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
test rbx, rbx
je 0x18001d915
mov rcx, rbx
call fcn.1800340d0
nop
mov rax, qword [rsp + 0x120]
mov qword [rsp + 0x78], rax
mov rcx, qword [rsp + 0xf0]
mov qword [rsp + 0x70], rcx
mov rax, qword [rax]
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x60], rcx
movaps xmm0, xmmword [rsp + 0x70]
movdqa xmmword [rsp + 0x180], xmm0
movaps xmm1, xmmword [rsp + 0x60]
movdqa xmmword [rsp + 0x130], xmm1
lea r9, [rsp + 0x180]
lea r8, [rsp + 0x130]
lea rdx, [rsp + 0x1a0]
lea rcx, [rsp + 0xf0]
call fcn.180024390
mov rcx, qword [rsp + 0x120]
call fcn.1800340d0
xor ebx, ebx
mov qword [rsp + 0x120], rbx
mov qword [rsp + 0x128], rbx
mov rcx, qword [rsp + 0xf0]
call fcn.1800340d0
test esi, esi
jne 0x18001d740
mov rdi, qword [rsp + 0x40]
nop word [rax + rax]
mov ebp, ebx
mov r8, rdi
xor edx, edx
lea ecx, [rdx + 6]
call qword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov r12, rax
test rax, rax
je 0x18001dbbb
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 6]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov r13, rax
test rax, rax
je 0x18001dbbb
mov rax, qword [rax]
mov qword [rsp + 0x50], rax
mov eax, dword [r13 + 8]
mov dword [rsp + 0x38], eax
mov ebx, dword [r13 + 0xc]
lea r14d, [rax - 0x10]
lea rcx, [rsp + 0xb0]
call fcn.18001fd90
nop
mov r8d, r14d
lea rdx, [r13 + 0x10]
lea rcx, [rsp + 0xb0]
call fcn.180021990
mov r9, qword [rsp + 0x200]
mov r8, qword [rsp + 0x1f8]
mov rdx, qword [rsp + 0x1f0]
lea rcx, [rsp + 0xb0]
call fcn.180020640
mov dword [rsp + 0x3c], 0
lea r9, [rsp + 0x3c]
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0xb0]
call fcn.180021b40
cmp dword [rsp + 0x3c], r14d
ja 0x18001daa8
lea r9, [rsp + 0x3c]
mov r8d, r14d
lea rdx, [r13 + 0x10]
lea rcx, [rsp + 0xb0]
call fcn.180021b40
mov dword [rsp + 0x30], 1
jmp 0x18001dab8
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp ebx, eax
mov eax, 1
cmove ebp, eax
xor ebx, ebx
mov rsi, rbx
test ebp, ebp
je 0x18001dade
mov ecx, r14d
call fcn.180034088
mov rsi, rax
mov r9d, r14d
lea r8, [r13 + 0x10]
mov edx, r14d
mov rcx, rax
call fcn.180034594
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebp, ebp
je 0x18001db13
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [rsp + 0x38]
add ecx, ecx
mov r9d, r14d
mov r8, rsi
mov rdx, rdi
call fcn.18001d440
test rsi, rsi
je 0x18001db21
mov rcx, rsi
call fcn.1800340d0
nop
mov rax, qword [rsp + 0xe0]
mov qword [rsp + 0x68], rax
mov rcx, qword [rsp + 0xb0]
mov qword [rsp + 0x60], rcx
mov rax, qword [rax]
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x70], rcx
movaps xmm0, xmmword [rsp + 0x60]
movdqa xmmword [rsp + 0x140], xmm0
movaps xmm1, xmmword [rsp + 0x70]
movdqa xmmword [rsp + 0x170], xmm1
lea r9, [rsp + 0x140]
lea r8, [rsp + 0x170]
lea rdx, [rsp + 0x190]
lea rcx, [rsp + 0xb0]
call fcn.180024390
mov rcx, qword [rsp + 0xe0]
call fcn.1800340d0
mov qword [rsp + 0xe0], rbx
mov qword [rsp + 0xe8], rbx
mov rcx, qword [rsp + 0xb0]
call fcn.1800340d0
test ebp, ebp
jne 0x18001d9c0
mov rbx, qword [rsp + 0x80]
test rbx, rbx
je 0x18001dbe5
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
cmp dword [rsp + 0x48], 0xb7
jne 0x18001dbe5
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rdx, [rdi - 0x18]
or r15, 0xffffffffffffffff
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x18001dc05
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
nop
mov rdx, qword [rsp + 0x58]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], r15d
dec r15d
test r15d, r15d
jg 0x18001dc25
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov eax, dword [rsp + 0x30]
jmp 0x18001dc2d
xor eax, eax
mov rbx, qword [rsp + 0x208]
add rsp, 0x1b0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret