Function at 0x4e4130
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x20
mov esi, esp
mov edi, ecx
mov eax, dword [0x5f3418]
xor eax, ebp
mov dword [esi + 0x18], eax
mov dword [esi + 0x14], 0xffffffff
mov dword [esi + 0xc], 0
mov dword [esi + 8], 0
mov dword [esi + 0xd], 0
mov dword [esi + 0x11], 0
mov eax, dword [0x6cf640]
mov ecx, dword [0x5f75b4]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4e4376
push dword [0x5f50f8]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
and eax, 0xfffffffc
je 0x4e41bb
mov ecx, dword [0x6cf638]
mov edx, dword [eax + ecx*8 + 4]
cmp edx, dword [0x6cf63c]
jne 0x4e41bb
cmp dword [eax + ecx*8], 0
jne 0x4e440e
mov eax, dword [0x6cf640]
mov ecx, dword [0x5f75b4]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4e43c2
push dword [0x5f50f8]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
and eax, 0xfffffffc
je 0x4e4354
mov ecx, dword [0x6cf638]
lea edx, [esi + 8]
mov dword [eax + ecx*8], edx
mov ecx, dword [0x6cf63c]
mov edx, dword [0x6cf638]
mov dword [eax + edx*8 + 4], ecx
mov al, 1
mov byte [esi + 0x14], al
mov eax, 1
lock xadd dword [edi + 4], eax
test eax, eax
js 0x4e4317
shr eax, 0x1e
and eax, 1
lea ebx, [ebp + 8]
lea ecx, [edi + 4]
cmp eax, 1
jne 0x4e4321
test ecx, ecx
je 0x4e4415
mov dword [esi + 4], esp
mov ecx, dword [edi + 0x10]
push eax
sub esp, 0x34
mov eax, esp
mov edx, dword [ebx]
mov dword [eax], edx
mov dword [ebx], 0
movups xmm0, xmmword [ebx + 4]
movups xmmword [eax + 4], xmm0
movups xmm0, xmmword [ebx + 0x14]
movups xmmword [eax + 0x14], xmm0
movsd xmm0, qword [ebx + 0x24]
movsd qword [eax + 0x24], xmm0
mov edx, dword [ebx + 0x2c]
mov dword [eax + 0x2c], edx
mov dword [ebx + 0x2c], 0
mov edx, dword [ebx + 0x30]
mov dword [eax + 0x30], edx
mov dword [ebx + 0x30], 0
mov edx, dword [ebx + 0x34]
mov dword [eax + 0x34], edx
call fcn.004e4420
mov esp, dword [esi + 4]
mov eax, 0xffffffff
lock xadd dword [edi + 4], eax
and eax, 0xbfffffff
mov dl, 1
mov cl, 1
cmp eax, 0x80000001
je 0x4e4342
mov dword [esi + 4], ecx
lea ecx, [esi + 8]
call fcn.004e4520
mov eax, dword [ebx + 0x30]
test eax, eax
jne 0x4e42f1
mov eax, dword [ebx + 0x2c]
test eax, eax
jne 0x4e435e
mov edi, dword [ebx]
test edi, edi
jne 0x4e4301
mov ecx, dword [esi + 0x18]
xor ecx, ebp
call fcn.00512ee3
mov eax, dword [esi + 4]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 0x38
lock dec dword [eax]
jne 0x4e42c9
push eax
call fcn.0050fc7c
add esp, 4
jmp 0x4e42c9
lock dec dword [edi]
jne 0x4e42da
mov ecx, dword [edi + 8]
call dword [section..00cfg]
push edi
call ecx
add esp, 4
jmp 0x4e42da
mov eax, 2
jmp 0x4e422a
cmp eax, 2
jne 0x4e4415
xor eax, eax
dec eax
lock xadd dword [ecx], eax
and eax, 0xbfffffff
xor edx, edx
mov ecx, 0
jmp 0x4e42ac
push dword [edi + 8]
mov edi, edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, edi
jmp 0x4e42b7
call fcn.00404220
jmp 0x4e41f1
lock dec dword [eax + 4]
jne 0x4e42d4
push eax
call fcn.0050b620
add esp, 4
jmp 0x4e42d4
push 0x6cf640
call fcn.00510c6d
add esp, 4
cmp dword [0x6cf640], 0xffffffff
jne 0x4e418e
mov dword [0x6cf63c], 0
mov dword [0x6cf638], 0xffffffff
mov ecx, 0x6cf638
push 0
call fcn.0040c200
push 0x6cf640
call fcn.00510d9d
add esp, 4
jmp 0x4e418e
push 0x6cf640
call fcn.00510c6d
add esp, 4
cmp dword [0x6cf640], 0xffffffff
jne 0x4e41dc
mov dword [0x6cf63c], 0
mov dword [0x6cf638], 0xffffffff
mov ecx, 0x6cf638
push 0
call fcn.0040c200
push 0x6cf640
call fcn.00510d9d
add esp, 4
jmp 0x4e41dc
xor eax, eax
jmp 0x4e420f
xor ecx, ecx
jmp 0x4e42b7