Function at 0x6ae09b40
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x24
mov esi, dword [esp + 0x30]
test esi, esi
je 0x6ae09c78
mov dword [esp], 0x6ae0f328
call fcn.6ae06e50
mov eax, esi
call fcn.6ae07570
mov dword [esp], 0x6ae0f328
mov ebx, eax
call fcn.6ae07190
test ebx, ebx
je 0x6ae09c78
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x6ae09c78
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 0x6ae09c78
test byte [ebx + 0x24], 4
jne 0x6ae09c88
cmp dword [0x6ae6828c], 1
je 0x6ae09bb9
call fcn.6ae07c50
mov eax, dword [0x6ae0f330]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x6ae09c98
cmp esi, dword [eax + 0xb4]
je 0x6ae09cb0
mov ecx, dword [ebx + 0x68]
mov eax, dword [ebx + 0x14]
test ecx, ecx
je 0x6ae09bf0
lea edx, [eax - 1]
cmp edx, 0xfffffffd
ja 0x6ae09c07
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 0x6ae09c24
mov dword [esp], eax
call esi
sub esp, 4
mov edx, dword [esp + 0x34]
mov dword [ebx + 0x18], 0
test edx, edx
je 0x6ae09c3c
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x34]
mov dword [ecx], eax
lea eax, [ebx + 0x1c]
mov dword [esp], eax
call fcn.6ae07320
lea eax, [ebx + 0x38]
mov dword [esp], eax
call fcn.6ae074e0
cmp eax, 1
je 0x6ae09cb7
mov eax, dword [ebx + 0xb0]
mov dword [ebx + 0x38], 0xffffffff
xor esi, esi
test eax, eax
jne 0x6ae09c7d
mov eax, ebx
call fcn.6ae07ac0
jmp 0x6ae09c7d
mov esi, 3
add esp, 0x24
mov eax, esi
pop ebx
pop esi
ret
mov esi, 0x16
add esp, 0x24
mov eax, esi
pop ebx
pop esi
ret
call fcn.6ae07cf0
test eax, eax
je 0x6ae09bde
jmp 0x6ae09bd2
mov esi, 0x24
jmp 0x6ae09c7d
call fcn.6ae07820
lea esi, [esi]
push edi
push esi
push ebx
sub esp, 0x20
mov dword [esp], 0x6ae0f328
mov edi, dword [esp + 0x30]
call fcn.6ae06e50
mov eax, edi
call fcn.6ae07570
test eax, eax
je 0x6ae09e00
mov ebx, eax
mov eax, dword [eax + 0x14]
test eax, eax
je 0x6ae09e00
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 0x6ae09e00
mov esi, dword [ebx + 0x24]
and esi, 4
jne 0x6ae09e20
cmp dword [0x6ae6828c], 1
je 0x6ae09d28
call fcn.6ae07c50
mov eax, dword [0x6ae0f330]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x6ae09e60
mov esi, dword [eax + 0xb4]
cmp edi, esi
je 0x6ae09e88
mov esi, dword [ebx + 0x68]
mov eax, dword [ebx + 0x14]
test esi, esi
jne 0x6ae09d78
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
test eax, eax
jne 0x6ae09e40
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 0x6ae09d95
mov dword [esp], eax
call esi
sub esp, 4
mov edx, dword [esp + 0x34]
mov dword [ebx + 0x18], 0
test edx, edx
je 0x6ae09dad
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x34]
mov dword [ecx], eax
lea eax, [ebx + 0x1c]
mov dword [esp], eax
call fcn.6ae07320
lea eax, [ebx + 0x38]
mov dword [esp], eax
call fcn.6ae074e0
cmp eax, 1
je 0x6ae09e9e
mov eax, dword [ebx + 0xb0]
mov dword [ebx + 0x38], 0xffffffff
test eax, eax
je 0x6ae09e78
mov dword [esp], 0x6ae0f328
call fcn.6ae07190
xor eax, eax
add esp, 0x20
pop ebx
pop esi
pop edi
ret
mov dword [esp], 0x6ae0f328
call fcn.6ae07190
add esp, 0x20
mov eax, 3
pop ebx
pop esi
pop edi
ret
mov dword [esp], 0x6ae0f328
call fcn.6ae07190
add esp, 0x20
mov eax, 0x16
pop ebx
pop esi
pop edi
ret
mov ecx, dword [ebx + 0x68]
test ecx, ecx
jne 0x6ae09d75
mov dword [esp], 0x6ae0f328
call fcn.6ae07190
mov eax, 0x10
jmp 0x6ae09def
call fcn.6ae07cf0
test eax, eax
je 0x6ae09d47
jmp 0x6ae09d41
mov eax, ebx
call fcn.6ae07ac0
jmp 0x6ae09de1
mov dword [esp], 0x6ae0f328
call fcn.6ae07190
mov eax, 0x24
jmp 0x6ae09def
call fcn.6ae07820
lea esi, [esi]
lea esi, [esi]
push esi
push ebx
sub esp, 0x24
mov ebx, dword [esp + 0x30]
mov dword [esp], 0x6ae0f328
test ebx, ebx
je 0x6ae09fb0
call fcn.6ae06e50
mov eax, ebx
call fcn.6ae07570
mov dword [esp], 0x6ae0f328
mov ebx, eax
call fcn.6ae07190
mov dword [esp], 0x6ae0f328
call fcn.6ae06e50
test ebx, ebx
je 0x6ae09fb5
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x6ae09fb5
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 0x6ae09fb5
mov eax, dword [ebx + 0x24]
test al, 4
jne 0x6ae09fd0
or eax, 4
mov edx, dword [ebx + 0x14]
mov dword [ebx + 0x14], 0
mov dword [ebx + 0x24], eax
test edx, edx
je 0x6ae09f98
mov dword [esp], edx
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov edx, dword [ebx + 0x68]
sub esp, 4
test edx, edx
je 0x6ae09f98
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x6ae09f60
mov dword [esp], eax
call esi
sub esp, 4
lea eax, [ebx + 0x1c]
mov dword [ebx + 0x18], 0
mov dword [esp], eax
call fcn.6ae07320
lea eax, [ebx + 0x38]
mov dword [esp], eax
call fcn.6ae074e0
cmp eax, 1
je 0x6ae09ff1
mov eax, dword [ebx + 0xb0]
mov dword [ebx + 0x38], 0xffffffff
test eax, eax
je 0x6ae09fe8
lea esi, [esi]
nop
mov dword [esp], 0x6ae0f328
call fcn.6ae07190
xor eax, eax
add esp, 0x24
pop ebx
pop esi
ret
call fcn.6ae06e50
mov dword [esp], 0x6ae0f328
call fcn.6ae07190
add esp, 0x24
mov eax, 3
pop ebx
pop esi
ret
mov dword [esp], 0x6ae0f328
call fcn.6ae07190
mov eax, 0x16
jmp 0x6ae09fa6
mov eax, ebx
call fcn.6ae07ac0
jmp 0x6ae09f98
call fcn.6ae07820
lea esi, [esi]
lea esi, [esi]
mov eax, dword [0x6ae6825c]
ret