Function at 0x10004420
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x14
mov eax, dword [0x1002b150]
push ebx
push esi
push edi
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [eax + 0x5c50]
mov ecx, eax
test edi, edi
je 0x10004c84
cmp dword [ecx + 0x5c54], 0
je 0x10004c84
mov esi, dword [ecx + 0x5c58]
cmp edi, esi
jbe 0x10004479
test esi, esi
je 0x1000446c
mov eax, esi
sub edx, edx
div dword [ecx + 0x5e24]
test edx, edx
je 0x100044a7
mov eax, 0xffffffd3
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x14
ret
sub edx, edx
mov dword [ecx + 0x5c58], edi
mov dword [ecx + 0x5e14], edi
mov esi, dword [ecx + 0x5e24]
mov eax, dword [ecx + 0x5c58]
div esi
test edx, edx
je 0x100044ad
mov eax, dword [ecx + 0x5c50]
sub edx, edx
div esi
sub esi, edx
add esi, edi
mov dword [ecx + 0x5e14], esi
mov edi, dword [ecx + 0x5c54]
mov esi, dword [ecx + 0x5c5c]
cmp edi, esi
jbe 0x100044dc
test esi, esi
je 0x100044cf
mov eax, esi
sub edx, edx
div dword [ecx + 0x5e28]
test edx, edx
je 0x1000450a
mov eax, 0xffffffd3
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x14
ret
sub edx, edx
mov dword [ecx + 0x5c5c], edi
mov dword [ecx + 0x5e18], edi
mov esi, dword [ecx + 0x5e28]
mov eax, dword [ecx + 0x5c5c]
div esi
test edx, edx
je 0x10004510
mov eax, dword [ecx + 0x5c54]
sub edx, edx
div esi
sub esi, edx
add esi, edi
mov dword [ecx + 0x5e18], esi
mov eax, dword [ecx + 0x5c50]
mov edx, dword [ecx + 0x5e24]
cmp eax, edx
jb 0x10004522
mov eax, edx
mov edx, dword [ecx + 0x5e28]
mov dword [esp + 0x1c], eax
mov eax, dword [ecx + 0x5c54]
cmp eax, edx
jb 0x10004538
mov eax, edx
mov dword [esp + 0x10], eax
mov eax, dword [ecx + 0x5ce4]
test eax, eax
je 0x10004644
lea esi, [ecx + 0x5ce8]
mov edx, dword [esi]
test edx, edx
je 0x10004644
cmp dword [esp + 0x1c], eax
ja 0x10004928
cmp dword [esp + 0x10], edx
ja 0x10004928
mov dword [ecx + 0x5cec], 0
mov eax, dword [ecx + 0x5c58]
mov edi, dword [ecx + 0x5ce4]
cmp eax, edi
ja 0x100045f2
mov edx, dword [ecx + 0x5c5c]
cmp dword [esi], edx
jb 0x100045ee
mov eax, dword [ecx + 0x5c50]
cmp eax, edi
jbe 0x100045bb
mov dword [esi], edx
sub edx, edx
mov edi, dword [ecx + 0x5ce4]
mov eax, edi
div dword [ecx + 0x5c58]
sub edi, edx
mov dword [ecx + 0x5ce4], edi
jmp 0x100048c8
mov dword [ecx + 0x5ce4], eax
mov eax, dword [ecx + 0x5c54]
mov edi, dword [esi]
cmp edi, eax
jb 0x100045d1
mov dword [esi], eax
jmp 0x100045df
mov eax, edi
sub edx, edx
div dword [ecx + 0x5c5c]
sub edi, edx
mov dword [esi], edi
mov dword [ecx + 0x5e50], 3
jmp 0x100048d2
cmp eax, edi
jbe 0x1000461f
mov eax, dword [esp + 0x10]
sub edx, edx
mov dword [esi], eax
mov edi, dword [ecx + 0x5ce4]
mov eax, edi
div dword [ecx + 0x5e24]
sub edi, edx
mov dword [ecx + 0x5ce4], edi
mov dword [ecx + 0x5e50], 0
jmp 0x100048d2
sub edx, edx
mov dword [ecx + 0x5ce4], eax
mov edi, dword [esi]
mov eax, edi
div dword [ecx + 0x5e28]
sub edi, edx
mov dword [esi], edi
mov dword [ecx + 0x5e50], 1
jmp 0x100048d2
mov esi, dword [ecx + 0x5cec]
test esi, esi
je 0x10004c77
mov eax, dword [ecx + 0x5e10]
mov edx, dword [ecx + 0x5c58]
mov edi, eax
mov dword [esp + 0x14], eax
imul edi, edx
mov eax, edi
mov dword [esp + 0x20], edx
cdq
xor eax, edx
sub eax, edx
and eax, 7
xor eax, edx
sub eax, edx
cmp eax, 1
mov eax, edi
sbb ebx, ebx
mov edi, dword [ecx + 0x5c5c]
cdq
and edx, 7
add eax, edx
sar eax, 3
lea ebx, [ebx + eax + 1]
mov eax, ebx
imul eax, edi
cmp eax, esi
jle 0x100047a8
mov edi, dword [esp + 0x1c]
imul edi, dword [esp + 0x14]
mov eax, edi
cdq
xor eax, edx
sub eax, edx
and eax, 7
xor eax, edx
sub eax, edx
cmp eax, 1
mov eax, edi
cdq
sbb ebp, ebp
and edx, 7
inc ebp
add eax, edx
sar eax, 3
add ebp, eax
imul ebp, dword [esp + 0x10]
cmp ebp, esi
jg 0x10004935
imul ebx, dword [esp + 0x10]
cmp ebx, esi
jle 0x10004743
lea esi, [ecx + 0x5ce8]
mov eax, dword [esp + 0x10]
mov dword [esi], eax
mov ebx, dword [ecx + 0x5e24]
mov edi, dword [ecx + 0x5e10]
imul edi, ebx
mov eax, edi
cdq
xor eax, edx
sub eax, edx
and eax, 7
xor eax, edx
sub eax, edx
cmp eax, 1
mov eax, edi
cdq
sbb ebp, ebp
and edx, 7
inc ebp
add eax, edx
sar eax, 3
sub edx, edx
add ebp, eax
mov eax, dword [ecx + 0x5cec]
imul ebp, dword [esp + 0x10]
div ebp
imul eax, ebx
mov dword [ecx + 0x5ce4], eax
mov dword [ecx + 0x5e50], 0
jmp 0x100048d2
mov eax, dword [esp + 0x20]
lea esi, [ecx + 0x5ce8]
mov dword [ecx + 0x5ce4], eax
mov ebx, dword [ecx + 0x5e10]
mov edi, dword [ecx + 0x5e28]
imul ebx, dword [ecx + 0x5c58]
mov eax, ebx
cdq
xor eax, edx
sub eax, edx
and eax, 7
xor eax, edx
sub eax, edx
cmp eax, 1
mov eax, ebx
cdq
sbb ebp, ebp
and edx, 7
inc ebp
add eax, edx
sar eax, 3
sub edx, edx
add ebp, eax
mov eax, dword [ecx + 0x5cec]
imul ebp, edi
div ebp
imul eax, edi
mov dword [esi], eax
mov dword [ecx + 0x5e50], 1
jmp 0x100048d2
mov ebx, dword [ecx + 0x5c50]
mov ebp, ebx
imul ebp, dword [esp + 0x14]
mov eax, ebp
cdq
xor eax, edx
sub eax, edx
and eax, 7
xor eax, edx
sub eax, edx
mov edx, dword [esp + 0x18]
cmp eax, 1
mov eax, ebp
sbb dword [esp + 0x18], edx
cdq
and edx, 7
add eax, edx
mov edx, dword [esp + 0x18]
sar eax, 3
lea eax, [edx + eax + 1]
mov edx, dword [ecx + 0x5c54]
imul edx, eax
cmp edx, esi
jg 0x10004811
lea esi, [ecx + 0x5ce8]
mov dword [ecx + 0x5ce4], ebx
mov eax, dword [ecx + 0x5c54]
mov dword [esi], eax
mov dword [ecx + 0x5e50], 3
jmp 0x100048d2
imul eax, edi
cmp eax, esi
jg 0x10004876
lea esi, [ecx + 0x5ce8]
mov dword [ecx + 0x5ce4], ebx
mov edi, dword [ecx + 0x5c50]
mov ebx, dword [ecx + 0x5c5c]
imul edi, dword [ecx + 0x5e10]
mov eax, edi
cdq
xor eax, edx
sub eax, edx
and eax, 7
xor eax, edx
sub eax, edx
cmp eax, 1
mov eax, edi
cdq
sbb ebp, ebp
and edx, 7
inc ebp
add eax, edx
sar eax, 3
sub edx, edx
add ebp, eax
mov eax, dword [ecx + 0x5cec]
imul ebp, ebx
div ebp
imul eax, ebx
mov dword [esi], eax
mov dword [ecx + 0x5e50], 3
jmp 0x100048d2
lea esi, [ecx + 0x5ce8]
mov dword [esi], edi
mov edi, dword [ecx + 0x5c58]
mov ebx, dword [ecx + 0x5e10]
imul ebx, edi
mov eax, ebx
cdq
xor eax, edx
sub eax, edx
and eax, 7
xor eax, edx
sub eax, edx
cmp eax, 1
mov eax, ebx
cdq
sbb ebp, ebp
and edx, 7
inc ebp
add eax, edx
sar eax, 3
sub edx, edx
add ebp, eax
mov eax, dword [ecx + 0x5cec]
imul ebp, dword [ecx + 0x5c5c]
div ebp
imul eax, edi
mov dword [ecx + 0x5ce4], eax
mov dword [ecx + 0x5e50], 2
mov edi, dword [ecx + 0x5e10]
imul edi, dword [ecx + 0x5ce4]
mov eax, edi
cdq
xor eax, edx
sub eax, edx
and eax, 7
xor eax, edx
sub eax, edx
cmp eax, 1
mov eax, edi
cdq
sbb ebx, ebx
and edx, 7
inc ebx
add eax, edx
sar eax, 3
add ebx, eax
cmp ebx, 0x10000
jle 0x10004942
mov eax, dword [esi]
shl eax, 0x10
mov dword [ecx + 0x5cec], eax
mov dword [ecx + 0x5ce4], 0
mov dword [esi], 0
jmp 0x1000453c
mov eax, 0xffffffd2
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x14
ret
mov eax, 0xffffffd2
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x14
ret
mov eax, dword [ecx + 0x5e50]
test eax, eax
jne 0x10004a58
cmp dword [ecx + 0x5cec], 0
je 0x10004a50
mov esi, dword [ecx + 0x5e24]
mov eax, dword [ecx + 0x5e14]
mov dword [esp + 0x20], 0xffffffff
sub edx, edx
div esi
sub edx, edx
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], 1
mov eax, dword [ecx + 0x5ce4]
div esi
cmp dword [esp + 0x10], 1
mov dword [esp + 0x18], eax
jb 0x10004b29
mov eax, dword [esp + 0x10]
sub edx, edx
div dword [esp + 0x1c]
test edx, edx
jne 0x10004a36
xor ebx, ebx
test ebx, ebx
je 0x100049b8
mov ebp, dword [esp + 0x1c]
jmp 0x100049c4
mov eax, dword [esp + 0x10]
sub edx, edx
div dword [esp + 0x1c]
mov ebp, eax
mov esi, dword [ecx + 0x5e24]
imul esi, ebp
cmp dword [ecx + 0x5e30], esi
jb 0x10004a2c
cmp ebp, dword [esp + 0x18]
ja 0x10004a2c
mov edi, dword [esp + 0x18]
sub edx, edx
mov eax, edi
div ebp
sub edi, edx
mov eax, dword [esp + 0x10]
sub edx, edx
lea eax, [edi + eax - 1]
div edi
mov edx, eax
mov dword [esp + 0x14], eax
imul edx, eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], edx
sub edx, edx
div ebp
imul eax, dword [esp + 0x14]
cmp dword [esp + 0x20], eax
jbe 0x10004a2c
mov dword [esp + 0x20], eax
mov dword [ecx + 0x5e2c], esi
mov eax, dword [ecx + 0x5e24]
imul eax, edi
mov dword [ecx + 0x5ce4], eax
inc ebx
cmp ebx, 2
jb 0x100049ae
inc dword [esp + 0x1c]
mov eax, dword [esp + 0x1c]
imul eax, eax
cmp eax, dword [esp + 0x10]
jbe 0x1000499a
jmp 0x10004b29
test eax, eax
je 0x10004ad8
cmp eax, 1
jl 0x10004a66
cmp eax, 3
jle 0x10004afd
mov edi, dword [esp + 0x18]
mov esi, 1
cmp edi, esi
jb 0x10004b29
mov eax, dword [ecx + 0x5e30]
sub edx, edx
div dword [ecx + 0x5e24]
cmp esi, eax
mov ebp, eax
ja 0x10004b29
mov eax, edi
sub edx, edx
div esi
test edx, edx
jne 0x10004acc
mov eax, edi
sub edx, edx
div esi
mov ebx, eax
sub edx, edx
mov eax, dword [esp + 0x10]
div ebx
test edx, edx
jne 0x10004ab1
cmp ebp, ebx
jae 0x10004b16
mov eax, dword [esp + 0x10]
sub edx, edx
div esi
test edx, edx
jne 0x10004acc
mov eax, esi
imul eax, dword [ecx + 0x5e24]
mov dword [ecx + 0x5e2c], eax
inc esi
mov eax, esi
imul eax, esi
cmp eax, edi
jbe 0x10004a77
jmp 0x10004b29
mov esi, dword [ecx + 0x5e24]
mov eax, dword [ecx + 0x5ce4]
sub edx, edx
div esi
mov edi, eax
sub edx, edx
mov eax, dword [ecx + 0x5e14]
div esi
mov dword [esp + 0x10], eax
jmp 0x10004a6a
mov eax, dword [ecx + 0x5e14]
sub edx, edx
div dword [ecx + 0x5e24]
mov edi, eax
mov dword [esp + 0x10], eax
jmp 0x10004a6a
mov eax, edi
sub edx, edx
div esi
imul eax, dword [ecx + 0x5e24]
mov dword [ecx + 0x5e2c], eax
mov esi, dword [ecx + 0x5c50]
mov ebx, dword [ecx + 0x5e14]
mov eax, esi
sub edx, edx
div ebx
lea edi, [ecx + 0x5e1c]
test edx, edx
je 0x10004b49
sub esi, edx
add esi, ebx
sub edx, edx
mov dword [edi], esi
mov ebp, dword [ecx + 0x5c54]
mov ebx, dword [ecx + 0x5e18]
mov eax, ebp
lea esi, [ecx + 0x5e20]
div ebx
test edx, edx
je 0x10004b6b
sub ebp, edx
add ebp, ebx
mov dword [esi], ebp
mov eax, dword [ecx + 0x5e50]
cmp eax, 3
ja case.default.0x10004b7c
jmp dword [eax*4 + 0x10004c94]
mov eax, dword [ecx + 0x5ce4]
mov dword [ecx + 0x5e44], eax
mov eax, dword [ecx + 0x5ce4]
mov dword [ecx + 0x5e64], eax
mov edx, dword [ecx + 0x5e28]
mov dword [ecx + 0x5e68], edx
jmp case.default.0x10004b7c
mov eax, dword [ecx + 0x5e14]
mov dword [ecx + 0x5e44], eax
mov eax, dword [ecx + 0x5e14]
mov dword [ecx + 0x5e64], eax
mov edx, dword [ecx + 0x5ce8]
mov dword [ecx + 0x5e68], edx
jmp case.default.0x10004b7c
mov eax, dword [ecx + 0x5e14]
mov dword [ecx + 0x5e44], eax
mov edx, dword [ecx + 0x5ce4]
mov dword [ecx + 0x5e64], edx
mov ebx, dword [ecx + 0x5e18]
mov dword [ecx + 0x5e68], ebx
jmp case.default.0x10004b7c
mov eax, dword [ecx + 0x5e14]
mov dword [ecx + 0x5e44], eax
mov edx, dword [edi]
mov dword [ecx + 0x5e64], edx
mov eax, dword [ecx + 0x5ce8]
cmp dword [ecx + 0x5c54], eax
jne 0x10004c19
mov eax, dword [esi]
mov dword [ecx + 0x5e68], eax
xor edx, edx
mov dword [ecx + 0x5e34], edx
mov dword [ecx + 0x5e38], edx
mov eax, dword [ecx + 0x5e44]
dec eax
mov dword [ecx + 0x5e3c], eax
mov eax, dword [ecx + 0x5e28]
dec eax
mov dword [ecx + 0x5e40], eax
mov dword [ecx + 0x5e54], edx
mov dword [ecx + 0x5e58], edx
mov eax, dword [ecx + 0x5e64]
pop ebp
dec eax
pop edi
pop esi
mov dword [ecx + 0x5e5c], eax
mov eax, dword [ecx + 0x5e68]
pop ebx
dec eax
mov dword [ecx + 0x5e60], eax
xor eax, eax
add esp, 0x14
ret
mov eax, 0xffffffd2
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x14
ret
mov eax, 0xffffffd4
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x14
ret