Function at 0x140004120
Capabilities:
Allocate thread local storage

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x198]
sub rsp, 0x270
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x14005d3d0]
xor rax, rsp
mov qword [rbp + 0x160], rax
mov r13, rcx
cmp qword [0x1400620b0], 0
jne 0x140004177
mov edi, 0x57c
jmp 0x140004599
cmp qword [0x1400620a8], 0
je 0x14000416d
cmp qword [0x1400620a0], 0
je 0x14000416d
cmp qword [0x140062098], 0
je 0x14000416d
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x14005ecd0], eax
cmp eax, 0xffffffff
je 0x140004591
lea rcx, [0x140050ef8]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x140004591
lea rdx, str.SetDefaultDllDirectories
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x140004591
mov ecx, 0x800
call rax
cmp eax, 1
jne 0x140004591
call fcn.14000a530
mov edi, eax
test eax, eax
jne 0x140004599
xor r15d, r15d
mov dword [rsp + 0x38], r15d
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
lea rdx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x140004591
or rsi, 0xffffffffffffffff
lea r14, [0x140050fb0]
lea r12d, [rdi + 1]
cmp dword [rsp + 0x38], r15d
je 0x1400043d0
xor eax, eax
mov qword [rsp + 0x40], rax
lea rdx, [rsp + 0x40]
call fcn.140004c90
nop
mov rax, qword [rsp + 0x40]
cmp dword [rax - 0x10], r15d
jne 0x140004274
mov edi, 0x2bf
lea rdx, [rax - 0x18]
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140004599
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x140004599
call fcn.1400014b0
mov rdx, rax
mov ecx, r15d
test rax, rax
setne cl
test ecx, ecx
jne 0x140004294
mov ecx, 0x80004005
call fcn.140001260
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x28], rbx
test r14, 0xffffffffffff0000
jne 0x1400042d5
movzx ebx, r14w
mov ecx, ebx
call fcn.140001330
test rax, rax
je 0x140004352
mov r8d, ebx
mov rdx, rax
lea rcx, [rsp + 0x28]
call fcn.140002b50
jmp 0x140004352
mov r15d, dword [rbx - 0x10]
sub r14, rbx
sar r14, 1
mov ecx, r12d
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, 5
or eax, ecx
jge 0x140004303
mov edx, 5
lea rcx, [rsp + 0x28]
call fcn.140002740
mov rbx, qword [rsp + 0x28]
movsxd rdx, dword [rbx - 0xc]
mov r9d, 0xa
mov rcx, rbx
add rdx, rdx
cmp r14, r15
ja 0x14000432a
lea r8, [rbx + r14*2]
call fcn.14000c79c
lea r14, [0x140050fb0]
jmp 0x140004339
lea r14, [0x140050fb0]
mov r8, r14
call fcn.14000c238
cmp dword [rbx - 0xc], 5
jl 0x1400043c5
mov dword [rbx - 0x10], 5
xor r15d, r15d
mov word [rbx + 0xa], r15w
lea r8, [rsp + 0x28]
lea rdx, [rsp + 0x40]
call fcn.140004e90
test eax, eax
sete bl
mov rdx, qword [rsp + 0x28]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x14000437f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test bl, bl
je 0x1400043aa
mov edi, 0xbf
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140004599
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x140004599
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x1400043d0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x1400043d0
mov ecx, 0x80070057
call fcn.140001260
nop
xor eax, eax
mov qword [rsp + 0x48], rax
lea rdx, [rsp + 0x48]
call fcn.140004d80
nop
mov rax, qword [rsp + 0x48]
cmp dword [rax - 0x10], 0
jne 0x1400043f7
mov edi, 0x2bf
jmp 0x140004257
call fcn.1400014b0
mov rdx, rax
mov ecx, r15d
test rax, rax
setne cl
test ecx, ecx
jne 0x140004417
mov ecx, 0x80004005
call fcn.140001260
int3
mov rax, qword [rax]
mov rcx, rdx
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetElement]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x20], rbx
test r14, 0xffffffffffff0000
jne 0x140004458
movzx ebx, r14w
mov ecx, ebx
call fcn.140001330
test rax, rax
je 0x1400044ca
mov r8d, ebx
mov rdx, rax
lea rcx, [rsp + 0x20]
call fcn.140002b50
jmp 0x1400044ca
mov r15d, dword [rbx - 0x10]
sub r14, rbx
sar r14, 1
sub r12d, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, 5
or eax, r12d
jge 0x140004485
mov edx, 5
lea rcx, [rsp + 0x20]
call fcn.140002740
mov rbx, qword [rsp + 0x20]
movsxd rdx, dword [rbx - 0xc]
mov r9d, 0xa
mov rcx, rbx
add rdx, rdx
cmp r14, r15
ja 0x1400044a5
lea r8, [rbx + r14*2]
call fcn.14000c79c
jmp 0x1400044b1
lea r8, [0x140050fb0]
call fcn.14000c238
cmp dword [rbx - 0xc], 5
jl 0x140004586
mov dword [rbx - 0x10], 5
xor r15d, r15d
mov word [rbx + 0xa], r15w
lea r8, [rsp + 0x20]
lea rdx, [rsp + 0x48]
call fcn.140004e90
test eax, eax
sete bl
mov rdx, qword [rsp + 0x20]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x1400044f7
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test bl, bl
je 0x14000450e
mov edi, 0xbf
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
jmp 0x14000425b
mov word [rsp + 0x50], r15w
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x52]
call fcn.14000c570
mov r8d, 0x104
lea rdx, [rsp + 0x50]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rcx, [rsp + 0x50]
call qword [sym.imp.SHLWAPI.dll_PathStripPathW]
lea rcx, [rsp + 0x50]
call qword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
lea rcx, [r13 + 0xa0]
lea rdx, [rsp + 0x50]
mov rax, rsi
nop
inc rax
cmp word [rdx + rax*2], 0
jne 0x140004560
mov r8d, eax
lea rdx, [rsp + 0x50]
call fcn.1400055a0
nop
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
jmp 0x14000425b
mov ecx, 0x80070057
call fcn.140001260
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, edi
mov rcx, qword [rbp + 0x160]
xor rcx, rsp
call fcn.14000bb80
lea r11, [rsp + 0x270]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret