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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [0x4c6114]
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 0x436fb4
mov ecx, dword [ebx + 0x10]
call fcn.004363a7
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x436dae
sub eax, esi
mov dword [ebp - 4], eax
cmp byte [0x4c6d08], cl
je 0x436dfb
mov eax, dword [0x4c6d0c]
cmp eax, 0xffffffff
je 0x436dfb
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x436dfd
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 [0x4c6d0c]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
jmp 0x436dfd
xor esi, esi
mov eax, dword [ebp - 4]
inc eax
mov dword [esi + 0x14], eax
cmp byte [0x4c6d08], 0
mov esi, dword [0x4c6d0c]
je 0x436e4f
cmp esi, 0xffffffff
je 0x436e4f
push esi
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x436e45
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 [0x4c6d0c]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
mov eax, esi
mov esi, dword [0x4c6d0c]
jmp 0x436e51
xor eax, eax
mov eax, dword [eax + 0x14]
call section..text
cmp byte [0x4c6d08], 0
mov dword [ebp - 4], esp
je 0x436e99
cmp esi, 0xffffffff
je 0x436e99
push esi
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x436e9b
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 [0x4c6d0c]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
jmp 0x436e9b
xor esi, esi
mov eax, dword [ebp - 4]
mov dword [esi + 0x18], eax
cmp byte [0x4c6d08], 0
mov eax, dword [0x4c6d0c]
je 0x436eeb
cmp eax, 0xffffffff
je 0x436eeb
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x436ee1
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 [0x4c6d0c]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
mov eax, dword [0x4c6d0c]
mov dword [ebp - 4], esi
jmp 0x436eef
and dword [ebp - 4], 0
cmp byte [0x4c6d08], 0
je 0x436f2e
cmp eax, 0xffffffff
je 0x436f2e
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x436f2a
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 [0x4c6d0c]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
mov edi, esi
jmp 0x436f30
xor edi, edi
mov eax, dword [ebp - 4]
mov ecx, dword [ebx + 0x10]
mov esi, dword [eax + 0x14]
call fcn.004363a7
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 [0x4c6140], esi
jbe 0x436f75
mov eax, dword [0x4c6138]
push dword [eax + esi*4]
push edi
call sub.MSVCRT.dll__stricmp
pop ecx
pop ecx
test eax, eax
je 0x436fb1
inc esi
cmp esi, dword [0x4c6140]
jb 0x436f58
mov ecx, dword [ebx + 0x10]
call fcn.004363a7
mov ecx, eax
call fcn.00444c8a
mov esi, eax
mov eax, dword [0x4c6140]
cmp eax, dword [0x4c613c]
jb 0x436f9d
mov ecx, 0x4c6138
call fcn.0045a5dd
mov eax, dword [0x4c6140]
mov ecx, dword [0x4c6138]
inc dword [0x4c6140]
mov dword [ecx + eax*4], esi
mov esi, dword [ebp - 8]
mov ecx, dword [ebx + 0x10]
call fcn.004444cc
mov ecx, dword [ebx + 0x24]
call fcn.004444cc
lea ecx, [ebx + 0x18]
call fcn.00435c65
mov eax, dword [0x4c611c]
mov ecx, dword [0x4c6114]
dec eax
mov dword [0x4c611c], 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
inc dword [0x4c3adc]
call fcn.00435fc3
inc dword [0x4c3adc]
lea esp, [ebp - 0x14]
pop edi
pop esi
pop ebx
leave
ret 4