Function at 0x10016a20
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0xb0
mov eax, dword [0x1002b150]
push ebx
push esi
push edi
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [esp + 0xcc], 0
mov esi, eax
je 0x10016a59
mov eax, dword [esi + 0x760]
mov ecx, dword [esp + 0xcc]
mov dword [esp + 0x2c], eax
mov dword [esi + 0x760], ecx
xor edi, edi
cmp dword [esi + 0x6f8], edi
jle 0x10016cf5
mov eax, dword [esi + 0x7bc]
mov edx, dword [esp + 0xc4]
imul eax, edi
mov ecx, dword [edx]
cmp eax, ecx
jg 0x10016a7f
mov eax, ecx
mov edx, dword [esp + 0xc4]
lea ecx, [edi + 1]
mov dword [esp + 0x30], eax
mov dword [esp + 0x24], ecx
mov eax, dword [edx + 4]
mov dword [esp + 0x34], eax
mov eax, dword [esi + 0x7bc]
imul eax, ecx
dec eax
mov ecx, dword [edx + 8]
cmp eax, ecx
jl 0x10016aab
mov eax, ecx
mov edx, dword [esp + 0xc4]
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x38], eax
mov eax, dword [edx + 0xc]
mov dword [esp + 0x3c], eax
cmp dword [esp + 0x38], ecx
jl 0x10016b9b
mov eax, dword [esp + 0x34]
cmp dword [esp + 0x3c], eax
jl 0x10016b9b
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0xc8]
sub eax, dword [esp + 0x34]
lea ecx, [eax*4 + 4]
lea eax, [esp + 0x40]
push ecx
push edx
push eax
call fcn.1000eef0
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0xd0]
add esp, 0xc
mov ecx, dword [esi + 0x7b8]
cmp ecx, 0xa
je 0x10016b1b
sub eax, dword [edx]
imul eax, ecx
jmp 0x10016b24
sub eax, dword [edx]
inc eax
cdq
sub eax, edx
sar eax, 1
mov edx, dword [esp + 0x3c]
sub edx, dword [esp + 0x34]
js 0x10016b3b
lea ecx, [esp + 0x40]
inc edx
add dword [ecx], eax
add ecx, 4
dec edx
jne 0x10016b33
mov eax, dword [esi + 0x7bc]
imul eax, edi
sub dword [esp + 0x30], eax
mov eax, dword [esi + 0x7bc]
imul eax, edi
sub dword [esp + 0x38], eax
cmp dword [esp + 0x30], 0
jne 0x10016b89
mov eax, dword [esi + 0x7bc]
sub eax, dword [esp + 0x38]
cmp eax, 1
jne 0x10016b89
cmp dword [esp + 0x34], 0
jne 0x10016b89
mov dword [esp + 0x20], 1
mov eax, dword [esi + 0x7c0]
sub eax, dword [esp + 0x3c]
cmp eax, 1
je 0x10016b91
mov dword [esp + 0x20], 0
mov dword [esp + 0x28], 1
jmp 0x10016bbb
mov dword [esp + 0x30], 1
mov dword [esp + 0x38], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], 0
cmp dword [esi + 0x7c4], 0
jle 0x10016c53
lea eax, [esi + 0x7cc]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
xor ebx, ebx
mov ecx, dword [eax + 0x53e4]
cmp dword [eax], ebx
mov edx, dword [esi + ecx*8 + 0x5b94]
mov dword [esp + 0x18], edx
jle 0x10016c3e
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x14]
shl eax, 8
shl edi, 7
lea ebp, [eax + esi + 0x7e8]
mov eax, dword [esp + 0x18]
inc ebx
push eax
push ebp
mov eax, dword [esi + 0x760]
add ebp, 0x100
add eax, edi
add edi, 0x80
push eax
call fcn.10001520
mov eax, dword [esp + 0x1c]
inc dword [esp + 0x20]
add esp, 0xc
cmp dword [eax], ebx
jg 0x10016c0e
add dword [esp + 0x10], 4
inc dword [esp + 0x1c]
mov eax, dword [esp + 0x1c]
cmp dword [esi + 0x7c4], eax
jg 0x10016bde
cmp dword [esp + 0x28], 0
je 0x10016cd7
cmp dword [esp + 0x20], 0
lea eax, [esp + 0x40]
jne 0x10016c6b
lea eax, [esi + 0x5868]
mov ecx, dword [esi + 0x7b0]
cmp ecx, 7
ja case.default.0x10016c76
jmp dword [ecx*4 + 0x10016d1c]
push eax
call fcn.10005400
jmp 0x10016cbb
push eax
call fcn.10006170
jmp 0x10016cbb
push eax
call fcn.100057e0
jmp 0x10016cbb
push eax
call fcn.10007890
jmp 0x10016cbb
push eax
call fcn.10008e70
jmp 0x10016cbb
push eax
call fcn.10008e90
jmp 0x10016cbb
push eax
call fcn.100094c0
jmp 0x10016cbb
push eax
call fcn.10008ea0
add esp, 4
cmp dword [esp + 0x20], 0
jne 0x10016cd7
lea eax, [esp + 0x30]
lea ecx, [esp + 0x40]
push eax
push ecx
call fcn.100051c0
add esp, 8
mov eax, dword [esi + 0x758]
mov edi, dword [esp + 0x24]
add eax, eax
add dword [esi + 0x760], eax
cmp dword [esi + 0x6f8], edi
jg 0x10016a67
dec dword [esi + 0x7e4]
cmp dword [esp + 0xcc], 0
je 0x10016d0f
mov eax, dword [esp + 0x2c]
mov dword [esi + 0x760], eax
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xb0
ret