Function at 0x140051160
Capabilities:
Link many functions at runtime

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0xb8
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x30], 0xfffffffffffffffe
mov rdi, r9
mov rsi, r8
mov rbx, rdx
mov r14, rcx
mov rcx, qword [0x14108a248]
test rcx, rcx
je 0x140051367
mov qword [rbp + 8], rcx
mov edx, 0xffffffff
xor r8d, r8d
call qword [sym.imp.kernel32.dll_WaitForSingleObjectEx]
mov rax, qword [0x14108a288]
test rax, rax
jne 0x1400511da
lea rcx, [0x1410793d0]
call qword [sym.imp.kernel32.dll_LoadLibraryA]
mov qword [0x14108a288], rax
test rax, rax
je 0x1400515e0
cmp byte [0x14108a250], 0
jne 0x1400515a8
mov rcx, qword [0x14108a290]
test rcx, rcx
jne 0x140051216
lea rdx, [0x1410793dc]
mov rcx, rax
call qword [sym.imp.kernel32.dll_GetProcAddress]
test rax, rax
je 0x140051635
mov rcx, rax
mov qword [0x14108a290], rax
call rcx
mov ecx, eax
mov rax, qword [0x14108a298]
test rax, rax
jne 0x140051250
mov r15d, ecx
mov rcx, qword [0x14108a288]
lea rdx, [0x1410793ea]
call qword [sym.imp.kernel32.dll_GetProcAddress]
test rax, rax
je 0x140051643
mov qword [0x14108a298], rax
mov ecx, r15d
or ecx, 4
call rax
mov r15, qword [0x14108a2a0]
test r15, r15
jne 0x140051288
mov rcx, qword [0x14108a288]
lea rdx, [0x1410793f8]
call qword [sym.imp.kernel32.dll_GetProcAddress]
test rax, rax
je 0x140051651
mov r15, rax
mov qword [0x14108a2a0], rax
call qword [sym.imp.kernel32.dll_GetCurrentProcess]
mov rcx, rax
xor edx, edx
mov r8d, 1
call r15
mov qword [rbp + 0x10], 0
mov qword [rbp + 0x18], 2
mov qword [rbp + 0x20], 0
mov byte [rbp + 0x2f], 1
lea rcx, [rbp + 0x10]
mov r8d, 0x400
xor edx, edx
call fcn.14005ee60
mov r15, qword [rbp + 0x18]
mov r12, qword [rbp + 0x20]
lea rcx, [r15 + r12*2]
mov r8d, 0x7fe
xor edx, edx
call sub.VCRUNTIME140.dll_memset
mov word [r15 + r12*2 + 0x7fe], 0
add r12, 0x400
mov qword [rbp + 0x20], r12
mov r13, qword [0x14108a2a8]
test r13, r13
jne 0x14005132b
mov rcx, qword [0x14108a288]
lea rdx, [0x141079407]
call qword [sym.imp.kernel32.dll_GetProcAddress]
test rax, rax
je 0x14005165f
mov r13, rax
mov qword [0x14108a2a8], rax
call qword [sym.imp.kernel32.dll_GetCurrentProcess]
mov rcx, rax
mov rdx, r15
mov r8d, r12d
call r13
cmp eax, 1
jne 0x140051449
mov rcx, r15
call qword [sym.imp.kernel32.dll_lstrlenW]
test eax, eax
js 0x140051617
mov eax, eax
cmp r12, rax
jae 0x1400514b6
jmp 0x1400514ba
movups xmm0, xmmword [0x1410784e8]
movaps xmmword [rbp - 0x10], xmm0
movups xmm0, xmmword [0x1410784d8]
movaps xmmword [rbp - 0x20], xmm0
mov byte [rbp], 0
call qword [sym.imp.kernel32.dll_GetCurrentProcessId]
test eax, eax
je 0x1400513f6
mov ecx, 0x1f
cmp rcx, 0x20
ja 0x1400515ff
mov edx, eax
and dl, 0xf
lea r8d, [rdx + 0x30]
lea r9d, [rdx + 0x37]
cmp dl, 0xa
movzx edx, r8b
movzx r8d, r9b
cmovb r8d, edx
mov byte [rbp + rcx - 0x20], r8b
cmp eax, 0x10
jb 0x1400513f6
mov edx, eax
shr edx, 4
and dl, 0xf
lea r8d, [rdx + 0x30]
lea r9d, [rdx + 0x37]
cmp dl, 0xa
movzx edx, r8b
movzx r8d, r9b
cmovb r8d, edx
mov byte [rbp + rcx - 0x21], r8b
mov edx, eax
shr edx, 8
add rcx, 0xfffffffffffffffe
cmp eax, 0x100
mov eax, edx
jae 0x140051390
movzx eax, byte [rbp]
mov byte [rbp - 0x30], al
movaps xmm0, xmmword [rbp - 0x20]
movaps xmm1, xmmword [rbp - 0x10]
movaps xmmword [rbp - 0x40], xmm1
movaps xmmword [rbp - 0x50], xmm0
lea r8, [rbp - 0x50]
xor ecx, ecx
xor edx, edx
call qword [sym.imp.kernel32.dll_CreateMutexA]
test rax, rax
je 0x1400515ea
mov rcx, rax
xor eax, eax
lock cmpxchg qword [0x14108a248], rcx
je 0x14005119f
mov r15, rax
call qword [sym.imp.kernel32.dll_CloseHandle]
mov rcx, r15
jmp 0x14005119f
mov qword [rbp + 0x20], 0
mov rax, qword [rbp + 0x10]
test rax, rax
je 0x140051470
mov word [r15], 0x2e
mov qword [rbp + 0x20], 1
cmp rax, 1
je 0x140051499
jmp 0x1400514aa
mov byte [rbp + 0x2f], 1
lea rcx, [rbp + 0x10]
call fcn.14003a9f0
mov rax, qword [rbp + 0x10]
mov r15, qword [rbp + 0x18]
mov word [r15], 0x2e
mov qword [rbp + 0x20], 1
cmp rax, 1
jne 0x1400514aa
mov byte [rbp + 0x2f], 1
lea rcx, [rbp + 0x10]
call fcn.14003a9f0
mov r15, qword [rbp + 0x18]
mov word [r15 + 2], 0x3b
mov eax, 2
mov qword [rbp + 0x20], rax
mov rax, qword [rbp + 0x20]
mov qword [rbp - 0x40], rax
movups xmm0, xmmword [rbp + 0x10]
movaps xmmword [rbp - 0x50], xmm0
mov r15, qword [0x14108a2b8]
test r15, r15
jne 0x1400514fd
mov rcx, qword [0x14108a288]
lea rdx, [0x14107942b]
call qword [sym.imp.kernel32.dll_GetProcAddress]
test rax, rax
je 0x140051671
mov r15, rax
mov qword [0x14108a2b8], rax
call qword [sym.imp.kernel32.dll_GetCurrentProcess]
lea rdx, [0x1400442a0]
lea r8, [rbp - 0x50]
mov rcx, rax
call r15
movaps xmm0, xmmword [rbp - 0x50]
movaps xmmword [rbp - 0x20], xmm0
mov r15, qword [rbp - 0x40]
mov qword [rbp - 0x10], r15
mov r12, qword [rbp - 0x20]
cmp r15, r12
jne 0x14005153a
lea rcx, [rbp - 0x20]
call fcn.14003a9f0
mov r12, qword [rbp - 0x20]
mov r13, qword [rbp - 0x18]
mov word [r13 + r15*2], 0
mov r15, qword [0x14108a2b0]
test r15, r15
jne 0x140051579
mov rcx, qword [0x14108a288]
lea rdx, [0x141079419]
call qword [sym.imp.kernel32.dll_GetProcAddress]
test rax, rax
je 0x140051683
mov r15, rax
mov qword [0x14108a2b0], rax
call qword [sym.imp.kernel32.dll_GetCurrentProcess]
mov rcx, rax
mov rdx, r13
call r15
mov byte [0x14108a250], 1
test r12, r12
je 0x1400515a8
add r12, r12
mov r8d, 2
mov rcx, r13
mov rdx, r12
call fcn.14000fc30
test r14, r14
je 0x1400515c6
mov rcx, qword [rbx + 0x10]
mov edx, dword [rbx]
mov r8d, dword [rbx + 4]
mov qword [rsp + 0x20], rdi
mov r9, rsi
call fcn.140051890
jmp 0x1400515e0
lea rcx, [rbx - 1]
test rbx, rbx
cmove rcx, rbx
mov qword [rsp + 0x20], rdi
xor edx, edx
mov r9, rsi
call fcn.140051890
mov rcx, qword [rbp + 8]
call qword [sym.imp.kernel32.dll_ReleaseMutex]
nop
add rsp, 0xb8
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea r8, [0x141078500]
mov edx, 0x21
mov rcx, 0xffffffffffffffff
call fcn.14005fd30
mov byte [rbp + 0x2f], 1
lea rcx, [0x141078470]
lea r8, [0x141078490]
mov edx, 0x1a
call fcn.14005fca0
jmp 0x140051697
lea rcx, [0x141078410]
call fcn.14005fba0
jmp 0x140051697
lea rcx, [0x141078428]
call fcn.14005fba0
jmp 0x140051697
lea rcx, [0x141078440]
call fcn.14005fba0
jmp 0x140051697
mov byte [rbp + 0x2f], 1
lea rcx, [0x141078458]
call fcn.14005fba0
jmp 0x140051697
mov byte [rbp + 0x2e], 1
lea rcx, [0x1410784a8]
call fcn.14005fba0
jmp 0x140051697
mov qword [rbp - 0x58], r13
mov qword [rbp - 0x28], r12
lea rcx, [0x1410784c0]
call fcn.14005fba0
ud2