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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
call fcn.004363a7
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x43689b
sub eax, ecx
mov dword [ebp - 4], eax
cmp byte [0x4c6d08], dl
je 0x4368ea
mov eax, dword [0x4c6d0c]
cmp eax, 0xffffffff
je 0x4368ea
mov ebx, dword [sym.imp.KERNEL32.DLL_TlsGetValue]
push eax
call ebx
mov esi, eax
test esi, esi
jne 0x4368f2
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 0x4368f2
mov ebx, dword [sym.imp.KERNEL32.DLL_TlsGetValue]
xor esi, esi
mov eax, dword [ebp - 4]
inc eax
mov dword [esi + 0x14], eax
cmp byte [0x4c6d08], 0
mov esi, dword [0x4c6d0c]
je 0x436940
cmp esi, 0xffffffff
je 0x436940
push esi
call ebx
mov esi, eax
test esi, esi
jne 0x436936
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 0x436942
xor eax, eax
mov eax, dword [eax + 0x14]
call section..text
cmp byte [0x4c6d08], 0
mov dword [ebp - 4], esp
je 0x436986
cmp esi, 0xffffffff
je 0x436986
push esi
call ebx
mov esi, eax
test esi, esi
jne 0x436988
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 0x436988
xor esi, esi
mov eax, dword [ebp - 4]
mov dword [esi + 0x18], eax
cmp byte [0x4c6d08], 0
mov eax, dword [0x4c6d0c]
je 0x4369d3
cmp eax, 0xffffffff
je 0x4369d3
push eax
call ebx
mov esi, eax
test esi, esi
jne 0x4369ca
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 ebx, esi
jmp 0x4369d5
xor ebx, ebx
cmp byte [0x4c6d08], 0
je 0x436a14
cmp eax, 0xffffffff
je 0x436a14
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x436a10
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 0x436a16
xor edi, edi
mov ecx, dword [ebp + 0x10]
mov esi, dword [ebx + 0x14]
call fcn.004363a7
mov ecx, dword [edi + 0x18]
push esi
push eax
push ecx
call sub.MSVCRT.dll_memcpy
mov ebx, eax
mov eax, dword [ebp + 0x14]
add esp, 0xc
mov edi, eax
cmp eax, dword [0x4c6134]
jae 0x436ae0
shl eax, 4
mov esi, eax
mov eax, dword [0x4c612c]
add eax, esi
cmp dword [eax + 8], 0
je 0x436a69
mov ecx, dword [eax + 8]
call fcn.004363a7
push eax
push ebx
call sub.MSVCRT.dll__stricmp
pop ecx
pop ecx
test eax, eax
jne 0x436ad0
mov eax, dword [ebp + 8]
test eax, eax
je 0x436aac
mov ecx, dword [0x4c612c]
mov ecx, dword [esi + ecx]
test ecx, ecx
je 0x436aac
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x436aa3
test dx, dx
je 0x436a9f
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x436aa3
add eax, 4
add ecx, 4
test dx, dx
jne 0x436a7d
xor eax, eax
jmp 0x436aa8
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x436ad0
cmp dword [ebp + 0xc], 0
je 0x436aed
mov eax, dword [0x4c612c]
add eax, esi
cmp dword [eax + 4], 0
je 0x436aed
push dword [eax + 4]
push dword [ebp + 0xc]
call sub.MSVCRT.dll__stricmp
pop ecx
pop ecx
test eax, eax
je 0x436aed
inc edi
add esi, 0x10
cmp edi, dword [0x4c6134]
jb 0x436a47
or eax, 0xffffffff
lea esp, [ebp - 0x10]
pop edi
pop esi
pop ebx
leave
ret 0x10
mov eax, edi
jmp 0x436ae3