Function at 0x46f270
Capabilities:
Get thread local storage value

Disassembly:
mov eax, dword [0x5296dc]
sub esp, 0x18
push ebx
push ebp
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebp, eax
test ebp, ebp
jne 0x46f296
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret
mov edx, dword [ebp + 0x16818]
mov ecx, dword [esp + 0x34]
xor eax, eax
mov edi, dword [ebp + 0x16820]
mov ebx, dword [ebp + 0x16824]
mov dword [ebp + 0x1681c], edx
mov ax, word [ecx*2 + 0x51d2b0]
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x1c], eax
xor eax, eax
mov ax, word [ecx*2 + 0x51d2b0]
mov dword [esp + 0x10], edx
mov dword [esp + 0x20], eax
cmp dword [ebp], 0
jne 0x46f640
cmp ebx, dword [esp + 0x34]
jae 0x46f310
lea esi, [ebp + 0x16828]
push ebp
push esi
call fcn.0046d640
xor edx, edx
mov eax, dword [esp + 0x3c]
mov dx, word [esi]
mov ecx, ebx
shl edx, cl
add ebx, 8
add esp, 8
or edi, edx
cmp ebx, eax
jb 0x46f2ec
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
and eax, edi
lea eax, [ecx + eax*8]
xor ecx, ecx
mov dword [esp + 0x14], eax
mov cl, byte [eax]
mov esi, ecx
cmp esi, 0x10
jbe 0x46f39c
cmp esi, 0x63
je 0x46f663
xor ecx, ecx
sub esi, 0x10
mov cl, byte [eax + 1]
sub ebx, ecx
mov dword [esp + 0x18], ecx
shr edi, cl
cmp ebx, esi
jae 0x46f377
lea eax, [ebp + 0x16828]
push ebp
push eax
call fcn.0046d640
xor edx, edx
mov ecx, ebx
mov dx, word [ebp + 0x16828]
add ebx, 8
shl edx, cl
add esp, 8
or edi, edx
cmp ebx, esi
jb 0x46f349
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 4]
xor ecx, ecx
mov cx, word [esi*2 + 0x51d2b0]
and ecx, edi
lea esi, [eax + ecx*8]
xor ecx, ecx
mov dword [esp + 0x14], esi
mov cl, byte [esi]
mov eax, dword [esp + 0x14]
mov esi, ecx
cmp esi, 0x10
ja 0x46f32c
xor ecx, ecx
mov cl, byte [eax + 1]
shr edi, cl
sub ebx, ecx
cmp esi, 0x10
mov dword [esp + 0x18], ecx
jne 0x46f3e4
mov al, byte [eax + 4]
mov byte [edx + ebp + 0x4f7c], al
inc edx
cmp edx, 0x8000
mov dword [esp + 0x10], edx
jne 0x46f61f
push ebp
push edx
call fcn.0046f1c0
mov dword [esp + 0x18], 0
add esp, 8
mov edx, dword [esp + 0x10]
jmp 0x46f61f
cmp esi, 0xf
je 0x46f640
cmp ebx, esi
jae 0x46f421
lea eax, [ebp + 0x16828]
push ebp
push eax
call fcn.0046d640
xor ecx, ecx
add esp, 8
mov cx, word [ebp + 0x16828]
mov edx, ecx
mov ecx, ebx
shl edx, cl
add ebx, 8
or edi, edx
cmp ebx, esi
jb 0x46f3f1
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
xor ecx, ecx
sub ebx, esi
mov cx, word [esi*2 + 0x51d2b0]
and ecx, edi
mov dword [esp + 0x18], ecx
xor ecx, ecx
mov cx, word [eax + 4]
mov eax, dword [esp + 0x18]
add eax, ecx
mov ecx, esi
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x38]
shr edi, cl
cmp ebx, eax
jae 0x46f47b
lea esi, [ebp + 0x16828]
push ebp
push esi
call fcn.0046d640
xor ecx, ecx
mov eax, dword [esp + 0x40]
mov cx, word [esi]
add esp, 8
mov edx, ecx
mov ecx, ebx
shl edx, cl
add ebx, 8
or edi, edx
cmp ebx, eax
jb 0x46f455
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x30]
and eax, edi
lea eax, [ecx + eax*8]
xor ecx, ecx
mov dword [esp + 0x14], eax
mov cl, byte [eax]
mov esi, ecx
cmp esi, 0x10
jbe 0x46f503
cmp esi, 0x63
je 0x46f663
xor ecx, ecx
sub esi, 0x10
mov cl, byte [eax + 1]
sub ebx, ecx
shr edi, cl
cmp ebx, esi
jae 0x46f4da
lea eax, [ebp + 0x16828]
push ebp
push eax
call fcn.0046d640
xor edx, edx
mov ecx, ebx
mov dx, word [ebp + 0x16828]
add ebx, 8
shl edx, cl
add esp, 8
or edi, edx
cmp ebx, esi
jb 0x46f4b0
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
xor eax, eax
mov ax, word [esi*2 + 0x51d2b0]
mov ecx, dword [ecx + 4]
and eax, edi
lea esi, [ecx + eax*8]
xor eax, eax
mov dword [esp + 0x14], esi
mov al, byte [esi]
mov esi, eax
mov eax, dword [esp + 0x14]
cmp esi, 0x10
ja 0x46f497
xor ecx, ecx
mov cl, byte [eax + 1]
sub ebx, ecx
shr edi, cl
cmp ebx, esi
jae 0x46f53c
lea eax, [ebp + 0x16828]
push ebp
push eax
call fcn.0046d640
xor ecx, ecx
add esp, 8
mov cx, word [ebp + 0x16828]
mov edx, ecx
mov ecx, ebx
shl edx, cl
add ebx, 8
or edi, edx
cmp ebx, esi
jb 0x46f510
mov edx, dword [esp + 0x10]
xor eax, eax
mov ax, word [esi*2 + 0x51d2b0]
mov ecx, eax
mov eax, edx
and ecx, edi
xor edx, edx
sub eax, ecx
mov ecx, dword [esp + 0x14]
mov dx, word [ecx + 4]
mov ecx, esi
shr edi, cl
sub eax, edx
mov edx, dword [esp + 0x10]
sub ebx, esi
mov dword [esp + 0x24], edi
and eax, 0x7fff
cmp eax, edx
mov ecx, eax
ja 0x46f575
mov ecx, edx
mov esi, 0x8000
sub esi, ecx
mov ecx, dword [esp + 0x18]
cmp esi, ecx
mov dword [esp + 0x14], esi
jbe 0x46f58e
mov esi, ecx
mov dword [esp + 0x14], esi
sub ecx, esi
mov dword [esp + 0x18], ecx
mov ecx, edx
sub ecx, eax
cmp ecx, esi
jb 0x46f5d6
mov ecx, esi
lea edi, [edx + ebp + 0x4f7c]
mov edx, ecx
lea esi, [eax + ebp + 0x4f7c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x24]
add esi, ecx
add eax, ecx
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], eax
mov edx, esi
jmp 0x46f5f1
mov cl, byte [eax + ebp + 0x4f7c]
mov byte [edx + ebp + 0x4f7c], cl
inc edx
inc eax
dec esi
jne 0x46f5d6
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edx
cmp edx, 0x8000
jne 0x46f613
push ebp
push edx
call fcn.0046f1c0
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
mov edx, dword [esp + 0x18]
add esp, 8
mov ecx, dword [esp + 0x18]
test ecx, ecx
jne 0x46f568
mov al, byte [ebp + 0x14fa4]
test al, al
je 0x46f633
mov eax, dword [ebp + 0x14f98]
test eax, eax
jbe 0x46f640
cmp dword [ebp + 0x1680c], 1
jle 0x46f2d6
mov eax, dword [ebp + 0x54]
mov dword [ebp + 0x16818], edx
test eax, eax
mov dword [ebp + 0x16820], edi
mov dword [ebp + 0x16824], ebx
jne 0x46f670
mov al, byte [ebp + 0x14fa4]
test al, al
je 0x46f670
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret