Function at 0x69910b30
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov edx, dword [0x69927018]
mov eax, dword [esp + 0x40]
test edx, edx
jne 0x69910b58
mov eax, dword [eax + 8]
test eax, eax
je 0x69910bb8
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [eax + 8]
test edi, edi
je 0x69910bd0
mov ebx, dword [0x6993a0c4]
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebp
mov esi, eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
test ebx, ebx
je 0x69910c30
mov edx, dword [ebx]
cmp edx, edi
jb 0x69910c80
sub edi, 1
mov eax, dword [ebx + edi*4 + 4]
test eax, eax
jne 0x69910b4c
mov eax, dword [esp + 0x40]
call sym._emutls_alloc
mov dword [ebx + edi*4 + 4], eax
jmp 0x69910b4c
mov eax, dword [esp + 0x40]
call sym._emutls_alloc
mov ecx, dword [esp + 0x40]
mov dword [ecx + 8], eax
jmp 0x69910b4c
mov ebp, dword [0x69927018]
test ebp, ebp
je 0x69910d2d
mov edi, dword [0x6992702c]
test edi, edi
je 0x69910d56
mov dword [esp], 0x6993a0c8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
mov eax, dword [esp + 0x40]
mov edi, dword [eax + 8]
test edi, edi
je 0x69910d3c
mov eax, dword [0x69927018]
test eax, eax
je 0x69910b5f
mov dword [esp], 0x6993a0c8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
jmp 0x69910b5f
lea eax, [edi + 0x21]
mov dword [esp + 4], 4
lea edx, [edi + 0x20]
mov dword [esp], eax
mov dword [esp + 0x18], edx
call sym._calloc
mov ebx, eax
test eax, eax
je sym.___emutls_get_address.cold
mov edx, dword [esp + 0x18]
mov dword [eax], edx
mov eax, dword [0x6993a0c4]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
test eax, eax
jne 0x69910b9b
call ebp
jmp 0x69910b9b
lea ecx, [edx + edx]
lea eax, [edi + 0x20]
mov dword [esp], ebx
cmp ecx, edi
mov dword [esp + 0x1c], edx
cmovb ecx, eax
lea eax, [ecx*4 + 4]
mov dword [esp + 0x18], ecx
mov dword [esp + 4], eax
call sym._realloc
mov ebx, eax
test eax, eax
je sym.___emutls_get_address.cold
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov dword [eax], ecx
sub ecx, edx
lea eax, [eax + edx*4 + 4]
shl ecx, 2
mov dword [esp + 4], 0
mov dword [esp + 8], ecx
mov dword [esp], eax
call sym._memset
jmp 0x69910c5a
mov dword [esp], 0x6993a0c8
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
sub esp, 4
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
je 0x69910d90
mov dword [esp + 4], dbg.emutls_destroy
mov dword [esp], eax
mov dword [0x6993a0c4], eax
call sym.___mingwthr_key_dtor
test eax, eax
jne sym.___emutls_get_address.cold
mov dword [0x6992702c], 1
mov edx, dword [0x69927018]
test edx, edx
jne 0x69910bec
mov eax, dword [esp + 0x40]
mov edi, dword [eax + 8]
test edi, edi
jne 0x69910b5f
mov eax, dword [0x6993a0c0]
lea edi, [eax + 1]
mov dword [0x6993a0c0], edi
mov eax, dword [esp + 0x40]
mov dword [eax + 8], edi
jmp 0x69910c0b
lock add dword [0x69927030], 1
je 0x69910cd9
mov esi, dword [0x6992702c]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
test esi, esi
jne 0x69910d1f
lea esi, [esi]
mov dword [esp], 0
call ebx
mov ecx, dword [0x6992702c]
sub esp, 4
test ecx, ecx
je 0x69910d78
jmp 0x69910d1f
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x69910d0d