Function at 0x6aa11440
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x24
mov esi, dword [esp + 0x30]
test esi, esi
je 0x6aa11570
mov dword [esp], 0x6ab34060
call fcn.6aa11e80
mov eax, esi
call fcn.6aa0eea0
mov dword [esp], 0x6ab34060
mov ebx, eax
call fcn.6aa121c0
test ebx, ebx
je 0x6aa11570
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x6aa11570
lea edx, [esp + 0x1c]
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
sub esp, 8
test eax, eax
je 0x6aa11570
test byte [ebx + 0x24], 4
jne 0x6aa11580
call fcn.6aa0f590
mov eax, dword [0x6ab34068]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x6aa115a0
cmp esi, dword [eax + 0xb4]
je 0x6aa115c8
mov ecx, dword [ebx + 0x68]
mov eax, dword [ebx + 0x14]
test ecx, ecx
je 0x6aa114e7
lea edx, [eax - 1]
cmp edx, 0xfffffffd
ja 0x6aa114fe
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebx + 0x14]
sub esp, 8
mov dword [esp], eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov eax, dword [ebx + 0x18]
sub esp, 4
test eax, eax
je 0x6aa1151b
mov dword [esp], eax
call esi
sub esp, 4
mov edx, dword [esp + 0x34]
mov dword [ebx + 0x18], 0
lea eax, [ebx + 0x1c]
test edx, edx
je 0x6aa115b8
mov edx, dword [ebx + 4]
mov ecx, dword [esp + 0x34]
mov dword [ecx], edx
mov dword [esp], eax
call fcn.6aa12340
lea eax, [ebx + 0x38]
mov dword [esp], eax
call fcn.6aa131c0
cmp eax, 1
je 0x6aa115cf
mov eax, dword [ebx + 0xb0]
mov dword [ebx + 0x38], 0xffffffff
test eax, eax
je 0x6aa11590
xor eax, eax
add esp, 0x24
pop ebx
pop esi
ret
mov eax, 3
add esp, 0x24
pop ebx
pop esi
ret
add esp, 0x24
mov eax, 0x16
pop ebx
pop esi
ret
mov eax, ebx
call fcn.6aa0f3d0
xor eax, eax
jmp 0x6aa11565
call fcn.6aa0f650
test eax, eax
jne 0x6aa114c9
jmp 0x6aa114d5
mov dword [esp], eax
call fcn.6aa12340
jmp 0x6aa11542
mov eax, 0x24
jmp 0x6aa11575
call fcn.6aa0f130
lea esi, [esi]
lea esi, [esi]
nop
push edi
push esi
push ebx
sub esp, 0x20
mov dword [esp], 0x6ab34060
mov edi, dword [esp + 0x30]
call fcn.6aa11e80
mov eax, edi
call fcn.6aa0eea0
test eax, eax
je 0x6aa11718
mov ebx, eax
mov eax, dword [eax + 0x14]
test eax, eax
je 0x6aa11718
lea edx, [esp + 0x1c]
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
sub esp, 8
test eax, eax
je 0x6aa11718
mov esi, dword [ebx + 0x24]
and esi, 4
jne 0x6aa11730
call fcn.6aa0f590
mov eax, dword [0x6ab34068]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x6aa11770
mov esi, dword [eax + 0xb4]
cmp edi, esi
je 0x6aa117a8
mov esi, dword [ebx + 0x68]
mov eax, dword [ebx + 0x14]
test esi, esi
jne 0x6aa1168f
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
test eax, eax
jne 0x6aa11750
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov eax, dword [ebx + 0x18]
sub esp, 4
test eax, eax
je 0x6aa116ac
mov dword [esp], eax
call esi
sub esp, 4
mov edx, dword [esp + 0x34]
mov dword [ebx + 0x18], 0
lea eax, [ebx + 0x1c]
test edx, edx
je 0x6aa11788
mov edx, dword [ebx + 4]
mov ecx, dword [esp + 0x34]
mov dword [ecx], edx
mov dword [esp], eax
call fcn.6aa12340
lea eax, [ebx + 0x38]
mov dword [esp], eax
call fcn.6aa131c0
cmp eax, 1
je 0x6aa117be
mov eax, dword [ebx + 0xb0]
mov dword [ebx + 0x38], 0xffffffff
test eax, eax
je 0x6aa11798
mov dword [esp], 0x6ab34060
call fcn.6aa121c0
xor eax, eax
add esp, 0x20
pop ebx
pop esi
pop edi
ret
mov dword [esp], 0x6ab34060
call fcn.6aa121c0
add esp, 0x20
mov eax, 3
pop ebx
pop esi
pop edi
ret
mov dword [esp], 0x6ab34060
call fcn.6aa121c0
add esp, 0x20
mov eax, 0x16
pop ebx
pop esi
pop edi
ret
mov ecx, dword [ebx + 0x68]
test ecx, ecx
jne 0x6aa1168c
mov dword [esp], 0x6ab34060
call fcn.6aa121c0
mov eax, 0x10
jmp 0x6aa1170a
call fcn.6aa0f650
test eax, eax
jne 0x6aa11658
jmp 0x6aa1165e
mov dword [esp], eax
call fcn.6aa12340
jmp 0x6aa116d3
mov eax, ebx
call fcn.6aa0f3d0
jmp 0x6aa116fc
mov dword [esp], 0x6ab34060
call fcn.6aa121c0
mov eax, 0x24
jmp 0x6aa1170a
call fcn.6aa0f130
lea esi, [esi]
lea esi, [esi]