Function at 0x5ed540
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push edi
mov edi, ecx
mov bl, 1
cmp dword [edi + 0x30], 0xffffffff
jne 0x5ed569
mov ecx, dword [ebp + 8]
push str.No_Event_specified_for_contact.
call fcn.0045d9a0
pop edi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [edi + 0x38]
test eax, eax
je 0x5ed807
cmp dword [eax + 8], 0
jne 0x5ed807
push esi
mov esi, dword [eax + 0x20]
mov dword [ebp - 4], esi
test esi, esi
jle 0x5ed7fc
push dword [0x884adc]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], connect
mov dword [ebp - 0xc], esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
lea edx, [esi*2 + 0x7f]
and edx, 0xffffff80
mov ecx, dword [eax + 0xc]
lea esi, [ecx + edx]
mov dword [ebp - 8], esi
mov esi, dword [ebp - 4]
cmp edx, dword [eax + 8]
jg 0x5ed5df
lea esi, [ecx + edx]
cmp esi, dword [eax + 0x10]
mov esi, dword [ebp - 4]
ja 0x5ed5df
mov edx, dword [ebp - 8]
mov dword [eax + 0xc], edx
jmp 0x5ed5e9
push edx
mov ecx, eax
call fcn.0046a3c0
mov ecx, eax
mov eax, dword [edi + 0x38]
mov edx, esi
or edx, 0x80000000
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], ecx
test eax, eax
je 0x5ed661
cmp dword [eax + 8], 0
jne 0x5ed661
xor esi, esi
cmp dword [eax + 0x20], esi
jle 0x5ed65e
mov ecx, dword [ebp - 0x18]
mov eax, dword [eax + 0x1c]
and edx, 0x3fffffff
lea eax, [eax + esi*2]
mov dword [ebp - 8], eax
cmp ecx, edx
jne 0x5ed63a
push 2
lea eax, [ebp - 0x1c]
push eax
push 0x7d8954
call fcn.00467c00
mov ecx, dword [ebp - 0x18]
add esp, 0xc
mov eax, dword [ebp - 0x1c]
inc esi
lea ecx, [eax + ecx*2]
mov eax, dword [ebp - 8]
mov ax, word [eax]
mov word [ecx], ax
mov ecx, dword [ebp - 0x18]
mov eax, dword [edi + 0x38]
inc ecx
mov dword [ebp - 0x18], ecx
cmp esi, dword [eax + 0x20]
jge 0x5ed65e
mov edx, dword [ebp - 0x14]
jmp 0x5ed611
mov esi, dword [ebp - 4]
push esi
call fcn.0046b820
add esp, 4
mov esi, eax
mov dword [ebp - 0x20], esi
push dword [0x884adc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
add esi, 0x7f
and esi, 0xffffff80
mov ecx, dword [eax + 0xc]
lea edx, [ecx + esi]
cmp esi, dword [eax + 8]
jg 0x5ed696
cmp edx, dword [eax + 0x10]
ja 0x5ed696
mov dword [eax + 0xc], edx
jmp 0x5ed6a0
push esi
mov ecx, eax
call fcn.0046a3c0
mov ecx, eax
push dword [ebp - 0x20]
mov dword [ebp - 0x24], ecx
push ecx
lea ecx, [ebp - 0x30]
call fcn.0046b980
xor esi, esi
cmp dword [ebp - 0x18], esi
jle 0x5ed724
mov edi, dword [ebp + 8]
nop dword [eax]
test bl, bl
je 0x5ed724
mov eax, dword [ebp - 0x1c]
cmp word [eax + esi*2], 0xffff
jne 0x5ed6df
push str.Unspecified_bone_index.
mov ecx, edi
call fcn.0045d9a0
mov eax, dword [ebp - 0x1c]
xor bl, bl
movsx eax, word [eax + esi*2]
lea ecx, [ebp - 0x30]
push 0xffffffffffffffff
push eax
call fcn.0046b890
cmp eax, 0xffffffff
je 0x5ed703
push str.Duplicate_bone_index.
mov ecx, edi
call fcn.0045d9a0
xor bl, bl
jmp 0x5ed71e
test bl, bl
je 0x5ed71e
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x30]
push 1
movsx eax, word [eax + esi*2]
push eax
push 0x7d8954
call fcn.0046ba50
inc esi
cmp esi, dword [ebp - 0x18]
jl 0x5ed6c0
push 0x7d8954
lea ecx, [ebp - 0x30]
call fcn.0046b3e0
mov esi, dword [ebp - 0x20]
push dword [0x884adc]
mov edi, dword [ebp - 0x24]
add esi, 0x7f
and esi, 0xffffff80
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
lea edx, [esi + 0xf]
and edx, 0xfffffff0
cmp esi, dword [ecx + 8]
jg 0x5ed768
lea eax, [edx + edi]
cmp eax, dword [ecx + 0xc]
jne 0x5ed768
cmp dword [ecx + 0x14], edi
je 0x5ed768
mov dword [ecx + 0xc], edi
jmp 0x5ed76f
push edx
push edi
call fcn.0046a590
push 0x7d8954
lea ecx, [ebp - 0x30]
call fcn.0046b3e0
lea ecx, [ebp - 0x30]
call fcn.0046b110
mov edi, dword [ebp - 0x10]
xor ecx, ecx
mov eax, dword [ebp - 0x18]
cmp edi, dword [ebp - 0x1c]
push dword [0x884adc]
cmove eax, ecx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xc]
lea esi, [eax*2 + 0x7f]
and esi, 0xffffff80
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
lea edx, [esi + 0xf]
and edx, 0xfffffff0
cmp esi, dword [ecx + 8]
jg 0x5ed7cd
lea eax, [edx + edi]
cmp eax, dword [ecx + 0xc]
jne 0x5ed7cd
cmp dword [ecx + 0x14], edi
je 0x5ed7cd
mov dword [ecx + 0xc], edi
jmp 0x5ed7d4
push edx
push edi
call fcn.0046a590
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], 0
test ecx, ecx
js 0x5ed7fc
mov edx, dword [0x7d8954]
and ecx, 0x3fffffff
add ecx, ecx
push ecx
push dword [ebp - 0x1c]
mov ecx, 0x7d8954
call dword [edx + 0x10]
pop esi
pop edi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret 4
pop edi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret 4