Function at 0x416b90
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
push esi
mov ebx, ecx
mov dword [esp + 0xc], 0
push edi
push 4
mov byte [ebx + 0x46], 1
call fcn.0046ebbd
mov esi, eax
add esp, 4
test esi, esi
je 0x416bbe
mov dword [esi], ebx
jmp 0x416bc0
xor esi, esi
cmp dword [ebp + 0xc], 0
mov dword [ebx + 8], esi
jl 0x416cfd
jg 0x416bd9
cmp dword [ebp + 8], 0
jbe 0x416cfd
call fcn.0041d3c0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [eax]
test edi, edi
je 0x416bf8
mov ecx, 1
lea eax, [edi + 4]
lock xadd dword [eax], ecx
mov esi, dword [ebx + 8]
push 0x10
call fcn.0046ebbd
add esp, 4
test eax, eax
je 0x416c24
mov dword [eax + 4], 0
mov dword [eax], 0x4a8340
mov dword [eax + 8], 0x4168b0
mov dword [eax + 0xc], esi
xor esi, esi
jmp 0x416c26
xor eax, eax
mov dword [esp + 0x18], eax
test eax, eax
je 0x416c3a
add eax, 4
mov ecx, 1
lock xadd dword [eax], ecx
push dword [ebp + 0xc]
lea eax, [esp + 0x1c]
mov dword [esp + 0x20], 0x416f80
push dword [ebp + 8]
mov edx, dword [edi]
mov ecx, edi
push eax
lea eax, [ebx + 0xc]
push eax
call dword [edx]
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x416c80
add ecx, 4
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
setne al
test al, al
jne 0x416c80
test ecx, ecx
je 0x416c80
add ecx, 0xfffffffc
je 0x416c80
mov eax, dword [ecx]
push 1
call dword [eax]
test esi, esi
je 0x416cb4
mov ecx, dword [esi]
mov dword [esp + 0x10], ecx
test ecx, ecx
je 0x416cab
mov eax, dword [ecx]
call dword [eax + 0x10]
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x416cab
mov dword [ecx], 0
mov dword [eax + 8], 0
push esi
call fcn.0046ec0e
add esp, 4
lea ecx, [edi + 4]
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
setne al
test al, al
jne 0x416cd6
test ecx, ecx
je 0x416ccf
add ecx, 0xfffffffc
jmp 0x416cd1
xor ecx, ecx
mov eax, dword [ecx]
call dword [eax + 0xc]
lea eax, [esp + 0x20]
push eax
mov eax, dword [0x4b6c50]
call eax
add esp, 4
mov ecx, dword [eax]
mov eax, dword [eax + 4]
add ecx, dword [ebp + 8]
mov dword [ebx + 0x38], ecx
adc eax, dword [ebp + 0xc]
mov dword [ebx + 0x3c], eax
mov eax, ecx
jmp 0x416e11
push 0x10
call fcn.0046ebbd
add esp, 4
test eax, eax
je 0x416d26
mov dword [eax + 4], 0
mov dword [eax], 0x4a8340
mov dword [eax + 8], 0x4168b0
mov dword [eax + 0xc], esi
xor esi, esi
jmp 0x416d28
xor eax, eax
mov dword [esp + 0x10], eax
mov ecx, 1
test eax, eax
je 0x416d3c
add eax, 4
lock xadd dword [eax], ecx
mov dword [esp + 0x14], 0x416f80
call fcn.0041d3c0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [eax]
test edi, edi
je 0x416d63
lea eax, [edi + 4]
mov ecx, 1
lock xadd dword [eax], ecx
mov edx, dword [edi]
lea eax, [esp + 0x10]
xorps xmm0, xmm0
mov ecx, edi
movlpd qword [esp + 0x18], xmm0
push dword [esp + 0x1c]
push dword [esp + 0x1c]
push eax
lea eax, [ebx + 0xc]
push eax
call dword [edx]
or ecx, 0xffffffff
add edi, 4
mov eax, ecx
lock xadd dword [edi], eax
dec eax
setne al
test al, al
jne 0x416daa
test edi, edi
je 0x416da0
lea ecx, [edi - 4]
jmp 0x416da2
xor ecx, ecx
mov eax, dword [ecx]
call dword [eax + 0xc]
or ecx, 0xffffffff
mov edx, dword [esp + 0x10]
test edx, edx
je 0x416dd2
add edx, 4
lock xadd dword [edx], ecx
dec ecx
setne al
test al, al
jne 0x416dd2
test edx, edx
je 0x416dd2
lea ecx, [edx - 4]
test ecx, ecx
je 0x416dd2
mov eax, dword [ecx]
push 1
call dword [eax]
test esi, esi
je 0x416e00
mov edi, dword [esi]
test edi, edi
je 0x416df7
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x10]
mov eax, dword [edi + 8]
test eax, eax
je 0x416df7
mov dword [eax], 0
mov dword [edi + 8], 0
push esi
call fcn.0046ec0e
add esp, 4
mov dword [ebx + 0x38], 0
mov eax, dword [ebx + 0x38]
mov dword [ebx + 0x3c], 0
mov ecx, dword [ebx + 0x3c]
mov dword [ebx + 0x34], ecx
mov dword [ebx + 0x30], eax
cmp dword [ebx + 0x40], 0
jne 0x416e29
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebx + 0x40], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8