Function at 0x41a550
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a3a28
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push esi
push edi
mov eax, dword [0x4c8104]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x2c], edi
mov eax, dword [edi + 0x190]
push dword [0x50b8e0]
mov esi, dword [eax + 0x10]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x41a5a4
cmp dword [eax], esi
je 0x41a64e
mov eax, dword [eax + 8]
test eax, eax
jne 0x41a595
lea eax, [ebp - 0x14]
mov ecx, edi
push eax
call fcn.0040d230
mov dword [ebp - 4], 0
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], edx
mov dword [eax], 0
mov dword [eax + 4], 0
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 1
push eax
lea ecx, [edi + 0x158]
call fcn.0041bd40
mov byte [ebp - 4], 2
or esi, 0xffffffff
mov edi, dword [ebp - 0x20]
test edi, edi
je 0x41a611
mov eax, esi
lock xadd dword [edi + 4], eax
jne 0x41a611
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
mov eax, esi
lock xadd dword [edi + 8], eax
jne 0x41a611
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov dword [ebp - 4], 3
mov edi, dword [ebp - 0x10]
test edi, edi
je 0x41a63d
mov eax, esi
lock xadd dword [edi + 4], eax
jne 0x41a63d
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lock xadd dword [edi + 8], esi
dec esi
jne 0x41a63d
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [eax + 4], 0
je 0x41a5a4
mov esi, dword [edi + 0x140]
lea eax, [edi + 0x108]
mov ecx, dword [ebp - 0x2c]
mov edi, dword [edi + 0x144]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x24]
push eax
call fcn.0040d230
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], edi
mov edi, dword [ebp - 0x2c]
xor eax, eax
mov dword [ebp - 4], 4
mov esi, dword [ebp - 0x1c]
test esi, esi
push 0x50b818
push 0x435e10
push 0x50b820
cmove edi, eax
mov dword [esi + 0x40], eax
call fcn.00475b00
add esp, 0xc
test eax, eax
je 0x41a75f
mov dword [esi + 0x44], 0x50b818
lea ecx, [esi + 0x48]
xor al, al
xchg byte [ecx], al
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
call fcn.00405db0
mov edx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x20]
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov ecx, dword [edi + 0x190]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0x40], eax
mov eax, dword [ecx + 0x10]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x30], esi
mov byte [ebp - 4], 6
lea edx, [ebp - 0x44]
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x1c], eax
call fcn.0041e8b0
mov byte [ebp - 4], 7
or esi, 0xffffffff
mov edi, dword [ebp - 0x30]
test edi, edi
je 0x41a750
mov eax, esi
lock xadd dword [edi + 4], eax
jne 0x41a750
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
mov eax, esi
lock xadd dword [edi + 8], eax
jne 0x41a750
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov dword [ebp - 4], 9
mov edi, dword [ebp - 0x20]
jmp 0x41a61b
call sub.msvcrt.dll_void___cdecl_terminate_void_
int3