Function at 0x100160d0
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0xb4
mov eax, dword [0x1002b150]
push ebx
push esi
push edi
push ebp
push eax
xor edi, edi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0x6f8], edi
mov esi, eax
jle 0x1001644a
mov eax, dword [esi + 0x7bc]
mov edx, dword [esp + 0xc8]
imul eax, edi
mov ecx, dword [edx]
cmp eax, ecx
jg 0x1001610e
mov eax, ecx
mov edx, dword [esp + 0xc8]
lea ecx, [edi + 1]
mov dword [esp + 0x34], eax
mov dword [esp + 0x28], ecx
mov eax, dword [edx + 4]
mov dword [esp + 0x38], eax
mov eax, dword [edx + 8]
mov ecx, dword [esi + 0x7bc]
imul ecx, dword [esp + 0x28]
dec ecx
cmp ecx, eax
jl 0x1001613c
mov ecx, eax
mov edx, dword [esp + 0xc8]
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x34]
mov eax, dword [edx + 0xc]
mov dword [esp + 0x40], eax
cmp dword [esp + 0x3c], ecx
jl 0x10016224
cmp dword [esp + 0x38], eax
jg 0x10016224
sub eax, dword [esp + 0x38]
mov edx, dword [esp + 0xcc]
lea ecx, [eax*4 + 4]
lea eax, [esp + 0x44]
push ecx
push edx
push eax
call fcn.1000eef0
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0xd4]
add esp, 0xc
mov ecx, dword [esi + 0x7b8]
cmp ecx, 0xa
je 0x100161a4
sub eax, dword [edx]
imul eax, ecx
jmp 0x100161ad
sub eax, dword [edx]
inc eax
cdq
sub eax, edx
sar eax, 1
mov edx, dword [esp + 0x40]
sub edx, dword [esp + 0x38]
js 0x100161c4
lea ecx, [esp + 0x44]
inc edx
add dword [ecx], eax
add ecx, 4
dec edx
jne 0x100161bc
mov eax, dword [esi + 0x7bc]
imul eax, edi
sub dword [esp + 0x34], eax
mov eax, dword [esi + 0x7bc]
imul eax, edi
sub dword [esp + 0x3c], eax
cmp dword [esp + 0x34], 0
jne 0x10016212
mov eax, dword [esi + 0x7bc]
sub eax, dword [esp + 0x3c]
cmp eax, 1
jne 0x10016212
cmp dword [esp + 0x38], 0
jne 0x10016212
mov dword [esp + 0x24], 1
mov eax, dword [esi + 0x7c0]
sub eax, dword [esp + 0x40]
cmp eax, 1
je 0x1001621a
mov dword [esp + 0x24], 0
mov dword [esp + 0x2c], 1
jmp 0x10016244
mov dword [esp + 0x34], 1
mov dword [esp + 0x3c], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x24], 0
mov eax, dword [esi + 0x5a0c]
test eax, eax
jge 0x1001625b
cmp dword [esi + 0x59fc], 1
je 0x1001645d
mov ecx, dword [esi + 0x7e0]
test ecx, ecx
jne 0x10016283
cmp dword [esi + 0x5a00], 0
je 0x1001627f
test edi, edi
jne 0x1001627b
cmp eax, 7
jle 0x10016299
test edi, edi
je 0x1001627f
test eax, eax
jle 0x10016299
test ecx, ecx
je 0x100162c0
cmp dword [esi + 0x5a00], 0
je 0x100162c0
mov eax, dword [esi + 0x7dc]
cdq
idiv ecx
test edx, edx
jne 0x100162c0
lea eax, [esp + 0x30]
push eax
call fcn.10012b50
add esp, 4
test eax, eax
jne 0x10016452
call fcn.100128b0
test eax, eax
jne 0x10016452
call fcn.100107a0
mov eax, dword [esi + 0x7dc]
inc eax
mov dword [esi + 0x7dc], eax
mov ecx, dword [esi + 0x7e0]
cmp eax, ecx
jl 0x100162df
sub eax, ecx
mov dword [esi + 0x7dc], eax
mov dword [esi + 0x5d4c], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x10], 0
cmp dword [esi + 0x7c4], 0
jle 0x100163b6
lea edi, [esi + 0x7cc]
mov eax, dword [edi + 0x53e4]
mov edx, dword [edi + 0x542c]
mov ecx, dword [esi + eax*8 + 0x5b94]
mov eax, dword [esi + edx*8 + 0x5bdc]
xor ebx, ebx
mov dword [esp + 0x14], ecx
mov ecx, dword [edi + 0x5474]
mov dword [esp + 0x18], eax
cmp dword [edi], ebx
mov edx, dword [esi + ecx*8 + 0x5c24]
mov dword [esp + 0x1c], edx
jle 0x1001639f
mov eax, dword [esp + 0x10]
shl eax, 8
lea ebp, [eax + esi + 0x7e8]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
push eax
lea edx, [edi + 0x511c]
push ecx
lea eax, [esi + 0x47e8]
push edx
push eax
call fcn.10010a70
add esp, 0x10
test eax, eax
jne 0x10016452
mov eax, dword [esp + 0x14]
lea ecx, [esi + 0x47e8]
push eax
inc ebx
push ebp
push ecx
add ebp, 0x100
call fcn.10001520
inc dword [esp + 0x1c]
add esp, 0xc
cmp dword [edi], ebx
jg 0x10016353
add edi, 4
inc dword [esp + 0x20]
mov eax, dword [esp + 0x20]
cmp dword [esi + 0x7c4], eax
jg 0x1001630c
cmp dword [esp + 0x2c], 0
je 0x1001643a
cmp dword [esp + 0x24], 0
lea eax, [esp + 0x44]
jne 0x100163ce
lea eax, [esi + 0x5868]
mov ecx, dword [esi + 0x7b0]
cmp ecx, 7
ja case.default.0x100163d9
jmp dword [ecx*4 + 0x1001646c]
push eax
call fcn.10005400
jmp 0x1001641e
push eax
call fcn.10006170
jmp 0x1001641e
push eax
call fcn.100057e0
jmp 0x1001641e
push eax
call fcn.10007890
jmp 0x1001641e
push eax
call fcn.10008e70
jmp 0x1001641e
push eax
call fcn.10008e90
jmp 0x1001641e
push eax
call fcn.100094c0
jmp 0x1001641e
push eax
call fcn.10008ea0
add esp, 4
cmp dword [esp + 0x24], 0
jne 0x1001643a
lea eax, [esp + 0x34]
lea ecx, [esp + 0x44]
push eax
push ecx
call fcn.100051c0
add esp, 8
mov edi, dword [esp + 0x28]
cmp dword [esi + 0x6f8], edi
jg 0x100160f6
xor eax, eax
dec dword [esi + 0x7e4]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xb4
ret
mov dword [esi + 0x790], 1
jmp 0x1001644a