Function at 0x1004dc70
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101107ed
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x10163164]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 4], 0
lea eax, [ebp - 0xd]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x24], eax
mov esi, dword [esi + 0x3c]
mov dword [ebp - 0x18], esi
mov byte [ebp - 4], 1
push dword [0x1017537c]
mov dword [ebp - 0x20], 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x1004dcd3
mov ecx, dword [eax + 4]
jmp 0x1004dcd5
xor ecx, ecx
push ecx
push dword [ebp - 0x1c]
mov edx, 0x78
call fcn.1004f040
add esp, 8
mov ebx, eax
lea eax, [ebp + 0x10]
mov dword [ebp - 0x20], ebx
push eax
lea eax, [ebp + 8]
push eax
push ecx
mov ecx, ebx
call fcn.1004f5d0
lea eax, [ebx + 0xc]
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x2c], eax
lea ecx, [ebx + 4]
mov dword [ebp - 0x14], ecx
test ebx, ebx
je 0x1004dd13
lock inc dword [ecx]
jmp 0x1004dd16
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], ebx
lea eax, [edi + 0x3c]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x24]
push eax
lea ecx, [edi + 0x20]
call fcn.100511b0
mov ecx, dword [ebp - 0x20]
or edi, 0xffffffff
test ecx, ecx
je 0x1004dd58
mov eax, edi
lock xadd dword [ecx + 4], eax
jne 0x1004dd58
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [ebp - 0x20]
mov eax, edi
lock xadd dword [ecx + 8], eax
jne 0x1004dd58
mov eax, dword [ecx]
call dword [eax + 4]
test ebx, ebx
je 0x1004dd62
mov eax, dword [ebp - 0x14]
lock inc dword [eax]
lea eax, [ebx + 0xc]
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x1c]
mov byte [ebp - 4], 4
lea eax, [ecx + 0x1c]
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.10051380
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x1004dda8
mov eax, edi
lock xadd dword [ecx + 4], eax
jne 0x1004dda8
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [ebp - 0x20]
mov eax, edi
lock xadd dword [ecx + 8], eax
jne 0x1004dda8
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [ebx + 0xc]
mov ecx, 0xfffffffe
lea eax, [edx + 8]
lock xadd dword [eax], ecx
lea eax, [ecx - 2]
test eax, eax
je 0x1004ddf1
lea eax, [edx + 0x18]
lea edi, [edx + 0x10]
mov dword [ebp - 0x1c], eax
cmp edi, eax
je 0x1004ddee
nop dword [eax + eax]
mov esi, dword [edx + 4]
mov ecx, dword [edi]
test ecx, ecx
je 0x1004dde4
mov eax, dword [ecx]
push esi
call dword [eax]
mov eax, dword [ebp - 0x1c]
lea edx, [ebx + 0xc]
add edi, 4
cmp edi, eax
jne 0x1004ddd0
mov esi, dword [ebp - 0x18]
or edi, 0xffffffff
test esi, esi
je 0x1004de6e
push ecx
push 0x10
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x18]
call fcn.100279a0
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x18], ecx
mov dword [ecx], 0x10148cf0
test ebx, ebx
je 0x1004def1
mov edx, dword [ebp - 0x14]
lock inc dword [edx]
lea eax, [ebx + 0xc]
mov dword [ecx + 8], 0
mov dword [ecx + 4], eax
lea eax, [ebx + 8]
mov dword [ecx + 8], ebx
lock inc dword [eax]
mov eax, edi
lock xadd dword [edx], eax
jne 0x1004de57
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
mov eax, edi
lea edx, [ebx + 8]
lock xadd dword [edx], eax
jne 0x1004de54
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 4]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x20]
mov dword [ecx + 0xc], eax
mov dword [esi], ecx
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x24], 0
call fcn.10027b30
lea esi, [ebx + 8]
test ebx, ebx
je 0x1004de94
mov ecx, dword [ebp - 0x14]
mov eax, edi
lock xadd dword [ecx], eax
jne 0x1004de94
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
lock xadd dword [esi], edi
dec edi
jne 0x1004de94
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 4]
mov dword [ebp - 4], 5
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x1004dedf
push ecx
lea ecx, [eax + 0x18]
mov dword [ebp + 0x10], 0
lea edx, [ebp - 0x18]
mov dword [ebp - 0x18], eax
call fcn.1002a4d0
mov eax, dword [ebp - 0x18]
add esp, 4
test eax, eax
je 0x1004decd
mov eax, dword [eax]
push eax
mov eax, dword [eax + 4]
call eax
add esp, 4
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x1004dedf
mov eax, dword [eax]
push eax
mov eax, dword [eax + 4]
call eax
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ecx + 4], 0
mov dword [ecx + 8], 0
jmp 0x1004de57