Function at 0x1001b070
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0xa0
mov eax, dword [0x1002b150]
push ebx
push esi
push edi
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov eax, dword [esp + 0xb4]
sub eax, 2
cmp eax, 1
sbb eax, eax
neg eax
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x7b0]
lea edx, [eax + eax*4]
mov ecx, eax
mov ebx, dword [esp + 0xb8]
lea eax, [edx + edx*8]
sub eax, ecx
test ebx, ebx
mov ecx, dword [eax + esi + 0x5a38]
mov dword [esp + 0x28], ecx
je 0x1001b0cf
cmp ebx, 1
je 0x1001b0d7
cmp ebx, 2
je 0x1001b0df
jmp 0x1001b0e9
lea eax, [esi + 0x714]
jmp 0x1001b0e5
lea eax, [esi + 0x724]
jmp 0x1001b0e5
lea eax, [esi + 0x734]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x3c]
shl eax, 2
lea edx, [esp + 0x70]
mov dword [esp + 0x38], eax
push eax
push ecx
push edx
call fcn.1000eef0
add esp, 0xc
lea ecx, [ebx*8]
lea edx, [ecx + ecx*8]
mov dword [esp + 0x40], edx
add edx, esi
mov dword [esp + 0x1c], edx
mov eax, dword [edx + 0x5b78]
shl eax, 2
mov ecx, dword [esp + 0x38]
push eax
mov eax, dword [esp + 0x20]
lea edx, [esp + ecx + 0x74]
add eax, 0x5b80
push eax
push edx
call fcn.1000eef0
mov ecx, dword [esp + 0x28]
add esp, 0xc
mov eax, dword [ecx + 0x5b78]
lea ecx, [esp + 0x50]
shl eax, 3
push eax
mov eax, dword [esp + 0x20]
add eax, 0x5b90
push eax
push ecx
call fcn.1000eef0
mov ecx, dword [esp + 0x28]
add esp, 0xc
mov eax, dword [ecx + 0x5b78]
lea edx, [esp + 0x70]
add eax, dword [esp + 0x28]
lea ecx, [esp + 0x90]
mov dword [esp + 0x10], eax
push ecx
lea eax, [esp + 0x14]
push edx
push ebx
push eax
call fcn.1000ed20
mov dword [esp + 0x24], eax
add esp, 0x10
test eax, eax
jne 0x1001b475
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x30], 0
cmp dword [eax + 0x5b78], 0
jbe 0x1001b22e
mov edi, dword [esp + 0x40]
mov eax, dword [esp + 0x38]
add edi, esi
lea ecx, [esp + eax + 0x90]
lea ebp, [edi + 0x5b90]
add edi, 0x5b80
mov dword [esp + 0x34], ecx
mov eax, dword [esp + 0x34]
mov eax, dword [eax]
sub eax, dword [esp + 0x28]
cmp eax, dword [esp + 0x30]
jne 0x1001b20f
mov eax, dword [edi]
push eax
call fcn.1000ef20
add esp, 4
mov eax, dword [ebp]
test eax, eax
je 0x1001b1ff
push eax
call fcn.1000ef20
add esp, 4
mov eax, dword [ebp + 4]
test eax, eax
je 0x1001b20f
push eax
call fcn.1000ef20
add esp, 4
add ebp, 8
add edi, 4
mov eax, dword [esp + 0x1c]
inc dword [esp + 0x30]
add dword [esp + 0x34], 4
mov ecx, dword [esp + 0x30]
cmp dword [eax + 0x5b78], ecx
ja 0x1001b1d4
xor edi, edi
mov dword [esp + 0x10], edi
cmp dword [esp + 0x28], edi
je 0x1001b463
mov eax, dword [esp + 0x40]
lea edx, [esp + 0x40]
mov dword [esp + 0x30], edx
lea ecx, [esi + eax + 0x5bb0]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x34], ecx
lea ecx, [esp + 0x90]
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], ecx
mov eax, dword [esp + 0x2c]
cmp dword [eax], edi
jne 0x1001b4b3
xor ecx, ecx
mov eax, dword [esp + 0x1c]
mov edx, dword [eax + 0x5b78]
cmp ecx, edx
je 0x1001b2a3
mov eax, dword [esp + 0x38]
lea eax, [esp + eax + 0x90]
cmp dword [eax], edi
je 0x1001b29b
add eax, 4
inc ecx
cmp ecx, edx
jb 0x1001b28f
cmp ecx, edx
jne 0x1001b391
lea eax, [ebx*2]
mov ecx, dword [esp + 0x1c]
lea ebp, [eax + eax*8]
mov eax, dword [ecx + 0x5b7c]
push eax
call fcn.1000ef10
mov ecx, dword [esp + 0x14]
add esp, 4
add ecx, ebp
mov dword [esi + ecx*4 + 0x5b80], eax
mov eax, dword [esp + 0x10]
add eax, ebp
mov ecx, dword [esi + eax*4 + 0x5b80]
test ecx, ecx
je 0x1001b379
mov eax, dword [esp + 0x1c]
mov edx, dword [eax + 0x5b7c]
mov eax, dword [esp + 0x20]
push edx
mov edx, dword [eax]
push edx
push ecx
call fcn.1000eef0
add esp, 0xc
lea ecx, [ebx + ebx*8]
cmp dword [esp + 0x24], 1
sbb edx, edx
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x20]
add ecx, dword [esp + 0x18]
lea edx, [edx + ecx*2 + 1]
lea ecx, [esi + edx*4]
mov edx, dword [eax]
add ecx, 0x5b90
push ecx
push edx
mov ecx, dword [esp + 0xbc]
push ecx
call dword [ebx*4 + 0x1002d0b0]
mov dword [esp + 0x20], eax
add esp, 0xc
test eax, eax
je 0x1001b358
mov eax, dword [esp + 0x10]
add eax, ebp
mov ecx, dword [esi + eax*4 + 0x5b80]
push ecx
call fcn.1000ef20
add esp, 4
cmp dword [esp + 0x24], 1
sbb ecx, ecx
mov eax, dword [esp + 0x10]
add eax, dword [esp + 0x18]
neg ecx
lea ecx, [ecx + eax*2]
mov dword [esi + ecx*4 + 0x5b90], 0
jmp 0x1001b381
mov dword [esp + 0x14], 0xffffffff
cmp dword [esp + 0x14], 0
je 0x1001b4a5
jmp 0x1001b463
lea eax, [ebx*2]
lea edx, [eax + eax*8]
mov eax, dword [esp + 0x28]
add eax, ecx
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x10]
mov ebp, dword [esp + eax*4 + 0x70]
add edx, dword [esp + 0x3c]
cmp dword [esp + 0x24], 1
mov dword [esi + edx*4 + 0x5b80], ebp
sbb edx, edx
lea eax, [edx + ecx*2 + 1]
inc edx
cmp dword [esp + eax*4 + 0x50], 0
jne 0x1001b480
cmp dword [esp + 0x24], 1
sbb ebp, ebp
lea eax, [ebx + ebx*8]
neg ebp
mov dword [esp + 0x18], eax
lea eax, [ebp + ecx*2]
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + eax*4 + 0x50]
add ecx, dword [esp + 0x18]
lea ecx, [ebp + ecx*2]
mov dword [esi + ecx*4 + 0x5b90], eax
mov eax, dword [esp + 0x10]
add eax, dword [esp + 0x18]
lea ecx, [edx + eax*2]
lea eax, [esi + ecx*4]
mov ecx, dword [esp + 0x20]
add eax, 0x5b90
mov edx, dword [ecx]
push eax
push edx
mov eax, dword [esp + 0xbc]
push eax
call dword [ebx*4 + 0x1002d0b0]
mov dword [esp + 0x20], eax
add esp, 0xc
test eax, eax
je 0x1001b4a5
mov eax, dword [esp + 0x10]
add eax, dword [esp + 0x3c]
mov ecx, dword [esi + eax*4 + 0x5b80]
push ecx
call fcn.1000ef20
mov eax, dword [esp + 0x14]
add eax, dword [esp + 0x1c]
add esp, 4
lea ecx, [ebp + eax*2]
mov edx, dword [esi + ecx*4 + 0x5b90]
push edx
call fcn.1000ef20
add esp, 4
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
mov dword [eax + 0x5b78], ecx
mov eax, dword [esp + 0x14]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xa0
ret
lea edx, [ebx + ebx*8]
mov eax, dword [esp + ecx*8 + 0x50]
mov ebp, dword [esp + 0x10]
add ebp, edx
mov dword [esi + ebp*8 + 0x5b90], eax
mov eax, dword [esp + ecx*8 + 0x54]
mov ecx, dword [esp + 0x10]
add ecx, edx
mov dword [esi + ecx*8 + 0x5b94], eax
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x30]
inc dword [esp + 0x10]
mov dword [eax], ecx
add dword [esp + 0x30], 4
add dword [esp + 0x20], 4
mov eax, dword [esp + 0x2c]
inc edi
add dword [esp + 0x2c], 4
mov edx, dword [eax]
mov eax, dword [esp + 0x34]
add dword [esp + 0x34], 4
mov ecx, dword [esp + edx*4 + 0x40]
cmp edi, dword [esp + 0x28]
mov dword [eax], ecx
jb 0x1001b268
jmp 0x1001b463