Function at 0x487b40
Capabilities:
Get thread local storage value

Disassembly:
push ecx
mov eax, dword [0x6c24b8]
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 0x487b66
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 0x487c0a
cmp dword [esi + 0x50], ebx
jne 0x487c0a
cmp dword [esi + 0x28], ebx
je 0x487c0a
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 0x487c25
mov eax, dword [esi + 0x460c]
cmp eax, ebx
je 0x487c25
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.0x487c49.7
jmp dword [eax*4 + 0x487e8c]
lea eax, [esp + 0x12]
push esi
push eax
call fcn.004869a0
add esp, 8
test eax, eax
je 0x487ceb
cmp dword [esi + 0x1680c], ebx
jne 0x487ceb
cmp dword [esi], ebx
jne 0x487ceb
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 0x487cad
push esi
call fcn.00486e70
add esp, 4
lea eax, [esp + 0x12]
push esi
push eax
call fcn.004869a0
add esp, 8
test eax, eax
jne 0x487c66
jmp 0x487ceb
call fcn.0048b3c0
jmp 0x487ceb
call fcn.0048ae50
jmp 0x487ceb
call fcn.0048aa60
cmp eax, ebx
je 0x487ceb
cmp eax, 5
je 0x487ceb
sub eax, 3
neg eax
sbb eax, eax
and al, 0xfd
add eax, 5
mov ebp, eax
cmp dword [esi + 0x24], ebx
je 0x487d29
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
pop ecx
ret
call fcn.00489200
cmp eax, ebx
je 0x487ceb
cmp dword [esi + 0x54], ebx
je 0x487cdd
cmp eax, 1
jne 0x487cdd
xor ebp, ebp
jmp 0x487ceb
call fcn.00485a40
cmp eax, ebx
je 0x487ceb
cmp dword [esi + 0x54], ebx
je 0x487cdd
cmp eax, 1
jne 0x487cdd
xor ebp, ebp
jmp 0x487ceb
cmp dword [esi], ebx
je 0x487d55
cmp dword [esi + 0x54], ebx
jne 0x487d37
cmp dword [esi + 0x4c], ebx
je 0x487d4a
cmp dword [esi + 0x1680c], 2
jne 0x487d4a
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 0x487d82
cmp dword [esi + 0x54], ebx
jne 0x487daf
cmp dword [esi + 0x4c], ebx
jne 0x487daf
cmp eax, 1
jle 0x487d79
pop edi
pop esi
pop ebp
mov eax, 0x32
pop ebx
pop ecx
ret
cmp eax, ebx
mov ebp, 1
jne 0x487dfd
push esi
call fcn.00486e70
add esp, 4
test eax, eax
je 0x487dfd
mov eax, dword [esi + 0x1680c]
cmp eax, 1
jle 0x487df8
cmp dword [esi + 0x54], ebx
jne 0x487de8
cmp dword [esi + 0x4c], ebx
jne 0x487de8
pop edi
pop esi
pop ebp
mov eax, 0x32
pop ebx
pop ecx
ret
cmp eax, 3
jne 0x487dbf
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
pop ecx
ret
cmp eax, 2
jne 0x487de0
cmp dword [esi + 0x4c], ebx
je 0x487da4
mov ecx, dword [esi + 0x68]
mov edx, dword [esi + 0x70]
lea eax, [esi + 0x70]
cmp ecx, edx
jne 0x487da4
mov edx, dword [esi + 0x6c]
mov ecx, dword [eax + 4]
cmp edx, ecx
jne 0x487da4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
cmp eax, 2
je 0x487dfd
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
pop ecx
ret
mov ebp, 1
cmp dword [esi + 0x3d30], ebx
jne 0x487e14
cmp dword [esi + 0x4c], ebx
jne 0x487e14
cmp dword [esi + 0x54], ebx
jne 0x487e14
call fcn.004878d0
cmp ebp, 1
jle 0x487e21
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
pop ecx
ret
cmp dword [esi + 0x4c], ebx
je 0x487e56
mov eax, dword [esi + 0x78]
mov ecx, dword [esi + 0x7c]
or eax, ecx
jne 0x487e78
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 0x487e78
jl 0x487e56
cmp ecx, dword [esi + 0x70]
ja 0x487e78
cmp dword [esi + 0x54], ebx
jne 0x487e78
mov eax, dword [esi + 0x14f7c]
mov ecx, dword [esi + 0x45da]
not eax
cmp eax, ecx
mov dword [esi + 0x14f7c], eax
je 0x487e78
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