Function at 0x46e7e0
Capabilities:
Get thread local storage value

Disassembly:
push ecx
mov eax, dword [0x5296dc]
push ebx
push ebp
push esi
push edi
push eax
xor ebx, ebx
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
cmp esi, ebx
jne 0x46e806
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
pop ecx
ret
mov ecx, dword [esi + 0xa4]
mov edi, dword [esi + 0x15ff4]
mov edx, ecx
mov eax, 0xaaaaaaaa
shr ecx, 2
mov dword [esi + 0x14fa0], ebx
mov dword [esi + 0x14f9c], ebx
mov dword [esi + 0x16800], ebx
mov dword [esi + 0x16804], ebx
mov dword [esi + 0x15ff8], edi
mov byte [esi + 0x14fa4], bl
mov dword [esi + 0x14f7c], 0xffffffff
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
cmp dword [esi + 0x54], ebx
jne 0x46e8aa
cmp dword [esi + 0x50], ebx
jne 0x46e8aa
cmp dword [esi + 0x28], ebx
je 0x46e8aa
lea eax, [esi + 0x3d4c]
lea ecx, [esi + 0x1e4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edx, dword [esi + 0x30]
lea ecx, [esi + 0x344]
push ecx
lea eax, [esi + 0x1e0]
push ebx
push 0x4a
push edx
mov dword [eax], ebx
mov dword [ecx], 1
mov dword [esi + 0x348], 0x164
mov dword [esi + 0x34c], eax
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x46e8c5
mov eax, dword [esi + 0x460c]
cmp eax, ebx
je 0x46e8c5
mov ecx, dword [esi + 0x4610]
lea edx, [esi + 0x3d4c]
push ecx
push ebx
push edx
call eax
xor eax, eax
mov dword [esi + 0x3d40], ebx
mov ax, word [esi + 0x45d4]
mov dword [esi + 0x68], ebx
cmp eax, 9
mov dword [esi + 0x3d44], ebx
mov dword [esi + 0x6c], ebx
ja case.0x46e8e9.7
jmp dword [eax*4 + 0x46eb2c]
lea eax, [esp + 0x12]
push esi
push eax
call fcn.0046d640
add esp, 8
test eax, eax
je 0x46e98b
cmp dword [esi + 0x1680c], ebx
jne 0x46e98b
cmp dword [esi], ebx
jne 0x46e98b
mov ecx, dword [esi + 0x15ff8]
mov dl, byte [esp + 0x12]
mov byte [ecx], dl
mov edi, dword [esi + 0x15ff8]
mov edx, dword [esi + 0x16804]
mov ecx, dword [esi + 0xa4]
inc edi
inc edx
mov eax, edx
mov dword [esi + 0x15ff8], edi
cmp eax, ecx
mov dword [esi + 0x16804], edx
jne 0x46e94d
push esi
call fcn.0046db10
add esp, 4
lea eax, [esp + 0x12]
push esi
push eax
call fcn.0046d640
add esp, 8
test eax, eax
jne 0x46e906
jmp 0x46e98b
call fcn.00472090
jmp 0x46e98b
call fcn.00471b20
jmp 0x46e98b
call fcn.00471730
cmp eax, ebx
je 0x46e98b
cmp eax, 5
je 0x46e98b
sub eax, 3
neg eax
sbb eax, eax
and al, 0xfd
add eax, 5
mov ebp, eax
cmp dword [esi + 0x24], ebx
je 0x46e9c9
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
pop ecx
ret
call fcn.0046fed0
cmp eax, ebx
je 0x46e98b
cmp dword [esi + 0x54], ebx
je 0x46e97d
cmp eax, 1
jne 0x46e97d
xor ebp, ebp
jmp 0x46e98b
call fcn.0046c630
cmp eax, ebx
je 0x46e98b
cmp dword [esi + 0x54], ebx
je 0x46e97d
cmp eax, 1
jne 0x46e97d
xor ebp, ebp
jmp 0x46e98b
cmp dword [esi], ebx
je 0x46e9f5
cmp dword [esi + 0x54], ebx
jne 0x46e9d7
cmp dword [esi + 0x4c], ebx
je 0x46e9ea
cmp dword [esi + 0x1680c], 2
jne 0x46e9ea
mov dword [esi], ebx
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
mov eax, 0x30
pop ebx
pop ecx
ret
mov eax, dword [esi + 0x1680c]
cmp eax, ebx
je 0x46ea22
cmp dword [esi + 0x54], ebx
jne 0x46ea4f
cmp dword [esi + 0x4c], ebx
jne 0x46ea4f
cmp eax, 1
jle 0x46ea19
pop edi
pop esi
pop ebp
mov eax, 0x32
pop ebx
pop ecx
ret
cmp eax, ebx
mov ebp, 1
jne 0x46ea9d
push esi
call fcn.0046db10
add esp, 4
test eax, eax
je 0x46ea9d
mov eax, dword [esi + 0x1680c]
cmp eax, 1
jle 0x46ea98
cmp dword [esi + 0x54], ebx
jne 0x46ea88
cmp dword [esi + 0x4c], ebx
jne 0x46ea88
pop edi
pop esi
pop ebp
mov eax, 0x32
pop ebx
pop ecx
ret
cmp eax, 3
jne 0x46ea5f
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
pop ecx
ret
cmp eax, 2
jne 0x46ea80
cmp dword [esi + 0x4c], ebx
je 0x46ea44
mov ecx, dword [esi + 0x68]
mov edx, dword [esi + 0x70]
lea eax, [esi + 0x70]
cmp ecx, edx
jne 0x46ea44
mov edx, dword [esi + 0x6c]
mov ecx, dword [eax + 4]
cmp edx, ecx
jne 0x46ea44
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
cmp eax, 2
je 0x46ea9d
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
pop ecx
ret
mov ebp, 1
cmp dword [esi + 0x3d30], ebx
jne 0x46eab4
cmp dword [esi + 0x4c], ebx
jne 0x46eab4
cmp dword [esi + 0x54], ebx
jne 0x46eab4
call fcn.0046e570
cmp ebp, 1
jle 0x46eac1
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
pop ecx
ret
cmp dword [esi + 0x4c], ebx
je 0x46eaf6
mov eax, dword [esi + 0x78]
mov ecx, dword [esi + 0x7c]
or eax, ecx
jne 0x46eb18
mov ecx, dword [esi + 0x45e2]
mov edx, dword [esi + 0x90]
mov edi, dword [esi + 0x94]
xor eax, eax
add ecx, edx
mov edx, dword [esi + 0x74]
adc eax, edi
cmp eax, edx
jg 0x46eb18
jl 0x46eaf6
cmp ecx, dword [esi + 0x70]
ja 0x46eb18
cmp dword [esi + 0x54], ebx
jne 0x46eb18
mov eax, dword [esi + 0x14f7c]
mov ecx, dword [esi + 0x45da]
not eax
cmp eax, ecx
mov dword [esi + 0x14f7c], eax
je 0x46eb18
mov ebp, 0x27
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
mov eax, 0x2a
pop ebx
pop ecx
ret