Function at 0x14018ee8c
Capabilities:
Parse pe header

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0x60
mov r13, qword [0x14045d4c8]
mov esi, 1
mov rbp, rdx
mov eax, esi
lea rbx, [r13 + 0x70]
lock xadd dword [rbx + 0x4c], eax
add eax, esi
xor r15d, r15d
test eax, eax
jle 0x14018eeee
mov rcx, qword [rbx + 0x40]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, esi
lock xadd dword [rbx + 0x4c], eax
add eax, esi
test eax, eax
jg 0x14018eecc
mov r8, qword [rsp + 0xb0]
lea r12, [r13 + 0x60]
mov rcx, qword [r12]
cmp rcx, r12
je 0x14018ef56
mov rdx, qword [rcx + 0x478]
cmp rbp, rdx
jbe 0x14018ef15
mov eax, dword [rcx + 0x480]
add rax, rdx
cmp rbp, rax
jb 0x14018ef1a
mov rcx, qword [rcx]
jmp 0x14018eef6
mov rdx, rbp
call fcn.14018f494
mov edi, eax
test rbx, rbx
je 0x14018ef44
or ecx, 0xffffffff
lock xadd dword [rbx + 0x4c], ecx
sub ecx, esi
jle 0x14018ef44
mov rcx, qword [rbx + 0x38]
xor r8d, r8d
mov edx, esi
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov eax, edi
add rsp, 0x60
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
test rbx, rbx
je 0x14018ef76
or eax, 0xffffffff
lock xadd dword [rbx + 0x4c], eax
sub eax, esi
jle 0x14018ef76
mov rcx, qword [rbx + 0x38]
xor r8d, r8d
mov edx, esi
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
lock add dword [rbx + 0x34], esi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, dword [rbx + 0x30]
mov ecx, r15d
mov r8d, eax
mov eax, edx
test edx, edx
je 0x14018efa3
cmp dword [rbx + 0x2c], r8d
je 0x14018efa3
mov ecx, edx
mov eax, r15d
inc eax
mov dword [rbx + 0x2c], r8d
mov dword [rbx + 0x30], eax
test ecx, ecx
je 0x14018efb7
neg ecx
lock xadd dword [rbx + 0x34], ecx
mov esi, 0x40000000
mov edi, r15d
mov eax, esi
xchg dword [rbx + 0x4c], eax
add eax, esi
mov dword [rbx + 0x48], eax
test eax, eax
jle 0x14018efe1
mov rcx, qword [rbx + 0x38]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
inc edi
cmp edi, dword [rbx + 0x48]
jl 0x14018efcd
mov rcx, qword [r12]
mov r15d, 0xc0000000
cmp rcx, r12
je 0x14018f017
mov rdx, qword [rcx + 0x478]
cmp rbp, rdx
jbe 0x14018f00a
mov eax, dword [rcx + 0x480]
add rax, rdx
cmp rbp, rax
jb 0x14018f00f
mov rcx, qword [rcx]
jmp 0x14018efeb
mov rdx, rbp
jmp 0x14018f3a7
cmp qword [r13], r13
jne 0x14018f03c
mov edx, 1
mov rcx, r13
call fcn.14018ea9c
mov ebp, eax
test eax, eax
js 0x14018f2c0
mov rbp, qword [rsp + 0xa8]
lea rdi, [r13 + 0x10]
lock inc dword [rdi + 0x34]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, dword [rdi + 0x30]
xor r9d, r9d
mov r8d, eax
mov ecx, r9d
mov eax, edx
test edx, edx
je 0x14018f070
cmp dword [rdi + 0x2c], r8d
je 0x14018f070
mov ecx, edx
mov eax, r9d
inc eax
mov dword [rdi + 0x2c], r8d
mov dword [rdi + 0x30], eax
test ecx, ecx
je 0x14018f084
neg ecx
lock xadd dword [rdi + 0x34], ecx
mov eax, esi
xchg dword [rdi + 0x4c], eax
add eax, esi
mov esi, r9d
mov dword [rdi + 0x48], eax
test eax, eax
jle 0x14018f0a9
mov rcx, qword [rdi + 0x38]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
inc esi
cmp esi, dword [rdi + 0x48]
jl 0x14018f095
mov rsi, qword [r13]
cmp qword [rsi + 8], r13
jne 0x14018f3ec
mov rax, qword [rsi]
cmp qword [rax + 8], rsi
jne 0x14018f3ec
mov qword [r13], rax
mov ecx, r15d
mov qword [rax + 8], r13
xchg dword [rdi + 0x4c], ecx
mov edx, dword [rdi + 0x48]
add edx, r15d
add edx, ecx
test edx, edx
jle 0x14018f0eb
mov rcx, qword [rdi + 0x40]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
dec dword [rdi + 0x30]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lock dec dword [rdi + 0x34]
lea rdx, [rsp + 0x28]
mov r8d, 0x30
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualQuery]
xor edx, edx
test rax, rax
jne 0x14018f12f
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebp, ax
or ebp, 0x80070000
test eax, eax
cmovle ebp, eax
jmp 0x14018f372
cmp dword [rsp + 0x50], 0x1000000
jne 0x14018f1b8
mov rax, qword [rsp + 0x30]
mov ecx, 0x5a4d
mov qword [rsp + 0x20], rax
cmp word [rax], cx
jne 0x14018f1b8
movsxd rbp, dword [rax + 0x3c]
add rbp, rax
cmp rbp, qword [rsp + 0xa8]
ja 0x14018f1b8
cmp dword [rbp], 0x4550
jne 0x14018f1b8
mov ecx, edx
mov dword [rsp + 0xa0], edx
cmp dx, word [rbp + 6]
jae 0x14018f1b8
mov eax, ecx
lea rcx, [rax + rax*4]
movzx eax, word [rbp + 0x14]
add rax, 0x18
mov qword [rsp + 0xb8], rcx
add rax, rbp
lea rcx, [rax + rcx*8]
call fcn.1401999b4
cmp al, 1
je 0x14018f2f8
mov ecx, dword [rsp + 0xa0]
movzx eax, word [rbp + 6]
inc ecx
mov dword [rsp + 0xa0], ecx
cmp ecx, eax
jb 0x14018f176
mov ebp, 1
xor r12d, r12d
mov dword [rsi + 0x20], 0x400
lea rax, [rsi + 0x10]
mov qword [rsi + 0x478], r12
lea rcx, [0x1403bc3d8]
mov qword [rsi + 0x488], r12
mov qword [rax], rcx
lea rcx, [rsi + 0x28]
mov qword [rcx + 8], rax
lea rax, [rsi + 0x78]
mov qword [rsi + 0x18], rax
mov word [rcx], r12w
mov qword [rcx + 0x10], r12
mov qword [rcx + 0x18], r12
mov qword [rcx + 0x38], r12
mov qword [rcx + 0x48], r12
mov qword [rcx + 0x30], rcx
lock inc dword [rdi + 0x34]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, dword [rdi + 0x30]
mov ecx, r12d
mov r8d, eax
mov eax, edx
test edx, edx
je 0x14018f238
cmp dword [rdi + 0x2c], r8d
je 0x14018f238
mov ecx, edx
mov eax, r12d
inc eax
mov dword [rdi + 0x2c], r8d
mov dword [rdi + 0x30], eax
test ecx, ecx
je 0x14018f24c
neg ecx
lock xadd dword [rdi + 0x34], ecx
mov eax, 0x40000000
xchg dword [rdi + 0x4c], eax
add eax, 0x40000000
mov dword [rdi + 0x48], eax
test eax, eax
jle 0x14018f276
mov rcx, qword [rdi + 0x38]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
inc r12d
cmp r12d, dword [rdi + 0x48]
jl 0x14018f260
mov rax, qword [r13 + 8]
cmp qword [rax], r13
jne 0x14018f3ec
mov qword [rsi], r13
mov ecx, r15d
mov qword [rsi + 8], rax
mov qword [rax], rsi
mov qword [r13 + 8], rsi
xchg dword [rdi + 0x4c], ecx
mov edx, dword [rdi + 0x48]
add edx, r15d
add edx, ecx
test edx, edx
jle 0x14018f2b0
mov rcx, qword [rdi + 0x40]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
dec dword [rdi + 0x30]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lock dec dword [rdi + 0x34]
xchg dword [rbx + 0x4c], r15d
mov edx, dword [rbx + 0x48]
add edx, 0xc0000000
add edx, r15d
test edx, edx
jle 0x14018f2e1
mov rcx, qword [rbx + 0x40]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
dec dword [rbx + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lock dec dword [rbx + 0x34]
mov eax, ebp
jmp 0x14018ef46
lfence
movzx eax, word [rbp + 0x14]
mov rcx, qword [rsp + 0xb8]
add rax, rbp
add rcx, 3
lea r8, [rax + rcx*8]
test r8, r8
je 0x14018f1b8
mov eax, dword [rbp + 0x50]
mov rcx, qword [rsp + 0x20]
mov qword [rsi + 0x478], rcx
mov dword [rsi + 0x480], eax
mov edx, dword [r8 + 0xc]
add rdx, rcx
lea rcx, [rsi + 0x28]
mov qword [rsi + 0x488], rdx
mov r8d, dword [r8 + 0x10]
call fcn.140199a3c
mov ebp, eax
test eax, eax
js 0x14018f1bd
mov rax, qword [rsi + 0x488]
movups xmm0, xmmword [rax + 0xc]
movups xmmword [rsi + 0x490], xmm0
movups xmm1, xmmword [rax + 0x1c]
movups xmmword [rsi + 0x4a0], xmm1
test ebp, ebp
js 0x14018f1bd
cmp ebp, 1
je 0x14018f1bd
mov rax, qword [r12 + 8]
cmp qword [rax], r12
jne 0x14018f3ec
mov rdx, qword [rsp + 0xa8]
mov rcx, rsi
mov qword [rsi], r12
mov qword [rsi + 8], rax
mov qword [rax], rsi
mov qword [r12 + 8], rsi
mov r8, qword [rsp + 0xb0]
call fcn.14018f494
xchg dword [rbx + 0x4c], r15d
mov edx, dword [rbx + 0x48]
mov edi, eax
add edx, 0xc0000000
add edx, r15d
test edx, edx
jle 0x14018f3d7
mov rcx, qword [rbx + 0x40]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
dec dword [rbx + 0x30]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lock dec dword [rbx + 0x34]
jmp 0x14018ef44
mov ecx, 3
int 0x29
int3