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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [0x4c2fbc]
push ebx
push esi
mov esi, dword [ebp + 8]
imul esi, esi, 0x28
lea ebx, [esi + eax]
test byte [ebx + 8], 8
push edi
mov dword [ebp - 8], esi
je 0x435f55
mov ecx, dword [ebx + 0x10]
call fcn.00435349
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x435d4f
sub eax, esi
mov dword [ebp - 4], eax
cmp byte [0x4c3bb0], cl
je 0x435d9c
mov eax, dword [0x4c3bb4]
cmp eax, 0xffffffff
je 0x435d9c
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x435d9e
push 0x20
call sub.MSVCRT.dll_malloc
pop ecx
push 8
mov esi, eax
pop ecx
xor eax, eax
mov edi, esi
push esi
rep stosd dword es:[edi], eax
push dword [0x4c3bb4]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
jmp 0x435d9e
xor esi, esi
mov eax, dword [ebp - 4]
inc eax
mov dword [esi + 0x14], eax
cmp byte [0x4c3bb0], 0
mov esi, dword [0x4c3bb4]
je 0x435df0
cmp esi, 0xffffffff
je 0x435df0
push esi
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x435de6
push 0x20
call sub.MSVCRT.dll_malloc
pop ecx
push 8
mov esi, eax
pop ecx
xor eax, eax
mov edi, esi
push esi
rep stosd dword es:[edi], eax
push dword [0x4c3bb4]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
mov eax, esi
mov esi, dword [0x4c3bb4]
jmp 0x435df2
xor eax, eax
mov eax, dword [eax + 0x14]
call section..text
cmp byte [0x4c3bb0], 0
mov dword [ebp - 4], esp
je 0x435e3a
cmp esi, 0xffffffff
je 0x435e3a
push esi
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x435e3c
push 0x20
call sub.MSVCRT.dll_malloc
pop ecx
push 8
mov esi, eax
pop ecx
xor eax, eax
mov edi, esi
push esi
rep stosd dword es:[edi], eax
push dword [0x4c3bb4]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
jmp 0x435e3c
xor esi, esi
mov eax, dword [ebp - 4]
mov dword [esi + 0x18], eax
cmp byte [0x4c3bb0], 0
mov eax, dword [0x4c3bb4]
je 0x435e8c
cmp eax, 0xffffffff
je 0x435e8c
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x435e82
push 0x20
call sub.MSVCRT.dll_malloc
pop ecx
push 8
mov esi, eax
pop ecx
xor eax, eax
mov edi, esi
push esi
rep stosd dword es:[edi], eax
push dword [0x4c3bb4]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
mov eax, dword [0x4c3bb4]
mov dword [ebp - 4], esi
jmp 0x435e90
and dword [ebp - 4], 0
cmp byte [0x4c3bb0], 0
je 0x435ecf
cmp eax, 0xffffffff
je 0x435ecf
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x435ecb
push 0x20
call sub.MSVCRT.dll_malloc
pop ecx
push 8
mov esi, eax
pop ecx
xor eax, eax
mov edi, esi
push esi
rep stosd dword es:[edi], eax
push dword [0x4c3bb4]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
mov edi, esi
jmp 0x435ed1
xor edi, edi
mov eax, dword [ebp - 4]
mov ecx, dword [ebx + 0x10]
mov esi, dword [eax + 0x14]
call fcn.00435349
mov ecx, dword [edi + 0x18]
push esi
push eax
push ecx
call sub.MSVCRT.dll_memcpy
xor esi, esi
add esp, 0xc
mov edi, eax
cmp dword [0x4c2fe8], esi
jbe 0x435f16
mov eax, dword [0x4c2fe0]
push dword [eax + esi*4]
push edi
call sub.MSVCRT.dll__stricmp
pop ecx
pop ecx
test eax, eax
je 0x435f52
inc esi
cmp esi, dword [0x4c2fe8]
jb 0x435ef9
mov ecx, dword [ebx + 0x10]
call fcn.00435349
mov ecx, eax
call fcn.00443b96
mov esi, eax
mov eax, dword [0x4c2fe8]
cmp eax, dword [0x4c2fe4]
jb 0x435f3e
mov ecx, 0x4c2fe0
call fcn.0042cef9
mov eax, dword [0x4c2fe8]
mov ecx, dword [0x4c2fe0]
inc dword [0x4c2fe8]
mov dword [ecx + eax*4], esi
mov esi, dword [ebp - 8]
mov ecx, dword [ebx + 0x10]
call fcn.004433ab
mov ecx, dword [ebx + 0x24]
call fcn.004433ab
lea ecx, [ebx + 0x18]
call fcn.00434c07
mov eax, dword [0x4c2fc4]
mov ecx, dword [0x4c2fbc]
dec eax
mov dword [0x4c2fc4], eax
sub eax, dword [ebp + 8]
add ecx, esi
imul eax, eax, 0x28
push eax
lea eax, [ecx + 0x28]
push eax
push ecx
call sub.MSVCRT.dll_memmove
add esp, 0xc
call fcn.00434f65
inc dword [0x4c09b4]
lea esp, [ebp - 0x14]
pop edi
pop esi
pop ebx
leave
ret 4