Function at 0x140316c00
Capabilities:
Link many functions at runtime

Disassembly:
push rbp
push rbx
push rdi
push r12
push r14
lea rbp, [rsp - 0x20]
sub rsp, 0x120
xor r12d, r12d
mov r14, rcx
mov dword [rbp + 0x50], r12d
mov rcx, qword [rcx + 0x50]
mov ebx, dword [rcx + 4]
test ebx, ebx
je 0x140316c46
mov rdx, qword [rcx + 0x10]
xor r9d, r9d
add rdx, rcx
xor r8d, r8d
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, ebx
jae 0x140316c46
mov al, 1
jmp 0x140316c48
xor al, al
cmp byte [r14 + 0x60], r12b
je 0x140316c56
test al, al
je 0x1403175c8
mov qword [rsp + 0x118], rsi
mov rcx, r14
mov qword [rsp + 0x110], r13
mov byte [r14 + 0x60], 1
call fcn.140318c20
lea rcx, [r14 + 0x50]
call fcn.140316310
lea rsi, [0x140000000]
mov rdx, 0xffffffff80000001
lea rax, [rsi + 0xe570]
lea r8, [rbp + 0x50]
mov qword [rbp + 0x50], rax
lea rcx, [r14 + 0x50]
call fcn.140316000
mov rcx, qword [rbp + 0x50]
or ebx, 0xffffffff
mov eax, dword [rcx]
test eax, eax
je 0x140316cc2
cmp eax, ebx
je 0x140316cd0
mov eax, ebx
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x140316cd0
mov rcx, qword [rbp + 0x50]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140379300
lea rax, [rsi + 0xe600]
mov rdx, 0xffffffff80000002
lea r8, [rbp + 0x58]
mov qword [rbp + 0x58], rax
lea rcx, [r14 + 0x50]
call fcn.140316000
mov rcx, qword [rbp + 0x58]
mov eax, dword [rcx]
test eax, eax
je 0x140316d0d
cmp eax, 0xffffffff
je 0x140316d1b
mov eax, ebx
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x140316d1b
mov rcx, qword [rbp + 0x58]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140379300
lea rax, [rsi + 0xe690]
mov rdx, 0xffffffff80000002
lea r8, [rbp + 0x60]
mov qword [rbp + 0x60], rax
lea rcx, [r14 + 0x50]
call fcn.140316000
mov rcx, qword [rbp + 0x60]
mov eax, dword [rcx]
test eax, eax
je 0x140316d58
cmp eax, 0xffffffff
je 0x140316d66
mov eax, ebx
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x140316d66
mov rcx, qword [rbp + 0x60]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140379300
lea r13, [0x1400495e0]
mov r8d, ebx
lea rdx, [0x14000e738]
mov qword [rsp + 0x38], r13
lea rcx, [rsp + 0x60]
call fcn.140367ed0
mov rcx, qword [rax]
mov qword [rax], r13
mov qword [rbp - 0x30], rcx
mov rcx, qword [rsp + 0x60]
mov eax, dword [rcx]
test eax, eax
je 0x140316db0
cmp eax, 0xffffffff
je 0x140316dbe
mov eax, ebx
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x140316dbe
mov rcx, qword [rsp + 0x60]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140379300
mov rcx, qword [rsp + 0x38]
mov rax, qword [rbp - 0x30]
mov qword [rsp + 0x38], rax
mov eax, dword [rcx]
test eax, eax
je 0x140316de2
cmp eax, 0xffffffff
je 0x140316df0
mov eax, ebx
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x140316df0
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140379300
lea rcx, [rsp + 0x38]
mov qword [rsp + 0x30], r12
mov byte [rsp + 0x40], r12b
call fcn.14036dfa0
mov rcx, rax
mov dl, 1
call fcn.1403edf80
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x40], 1
test rax, rax
je 0x14031758c
lea rdx, [0x14000e748]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
movzx ecx, byte [rsp + 0x40]
mov qword [0x140582868], rax
test cl, cl
jne 0x140316e62
lea rcx, [rsp + 0x38]
call fcn.14036dfa0
mov rcx, rax
mov dl, 1
call fcn.1403edf80
mov cl, 1
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x40], cl
jmp 0x140316e67
mov rax, qword [rsp + 0x30]
test rax, rax
jne 0x140316e71
mov rdx, r12
jmp 0x140316e8e
lea rdx, [0x14000e758]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
movzx ecx, byte [rsp + 0x40]
mov rdx, rax
mov rax, qword [rsp + 0x30]
mov qword [0x140582880], rdx
test cl, cl
jne 0x140316eb8
lea rcx, [rsp + 0x38]
call fcn.14036dfa0
mov rcx, rax
mov dl, 1
call fcn.1403edf80
mov cl, 1
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x40], cl
test rax, rax
jne 0x140316ec2
mov rdx, r12
jmp 0x140316edf
lea rdx, [0x14000e770]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
movzx ecx, byte [rsp + 0x40]
mov rdx, rax
mov rax, qword [rsp + 0x30]
mov qword [0x140582860], rdx
test cl, cl
jne 0x140316f09
lea rcx, [rsp + 0x38]
call fcn.14036dfa0
mov rcx, rax
mov dl, 1
call fcn.1403edf80
mov cl, 1
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x40], cl
test rax, rax
jne 0x140316f13
mov rdx, r12
jmp 0x140316f30
lea rdx, [0x14000e788]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
movzx ecx, byte [rsp + 0x40]
mov rdx, rax
mov rax, qword [rsp + 0x30]
mov qword [0x140582870], rdx
test cl, cl
jne 0x140316f59
lea rcx, [rsp + 0x38]
call fcn.14036dfa0
mov rcx, rax
mov dl, 1
call fcn.1403edf80
mov qword [rsp + 0x30], rax
mov byte [rsp + 0x40], 1
test rax, rax
jne 0x140316f63
mov rax, r12
jmp 0x140316f73
lea rdx, [0x14000e7b0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rcx, [rbp - 0x50]
mov qword [rsp + 0x108], r15
mov qword [0x140582878], rax
call rax
test eax, eax
setne al
test al, al
je 0x140317291
mov rdx, qword [rbp - 0x48]
test rdx, rdx
je 0x14031701d
mov r8d, ebx
lea rcx, [rsp + 0x68]
call fcn.140367ed0
mov rcx, qword [rax]
mov qword [rax], r13
mov qword [rbp - 0x28], rcx
mov rcx, qword [rsp + 0x68]
mov eax, dword [rcx]
test eax, eax
je 0x140316fd5
cmp eax, 0xffffffff
je 0x140316fe3
mov eax, ebx
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x140316fe3
mov rcx, qword [rsp + 0x68]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140379300
mov rcx, qword [r14 + 0x30]
mov rax, qword [rbp - 0x28]
mov qword [r14 + 0x30], rax
mov eax, dword [rcx]
test eax, eax
je 0x140317005
cmp eax, 0xffffffff
je 0x140317013
mov eax, ebx
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x140317013
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140379300
mov rcx, qword [rbp - 0x48]
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rdx, qword [rbp - 0x40]
test rdx, rdx
je 0x140317142
mov r8d, ebx
lea rcx, [rsp + 0x70]
call fcn.140367ed0
mov rcx, qword [rax]
mov qword [rbp + 0x68], rcx
mov qword [rax], r13
mov rcx, qword [rsp + 0x70]
mov eax, dword [rcx]
test eax, eax
je 0x140317061
cmp eax, 0xffffffff
je 0x14031706f
mov eax, ebx
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x14031706f
mov rcx, qword [rsp + 0x70]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140379300
lea rdx, [rbp + 0x68]
lea rcx, [rsp + 0x78]
call fcn.140318dd0
lea rcx, [r14 + 0x38]
mov rdx, rax
call fcn.140315f30
mov rsi, qword [rsp + 0x78]
mov eax, dword [rsi]
test eax, eax
je 0x1403170a9
cmp eax, 0xffffffff
je 0x14031710c
mov eax, ebx
lock xadd dword [rsi], eax
cmp eax, 1
jne 0x14031710c
mov rsi, qword [rsp + 0x78]
movsxd rdi, dword [rsi + 0xc]
movsxd r15, dword [rsi + 8]
add rdi, 2
add r15, 2
lea rdi, [rsi + rdi*8]
lea r15, [rsi + r15*8]
cmp r15, rdi
je 0x140317104
nop word [rax + rax]
mov rcx, qword [rdi - 8]
sub rdi, 8
mov eax, dword [rcx]
test eax, eax
je 0x1403170ee
cmp eax, 0xffffffff
je 0x1403170ff
mov eax, ebx
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x1403170ff
mov rcx, qword [rdi]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140379300
cmp rdi, r15
jne 0x1403170d0
mov rcx, rsi
call fcn.1404e1e20
mov rcx, qword [rbp + 0x68]
mov eax, dword [rcx]
test eax, eax
je 0x14031712a
cmp eax, 0xffffffff
je 0x140317138
mov eax, ebx
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x140317138
mov rcx, qword [rbp + 0x68]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140379300
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rdx, qword [rbp - 0x38]
test rdx, rdx
je 0x140317264
mov r8d, ebx
lea rcx, [rbp - 0x80]
call fcn.140367ed0
mov rcx, qword [rax]
mov qword [rsp + 0x48], rcx
mov qword [rax], r13
mov rcx, qword [rbp - 0x80]
mov eax, dword [rcx]
test eax, eax
je 0x140317184
cmp eax, 0xffffffff
je 0x140317192
mov eax, ebx
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x140317192
mov rcx, qword [rbp - 0x80]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140379300
lea rdx, [rsp + 0x48]
lea rcx, [rbp - 0x78]
call fcn.140318dd0
lea rcx, [r14 + 0x40]
mov rdx, rax
call fcn.140315f30
mov rsi, qword [rbp - 0x78]
mov eax, dword [rsi]
test eax, eax
je 0x1403171ca
cmp eax, 0xffffffff
je 0x14031722c
mov eax, ebx
lock xadd dword [rsi], eax
cmp eax, 1
jne 0x14031722c
mov rsi, qword [rbp - 0x78]
movsxd rdi, dword [rsi + 0xc]
movsxd r15, dword [rsi + 8]
add rdi, 2
add r15, 2
lea rdi, [rsi + rdi*8]
lea r15, [rsi + r15*8]
cmp r15, rdi
je 0x140317224
nop word [rax + rax]
mov rcx, qword [rdi - 8]
sub rdi, 8
mov eax, dword [rcx]
test eax, eax
je 0x14031720e
cmp eax, 0xffffffff
je 0x14031721f
mov eax, ebx
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x14031721f
mov rcx, qword [rdi]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140379300
cmp rdi, r15
jne 0x1403171f0
mov rcx, rsi
call fcn.1404e1e20
mov rcx, qword [rsp + 0x48]
mov eax, dword [rcx]
test eax, eax
je 0x14031724c
cmp eax, 0xffffffff
je 0x14031725a
mov eax, ebx
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x14031725a
mov rcx, qword [rsp + 0x48]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140379300
mov rcx, qword [rbp - 0x38]
call qword [sym.imp.KERNEL32.dll_GlobalFree]
call fcn.1403164e0
test al, al
je 0x1403174e8
mov rcx, qword [r14 + 0x38]
mov eax, dword [rcx + 8]
cmp dword [rcx + 0xc], eax
jne 0x1403174e8
mov rcx, qword [r14 + 0x40]
mov eax, dword [rcx + 8]
cmp dword [rcx + 0xc], eax
jne 0x1403174e8
lea rcx, [rbp - 0x20]
call qword [0x140582870]
test eax, eax
je 0x1403174ca
cmp dword [rbp - 0x20], 3
jne 0x1403174ca
mov rdx, qword [rbp - 0x10]
lea rcx, [rbp - 0x70]
mov r8d, ebx
call fcn.140367ed0
mov rcx, qword [rax]
mov qword [rsp + 0x50], rcx
mov qword [rax], r13
mov rcx, qword [rbp - 0x70]
mov eax, dword [rcx]
test eax, eax
je 0x1403172e6
cmp eax, 0xffffffff
je 0x1403172f4
mov eax, ebx
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x1403172f4
mov rcx, qword [rbp - 0x70]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140379300
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x68]
call fcn.140318dd0
lea rcx, [r14 + 0x40]
mov rdx, rax
call fcn.140315f30
mov rsi, qword [rbp - 0x68]
mov eax, dword [rsi]
test eax, eax
je 0x14031732c
cmp eax, 0xffffffff
je 0x14031738c
mov eax, ebx
lock xadd dword [rsi], eax
cmp eax, 1
jne 0x14031738c
mov rsi, qword [rbp - 0x68]
movsxd rdi, dword [rsi + 0xc]
movsxd r15, dword [rsi + 8]
add rdi, 2
add r15, 2
lea rdi, [rsi + rdi*8]
lea r15, [rsi + r15*8]
cmp r15, rdi
je 0x140317384
nop dword [rax]
mov rcx, qword [rdi - 8]
sub rdi, 8
mov eax, dword [rcx]
test eax, eax
je 0x14031736e
cmp eax, 0xffffffff
je 0x14031737f
mov eax, ebx
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x14031737f
mov rcx, qword [rdi]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140379300
cmp rdi, r15
jne 0x140317350
mov rcx, rsi
call fcn.1404e1e20
mov rcx, qword [rsp + 0x50]
mov eax, dword [rcx]
test eax, eax
je 0x1403173ac
cmp eax, 0xffffffff
je 0x1403173ba
mov eax, ebx
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x1403173ba
mov rcx, qword [rsp + 0x50]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140379300
mov rdx, qword [rbp - 0x18]
lea rcx, [rbp - 0x60]
mov r8d, ebx
call fcn.140367ed0
mov rcx, qword [rax]
mov qword [rsp + 0x58], rcx
mov qword [rax], r13
mov rcx, qword [rbp - 0x60]
mov eax, dword [rcx]
test eax, eax
je 0x1403173f3
cmp eax, 0xffffffff
je 0x140317401
mov eax, ebx
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x140317401
mov rcx, qword [rbp - 0x60]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140379300
lea rdx, [rsp + 0x58]
lea rcx, [rbp - 0x58]
call fcn.140318dd0
lea rcx, [r14 + 0x38]
mov rdx, rax
call fcn.140315f30
mov rsi, qword [rbp - 0x58]
mov eax, dword [rsi]
test eax, eax
je 0x140317439
cmp eax, 0xffffffff
je 0x14031749c
mov eax, ebx
lock xadd dword [rsi], eax
cmp eax, 1
jne 0x14031749c
mov rsi, qword [rbp - 0x58]
movsxd rdi, dword [rsi + 0xc]
movsxd r15, dword [rsi + 8]
add rdi, 2
add r15, 2
lea rdi, [rsi + rdi*8]
lea r15, [rsi + r15*8]
cmp r15, rdi
je 0x140317494
nop word [rax + rax]
mov rcx, qword [rdi - 8]
sub rdi, 8
mov eax, dword [rcx]
test eax, eax
je 0x14031747e
cmp eax, 0xffffffff
je 0x14031748f
mov eax, ebx
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x14031748f
mov rcx, qword [rdi]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140379300
cmp rdi, r15
jne 0x140317460
mov rcx, rsi
call fcn.1404e1e20
mov rcx, qword [rsp + 0x58]
mov eax, dword [rcx]
test eax, eax
je 0x1403174bc
cmp eax, 0xffffffff
je 0x1403174ca
mov eax, ebx
lock xadd dword [rcx], eax
cmp eax, 1
jne 0x1403174ca
mov rcx, qword [rsp + 0x58]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140379300
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x1403174d9
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x1403174e8
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov r15, qword [rsp + 0x108]
mov qword [r14 + 8], r12
cmp dword [rbp - 0x50], r12d
jne 0x140317504
mov rax, qword [r14 + 0x30]
cmp dword [rax + 4], r12d
je 0x140317570
xor r9d, r9d
mov dword [rsp + 0x20], r12d
xor r8d, r8d
lea rcx, [0x14000e7d8]
lea edx, [r9 + 1]
call qword [0x140582868]
mov qword [r14 + 8], rax
test rax, rax
je 0x14031758c
xor eax, eax
mov byte [r14 + 0x62], 1
mov qword [r14 + 0x10], rax
mov qword [r14 + 0x18], rax
mov qword [r14 + 0x20], rax
mov qword [r14 + 0x28], rax
mov dword [r14 + 0x2c], r12d
cmp dword [rbp - 0x50], eax
je 0x14031755b
mov dword [r14 + 0x10], 1
mov dword [r14 + 0x14], 3
jmp 0x140317570
lea rcx, [r14 + 0x30]
mov dword [r14 + 0x10], 2
call fcn.14036dfa0
mov qword [r14 + 0x18], rax
cmp byte [r14 + 0x62], r12b
jne 0x140317582
mov rcx, qword [r14 + 0x38]
mov eax, dword [rcx + 8]
cmp dword [rcx + 0xc], eax
je 0x140317588
mov r12d, 1
mov byte [r14 + 0x61], r12b
mov rcx, qword [rsp + 0x38]
mov r13, qword [rsp + 0x110]
mov rsi, qword [rsp + 0x118]
mov eax, dword [rcx]
test eax, eax
je 0x1403175ba
cmp eax, 0xffffffff
je 0x1403175c8
lock xadd dword [rcx], ebx
cmp ebx, 1
jne 0x1403175c8
mov rcx, qword [rsp + 0x38]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140379300
add rsp, 0x120
pop r14
pop r12
pop rdi
pop rbx
pop rbp
ret