Function at 0x4affb0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
pop edx
and eax, dword [0x69f96c]
and edx, dword [0x69f970]
mov dword [ebp - 4], eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push 0x20
call fcn.00534710
mov dword [ebp - 8], eax
push dword [ebp + 0x18]
mov eax, dword [ebp + 0x14]
pop edx
and eax, dword [0x69f96c]
and edx, dword [0x69f970]
mov dword [ebp - 0xc], eax
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push 0x20
call fcn.00534710
mov dword [ebp - 0x10], eax
cmp dword [0x7c0370], 0
jne 0x4b0020
mov dword [0x7c0370], 1
call fcn.004bf6e0
mov dword [0x7cdd9c], eax
mov eax, dword [0x7d8230]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0x7c], 0
je 0x4b0083
mov eax, dword [0x7d8230]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
movzx eax, word [eax + 0x80]
test eax, eax
jne 0x4b0083
push 0x7d87d8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
dec dword [0x7d87f0]
mov eax, dword [0x7d8230]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [eax + 0x7c], 0
push 0x7d87f8
call fcn.0048dab0
pop ecx
push 0x7d87d8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x7d87c0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x7d8230]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0x1654], 0
je 0x4b00b3
push 0x7d87c0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.0048d580
mov eax, dword [0x7d8230]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [eax + 0x1658], 1
push 0x7d87c0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
movzx eax, word [ebp + 0x1c]
and eax, 0xff
mov dword [ebp - 0x14], eax
test eax, eax
je 0x4b00f2
cmp eax, 1
je 0x4b01a6
jmp 0x4b0213
cmp dword [0x7cdd9c], 0
je 0x4b017e
movzx eax, word [ebp + 0x1c]
and eax, 0x100
je 0x4b0113
mov dword [ebp - 0x30], 0
jmp 0x4b011a
mov dword [ebp - 0x30], 2
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x2c], eax
cmp dword [0x7c0368], 0
je 0x4b0134
movzx eax, word [ebp + 0x1c]
and eax, 0x200
jne 0x4b0138
or dword [ebp - 0x2c], 1
push edi
lea edi, [ebp - 0x28]
push edi
xor eax, eax
mov ecx, 5
rep stosd dword es:[edi], eax
pop eax
pop edi
mov eax, dword [ebp - 4]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 8]
push eax
call fcn.004ae4c0
pop ecx
lea edx, [ebp - 0x28]
push edx
mov edx, dword [ebp - 0x10]
push edx
mov edx, dword [ebp - 0xc]
push edx
push 0
mov edx, dword [ebp - 0x2c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_LockFileEx]
mov ebx, eax
jmp 0x4b0215
mov eax, dword [ebp + 8]
push eax
call fcn.004ae4c0
pop ecx
mov edx, dword [ebp - 0x10]
push edx
mov edx, dword [ebp - 0xc]
push edx
mov edx, dword [ebp - 8]
push edx
mov edx, dword [ebp - 4]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_LockFile]
mov ebx, eax
jmp 0x4b0215
cmp dword [0x7cdd9c], 0
je 0x4b01ee
push edi
lea edi, [ebp - 0x28]
push edi
xor eax, eax
mov ecx, 5
rep stosd dword es:[edi], eax
pop eax
pop edi
mov eax, dword [ebp - 4]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 8]
push eax
call fcn.004ae4c0
pop ecx
lea edx, [ebp - 0x28]
push edx
mov edx, dword [ebp - 0x10]
push edx
mov edx, dword [ebp - 0xc]
push edx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_UnlockFileEx]
mov ebx, eax
jmp 0x4b0215
mov eax, dword [ebp + 8]
push eax
call fcn.004ae4c0
pop ecx
mov edx, dword [ebp - 0x10]
push edx
mov edx, dword [ebp - 0xc]
push edx
mov edx, dword [ebp - 8]
push edx
mov edx, dword [ebp - 4]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_UnlockFile]
mov ebx, eax
jmp 0x4b0215
xor ebx, ebx
push 0
push ebx
call fcn.004be070
add esp, 8
push 0x7d87c0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x7d8230]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [eax + 0x1658], 0
push 0x7d87c0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [0x7d8230]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0x7c], 0
jne 0x4b02c3
mov eax, dword [0x7d8230]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
movzx eax, word [eax + 0x80]
test eax, eax
jne 0x4b02c3
push 0x7d87d8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
jmp 0x4b0296
push 0xffffffffffffffff
push 0x7d87d8
push 0x7d87f8
call fcn.0048db80
add esp, 0xc
mov eax, dword [0x7d87f4]
test eax, eax
jne 0x4b0282
inc dword [0x7d87f0]
mov eax, dword [0x7d8230]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [eax + 0x7c], 1
push 0x7d87d8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret