Function at 0x486bc0
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x5c
push ebx
mov ebx, dword [esp + 0x64]
test ebx, ebx
jne 0x486bee
mov ecx, dword [esp + 0x68]
test ecx, ecx
je 0x486be7
mov dword [ecx], 1
add ecx, 4
push str.Stream_pointer_is_null
call fcn.0045d9a0
xor eax, eax
pop ebx
add esp, 0x5c
ret
mov eax, dword [ebx]
lea ecx, [esp + 0x64]
push ecx
mov ecx, ebx
call dword [eax + 0xc]
cmp byte [eax], 0
jne 0x486c21
mov ecx, dword [esp + 0x68]
test ecx, ecx
je 0x486be7
mov dword [ecx], 1
add ecx, 4
push str.Stream_is_not_ok
call fcn.0045d9a0
xor eax, eax
pop ebx
add esp, 0x5c
ret
push ebp
mov ebp, dword [esp + 0x70]
push esi
push edi
test ebp, ebp
jne 0x486c39
mov ecx, dword [0x884f00]
mov eax, dword [ecx]
call dword [eax + 0x10]
mov ebp, eax
lea ecx, [esp + 0x14]
call fcn.0045d8c0
lea eax, [esp + 0x10]
push eax
push ebx
call fcn.00487560
mov eax, dword [esp + 0x18]
add esp, 8
add eax, 0xfffffffe
cmp eax, 3
ja case.default.0x486c60
jmp dword [eax*4 + 0x486e90]
mov ecx, dword [0x884f00]
mov eax, dword [ecx]
call dword [eax + 0xc]
push dword [esp + 0x7c]
push eax
push dword [esp + 0x7c]
lea eax, [esp + 0x1c]
push eax
push ebx
call fcn.00488120
add esp, 0x14
lea ecx, [esp + 0x14]
mov esi, eax
call fcn.0045d990
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
push dword [0x884adc]
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
call esi
cmp dword [eax + 8], 0x4000
mov edi, dword [eax + 0xc]
lea ecx, [edi + 0x4000]
jl 0x486cc8
cmp ecx, dword [eax + 0x10]
ja 0x486cc8
mov dword [eax + 0xc], ecx
jmp 0x486cd6
push 0x4000
mov ecx, eax
call fcn.0046a3c0
mov edi, eax
push dword [0x884adc]
call esi
lea ecx, [esp + 0x2c]
mov esi, dword [eax + 0x2c]
call fcn.0064aab0
push 0x4000
push edi
push 0x4000
push esi
push esi
push esi
lea ecx, [esp + 0x44]
call fcn.0064ab10
lea eax, [esp + 0x2c]
xor esi, esi
push eax
lea ecx, [esp + 0x20]
call fcn.0048e860
push ebp
push dword [esp + 0x78]
lea eax, [esp + 0x24]
push eax
push ebx
call fcn.00487f80
add esp, 0x10
test eax, eax
jne 0x486d4b
push ebp
lea eax, [esp + 0x74]
push eax
lea ecx, [esp + 0x24]
call fcn.0048e900
push eax
call fcn.0048c990
add esp, 8
lea ecx, [esp + 0x70]
mov esi, eax
call fcn.00484690
lea ecx, [esp + 0x1c]
call fcn.0048e8c0
lea ecx, [esp + 0x2c]
call fcn.0064ab80
lea ecx, [esp + 0x54]
call fcn.0064b6e0
lea ecx, [esp + 0x2c]
call fcn.00469ff0
push dword [0x884adc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 8], 0x4000
jl 0x486e3e
lea ecx, [edi + 0x4000]
cmp ecx, dword [eax + 0xc]
jne 0x486e3e
cmp dword [eax + 0x14], edi
je 0x486e3e
lea ecx, [esp + 0x14]
mov dword [eax + 0xc], edi
call fcn.0045d990
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
push dword [0x884adc]
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
call esi
cmp dword [eax + 8], 0x4000
mov edi, dword [eax + 0xc]
lea ecx, [edi + 0x4000]
jl 0x486de0
cmp ecx, dword [eax + 0x10]
ja 0x486de0
mov dword [eax + 0xc], ecx
jmp 0x486dee
push 0x4000
mov ecx, eax
call fcn.0046a3c0
mov edi, eax
push dword [0x884adc]
call esi
lea ecx, [esp + 0x2c]
mov esi, dword [eax + 0x2c]
call fcn.0064aab0
push 0x4000
push edi
push 0x4000
push esi
push esi
push esi
lea ecx, [esp + 0x44]
call fcn.0064ab10
lea eax, [esp + 0x2c]
xor esi, esi
push eax
lea ecx, [esp + 0x20]
call fcn.0048e860
push ebp
push dword [esp + 0x78]
lea eax, [esp + 0x24]
push eax
push ebx
call fcn.004884e0
jmp 0x486d21
push 0x4000
push edi
mov ecx, eax
call fcn.0046a590
lea ecx, [esp + 0x14]
call fcn.0045d990
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
mov ecx, dword [esp + 0x74]
test ecx, ecx
je 0x486e79
mov dword [ecx], 2
add ecx, 4
push str.Unable_to_detect_format_from_stream
call fcn.0045d9a0
lea ecx, [esp + 0x14]
xor esi, esi
call fcn.0045d990
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret