Function at 0x10045297
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
push edi
mov dword [ebp - 4], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], 1
mov edi, str._Assertion_at__s:_d__condition___s_not_met_n
cmp ebx, esi
jne 0x100452d6
push str.klass___NULL
push 0x2848
push str...monometadatamarshal.c
push edi
push 4
push esi
call fcn.100010d9
add esp, 0x18
mov eax, dword [ebx + 0x74]
cmp eax, esi
jne 0x10045602
test byte [ebx + 0x14], 1
jne 0x100452ee
push ebx
call sym.mono.dll_mono_class_init
pop ecx
call fcn.100386e0
cmp dword [ebx + 0x74], esi
jne 0x100455fa
push ebx
call fcn.1004371d
pop ecx
test eax, eax
je 0x10045322
push str._mono_marshal_is_loading_type_info__klass_
push 0x285b
push str...monometadatamarshal.c
push edi
push 4
push esi
call fcn.100010d9
add esp, 0x18
push dword [0x101f7400]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push ebx
push eax
call fcn.10003215
pop ecx
pop ecx
push eax
push dword [0x101f7400]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [ebp - 8], esi
jmp 0x1004537b
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
test cl, 0x10
jne 0x1004537b
test ecx, 0x600
je 0x10045374
push eax
mov edi, str._Deleted
call sym.mono.dll_mono_event_get_name
pop ecx
mov esi, eax
push 9
pop ecx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x10045379
xor esi, esi
inc dword [ebp - 4]
jmp 0x1004537b
xor esi, esi
lea eax, [ebp - 8]
push eax
push ebx
call sym.mono.dll_mono_class_get_fields
pop ecx
pop ecx
cmp eax, esi
jne 0x10045349
mov eax, dword [ebx + 0x60]
and eax, 0x18
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
imul eax, eax, 0xc
add eax, 0x14
push eax
push dword [ebx + 0x30]
call fcn.10037bc4
mov edi, eax
mov eax, dword [ebp - 4]
mov dword [edi + 8], eax
lea eax, [ebp - 0xc]
push eax
push esi
push dword [ebx + 0x3c]
mov dword [ebp - 0x1c], edi
push dword [ebx + 0x30]
call sym.mono.dll_mono_metadata_packing_from_typedef
mov eax, dword [ebx + 0x24]
add esp, 0x18
cmp eax, esi
je 0x100453d9
push esi
push eax
call fcn.1004373f
add dword [ebp - 0xc], eax
pop ecx
pop ecx
mov dword [edi], eax
lea eax, [ebp - 8]
push eax
push ebx
mov dword [ebp - 8], esi
call sym.mono.dll_mono_class_get_fields
mov esi, eax
pop ecx
pop ecx
mov dword [ebp - 0x14], esi
test esi, esi
je 0x1004557f
and dword [ebp - 4], 0
jmp 0x100453fe
mov esi, dword [ebp - 0x14]
mov eax, dword [esi]
mov eax, dword [eax + 4]
test al, 0x10
jne 0x10045568
test eax, 0x600
je 0x10045433
push esi
mov edi, str._Deleted
call sym.mono.dll_mono_event_get_name
pop ecx
mov esi, eax
push 9
pop ecx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x10045565
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x1c]
mov eax, dword [esi]
test dword [eax + 4], 0x1000
je 0x10045463
mov eax, dword [ebp - 4]
lea eax, [eax + edi + 0x1c]
push eax
push 0
push 0
push esi
call sym.mono.dll_mono_class_get_field_token
and eax, 0xffffff
pop ecx
dec eax
push eax
push dword [ebx + 0x30]
call fcn.10056b3a
add esp, 0x14
mov eax, dword [ebp - 4]
add eax, edi
push ebx
mov dword [ebp - 0x20], eax
mov dword [eax + 0x14], esi
call sym.mono.dll_mono_class_num_fields
pop ecx
cmp eax, 1
jne 0x100454a1
cmp dword [ebx + 0x10], 8
jne 0x100454a1
push esi
mov edi, str._PRIVATE_
call sym.mono.dll_mono_event_get_name
pop ecx
mov esi, eax
push 0xa
pop ecx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x10045565
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x1c]
cmp dword [ebp - 0x18], 0
je 0x1004550d
cmp dword [ebp - 0x18], 8
je 0x1004550d
cmp dword [ebp - 0x18], 0x10
jne 0x1004555f
mov eax, dword [ebx + 0x14]
shr eax, 6
and eax, 1
push eax
push 1
lea eax, [ebp + 8]
push eax
mov eax, dword [ebp - 0x20]
push dword [eax + 0x1c]
push dword [esi]
call fcn.1004388f
mov ecx, dword [ebx + 0x1c]
add esp, 0x14
and ecx, 0xf
je 0x100454e7
cmp ecx, dword [ebp + 8]
jae 0x100454e7
mov dword [ebp + 8], ecx
mov ecx, dword [ebp + 8]
cmp ecx, dword [ebp - 0x10]
jbe 0x100454f2
mov dword [ebp - 0x10], ecx
mov ecx, dword [esi + 0xc]
mov edx, dword [ebp - 4]
add ecx, 0xfffffff8
add eax, ecx
mov dword [edx + edi + 0x18], ecx
mov ecx, dword [edi]
cmp ecx, eax
jbe 0x10045509
mov eax, ecx
mov dword [edi], eax
jmp 0x1004555f
mov eax, dword [ebx + 0x14]
shr eax, 6
and eax, 1
push eax
push 1
lea eax, [ebp + 8]
push eax
mov eax, dword [ebp - 0x20]
push dword [eax + 0x1c]
push dword [esi]
call fcn.1004388f
mov ecx, dword [ebx + 0x1c]
mov edx, dword [ebp + 8]
add esp, 0x14
and ecx, 0xf
je 0x10045541
cmp ecx, edx
jae 0x10045541
mov edx, ecx
mov dword [ebp + 8], edx
cmp edx, dword [ebp - 0x10]
jbe 0x10045549
mov dword [ebp - 0x10], edx
mov ecx, dword [edi]
lea ecx, [ecx + edx - 1]
dec edx
not edx
and ecx, edx
mov edx, dword [ebp - 4]
mov dword [edx + edi + 0x18], ecx
add ecx, eax
mov dword [edi], ecx
add dword [ebp - 4], 0xc
jmp 0x10045568
mov edi, dword [ebp - 0x1c]
lea eax, [ebp - 8]
push eax
push ebx
call sym.mono.dll_mono_class_get_fields
pop ecx
pop ecx
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x100453fb
cmp dword [ebp - 0x18], 0
je 0x10045591
mov eax, dword [edi]
cmp dword [ebp - 0xc], eax
jbe 0x1004558f
mov eax, dword [ebp - 0xc]
mov dword [edi], eax
mov edx, dword [ebp - 0x10]
mov ecx, dword [edi]
lea eax, [edx - 1]
test ecx, eax
je 0x100455a7
lea ecx, [ecx + edx - 1]
not eax
and ecx, eax
mov dword [edi], ecx
push 0
push ebx
mov dword [edi + 4], edx
call sym.mono.dll_mono_class_value_size
pop ecx
pop ecx
cmp dword [edi], eax
je 0x100455bc
and dword [ebx + 0x14], 0xffffffdf
mov eax, dword [ebx]
test eax, eax
je 0x100455d5
push eax
call fcn.1004371d
pop ecx
test eax, eax
jne 0x100455d5
push dword [ebx]
call fcn.10045297
pop ecx
push dword [0x101f7400]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push ebx
push eax
call fcn.10003267
pop ecx
pop ecx
push eax
push dword [0x101f7400]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [ebx + 0x74], edi
call fcn.10038744
mov eax, dword [ebx + 0x74]
pop edi
pop esi
pop ebx
leave
ret