Function at 0x140018880
Capabilities:
Link many functions at runtime

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x50
mov rsi, r8
mov r14, rdx
mov rdi, rcx
xor r15d, r15d
mov rbx, qword [0x1400faa88]
test rbx, rbx
jne 0x1400188d0
lea ecx, [rbx + 0x28]
call fcn.14008d9e0
mov rbx, rax
mov qword [rsp + 0x90], rax
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov qword [0x1400faa88], rbx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test rsi, rsi
jne 0x140018925
mov rcx, qword [0x1400faa88]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
mov rdx, qword [r14]
sub rdx, 0x18
mov eax, dword [rdx + 0x10]
cmp eax, 0x7ffffc17
je 0x14001891e
mov eax, dword [rdx + 0x10]
cmp eax, 0xffffffff
je 0x140018914
mov ebx, 0xffffffff
lock xadd dword [rdx + 0x10], ebx
sub ebx, 1
jg 0x14001891e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
xor al, al
jmp 0x140018d8f
cmp qword [rsi], 0
je 0x140018972
mov rcx, qword [0x1400faa88]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
mov rdx, qword [r14]
sub rdx, 0x18
mov eax, dword [rdx + 0x10]
cmp eax, 0x7ffffc17
je 0x14001896b
mov eax, dword [rdx + 0x10]
cmp eax, 0xffffffff
je 0x140018961
mov ebx, 0xffffffff
lock xadd dword [rdx + 0x10], ebx
sub ebx, 1
jg 0x14001896b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov al, 1
jmp 0x140018d8f
imul eax, dword [rdi + 0x88], 0x343fd
add eax, 0x269ec3
shr eax, 0x10
and eax, 0x7fff
mov dword [rdi + 0x88], eax
mov rcx, qword [rsi]
mov ebx, 0xffffffff
test rcx, rcx
jne 0x140018bea
mov rbp, qword [r14]
cmp dword [rbp - 0x10], ecx
jle 0x140018a31
lea edx, [rcx + 0x5c]
mov rcx, rbp
call fcn.14008f928
test rax, rax
je 0x140018a31
cmp word [rax], 0
je 0x140018a31
sub rax, rbp
sar rax, 1
test eax, eax
js 0x140018a31
mov rbp, qword [r14]
cmp dword [rbp - 0x10], 0
jle 0x1400189f4
lea rdx, [0x1400c8d28]
mov rcx, rbp
call fcn.14008f9a4
test rax, rax
je 0x1400189f4
sub rax, rbp
sar rax, 1
cmp eax, 1
je 0x140018a1b
mov rbp, qword [r14]
cmp dword [rbp - 0x10], 0
jle 0x140018a31
lea rdx, [0x1400c8d30]
mov rcx, rbp
call fcn.14008f9a4
test rax, rax
je 0x140018a31
sub rax, rbp
sar rax, 1
test eax, eax
jne 0x140018a31
mov r9d, 8
mov rdx, qword [r14]
mov rcx, rsi
call fcn.140029680
jmp 0x140018bde
xor edx, edx
mov cl, 1
call fcn.140042fe0
mov rcx, qword [rax]
mov rbp, qword [rcx + 0x18]
test rbp, rbp
je 0x140018a4f
add rbp, 0x620
jmp 0x140018a56
lea rbp, [0x1400c5494]
call fcn.140002000
mov r10, qword [rax]
mov byte [rsp + 0x30], 1
mov byte [rsp + 0x28], 0
mov byte [rsp + 0x20], 0
mov r9d, ebx
mov r8d, ebx
mov rdx, rbp
mov rcx, rax
call qword [r10 + 0x28]
mov qword [rsp + 0x90], rax
cmp dword [rax - 0x10], 0
jle 0x140018b9b
mov r8, r14
lea rdx, [rsp + 0x90]
lea rcx, [rsp + 0x98]
call fcn.140016f20
nop
mov r9d, 8
mov rdx, qword [rax]
mov rcx, rsi
call fcn.140029680
movzx ebp, al
mov rdx, qword [rsp + 0x98]
add rdx, 0xffffffffffffffe8
mov ecx, dword [rdx + 0x10]
cmp ecx, 0x7ffffc17
je 0x140018af1
mov eax, dword [rdx + 0x10]
cmp eax, 0xffffffff
je 0x140018ae7
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140018af1
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
test bpl, bpl
jne 0x140018baa
lea r8, [0x1400c8d38]
lea rdx, [rsp + 0x90]
lea rcx, [rsp + 0x48]
call fcn.140017010
nop
mov r8, r14
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.140016f20
nop
mov r9d, 8
mov rdx, qword [rax]
mov rcx, rsi
call fcn.140029680
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov eax, dword [rdx + 0x10]
cmp eax, 0x7ffffc17
je 0x140018b68
mov eax, dword [rdx + 0x10]
cmp eax, 0xffffffff
je 0x140018b5e
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140018b68
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
mov eax, dword [rdx + 0x10]
cmp eax, 0x7ffffc17
je 0x140018b99
mov eax, dword [rdx + 0x10]
cmp eax, 0xffffffff
je 0x140018b8f
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140018b99
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
jmp 0x140018baa
xor r9d, r9d
mov rdx, qword [r14]
mov rcx, rsi
call fcn.140029680
nop
mov rdx, qword [rsp + 0x90]
add rdx, 0xffffffffffffffe8
mov eax, dword [rdx + 0x10]
cmp eax, 0x7ffffc17
je 0x140018bde
mov eax, dword [rdx + 0x10]
cmp eax, 0xffffffff
je 0x140018bd4
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140018bde
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rcx, qword [rsi]
test rcx, rcx
je 0x140018d48
lea rax, [rdi + 0x28]
cmp rsi, rax
jne 0x140018c43
test rcx, rcx
je 0x140018c15
lea rdx, str.GetJRToolsDLL
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140018c15
mov ecx, 0x30d70
call rax
mov qword [rdi + 0x38], rax
mov rcx, qword [rdi + 0x38]
test rcx, rcx
je 0x140018d01
mov rax, qword [0x1400faa70]
test rax, rax
je 0x140018c32
mov r15, qword [rax + 8]
mov rax, qword [rcx]
mov r8, r15
movzx edx, byte [rdi + 0x30]
call qword [rax]
jmp 0x140018d48
lea rax, [rdi + 0x40]
cmp rsi, rax
jne 0x140018c84
test rcx, rcx
je 0x140018c69
lea rdx, str.GetJRPlayerDLL
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140018c69
call rax
mov qword [rdi + 0x50], rax
mov rcx, qword [rdi + 0x50]
test rcx, rcx
je 0x140018d01
mov rax, qword [rcx]
movzx edx, byte [rdi + 0x48]
call qword [rax]
jmp 0x140018d48
lea rax, [rdi + 0x10]
cmp rsi, rax
jne 0x140018cc1
test rcx, rcx
je 0x140018caa
lea rdx, str.GetJRImageAppDLL
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140018caa
call rax
mov qword [rdi + 0x20], rax
mov rcx, qword [rdi + 0x20]
test rcx, rcx
je 0x140018d01
mov rax, qword [rcx]
movzx edx, byte [rdi + 0x30]
call qword [rax]
jmp 0x140018d48
lea rax, [rdi + 0x70]
cmp rsi, rax
jne 0x140018d0b
test rcx, rcx
je 0x140018cea
lea rdx, str.GetJRTelevisionDLL
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140018cea
call rax
mov qword [rdi + 0x80], rax
mov rcx, qword [rdi + 0x80]
test rcx, rcx
je 0x140018d01
mov rax, qword [rcx]
movzx edx, byte [rdi + 0x78]
call qword [rax]
jmp 0x140018d48
mov rcx, rsi
call fcn.140029b60
jmp 0x140018d48
test rcx, rcx
je 0x140018d28
lea rdx, str.JRReaderInitialize
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140018d28
movzx ecx, byte [rdi + 8]
call rax
mov rcx, qword [rsi]
test rcx, rcx
je 0x140018d48
lea rdx, str.JRDiscInitialize
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140018d48
movzx ecx, byte [rdi + 0x60]
call rax
mov rcx, qword [0x1400faa88]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp qword [rsi], 0
setne dil
mov rdx, qword [r14]
sub rdx, 0x18
mov eax, dword [rdx + 0x10]
cmp eax, 0x7ffffc17
je 0x140018d8b
mov eax, dword [rdx + 0x10]
cmp eax, 0xffffffff
je 0x140018d80
lock xadd dword [rdx + 0x10], ebx
sub ebx, 1
jg 0x140018d8b
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [r8 + 8]
nop
movzx eax, dil
mov rbx, qword [rsp + 0x80]
add rsp, 0x50
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret