Function at 0x4f9b80
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x18
mov esi, ecx
mov eax, dword [0x5f3418]
xor eax, ebp
mov dword [esp + 0x10], eax
call fcn.00510cbf
mov eax, dword [eax]
mov dword [esp + 4], eax
call fcn.00510cbf
xor edi, edi
mov dword [eax], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], eax
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, dword [0x6cebb4]
cmp ebx, 1
jbe 0x4f9ce6
mov edi, dword [esi + 4]
push dword [0x5f50f8]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
and eax, 0xfffffffc
je 0x4f9d27
mov ecx, dword [ebx]
mov dword [eax + ecx*8], edi
mov ecx, dword [ebx]
mov edx, dword [ebx + 4]
mov dword [eax + ecx*8 + 4], edx
mov ecx, dword [esi]
test ecx, ecx
jne 0x4f9cbe
push dword [esp]
call dword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.00510cbf
mov ecx, dword [esp + 4]
mov dword [eax], ecx
cmp byte [esi + 0x20], 0
jne 0x4f9cd2
mov eax, dword [esi + 0xc]
test eax, eax
jne 0x4f9d39
mov edi, dword [esi + 0x14]
mov dword [esi + 0x14], 0
test edi, edi
jne 0x4f9d89
mov ecx, dword [esi + 0xc]
xor eax, eax
test ecx, ecx
jne 0x4f9d9e
mov ecx, eax
shr ecx, 0xe
mov edx, eax
shr edx, 0x13
mov edx, dword [edx*4 + 0x6c24fc]
bt edx, ecx
jb 0x4f9db4
mov dword [esi + 0xc], 0
mov eax, dword [esi + 4]
mov ecx, eax
shr ecx, 0xe
mov edx, eax
shr edx, 0x13
mov edx, dword [edx*4 + 0x6c24fc]
bt edx, ecx
jb 0x4f9dc2
mov dword [esi + 4], 0
mov eax, dword [esi]
mov ecx, eax
shr ecx, 0xe
mov edx, eax
shr edx, 0x13
mov edx, dword [edx*4 + 0x6c24fc]
bt edx, ecx
jb 0x4f9dd0
mov dword [esi], 0
mov ecx, dword [esp + 0x10]
xor ecx, ebp
call fcn.00512ee3
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
cmp dword [esi + 4], 0
jne 0x4f9bfc
call fcn.00407cf0
jmp 0x4f9bfc
mov edi, dword [esi + 0x30]
test edi, edi
jne 0x4f9dde
mov byte [esi + 0x20], 0
jmp 0x4f9c1a
push 0x6cebb4
call fcn.00408860
add esp, 4
test al, al
je 0x4f9e26
xor eax, eax
mov dword [0x6cebbc], eax
mov dword [0x6cebb8], 0xffffffff
mov ebx, 0x6cebb8
mov ecx, 0x6cebb8
push eax
call fcn.0040c200
mov dword [0x6cebb4], ebx
jmp 0x4f9bcc
test edi, edi
je 0x4f9bf2
call fcn.00404220
jmp 0x4f9be4
mov ecx, dword [esi + 0x10]
cmp dword [eax + 0xc], ecx
jbe 0x4f9c25
mov eax, dword [eax + 8]
shl ecx, 7
cmp dword [eax + ecx + 0x68], 0
je 0x4f9c25
mov ebx, dword [0x6bede4]
lea edi, [ebx + 0x74]
push edi
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x4f9e31
add ebx, 0x48
mov ecx, dword [esi + 0xc]
push ebx
push dword [esi + 0x10]
call fcn.00565de0
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x4f9c25
mov ecx, edi
call fcn.00565540
push edi
call fcn.0050fc7c
add esp, 4
jmp 0x4f9c37
mov eax, dword [ecx + 4]
lock dec dword [eax + 0x38]
mov eax, dword [ecx + 4]
lock inc dword [eax + 0x3c]
mov eax, dword [esi + 0xc]
jmp 0x4f9c44
push eax
call fcn.004e3ba0
add esp, 4
jmp 0x4f9c5e
push eax
call fcn.004e3ba0
add esp, 4
jmp 0x4f9c82
push eax
call fcn.004e3ba0
add esp, 4
jmp 0x4f9ca5
lea ebx, [esp + 8]
push ebx
call fcn.00504e70
add esp, 4
mov ecx, edi
push dword [ebx + 4]
push dword [ebx]
push dword [esi + 0x2c]
push dword [esi + 0x28]
call fcn.00584820
mov edi, dword [esi + 0x30]
test edi, edi
je 0x4f9cdd
lock dec dword [edi]
jne 0x4f9cdd
mov ecx, edi
call fcn.00584a90
push edi
call fcn.0050fc7c
add esp, 4
jmp 0x4f9cdd
mov ebx, dword [0x6cebb4]
jmp 0x4f9bcc
mov ecx, edi
call fcn.004f8930
jmp 0x4f9d6e