Function at 0x10191020
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x44
mov ecx, dword [ebp + 0x14]
push ebx
push esi
mov esi, dword [ebp + 0x10]
shl esi, 4
add esi, dword [ebp + 0xc]
or eax, 0xffffffff
cmp dword [ebp + 0x18], 0
push edi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 4], 0
jbe 0x10191162
mov eax, dword [ebp + 0x24]
mov ebx, dword [ebp + 0x1c]
lea edx, [ebp - 0x40]
sub eax, edx
mov dword [ebp - 8], eax
mov eax, ecx
sub ebx, ecx
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], ebx
jmp 0x10191077
mov ebx, dword [ebp - 0x10]
mov edx, dword [eax]
mov ecx, dword [edx + 0xc0]
mov eax, dword [eax + ebx]
mov dword [ebp - 0x28], ecx
mov ecx, dword [edx + 0xc4]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x24], ecx
xor edi, edi
mov dword [ebp - 0x1c], eax
jmp 0x101910a3
mov edx, dword [ebp - 0x18]
mov ecx, edi
mov eax, 1
shl eax, cl
mov ecx, dword [ebp - 0x1c]
test ecx, eax
je 0x10191138
mov eax, dword [ebp - 8]
lea ecx, [eax + edi*4]
mov eax, dword [ebp + ecx - 0x40]
mov eax, dword [esi + eax*4]
cmp eax, 0xffffffff
jne 0x101910cf
mov dword [ebp + edi*4 - 0x40], edx
jmp 0x10191138
mov edx, dword [eax + 0xc0]
mov ebx, dword [eax + 0xc4]
mov eax, dword [eax + 0x4c]
mov ecx, dword [eax*4 + 0x101e0f10]
mov eax, dword [ebp + 0x20]
and cl, 0xf
cmp cl, 4
je 0x10191111
test eax, 0x1000
je 0x101910ff
and edx, 0x7fffffff
xor ebx, ebx
test eax, 0x400
je 0x1019112e
xor edx, 0x80000000
xor ebx, 0xffffffff
jmp 0x1019112e
test eax, 0x1000
je 0x1019111e
and ebx, 0x7fffffff
test eax, 0x400
je 0x1019112e
xor edx, 0
xor ebx, 0x80000000
cmp dword [ebp - 0x28], edx
jne 0x10191144
cmp dword [ebp - 0x24], ebx
jne 0x10191144
inc edi
cmp edi, 4
jb 0x101910a0
jmp 0x10191149
cmp edi, 4
jb 0x10191183
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
inc ecx
add eax, 4
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], eax
cmp ecx, dword [ebp + 0x18]
jb 0x10191074
cmp dword [ebp + 0x18], 0
mov dword [ebp - 4], 0
jbe 0x10191331
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x1c]
sub ecx, eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], ecx
jmp 0x101911a3
mov edx, dword [ebp + 0x18]
cmp dword [ebp - 4], edx
jae 0x10191162
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x20
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
cmp dword [eax + ecx], 0
jne 0x1019130f
mov ebx, dword [ebp + 0x24]
mov edi, dword [ebp + 0x20]
mov ecx, eax
mov eax, dword [ecx]
mov edx, dword [eax + 0xc0]
lea ecx, [ebp - 0x40]
mov dword [ebp + 0x1c], eax
mov eax, dword [eax + 0xc4]
xor esi, esi
sub ebx, ecx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 8], ebx
mov ecx, dword [ebp - 0x14]
lea edx, [ebx + esi*4]
mov eax, dword [ebp + edx - 0x40]
mov eax, dword [ecx + eax*4]
cmp eax, 0xffffffff
je 0x10191253
mov ecx, dword [eax + 0xc0]
mov edx, dword [eax + 0xc4]
mov eax, dword [eax + 0x4c]
mov eax, dword [eax*4 + 0x101e0f10]
and al, 0xf
cmp al, 4
je 0x1019122a
test edi, 0x1000
je 0x10191217
and ecx, 0x7fffffff
xor edx, edx
test edi, 0x400
je 0x10191249
xor ecx, 0x80000000
xor edx, 0xffffffff
jmp 0x10191249
test edi, 0x1000
je 0x10191238
and edx, 0x7fffffff
test edi, 0x400
je 0x10191249
xor ecx, 0
xor edx, 0x80000000
cmp ecx, dword [ebp - 0x20]
jne 0x10191253
cmp edx, dword [ebp - 0x1c]
je 0x10191283
mov eax, dword [ebp + esi*4 - 0x40]
cmp eax, 0xffffffff
je 0x10191272
mov ecx, dword [eax + 0xc0]
mov eax, dword [eax + 0xc4]
cmp dword [ebp - 0x20], ecx
jne 0x10191272
cmp dword [ebp - 0x1c], eax
je 0x10191283
inc esi
cmp esi, 4
jb 0x101911d9
mov edx, dword [ebp + 0x20]
xor edi, edi
jmp 0x10191296
cmp esi, 4
jb 0x1019130f
mov edx, dword [ebp + 0x20]
xor edi, edi
jmp 0x10191296
mov ebx, dword [ebp - 8]
lea ecx, [ebx + edi*4]
mov esi, dword [ebp + ecx - 0x40]
xor eax, eax
xor ecx, ecx
cmp edx, 0x1000
jne 0x101912d9
mov ebx, dword [ebp + 0x1c]
mov eax, dword [ebx + 0xc0]
mov ecx, dword [ebx + 0xc4]
mov ebx, dword [ebx + 0x4c]
mov ebx, dword [ebx*4 + 0x101e0f10]
and bl, 0xf
cmp bl, 4
je 0x101912d3
and eax, 0x7fffffff
xor ecx, ecx
jmp 0x101912d9
and ecx, 0x7fffffff
mov ebx, dword [ebp - 0x14]
cmp dword [ebx + esi*4], 0xffffffff
jne 0x101912fb
cmp dword [ebp + edi*4 - 0x40], 0xffffffff
jne 0x101912fb
cmp edx, 0x1000
jne 0x10191303
cmp dword [ebp - 0x20], eax
jne 0x101912fb
cmp dword [ebp - 0x1c], ecx
je 0x10191303
inc edi
cmp edi, 4
jb 0x10191293
jmp 0x1019130a
mov edx, dword [ebp + 0x1c]
mov dword [ebp + edi*4 - 0x40], edx
cmp edi, 4
je 0x10191325
mov eax, dword [ebp - 4]
add dword [ebp - 0xc], 4
inc eax
mov dword [ebp - 4], eax
cmp eax, dword [ebp + 0x18]
jb 0x101911a0
jmp 0x10191331
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x18]
jb 0x1019118b
mov esi, dword [ebp + 0x24]
lea ecx, [ebp - 0x40]
sub esi, ecx
xor edx, edx
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], edx
mov ecx, dword [ebp - 0x14]
lea eax, [ebp + edx - 0x40]
mov edi, dword [esi + eax]
mov eax, dword [eax]
mov ecx, dword [ecx + edi*4]
mov dword [ebp - 0x1c], eax
cmp ecx, eax
jne 0x10191360
mov dword [ebp + edx - 0x30], eax
jmp 0x1019165a
cmp ecx, 0xffffffff
je 0x1019136e
mov dword [ebp + edx - 0x30], ecx
jmp 0x1019165a
mov ecx, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
lea ecx, [edi + ecx*4]
lea ecx, [ebx + ecx*4]
or ebx, 0xffffffff
mov dword [ebp - 0x10], ecx
cmp dword [ecx], ebx
jne 0x1019164f
cmp dword [ebp + 0x20], 0
jne 0x101913ac
cmp dword [eax + 0x80], 0
jne 0x101913ac
cmp dword [eax + 0x60], ebx
jne 0x101913ac
mov ebx, dword [ebp + 0x10]
mov dword [eax + 0x60], ebx
mov dword [eax + 0x64], edi
mov dword [ecx], eax
jmp 0x1019164f
mov eax, dword [0x101e316c]
mov edx, dword [ebp + 8]
mov esi, dword [edx + 0x8024]
mov dword [ebp + 0x18], ebx
test eax, eax
jge 0x101913c5
xor eax, eax
jmp 0x101913cc
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0xc], 0
je 0x101913f3
mov ecx, dword [eax + 0xc]
test ecx, ecx
jne 0x101913dd
mov ebx, ecx
jmp 0x10191404
mov edx, dword [ecx]
mov dword [eax + 0xc], edx
test edx, edx
jne 0x101913e9
mov dword [eax + 0x10], edx
mov dword [ecx], 0xfefefefe
mov ebx, ecx
jmp 0x10191404
mov ecx, dword [eax + 8]
push 0x10
push pe_nt_image_headers32
call fcn.101d8457
mov ebx, eax
xor eax, eax
cmp ebx, eax
je 0x1019145a
mov dword [ebx], eax
mov dword [ebx + 4], eax
mov dword [ebx + 0x94], eax
mov dword [ebx + 0x98], eax
mov dword [ebx + 0x24], eax
mov eax, dword [ebp + 0x10]
push edi
push eax
or ecx, 0xffffffff
push esi
mov eax, ebx
mov dword [ebx + 0x50], ecx
mov dword [ebx + 0x48], ecx
call fcn.10165570
mov esi, eax
mov dword [ebp + 0x1c], esi
test esi, esi
jl 0x10191464
mov edi, dword [ebp + 8]
push 0
call fcn.10169830
mov esi, eax
mov dword [ebp + 0x1c], eax
test esi, esi
jl 0x10191464
xor esi, esi
mov dword [ebp + 0x18], ebx
jmp 0x10191591
mov esi, 0x8007000e
jmp 0x10191591
mov ecx, dword [ebx + 0x50]
test ecx, ecx
je 0x10191496
cmp ecx, 0xffffffff
je 0x10191496
mov eax, dword [ebx + 4]
test eax, eax
je 0x1019147d
mov edx, dword [ebx]
mov dword [eax], edx
jmp 0x10191482
mov eax, dword [ebx]
mov dword [ecx + 0x24], eax
mov eax, dword [ebx]
test eax, eax
je 0x10191490
mov ecx, dword [ebx + 4]
mov dword [eax + 4], ecx
jmp 0x10191496
mov edx, dword [ebx + 4]
mov dword [ecx + 0x28], edx
mov edi, dword [ebx + 0x94]
test edi, edi
je 0x101914f0
cmp byte [edi + 0xc], 0
mov dword [edi + 8], 0
je 0x101914da
mov esi, dword [edi]
test esi, esi
je 0x101914d3
mov eax, dword [0x101e316c]
test eax, eax
jge 0x101914c0
xor eax, eax
jmp 0x101914c7
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax]
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp + 0x1c]
mov byte [edi + 0xc], 0
push edi
mov dword [edi], 0
mov dword [edi + 4], 0
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 4
mov edi, dword [ebx + 0x98]
xor eax, eax
mov dword [ebx + 0x94], eax
cmp edi, eax
je 0x1019154d
mov dword [edi + 8], eax
cmp byte [edi + 0xc], al
je 0x10191537
mov esi, dword [edi]
test esi, esi
je 0x10191530
mov eax, dword [0x101e316c]
test eax, eax
jge 0x1019151d
xor eax, eax
jmp 0x10191524
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [eax]
push esi
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp + 0x1c]
mov byte [edi + 0xc], 0
push edi
mov dword [edi], 0
mov dword [edi + 4], 0
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 4
xor edi, edi
mov dword [ebx + 0x98], edi
mov eax, dword [0x101e316c]
cmp eax, edi
jl 0x10191567
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
push pe_nt_image_headers32
push 0xfe
push ebx
call sub.msvcrt.dll_memset
mov dword [ebx], 0
mov eax, dword [edi + 0x10]
add esp, 0xc
test eax, eax
je 0x1019158b
mov dword [eax], ebx
jmp 0x1019158e
mov dword [edi + 0xc], ebx
mov dword [edi + 0x10], ebx
mov edi, esi
test esi, esi
jl 0x10191641
mov esi, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx + 0x4c]
mov eax, dword [esi + 0x44]
or dword [esi + 0x40], 0x10
mov dword [esi + 0x44], eax
mov eax, esi
mov dword [esi + 0x4c], edx
call fcn.10166070
cmp dword [ebp + 0x20], 0
je 0x10191639
mov eax, esi
mov ecx, dword [eax + 0x4c]
mov edx, dword [ecx*4 + 0x101e0f10]
mov edi, dword [eax + 0xc0]
mov ebx, dword [eax + 0xc4]
mov ecx, dword [ebp + 0x20]
and dl, 0xf
cmp dl, 4
je 0x10191604
test ecx, 0x1000
je 0x101915f1
and edi, 0x7fffffff
xor ebx, ebx
test ecx, 0x400
je 0x10191623
xor edi, 0x80000000
xor ebx, 0xffffffff
jmp 0x10191623
test ecx, 0x1000
je 0x10191612
and ebx, 0x7fffffff
test ecx, 0x400
je 0x10191623
xor edi, 0
xor ebx, 0x80000000
call fcn.10165fc0
push 0x11
push ebx
mov ebx, dword [ebp + 8]
push edi
call fcn.10166220
mov esi, dword [ebp + 0x18]
mov edi, eax
test edi, edi
jl 0x10191641
mov eax, esi
jmp 0x10191644
or eax, 0xffffffff
mov ecx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
mov dword [ecx], eax
mov eax, dword [ecx]
mov dword [ebp + edx - 0x30], eax
cmp eax, 0xffffffff
je 0x101916c8
add edx, 4
mov dword [ebp - 0xc], edx
cmp edx, 0x10
jb 0x10191341
mov eax, dword [ebp + 0x24]
lea edx, [ebp - 0x30]
sub eax, edx
mov dword [ebp + 0x1c], eax
mov eax, dword [ebp + 0x14]
mov ecx, edx
sub eax, ecx
mov dword [ebp + 0x18], 0
mov dword [ebp + 0x14], eax
cmp dword [ebp + 0x20], 0
mov edx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x18]
lea ecx, [edx + eax*4]
mov edx, dword [ebp + ecx - 0x30]
mov dword [ebp + 0x24], edx
je 0x10191970
mov ecx, dword [ebp + eax*4 - 0x30]
cmp ecx, 0xffffffff
je 0x10191970
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x8024]
mov eax, dword [0x101e316c]
or esi, 0xffffffff
mov dword [ebp + 0xc], ecx
test eax, eax
jge 0x101916d6
xor eax, eax
jmp 0x101916dd
mov eax, 0x8007000e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x20
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0xc], 0
je 0x10191704
mov ecx, dword [eax + 0xc]
test ecx, ecx
jne 0x101916ee
mov ebx, ecx
jmp 0x10191715
mov edx, dword [ecx]
mov dword [eax + 0xc], edx
test edx, edx
jne 0x101916fa
mov dword [eax + 0x10], edx
mov dword [ecx], 0xfefefefe
mov ebx, ecx
jmp 0x10191715
mov ecx, dword [eax + 8]
push 0x10
push pe_nt_image_headers32
call fcn.101d8457
mov ebx, eax
test ebx, ebx
je 0x10191955
mov edx, dword [ebp + 0x24]
mov ecx, dword [ebp + 0xc]
or eax, 0xffffffff
mov dword [ebx + 0x50], eax
mov dword [ebx + 0x48], eax
mov eax, dword [ebp + 0x10]
push edx
xor edi, edi
push eax
push ecx
mov eax, ebx
mov dword [ebx], edi
mov dword [ebx + 4], edi
mov dword [ebx + 0x94], edi
mov dword [ebx + 0x98], edi
mov dword [ebx + 0x24], edi
call fcn.10165570
cmp eax, edi
mov dword [ebp + 0x24], eax
jl 0x1019176d
push edi
mov edi, dword [ebp + 8]
call fcn.10169830
mov dword [ebp + 0x24], eax
test eax, eax
jl 0x1019176d
mov esi, ebx
jmp 0x101918ac
mov ecx, dword [ebx + 0x50]
test ecx, ecx
je 0x1019179f
cmp ecx, 0xffffffff
je 0x1019179f
mov eax, dword [ebx + 4]
test eax, eax
je 0x10191786
mov edx, dword [ebx]
mov dword [eax], edx
jmp 0x1019178b
mov eax, dword [ebx]
mov dword [ecx + 0x24], eax
mov eax, dword [ebx]
test eax, eax
je 0x10191799
mov ecx, dword [ebx + 4]
mov dword [eax + 4], ecx
jmp 0x1019179f
mov edx, dword [ebx + 4]
mov dword [ecx + 0x28], edx
mov edi, dword [ebx + 0x94]
test edi, edi
je 0x101917fc
cmp byte [edi + 0xc], 0
mov dword [edi + 8], 0
je 0x101917e6
mov ecx, dword [edi]
mov dword [ebp + 0xc], ecx
test ecx, ecx
je 0x101917e2
mov eax, dword [0x101e316c]
test eax, eax
jge 0x101917cc
xor eax, eax
jmp 0x101917d6
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [ebp + 0xc]
mov eax, dword [eax]
push ecx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [edi + 0xc], 0
push edi
mov dword [edi], 0
mov dword [edi + 4], 0
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 4
mov edi, dword [ebx + 0x98]
xor eax, eax
mov dword [ebx + 0x94], eax
cmp edi, eax
je 0x1019185b
mov dword [edi + 8], eax
cmp byte [edi + 0xc], al
je 0x10191843
mov ecx, dword [edi]
mov dword [ebp + 0xc], ecx
cmp ecx, eax
je 0x1019183f
mov ecx, dword [0x101e316c]
cmp ecx, eax
jl 0x10191830
push ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [ebp + 0xc]
mov edx, dword [eax]
push ecx
push 0
push edx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [edi + 0xc], 0
push edi
mov dword [edi], 0
mov dword [edi + 4], 0
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
mov dword [ebx + 0x98], eax
mov ecx, dword [0x101e316c]
cmp ecx, eax
jge 0x1019186f
xor edi, edi
jmp 0x10191878
push ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
push pe_nt_image_headers32
push 0xfe
push ebx
call sub.msvcrt.dll_memset
mov dword [ebx], 0
mov eax, dword [edi + 0x10]
add esp, 0xc
test eax, eax
je 0x1019189c
mov dword [eax], ebx
jmp 0x1019189f
mov dword [edi + 0xc], ebx
cmp dword [ebp + 0x24], 0
mov dword [edi + 0x10], ebx
jl 0x10191955
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + eax*4 - 0x30]
mov edx, dword [ecx + 0x4c]
mov eax, dword [esi + 0x44]
or dword [esi + 0x40], 0x10
mov dword [esi + 0x44], eax
mov eax, esi
mov dword [esi + 0x4c], edx
call fcn.10166070
mov ecx, dword [esi + 0x4c]
mov edx, dword [ecx*4 + 0x101e0f10]
mov ebx, dword [esi + 0xc0]
mov edi, dword [esi + 0xc4]
mov eax, dword [ebp + 0x20]
and dl, 0xf
cmp dl, 4
je 0x1019190c
test eax, 0x1000
je 0x101918fa
and ebx, 0x7fffffff
xor edi, edi
test eax, 0x400
je 0x10191929
xor ebx, 0x80000000
xor edi, 0xffffffff
jmp 0x10191929
test eax, 0x1000
je 0x10191919
and edi, 0x7fffffff
test eax, 0x400
je 0x10191929
xor ebx, 0
xor edi, 0x80000000
mov eax, esi
call fcn.10165fc0
push 0x11
push edi
push ebx
mov ebx, dword [ebp + 8]
call fcn.10166220
test eax, eax
jl 0x10191955
mov eax, dword [ebp + 0x18]
mov eax, dword [ebp + eax*4 - 0x30]
mov ecx, dword [ebp + 0x20]
mov dword [esi + 0x7c], eax
mov dword [esi + 0x80], ecx
jmp 0x10191958
or esi, 0xffffffff
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x18]
lea ecx, [edx + eax*4]
mov dword [ebp + ecx - 0x30], esi
cmp esi, 0xffffffff
je 0x101916c8
jmp 0x1019197e
mov edx, dword [ebp + 0x14]
lea ecx, [edx + eax*4]
mov edx, dword [ebp + eax*4 - 0x30]
mov dword [ebp + ecx - 0x30], edx
mov eax, dword [ebp + 0x18]
inc eax
mov dword [ebp + 0x18], eax
cmp eax, 4
jb 0x10191685
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x20