Function at 0x5b1915
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x2c
push ebx
push ebp
push esi
mov esi, ecx
xor ebp, ebp
push edi
cmp dword [esi + 8], ebp
jne 0x5b1923
mov ebp, dword [esi + 0x30]
mov eax, dword [esi + 0x38]
test eax, eax
je 0x5b1933
cmp dword [eax + 8], 0
jne 0x5b1933
add ebp, dword [eax + 0x20]
test ebp, ebp
jle 0x5b1cfa
push dword [0x884adc]
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], connect
mov dword [esp + 0x28], ebp
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
lea ecx, [ebp*2 + 0x7f]
and ecx, 0xffffff80
mov edx, dword [eax + 0xc]
lea edi, [edx + ecx]
cmp ecx, dword [eax + 8]
jg 0x5b1982
cmp edi, dword [eax + 0x10]
ja 0x5b1982
mov dword [eax + 0xc], edi
jmp 0x5b198c
push ecx
mov ecx, eax
call fcn.0046a3c0
mov edx, eax
mov ecx, ebp
mov dword [esp + 0x14], edx
or ecx, 0x80000000
mov dword [esp + 0x20], edx
cmp dword [esi + 8], 0
mov dword [esp + 0x1c], ecx
jne 0x5b1a09
xor ebx, ebx
cmp dword [esi + 0x30], ebx
jle 0x5b1a09
mov ecx, dword [esp + 0x18]
xor edi, edi
mov eax, dword [esi + 0x2c]
add eax, 0x20
add eax, edi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1c]
and eax, 0x3fffffff
cmp ecx, eax
jne 0x5b19e4
push 2
lea eax, [esp + 0x18]
push eax
push 0x7d8954
call fcn.00467c00
mov ecx, dword [esp + 0x24]
add esp, 0xc
mov eax, dword [esp + 0x14]
inc ebx
add edi, 0x30
lea ecx, [eax + ecx*2]
mov eax, dword [esp + 0x10]
mov ax, word [eax]
mov word [ecx], ax
mov ecx, dword [esp + 0x18]
inc ecx
mov dword [esp + 0x18], ecx
cmp ebx, dword [esi + 0x30]
jl 0x5b19b3
jmp 0x5b1a0d
mov ecx, dword [esp + 0x18]
mov eax, dword [esi + 0x38]
test eax, eax
je 0x5b1a6b
cmp dword [eax + 8], 0
jne 0x5b1a6b
xor edi, edi
cmp dword [eax + 0x20], edi
jle 0x5b1a6b
mov eax, dword [eax + 0x1c]
lea ebx, [eax + edi*2]
mov eax, dword [esp + 0x1c]
and eax, 0x3fffffff
cmp ecx, eax
jne 0x5b1a4c
push 2
lea eax, [esp + 0x18]
push eax
push 0x7d8954
call fcn.00467c00
mov ecx, dword [esp + 0x24]
add esp, 0xc
mov eax, dword [esp + 0x14]
inc edi
lea ecx, [eax + ecx*2]
mov ax, word [ebx]
mov word [ecx], ax
mov ecx, dword [esp + 0x18]
mov eax, dword [esi + 0x38]
inc ecx
mov dword [esp + 0x18], ecx
cmp edi, dword [eax + 0x20]
jl 0x5b1a21
push ebp
call fcn.0046b820
mov ebx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
add esp, 4
mov esi, eax
mov dword [esp + 0x38], esi
push dword [0x884adc]
call ebx
add esi, 0x7f
and esi, 0xffffff80
mov ecx, dword [eax + 0xc]
lea edx, [esi + ecx]
cmp esi, dword [eax + 8]
jg 0x5b1aa3
cmp edx, dword [eax + 0x10]
ja 0x5b1aa3
mov dword [eax + 0xc], edx
jmp 0x5b1aad
push esi
mov ecx, eax
call fcn.0046a3c0
mov ecx, eax
push dword [esp + 0x38]
mov dword [esp + 0x38], ecx
push ecx
lea ecx, [esp + 0x30]
call fcn.0046b980
xor esi, esi
cmp dword [esp + 0x18], esi
jle 0x5b1b14
nop word [eax + eax]
mov eax, dword [esp + 0x14]
movzx eax, word [eax + esi*2]
cmp ax, 0xffff
je 0x5b1b6b
cwde
lea ecx, [esp + 0x28]
push 0xffffffffffffffff
push eax
call fcn.0046b890
cmp eax, 0xffffffff
jne 0x5b1b64
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x28]
push 1
movsx eax, word [eax + esi*2]
push eax
push 0x7d8954
call fcn.0046ba50
inc esi
cmp esi, dword [esp + 0x18]
jl 0x5b1ad0
push 0x7d8954
lea ecx, [esp + 0x2c]
call fcn.0046b3e0
mov esi, dword [esp + 0x38]
push dword [0x884adc]
mov edi, dword [esp + 0x38]
add esi, 0x7f
and esi, 0xffffff80
call ebx
lea edx, [esi + 0xf]
and edx, 0xfffffff0
cmp esi, dword [eax + 8]
jg 0x5b1c60
lea ecx, [edx + edi]
cmp ecx, dword [eax + 0xc]
jne 0x5b1c60
cmp dword [eax + 0x14], edi
je 0x5b1c60
mov dword [eax + 0xc], edi
jmp 0x5b1c69
push str.Duplicate_bone_index.
jmp 0x5b1b70
push str.Unspecified_bone_index.
mov ecx, dword [esp + 0x44]
call fcn.0045d9a0
push 0x7d8954
lea ecx, [esp + 0x2c]
call fcn.0046b3e0
mov esi, dword [esp + 0x38]
push dword [0x884adc]
mov edi, dword [esp + 0x38]
add esi, 0x7f
and esi, 0xffffff80
call ebx
lea edx, [esi + 0xf]
and edx, 0xfffffff0
cmp esi, dword [eax + 8]
jg 0x5b1bba
lea ecx, [edx + edi]
cmp ecx, dword [eax + 0xc]
jne 0x5b1bba
cmp dword [eax + 0x14], edi
je 0x5b1bba
mov dword [eax + 0xc], edi
jmp 0x5b1bc3
push edx
push edi
mov ecx, eax
call fcn.0046a590
push 0x7d8954
lea ecx, [esp + 0x2c]
call fcn.0046b3e0
lea ecx, [esp + 0x28]
call fcn.0046b110
mov edi, dword [esp + 0x20]
xor ecx, ecx
mov eax, dword [esp + 0x18]
cmp edi, dword [esp + 0x14]
push dword [0x884adc]
cmove eax, ecx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x28]
lea esi, [eax*2 + 0x7f]
and esi, 0xffffff80
call ebx
lea edx, [esi + 0xf]
and edx, 0xfffffff0
cmp esi, dword [eax + 8]
jg 0x5b1c22
lea ecx, [edx + edi]
cmp ecx, dword [eax + 0xc]
jne 0x5b1c22
cmp dword [eax + 0x14], edi
je 0x5b1c22
mov dword [eax + 0xc], edi
jmp 0x5b1c2b
push edx
push edi
mov ecx, eax
call fcn.0046a590
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
test eax, eax
js 0x5b1c54
and eax, 0x3fffffff
mov ecx, 0x7d8954
add eax, eax
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x18]
call dword [eax + 0x10]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x2c
ret 4
push edx
push edi
mov ecx, eax
call fcn.0046a590
push 0x7d8954
lea ecx, [esp + 0x2c]
call fcn.0046b3e0
lea ecx, [esp + 0x28]
call fcn.0046b110
mov edi, dword [esp + 0x20]
xor ecx, ecx
mov eax, dword [esp + 0x18]
cmp edi, dword [esp + 0x14]
push dword [0x884adc]
cmove eax, ecx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x28]
lea esi, [eax*2 + 0x7f]
and esi, 0xffffff80
call ebx
lea edx, [esi + 0xf]
and edx, 0xfffffff0
cmp esi, dword [eax + 8]
jg 0x5b1cc8
lea ecx, [edx + edi]
cmp ecx, dword [eax + 0xc]
jne 0x5b1cc8
cmp dword [eax + 0x14], edi
je 0x5b1cc8
mov dword [eax + 0xc], edi
jmp 0x5b1cd1
push edx
push edi
mov ecx, eax
call fcn.0046a590
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
test eax, eax
js 0x5b1cfa
and eax, 0x3fffffff
mov ecx, 0x7d8954
add eax, eax
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x18]
call dword [eax + 0x10]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x2c
ret 4