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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x24], esi
push edi
mov edi, edx
mov dword [ebp - 0x1c], edi
test esi, esi
je 0x4906eb
mov eax, dword [esi + 4]
test eax, eax
je 0x4906eb
mov edx, dword [eax + 0xc]
mov dword [ebp - 0x28], edx
test edx, edx
je 0x4906eb
mov eax, dword [esi + 8]
test al, 0x20
je 0x4902da
mov eax, dword [esi + 0x60]
test eax, eax
jne 0x4902c3
mov ecx, 0x8000006
call fcn.00476850
push str.tsk_fs_attr_read:_Attribute_has_compressed_type_set__but_no_compressed_read_function_defined
call fcn.004768f0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebp + 0x10]
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
push esi
call eax
add esp, 0x14
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test al, 4
je 0x490370
mov ebx, dword [ebp + 0xc]
mov eax, dword [esi + 0x20]
mov ecx, dword [ebp + 8]
cmp ebx, dword [esi + 0x24]
jl 0x490321
jg 0x4902f6
cmp ecx, eax
jb 0x490321
call fcn.00476ab0
mov ecx, 0x8000005
call fcn.00476850
mov eax, dword [ebp + 8]
push ebx
push eax
push str.tsk_fs_attr_read____llu
call fcn.004768f0
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0x10]
xor eax, eax
mov dword [ebp - 0x28], edx
mov ebx, edx
add dword [ebp - 0x28], ecx
adc eax, dword [ebp + 0xc]
cmp eax, dword [esi + 0x24]
jl 0x490356
jg 0x490340
mov eax, dword [esi + 0x20]
cmp dword [ebp - 0x28], eax
jbe 0x490356
mov ebx, dword [esi + 0x20]
sub ebx, ecx
sub edx, ebx
push edx
push 0
lea eax, [ebx + edi]
push eax
call fcn.004c13c0
add esp, 0xc
mov ecx, dword [esi + 0x50]
add ecx, dword [ebp + 8]
push ebx
push ecx
push edi
call fcn.004c0d70
add esp, 0xc
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test al, 2
je 0x4906c7
mov ecx, dword [esi + 0x24]
mov eax, dword [esi + 0x20]
mov ebx, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x14], ecx
cmp ebx, ecx
jl 0x4903bc
jg 0x490394
cmp esi, eax
jb 0x4903bc
call fcn.00476ab0
mov ecx, 0x8000005
call fcn.00476850
push ebx
push esi
push str.tsk_fs_attr_read____llu
call fcn.004768f0
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push dword [edx + 0x50]
push ebx
push esi
call fcn.004dce20
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x44], ebx
mov ebx, ecx
mov dword [ebp - 0x30], eax
xor eax, eax
add ebx, esi
mov dword [ebp - 0x2c], edx
mov edx, ecx
adc eax, dword [ebp + 0xc]
mov dword [ebp - 4], edx
cmp eax, dword [ebp - 0x14]
jl 0x490416
jg 0x4903f1
cmp ebx, dword [ebp - 0xc]
jbe 0x490416
mov ebx, dword [ebp - 0x24]
mov edx, dword [ebx + 0x20]
sub edx, esi
mov dword [ebp - 4], edx
cmp edx, ecx
jae 0x490419
sub ecx, edx
lea eax, [edx + edi]
push ecx
push 0
push eax
call fcn.004c13c0
mov edx, dword [ebp - 4]
add esp, 0xc
jmp 0x490419
mov ebx, dword [ebp - 0x24]
mov edi, dword [ebx + 0x28]
mov ecx, edx
mov dword [ebp - 8], ecx
test edi, edi
je 0x49068b
lea esp, [esp]
test ecx, ecx
je 0x490688
mov edx, dword [edi + 8]
mov eax, edx
add eax, dword [edi + 0x18]
mov esi, dword [edi + 0xc]
mov dword [ebp - 0x24], eax
mov eax, esi
adc eax, dword [edi + 0x1c]
cmp eax, dword [ebp - 0x2c]
jb 0x49067e
mov eax, dword [ebp - 0x30]
ja 0x490462
cmp dword [ebp - 0x24], eax
jbe 0x49067e
cmp esi, dword [ebp - 0x2c]
ja 0x490476
jb 0x49046d
cmp edx, eax
jae 0x490476
sub eax, edx
mov edx, dword [ebp - 0x2c]
sbb edx, esi
jmp 0x490484
xorps xmm0, xmm0
movlpd qword [ebp - 0x18], xmm0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
mov esi, ecx
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x28]
push 0
mov dword [ebp - 0x24], edx
mov ecx, dword [ecx + 0x50]
mov dword [ebp - 0x14], ecx
mov ecx, dword [edi + 0x18]
push dword [ebp - 0x14]
sub ecx, eax
mov eax, dword [edi + 0x1c]
sbb eax, edx
push eax
push ecx
call fcn.004c2160
mov ecx, dword [ebp - 0x20]
sub eax, ecx
sbb edx, 0
test edx, edx
ja 0x4904d0
jb 0x4904be
cmp eax, dword [ebp - 8]
jae 0x4904d0
mov esi, dword [edi + 0x18]
mov eax, dword [ebp - 0xc]
sub esi, eax
mov edx, dword [ebp - 0x14]
imul esi, edx
sub esi, ecx
jmp 0x4904d6
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi + 0x20]
test cl, 2
je 0x4904f0
mov eax, dword [ebp - 4]
sub eax, dword [ebp - 8]
add eax, dword [ebp - 0x1c]
push esi
push 0
push eax
jmp 0x49066e
test cl, 1
je 0x49054a
mov eax, dword [ebp - 4]
sub eax, dword [ebp - 8]
add eax, dword [ebp - 0x1c]
push esi
push 0
push eax
call fcn.004c13c0
add esp, 0xc
cmp dword [0x561618], 0
je 0x490676
mov eax, dword [ebx + 4]
mov eax, dword [eax + 8]
test eax, eax
je 0x490533
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
push eax
push ecx
push str.tsk_fs_attr_read_type:_File__llu_has_FILLER_entry__using_0s_n
jmp 0x4905be
xorps xmm0, xmm0
movlpd qword [ebp - 0x48], xmm0
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x48]
push eax
push ecx
push str.tsk_fs_attr_read_type:_File__llu_has_FILLER_entry__using_0s_n
jmp 0x4905be
mov ecx, dword [edi + 8]
add ecx, eax
mov eax, dword [edi + 0xc]
push 0
adc eax, dword [ebp - 0x24]
push edx
push eax
push ecx
call fcn.004c2160
add eax, dword [ebp - 0x20]
adc edx, 0
cmp edx, dword [ebx + 0x44]
jl 0x4905d4
jg 0x490571
cmp eax, dword [ebx + 0x40]
jb 0x4905d4
mov eax, dword [ebp - 4]
sub eax, dword [ebp - 8]
add eax, dword [ebp - 0x1c]
push esi
push 0
push eax
call fcn.004c13c0
add esp, 0xc
cmp dword [0x561618], 0
je 0x490676
mov eax, dword [ebx + 4]
test eax, eax
je 0x4905a9
mov eax, dword [eax + 8]
test eax, eax
je 0x4905a9
mov ecx, dword [eax + 8]
mov eax, dword [eax + 0xc]
jmp 0x4905b7
xorps xmm0, xmm0
movlpd qword [ebp - 0x48], xmm0
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x48]
push eax
push ecx
push str.tsk_fs_attr_read:_Returning_0s_for_read_past_end_of_initsize___llu__n
call fcn.004bdd06
add eax, 0x40
push eax
call fcn.004bea01
add esp, 0x10
jmp 0x490676
mov ecx, dword [edi + 0x10]
add ecx, dword [ebp - 0xc]
mov eax, dword [edi + 0x14]
adc eax, dword [ebp - 0x24]
push 0
push dword [ebp - 0x14]
push eax
push ecx
call fcn.004c2160
add eax, dword [ebp - 0x20]
mov ecx, edx
mov edx, dword [ebp - 4]
adc ecx, 0
mov dword [ebp - 0x3c], eax
sub edx, dword [ebp - 8]
add edx, dword [ebp - 0x1c]
push esi
push ecx
mov dword [ebp - 0x44], ecx
mov ecx, dword [ebp - 0x28]
push eax
mov dword [ebp - 0x20], 0
call fcn.00491170
add esp, 0xc
mov dword [ebp - 0x38], eax
cmp eax, esi
jne 0x490696
mov edx, dword [ebp - 0x28]
mov ecx, dword [edi + 8]
add ecx, dword [ebp - 0xc]
mov eax, dword [edi + 0xc]
adc eax, dword [ebp - 0x24]
push 0
push dword [edx + 0x50]
push eax
push ecx
call fcn.004c2160
add eax, esi
adc edx, 0
cmp edx, dword [ebx + 0x44]
jl 0x490676
jg 0x49064b
cmp eax, dword [ebx + 0x40]
jbe 0x490676
mov ecx, dword [ebp - 0x28]
mov eax, dword [edi + 8]
add eax, dword [ebp - 0xc]
imul eax, dword [ecx + 0x50]
mov ecx, dword [ebx + 0x40]
sub ecx, eax
mov eax, esi
sub eax, ecx
sub ecx, dword [ebp - 8]
add ecx, dword [ebp - 4]
add ecx, dword [ebp - 0x1c]
push eax
push 0
push ecx
call fcn.004c13c0
add esp, 0xc
mov ecx, dword [ebp - 8]
sub ecx, esi
mov dword [ebp - 8], ecx
mov edi, dword [edi]
test edi, edi
jne 0x490430
mov edx, dword [ebp - 4]
sub edx, ecx
mov eax, edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
js 0x4906a9
call fcn.00476ab0
mov ecx, 0x8000004
call fcn.00476850
push esi
push dword [ebp - 0x44]
push dword [ebp - 0x3c]
push str.tsk_fs_attr_read_type:_offset:__llu__Len:__Iu
call fcn.00476950
mov eax, dword [ebp - 0x38]
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, 0x8000006
call fcn.00476850
push dword [esi + 8]
push str.tsk_fs_attr_read:_Unknown_attribute_type:__x
call fcn.004768f0
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [0x56161c]
push edi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x490725
push 0xc08
call fcn.004bb5d5
add esp, 4
mov esi, eax
push 0xc08
push 0
push esi
call fcn.004c13c0
add esp, 0xc
push esi
push edi
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push str.tsk_fs_attr_read:_Attribute_has_null_pointers.
mov dword [esi], 0x8000006
call fcn.004768f0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret