Function at 0x1001b620
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x10
push esi
mov esi, dword [esp + 0x18]
push edi
xor edi, edi
mov dword [esp + 8], edi
cmp esi, edi
jne 0x1001b64c
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
push eax
push ecx
push edi
call fcn.1001b470
add esp, 0xc
pop edi
pop esi
add esp, 0x10
ret
push ebx
mov ebx, dword [esp + 0x28]
push ebp
mov dword [esp + 0x18], 1
test ebx, ebx
js 0x1001b669
mov edx, esi
call fcn.1001aa10
test eax, eax
je 0x1001b6e7
mov eax, dword [esi - 4]
test al, 3
mov edx, edi
sete dl
and eax, 0xfffffff8
mov dword [esp + 0x18], edi
lea edx, [edx*4 + 8]
sub eax, edx
mov ebp, eax
cmp ebp, edi
jne 0x1001b6eb
push str.nedmalloc:_nedprealloc___called_with_a_block_not_created_by_nedmalloc__n
call fcn.10020f70
add eax, 0x40
push eax
call fcn.10021125
add esp, 8
call fcn.10020f0a
mov edi, dword [esp + 0x28]
cmp edi, 0x14
jae 0x1001b6b9
mov dword [esp + 0x28], 0x14
mov edi, dword [esp + 0x28]
lea eax, [esp + 0x10]
call fcn.1001b3f0
mov esi, dword [esp + 0x10]
mov ecx, dword [esi + 0x454]
push ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
jle 0x1001b706
mov eax, dword [esi + eax*4 + 0x50]
mov edx, dword [eax]
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], edx
jmp 0x1001b727
xor ebp, ebp
jmp 0x1001b689
mov edi, dword [esp + 0x28]
cmp edi, ebp
ja 0x1001b6a8
sub eax, edi
cmp eax, 0x400
jae 0x1001b6a8
pop ebp
pop ebx
pop edi
mov eax, esi
pop esi
add esp, 0x10
ret
lea edi, [esp + 0x1c]
lea esi, [esp + 0x14]
lea ebx, [esp + 0x10]
call fcn.1001b420
mov esi, dword [esp + 0x10]
mov ebx, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x14]
test ebx, 0xfffe
jne 0x1001b7f8
test eax, eax
je 0x1001b7f8
test edi, edi
je 0x1001b7f8
cmp edi, 0x2000
ja 0x1001b7f8
lea ecx, [esp + 0x28]
push ecx
mov edi, eax
call fcn.1001ade0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x1001b7f0
mov esi, dword [esp + 0x28]
mov eax, ebp
cmp ebp, esi
jb 0x1001b774
mov eax, esi
mov edi, dword [esp + 0x24]
push eax
push edi
push ebx
call fcn.10025550
add esp, 0xc
test byte [esp + 0x2c], 1
je 0x1001b79f
cmp esi, ebp
jbe 0x1001b79f
sub esi, ebp
push esi
lea edx, [ebx + ebp]
push 0
push edx
call fcn.10025370
add esp, 0xc
cmp dword [esp + 0x18], 0
jne 0x1001b7cb
lea eax, [ebp - 0x14]
cmp eax, 0x1ff4
ja 0x1001b7df
push 0
mov esi, edi
mov edi, dword [esp + 0x18]
push ebp
call fcn.1001aeb0
add esp, 8
pop ebp
mov eax, ebx
pop ebx
pop edi
pop esi
add esp, 0x10
ret
push edi
call dword [0x10081dd0]
add esp, 4
pop ebp
mov eax, ebx
pop ebx
pop edi
pop esi
add esp, 0x10
ret
mov eax, edi
call fcn.1001a2d0
pop ebp
mov eax, ebx
pop ebx
pop edi
pop esi
add esp, 0x10
ret
mov ebx, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
cmp dword [esp + 0x18], 0
mov ecx, dword [esp + 0x1c]
mov esi, dword [esi + ecx*4 + 0x458]
mov eax, esi
je 0x1001b8a9
push ebx
push edi
call fcn.10019fa0
add esp, 8
test eax, eax
je 0x1001b89b
mov ecx, dword [eax - 4]
test cl, 3
mov edx, 0
sete dl
and ecx, 0xfffffff8
lea edx, [edx*4 + 8]
sub ecx, edx
mov edx, dword [0x100831b8]
test edx, edx
je 0x1001b847
cmp dword [esi + 0x10], edx
jae 0x1001b850
mov edx, dword [esi + 0x10]
mov dword [0x100831b8], edx
mov edx, dword [0x100831bc]
test edx, edx
je 0x1001b85e
cmp ecx, edx
jbe 0x1001b871
mov edx, dword [0x100836b0]
add ecx, edx
dec edx
not edx
and ecx, edx
mov dword [0x100831bc], ecx
mov esi, eax
cmp ebp, edi
jb 0x1001b879
mov ebp, edi
mov edi, dword [esp + 0x24]
push ebp
push edi
push eax
call fcn.10025550
push edi
call dword [0x10081dd0]
add esp, 0x10
mov ebx, esi
pop ebp
mov eax, ebx
pop ebx
pop edi
pop esi
add esp, 0x10
ret
xor esi, esi
mov ebx, esi
pop ebp
mov eax, ebx
pop ebx
pop edi
pop esi
add esp, 0x10
ret
mov ecx, dword [esp + 0x24]
push edi
call fcn.1001a960
add esp, 4
test eax, eax
je 0x1001b917
mov ecx, dword [eax - 4]
test cl, 3
mov edx, 0
sete dl
and ecx, 0xfffffff8
lea edx, [edx*4 + 8]
sub ecx, edx
mov edx, dword [0x100831b8]
test edx, edx
je 0x1001b8e3
cmp dword [esi + 0x10], edx
jae 0x1001b8ec
mov edx, dword [esi + 0x10]
mov dword [0x100831b8], edx
mov edx, dword [0x100831bc]
test edx, edx
je 0x1001b8fa
cmp ecx, edx
jbe 0x1001b90d
mov edx, dword [0x100836b0]
add ecx, edx
dec edx
not edx
and ecx, edx
mov dword [0x100831bc], ecx
pop ebp
mov ebx, eax
pop ebx
pop edi
pop esi
add esp, 0x10
ret
xor ebx, ebx
pop ebp
mov eax, ebx
pop ebx
pop edi
pop esi
add esp, 0x10
ret