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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
mov esi, ecx
mov dword [ebp - 4], 0
mov dword [ebp - 0x2c], esi
mov eax, edx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], 0
push edi
test esi, esi
jne 0x134a41
call fcn.000ee7f0
mov edi, dword [0x1aa224]
push edi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x134a24
push 0xc08
call fcn.0015c8ae
add esp, 4
mov esi, eax
push 0xc08
push 0
push esi
call fcn.00153d90
add esp, 0xc
push esi
push edi
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push str.tsk_img_read:_a_img_info:_NULL
mov dword [esi], 0x2000009
call fcn.000ee5f0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
jne 0x134aa1
call fcn.000ee7f0
mov edi, dword [0x1aa224]
push edi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x134a84
push 0xc08
call fcn.0015c8ae
add esp, 4
mov esi, eax
push 0xc08
push 0
push esi
call fcn.00153d90
add esp, 0xc
push esi
push edi
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push str.tsk_img_read:_a_buf:_NULL
mov dword [esi], 0x2000009
call fcn.000ee5f0
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
test edi, edi
jg 0x134ad9
jl 0x134ab1
test ebx, ebx
jae 0x134ad9
call fcn.000ee7f0
mov ecx, 0x2000009
call fcn.000ee550
push edi
push ebx
push str.tsk_img_read:_a_off:__llu
call fcn.000ee5f0
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [esi + 0x1c]
push eax
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [ebp + 0x10]
push 0
push 0x200
push dword [ebp + 0xc]
mov dword [ebp - 0x28], 0
push ebx
call fcn.00171ce0
add eax, edi
mov ecx, 0
adc edx, ecx
mov dword [ebp - 0x34], edx
js 0x134bfe
jg 0x134b1f
cmp eax, 0x10000
jbe 0x134bfe
mov ecx, dword [esi + 0x10]
xor edx, edx
mov eax, edi
div ecx
test edx, edx
je 0x134bd6
lea eax, [edi - 1]
xor edx, edx
add eax, ecx
div ecx
imul eax, ecx
mov ecx, eax
mov dword [ebp - 0x28], eax
call fcn.000f2310
mov dword [ebp - 0x24], eax
test eax, eax
jne 0x134b60
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x28]
push eax
push dword [ebp + 0xc]
mov eax, dword [esi + 0x40078]
push ebx
push esi
call eax
mov esi, eax
add esp, 0x14
test esi, esi
jle 0x134ba9
cmp esi, edi
jge 0x134ba9
mov ebx, dword [ebp - 0x24]
push esi
push ebx
push dword [ebp - 0x14]
call fcn.00153810
add esp, 0xc
push ebx
call fcn.00158d47
add esp, 4
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x24]
push edi
push ebx
push dword [ebp - 0x14]
call fcn.00153810
add esp, 0xc
mov esi, edi
push ebx
call fcn.00158d47
add esp, 4
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x40078]
push edi
push dword [ebp - 0x14]
push dword [ebp + 0xc]
push ebx
push esi
call eax
add esp, 0x14
mov esi, eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov ecx, dword [esi + 8]
cmp eax, dword [esi + 0xc]
jl 0x134c47
jg 0x134c14
mov edx, dword [ebp + 8]
cmp edx, ecx
jb 0x134c4a
mov ebx, edx
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.000ee7f0
mov ecx, 0x2000008
call fcn.000ee550
push dword [ebp + 0xc]
push ebx
push str.tsk_img_read____llu
call fcn.000ee5f0
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 8]
mov ebx, dword [esi + 0xc]
cmp dword [ebp - 0x28], ebx
jg 0x134c67
jl 0x134c58
cmp edi, ecx
ja 0x134c67
sub ecx, edi
sbb ebx, 0
cmp eax, ebx
jl 0x134c6c
jg 0x134c67
cmp edx, ecx
jb 0x134c6c
mov edi, dword [esi + 8]
sub edi, edx
mov eax, 0xfffbffa8
mov dword [ebp - 8], 0
lea ecx, [esi + 0x40038]
mov dword [ebp - 0x24], 0
sub eax, esi
mov dword [ebp - 0x20], 0
lea ebx, [esi + 0x40058]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x28], eax
nop word [eax + eax]
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x134e5e
cmp dword [ebp - 4], 0
jne 0x134e28
mov esi, dword [ecx]
mov dword [ebp - 0x1c], esi
mov esi, dword [ecx + 4]
cmp esi, dword [ebp + 0xc]
mov dword [ebp - 0x30], esi
mov esi, dword [ebp - 0x2c]
jg 0x134e28
jl 0x134cd6
cmp dword [ecx], edx
ja 0x134e28
xor ecx, ecx
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0x34], eax
adc ecx, dword [ebp - 0x30]
xor eax, eax
mov dword [ebp - 0x1c], edi
add dword [ebp - 0x1c], edx
adc eax, dword [ebp + 0xc]
cmp ecx, eax
jl 0x134e25
jg 0x134d02
mov eax, dword [ebp - 0x1c]
cmp dword [ebp - 0x34], eax
jb 0x134e25
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x24]
push edi
sub eax, dword [ecx]
add eax, 0x34
add eax, edx
add eax, esi
push eax
push dword [ebp - 0x14]
call fcn.00153810
mov ecx, dword [ebp - 0x10]
add esp, 0xc
mov dword [ebp - 4], edi
mov dword [ebx], 0x3e8
mov eax, dword [ebp - 8]
mov edx, dword [ebp + 8]
inc eax
mov dword [ebp - 8], eax
add ecx, 8
mov eax, dword [ebp - 0x24]
add ebx, 4
add eax, 0x10000
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x24], eax
cmp eax, 0x40000
jl 0x134ca0
cmp dword [ebp - 4], 0
jne 0x134ee0
mov eax, dword [ebp - 0xc]
mov ebx, dword [ebp + 8]
add eax, 0x8007
push 0
push 0x200
push dword [ebp + 0xc]
lea edx, [esi + eax*8]
push ebx
mov dword [ebp - 0x24], edx
call fcn.00171c30
mov ecx, dword [ebp - 0x24]
shld edx, eax, 9
shl eax, 9
mov dword [ecx + 4], edx
mov edx, 0x10000
mov dword [ecx], eax
add eax, edx
mov dword [ebp - 0x34], eax
mov eax, dword [ecx + 4]
adc eax, 0
cmp eax, dword [esi + 0xc]
jl 0x134db1
jg 0x134dac
mov eax, dword [ebp - 0x34]
cmp eax, dword [esi + 8]
jbe 0x134db1
mov edx, dword [esi + 8]
sub edx, dword [ecx]
mov eax, dword [ebp - 0xc]
shl eax, 0x10
mov dword [ebp - 0x2c], eax
add eax, 0x34
push edx
add eax, esi
push eax
push dword [ecx + 4]
mov eax, dword [esi + 0x40078]
push dword [ecx]
push esi
call eax
mov edx, dword [ebp - 0x24]
add esp, 0x14
mov dword [ebp - 4], eax
test eax, eax
jle 0x134eba
mov ecx, dword [ebp - 0xc]
mov dword [esi + ecx*4 + 0x40068], eax
mov dword [esi + ecx*4 + 0x40058], 0x3e8
sub ebx, dword [edx]
mov ecx, dword [ebp + 0xc]
sbb ecx, dword [edx + 4]
cdq
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], edx
cmp ecx, edx
jl 0x134e71
jg 0x134e0e
cmp ebx, eax
jbe 0x134e71
push dword [ebp - 0x18]
xor edi, edi
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebx]
mov edx, dword [ebp - 0x20]
dec eax
mov dword [ebx], eax
cmp dword [edx + esi + 0x40068], 0
jbe 0x134d2a
cmp eax, dword [edx + esi + 0x40058]
mov eax, dword [ebp - 8]
jge 0x134d2d
mov edx, dword [ebp - 0x28]
add edx, ebx
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x20], edx
jmp 0x134d2d
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 8]
add edx, ebx
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x20], edx
jmp 0x134d2d
xor eax, eax
mov edx, edi
add edx, ebx
adc eax, ecx
cmp eax, dword [ebp - 0x34]
jl 0x134e8a
jg 0x134e85
cmp edx, dword [ebp - 0x30]
jbe 0x134e8a
mov edi, dword [ebp - 4]
sub edi, ebx
test edi, edi
je 0x134ea5
mov eax, dword [ebp - 0x2c]
add eax, 0x34
add eax, ebx
push edi
add eax, esi
push eax
push dword [ebp - 0x14]
call fcn.00153810
add esp, 0xc
push dword [ebp - 0x18]
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xc]
mov dword [esi + eax*4 + 0x40068], 0
mov dword [esi + eax*4 + 0x40058], 0
mov dword [edx], 0
mov dword [edx + 4], 0
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret