Function at 0x101ba890
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebx + 0x24]
test esi, esi
je 0x101ba8b8
mov ecx, dword [esi + 0x30]
test ecx, ecx
je 0x101ba8b2
push 1
call fcn.101ba660
push esi
call fcn.100a49c0
mov ecx, dword [ebx + 0x67c]
push edi
or edi, 0xffffffff
test ecx, ecx
je 0x101ba8d3
add dword [ecx + 0x10], edi
jne 0x101ba8d3
mov eax, dword [ecx]
mov edx, dword [eax]
push 1
call edx
mov ecx, dword [ebx + 0x680]
test ecx, ecx
je 0x101ba8ea
add dword [ecx + 0x10], edi
jne 0x101ba8ea
mov eax, dword [ecx]
mov edx, dword [eax]
push 1
call edx
mov esi, dword [ebx + 0x688]
test esi, esi
je 0x101ba908
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x101ba902
push 1
call fcn.101ba630
push esi
call fcn.100a49c0
mov esi, dword [ebx + 0x28]
test esi, esi
je 0x101ba923
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x101ba91d
push 1
call fcn.101ba690
push esi
call fcn.100a49c0
lea eax, [ebx + 0x68c]
mov dword [ebp - 4], eax
mov dword [ebp - 8], 0x7f
mov ecx, dword [ebp - 4]
mov esi, dword [ecx]
test esi, esi
je 0x101ba99f
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x101ba950
add dword [ecx + 0x10], edi
jne 0x101ba950
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x101ba964
add dword [ecx + 0x10], edi
jne 0x101ba964
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov ecx, dword [esi + 0x14]
test ecx, ecx
je 0x101ba972
push 1
call fcn.101ba1d0
mov ecx, dword [esi + 4]
mov edi, dword [esi]
push ecx
push 0xfe
push esi
call sub.msvcrt.dll_memset
mov dword [esi], 0
mov eax, dword [edi + 4]
add esp, 0xc
test eax, eax
je 0x101ba997
mov dword [eax], esi
jmp 0x101ba999
mov dword [edi], esi
mov dword [edi + 4], esi
or edi, 0xffffffff
add dword [ebp - 4], 4
sub dword [ebp - 8], 1
jne 0x101ba933
cmp dword [ebx + 0x890], 0
je 0x101baa82
jmp 0x101ba9c0
mov esi, dword [ebx + 0x890]
mov edx, dword [esi + 0x94]
mov dword [ebx + 0x890], edx
mov edi, dword [esi + 0x50]
test edi, edi
je 0x101baa14
mov ecx, dword [edi + 0x14]
test ecx, ecx
je 0x101ba9e7
push 1
call fcn.101ba220
mov eax, dword [edi + 4]
mov ebx, dword [edi]
push eax
push 0xfe
push edi
call sub.msvcrt.dll_memset
mov dword [edi], 0
mov eax, dword [ebx + 4]
add esp, 0xc
test eax, eax
je 0x101baa0c
mov dword [eax], edi
jmp 0x101baa0e
mov dword [ebx], edi
mov dword [ebx + 4], edi
mov ebx, dword [ebp + 8]
mov eax, dword [esi + 0x70]
test eax, eax
je 0x101baa38
mov ecx, dword [esi + 0x84]
test ecx, ecx
je 0x101baa38
mov edx, dword [eax]
push ecx
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esi + 0x84], 0
lea ecx, [esi + 0x64]
call fcn.101d8b31
lea ecx, [esi + 0x54]
call fcn.101d8b21
mov ecx, dword [esi + 4]
mov edi, dword [esi]
push ecx
push 0xfe
push esi
call sub.msvcrt.dll_memset
mov dword [esi], 0
mov eax, dword [edi + 4]
add esp, 0xc
test eax, eax
je 0x101baa6d
mov dword [eax], esi
jmp 0x101baa6f
mov dword [edi], esi
mov dword [edi + 4], esi
cmp dword [ebx + 0x890], 0
jne 0x101ba9c0
or edi, 0xffffffff
mov esi, dword [ebx + 0x8cc]
test esi, esi
je 0x101baac6
mov ecx, 0x1008217c
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x101baab3
test dl, dl
je 0x101baaaf
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x101baab3
add eax, 2
add ecx, 2
test dl, dl
jne 0x101baa93
xor eax, eax
jmp 0x101baab7
sbb eax, eax
sbb eax, edi
test eax, eax
je 0x101baac6
push esi
push 4
call sub.msvcrt.dll_setlocale
add esp, 8
mov eax, dword [ebx + 0x8cc]
test eax, eax
je 0x101baad9
push eax
call sub.msvcrt.dll_free
add esp, 4
cmp byte [ebx + 0x8d0], 0
je 0x101baaf5
mov edx, dword [ebx + 0x8d4]
push edx
call fcn.101bf5b0
mov byte [ebx + 0x8d0], 0
cmp dword [ebx + 0x65c], 0
je 0x101bab47
mov eax, dword [0x101e316c]
test eax, eax
jge 0x101bab0b
xor esi, esi
jmp 0x101bab14
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
add dword [esi + 0x12c], edi
cmp dword [esi + 0x12c], 0
jg 0x101bab47
mov eax, dword [esi]
test eax, eax
je 0x101bab30
push eax
call dword [sym.imp.KERNEL32.dll_HeapDestroy]
push esi
call sub.msvcrt.dll_free
mov eax, dword [0x101e316c]
add esp, 4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
lea ecx, [ebx + 0x30]
call fcn.101d8430
cmp dword [ebx + 0xc], 0
pop edi
je 0x101bab6b
mov eax, dword [ebx + 0xc]
mov esi, dword [eax]
push eax
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 4
mov dword [ebx + 0xc], esi
test esi, esi
jne 0x101bab56
mov ecx, dword [ebx + 4]
push ecx
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
mov edx, dword [ebx + 8]
push edx
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 8
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4