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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
mov eax, dword [0x1a700c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, ecx
call fcn.000ee7f0
cmp dword [esi + 0x98], 1
jne 0x138326
movzx edi, byte [esi + 0x41e8]
movzx eax, byte [esi + 0x41e7]
jmp 0x138334
movzx edi, byte [esi + 0x41e7]
movzx eax, byte [esi + 0x41e8]
shl edi, 8
add edi, eax
mov eax, 0x200
mov word [esi + 0x4190], di
cmp di, ax
jne 0x138351
mov eax, 9
jmp 0x138386
mov eax, 0x400
cmp di, ax
jne 0x138362
mov eax, 0xa
jmp 0x138386
mov eax, 0x800
cmp di, ax
jne 0x138373
mov eax, 0xb
jmp 0x138386
mov eax, 0x1000
cmp di, ax
jne 0x138f60
mov eax, 0xc
mov word [esi + 0x4192], ax
mov al, byte [esi + 0x41e9]
mov byte [esi + 0x4194], al
cmp al, 1
je 0x138412
cmp al, 2
je 0x138412
cmp al, 4
je 0x138412
cmp al, 8
je 0x138412
cmp al, 0x10
je 0x138412
cmp al, 0x20
je 0x138412
cmp al, 0x40
je 0x138412
cmp al, 0x80
je 0x138412
cmp dword [0x1aa220], 0
je 0x1383e3
movzx eax, al
push eax
push str.fatxxfs_open
push str._s:_Invalid_cluster_size___d__n
push 2
call fcn.00158e14
add esp, 4
push eax
call fcn.000a3930
add esp, 0x10
call fcn.000ee7f0
mov ecx, 0x800000a
call fcn.000ee550
push str.Not_a_FATXX_file_system__cluster_size_
call fcn.000ee5f0
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00150cb2
mov esp, ebp
pop ebp
ret
mov al, byte [esi + 0x41ec]
mov byte [esi + 0x4195], al
test al, al
je 0x138ed1
cmp al, 8
ja 0x138ed1
cmp dword [esi + 0x98], 1
jne 0x138447
movzx ecx, byte [esi + 0x41ee]
movzx eax, byte [esi + 0x41ed]
jmp 0x138455
movzx ecx, byte [esi + 0x41ed]
movzx eax, byte [esi + 0x41ee]
shl ecx, 8
add ecx, eax
mov word [esi + 0x419c], cx
cmp dword [esi + 0x98], 1
mov dword [ebp - 0x40c], ecx
jne 0x138480
movzx ecx, byte [esi + 0x41f0]
movzx eax, byte [esi + 0x41ef]
jmp 0x13848e
movzx ecx, byte [esi + 0x41ef]
movzx eax, byte [esi + 0x41f0]
shl ecx, 8
add ecx, eax
movzx eax, cx
mov ecx, dword [esi + 0x98]
cdq
mov ebx, eax
mov eax, edx
mov dword [ebp - 0x410], eax
test ebx, ebx
jne 0x138511
test eax, eax
jne 0x138511
cmp ecx, 1
jne 0x1384dc
movzx ebx, byte [esi + 0x41ff]
movzx eax, byte [esi + 0x41fe]
shl ebx, 8
add ebx, eax
movzx eax, byte [esi + 0x41fd]
shl ebx, 8
add ebx, eax
movzx eax, byte [esi + 0x41fc]
jmp 0x138502
movzx ebx, byte [esi + 0x41fc]
movzx eax, byte [esi + 0x41fd]
shl ebx, 8
add ebx, eax
movzx eax, byte [esi + 0x41fe]
shl ebx, 8
add ebx, eax
movzx eax, byte [esi + 0x41ff]
shl ebx, 8
add ebx, eax
mov dword [ebp - 0x410], 0
cmp ecx, 1
jne 0x138526
movzx ecx, byte [esi + 0x41f3]
movzx eax, byte [esi + 0x41f2]
jmp 0x138534
movzx ecx, byte [esi + 0x41f2]
movzx eax, byte [esi + 0x41f3]
shl ecx, 8
add ecx, eax
movzx eax, cx
mov dword [esi + 0x4198], eax
test eax, eax
jne 0x1385a8
cmp dword [esi + 0x98], 1
jne 0x138577
movzx ecx, byte [esi + 0x4203]
movzx eax, byte [esi + 0x4202]
shl ecx, 8
add ecx, eax
movzx eax, byte [esi + 0x4201]
shl ecx, 8
add ecx, eax
movzx eax, byte [esi + 0x4200]
jmp 0x13859d
movzx ecx, byte [esi + 0x4200]
movzx eax, byte [esi + 0x4201]
shl ecx, 8
add ecx, eax
movzx eax, byte [esi + 0x4202]
shl ecx, 8
add ecx, eax
movzx eax, byte [esi + 0x4203]
shl ecx, 8
add ecx, eax
mov dword [esi + 0x4198], ecx
cmp dword [esi + 0x4198], 0
jne 0x138608
cmp dword [0x1aa220], 0
je 0x1385d9
push 0
push str.fatxxfs_open
push str._s:_Invalid_number_of_sectors_per_FAT___d__n
push 2
call fcn.00158e14
add esp, 4
push eax
call fcn.000a3930
add esp, 0x10
call fcn.000ee7f0
mov ecx, 0x800000a
call fcn.000ee550
push str.Not_a_FATXX_file_system__invalid_sectors_per_FAT_
call fcn.000ee5f0
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00150cb2
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x98], 1
jne 0x138621
movzx ecx, byte [esi + 0x41eb]
movzx eax, byte [esi + 0x41ea]
jmp 0x13862f
movzx ecx, byte [esi + 0x41ea]
movzx eax, byte [esi + 0x41eb]
shl ecx, 8
add ecx, eax
movzx eax, cx
cdq
mov dword [esi + 0x4158], eax
mov ecx, eax
or eax, edx
mov dword [esi + 0x415c], edx
je 0x138e60
cmp edx, dword [ebp - 0x410]
ja 0x138e60
jb 0x138664
cmp ecx, ebx
ja 0x138e60
movzx ecx, byte [esi + 0x4195]
xor eax, eax
imul ecx, dword [esi + 0x4198]
add ecx, dword [esi + 0x4158]
mov dword [esi + 0x4160], ecx
adc eax, edx
movzx ecx, di
mov dword [esi + 0x4164], eax
mov edi, ebx
mov eax, dword [ebp - 0x40c]
movzx eax, ax
shl eax, 5
dec eax
mov dword [ebp - 0x414], ecx
add eax, ecx
cdq
idiv ecx
mov ecx, dword [ebp - 0x410]
cdq
add eax, dword [esi + 0x4160]
mov dword [esi + 0x4168], eax
adc edx, dword [esi + 0x4164]
sub edi, eax
movzx eax, byte [esi + 0x4194]
sbb ecx, edx
mov dword [esi + 0x416c], edx
cdq
push edx
push eax
push ecx
push edi
call fcn.00171f70
mov edi, eax
mov dword [esi + 0x4170], eax
mov ecx, edi
mov dword [esi + 0x4174], edx
add ecx, 1
mov eax, edx
mov dword [esi + 0x4178], ecx
mov ecx, dword [esi + 0x68]
adc eax, 0
mov dword [esi + 0x417c], eax
cmp ecx, 0xe
jne 0x13878e
test edx, edx
ja 0x138737
jb 0x138717
cmp edi, 0xff5
jae 0x138720
mov dword [esi + 0x68], 2
jmp 0x13873e
test edx, edx
ja 0x138737
jb 0x13872e
cmp edi, 0xfff5
jae 0x138737
mov dword [esi + 0x68], 4
jmp 0x13873e
mov dword [esi + 0x68], 8
mov ecx, dword [esi + 0x68]
mov eax, dword [ebp - 0x40c]
cmp ecx, 8
jne 0x1387fd
test ax, ax
je 0x1387f8
call fcn.000ee7f0
mov ecx, 0x800000a
call fcn.000ee550
push str.Invalid_TSK_FS_TYPE_FAT32_image__numroot___0_
call fcn.000ee5f0
add esp, 4
cmp dword [0x1aa220], 0
je 0x138fb5
push str.fatxxfs_open
push str._s:_numroom___0_for_FAT32_n
jmp 0x1387d2
cmp ecx, 2
jne 0x138741
test edx, edx
jne 0x13879f
cmp edi, 0xff5
jb 0x138741
call fcn.000ee7f0
mov ecx, 0x800000a
call fcn.000ee550
push str.Too_many_sectors_for_TSK_FS_TYPE_FAT12:_try_auto_detect_mode
call fcn.000ee5f0
add esp, 4
cmp dword [0x1aa220], 0
je 0x138fb5
push str.fatxxfs_open
push str._s:_Too_many_sectors_for_FAT12_n
push 2
call fcn.00158e14
add esp, 4
push eax
call fcn.000a3930
add esp, 0xc
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00150cb2
mov esp, ebp
pop ebp
ret
cmp ecx, 8
je 0x138837
test ax, ax
jne 0x138837
call fcn.000ee7f0
mov ecx, 0x800000a
call fcn.000ee550
push str.Invalid_FAT_image__numroot__0__and_not_TSK_FS_TYPE_FAT32_
call fcn.000ee5f0
add esp, 4
cmp dword [0x1aa220], 0
je 0x138fb5
push str.fatxxfs_open
push str._s:_numroom__0_and_not_FAT32_n
jmp 0x1387d2
cmp dword [esi + 0x43dc], 0
je 0x138a1e
cmp ecx, 8
je 0x138881
call fcn.000ee7f0
mov ecx, 0x800000a
call fcn.000ee550
push str.Invalid_FAT_image__Used_what_we_thought_was_a_backup_boot_sector__but_it_is_not_TSK_FS_TYPE_FAT32_
call fcn.000ee5f0
add esp, 4
cmp dword [0x1aa220], 0
je 0x138fb5
push str.fatxxfs_open
push str._s:_Had_to_use_backup_boot_sector__but_this_isnt_FAT32_n
jmp 0x1387d2
cmp ax, 1
jbe 0x138a1e
mov eax, dword [ebp - 0x414]
push 0x200
push dword [esi + 0x415c]
cdq
push dword [esi + 0x4158]
push edx
push eax
call fcn.00171bf0
push edx
push eax
lea edx, [ebp - 0x208]
mov ecx, esi
call fcn.00135350
add esp, 0xc
cmp eax, 0x200
je 0x138901
test eax, eax
js 0x1388d6
call fcn.000ee7f0
mov ecx, 0x8000004
call fcn.000ee550
push str.fatxxfs_open
push str._s:_FAT1
call fcn.000ee650
add esp, 8
mov dword [esi], 0
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00150cb2
mov esp, ebp
pop ebp
ret
movzx eax, word [esi + 0x4190]
xor ecx, ecx
mov edi, dword [esi + 0x4198]
add edi, dword [esi + 0x4158]
push 0x200
adc ecx, dword [esi + 0x415c]
cdq
push edx
push eax
push ecx
push edi
call fcn.00171bf0
push edx
push eax
lea edx, [ebp - 0x408]
mov ecx, esi
call fcn.00135350
add esp, 0xc
cmp eax, 0x200
je 0x138982
test eax, eax
js 0x138957
call fcn.000ee7f0
mov ecx, 0x8000004
call fcn.000ee550
push str.fatxxfs_open
push str._s:_FAT2
call fcn.000ee650
add esp, 8
mov dword [esi], 0
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00150cb2
mov esp, ebp
pop ebp
ret
xor edi, edi
xor ecx, ecx
nop word [eax + eax]
mov al, byte [ebp + ecx - 0x208]
cmp al, byte [ebp + ecx - 0x408]
je 0x1389a1
inc edi
mov al, byte [ebp + ecx - 0x207]
cmp al, byte [ebp + ecx - 0x407]
je 0x1389b2
inc edi
mov al, byte [ebp + ecx - 0x206]
cmp al, byte [ebp + ecx - 0x406]
je 0x1389c3
inc edi
mov al, byte [ebp + ecx - 0x205]
cmp al, byte [ebp + ecx - 0x405]
je 0x1389d4
inc edi
add ecx, 4
cmp ecx, 0x200
jl 0x138990
cmp edi, 0x19
jle 0x138a1e
call fcn.000ee7f0
mov ecx, 0x800000a
call fcn.000ee550
push edi
push str.Invalid_FAT_image__Too_many_differences_between_FATS_from_guessing___d_diffs__
call fcn.000ee5f0
add esp, 8
cmp dword [0x1aa220], 0
je 0x138fb5
push edi
push str.fatxxfs_open
push str._s:_Too_many_differences_in_FAT_from_guessing___d_diffs__n
jmp 0x138fa2
mov eax, dword [esi + 0x68]
cmp eax, 2
jne 0x138a32
mov dword [esi + 0x41a0], 0xfff
jmp 0x138a56
cmp eax, 4
jne 0x138a43
mov dword [esi + 0x41a0], 0xffff
jmp 0x138a56
cmp eax, 8
jne 0x138e3a
mov dword [esi + 0x41a0], 0xfffffff
mov dword [esi + 0x6c], str.Sector
cmp dword [esi + 0x68], 8
jne 0x138aee
cmp dword [esi + 0x98], 1
jne 0x138a98
movzx edx, byte [esi + 0x420b]
movzx eax, byte [esi + 0x420a]
shl edx, 8
add edx, eax
movzx eax, byte [esi + 0x4209]
shl edx, 8
add edx, eax
movzx eax, byte [esi + 0x4208]
jmp 0x138abe
movzx edx, byte [esi + 0x4208]
movzx eax, byte [esi + 0x4209]
shl edx, 8
add edx, eax
movzx eax, byte [esi + 0x420a]
shl edx, 8
add edx, eax
movzx eax, byte [esi + 0x420b]
mov ecx, dword [esi + 0x41a0]
shl edx, 8
add edx, eax
movzx eax, byte [esi + 0x4194]
and ecx, edx
sub ecx, 2
imul ecx, eax
xor eax, eax
add ecx, dword [esi + 0x4168]
mov dword [esi + 0x4180], ecx
adc eax, dword [esi + 0x416c]
jmp 0x138b00
mov eax, dword [esi + 0x4160]
mov dword [esi + 0x4180], eax
mov eax, dword [esi + 0x4164]
mov dword [esi + 0x4184], eax
lea ecx, [esi + 0x4130]
xor eax, eax
nop
mov dword [ecx], 0
lea ecx, [ecx + 8]
mov dword [ecx - 4], 0
mov byte [esi + eax + 0x4150], 0
inc eax
cmp eax, 4
jl 0x138b10
mov edi, dword [ebp - 0x410]
mov ecx, ebx
add ecx, 0xffffffff
mov dword [esi + 0x38], 0
mov dword [esi + 0x48], ecx
mov eax, edi
adc eax, 0xffffffff
mov dword [esi + 0x40], ecx
mov dword [esi + 0x4c], eax
mov dword [esi + 0x44], eax
mov dword [esi + 0x3c], 0
mov dword [esi + 0x30], ebx
mov dword [esi + 0x34], edi
movzx edx, word [esi + 0x4190]
mov dword [esi + 0x50], edx
mov eax, dword [esi + 4]
push 0
push edx
mov ecx, dword [eax + 8]
sub ecx, dword [esi + 8]
mov eax, dword [eax + 0xc]
sbb eax, dword [esi + 0xc]
push eax
push ecx
call fcn.00171c30
cmp edx, edi
ja 0x138b97
jb 0x138b8b
cmp eax, ebx
jae 0x138b97
add eax, 0xffffffff
mov dword [esi + 0x48], eax
adc edx, 0xffffffff
mov dword [esi + 0x4c], edx
movzx ecx, word [esi + 0x4190]
movzx eax, byte [esi + 0x4194]
shr ecx, 5
imul eax, ecx
mov dword [esi + 0x4188], ecx
push 0
mov dword [esi + 0x418c], eax
mov ecx, dword [esi + 0x48]
mov eax, dword [esi + 0x4c]
mov dword [esi + 0x18], 2
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 2
mov dword [esi + 0x24], 0
sub ecx, dword [esi + 0x4160]
push dword [esi + 0x4188]
sbb eax, dword [esi + 0x4164]
add ecx, 1
adc eax, 0
push eax
push ecx
call fcn.00171bf0
mov ecx, eax
mov edi, edx
movzx eax, byte [esi + 0x4195]
add eax, 2
cdq
add ecx, eax
adc edi, edx
add ecx, 2
mov dword [esi + 0x28], ecx
adc edi, 0
mov dword [esi + 0x2c], edi
movzx eax, byte [esi + 0x4195]
add eax, 2
cdq
sub ecx, eax
mov eax, edi
sbb eax, edx
add ecx, 1
mov dword [esi + 0x41a8], ecx
adc eax, 0
add ecx, 1
mov dword [esi + 0x41ac], eax
adc eax, 0
mov dword [esi + 0x41b0], ecx
cmp byte [esi + 0x4195], 2
mov dword [esi + 0x41b4], eax
jne 0x138c65
add ecx, 1
mov dword [esi + 0x41b8], ecx
adc eax, 0
jmp 0x138c73
mov eax, ecx
mov dword [esi + 0x41b8], eax
mov eax, dword [esi + 0x41b4]
mov dword [esi + 0x41bc], eax
mov eax, edi
mov ecx, dword [esi + 0x28]
sub ecx, dword [esi + 0x20]
mov dword [esi + 0x94], 0
sbb eax, dword [esi + 0x24]
add ecx, 1
mov dword [esi + 0x10], ecx
adc eax, 0
mov dword [esi + 0x14], eax
nop word [eax + eax]
cmp dword [esi + 0x68], 8
mov ecx, dword [esi + 0x94]
jne 0x138cb5
mov al, byte [ecx + esi + 0x421f]
jmp 0x138cbc
mov al, byte [ecx + esi + 0x4203]
mov byte [ecx + esi + 0x74], al
inc dword [esi + 0x94]
cmp dword [esi + 0x94], 4
jb 0x138ca0
mov edi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [esi + 0x118]
mov dword [esi + 0xd4], 0xfad30
mov dword [esi + 0xd8], 0xfb3b0
mov dword [esi + 0xdc], 0x1423d0
mov dword [esi + 0xec], 0x141f60
mov dword [esi + 0xe0], 0x141250
mov dword [esi + 0xe4], 0xf6600
mov dword [esi + 0xe8], 0x1413c0
mov dword [esi + 0xf0], 0x132e00
mov dword [esi + 0x104], 0x1332d0
mov dword [esi + 0x100], 0x137350
mov dword [esi + 0x108], 0xfb530
mov dword [esi + 0x10c], 0xfb5f0
mov dword [esi + 0xf8], 0xfb590
mov dword [esi + 0xfc], 0xfb590
mov dword [esi + 0xf4], 0xfb4d0
push eax
mov dword [esi + 0x43e4], 0x138fd0
mov dword [esi + 0x43e8], 0x146c80
mov dword [esi + 0x43fc], 0x147610
mov dword [esi + 0x43ec], 0x1481e0
mov dword [esi + 0x43f0], 0x148530
mov dword [esi + 0x43f4], 0x1483b0
mov dword [esi + 0x43f8], 0x148620
call edi
lea eax, [esi + 0x41c0]
push eax
call edi
mov dword [esi + 0x41d8], 0
mov ecx, esi
mov dword [esi + 0x43e0], 0
push dword [esi + 0x1c]
push dword [esi + 0x18]
call fcn.000ef9e0
mov edi, eax
add esp, 8
cmp dword [edi + 0xc], 4
ja 0x138e20
mov dword [esi + 0x43e0], 1
mov ecx, esi
push dword [esi + 0x1c]
push dword [esi + 0x18]
call fcn.000ef9e0
add esp, 8
mov ecx, dword [eax + 0xc]
cmp dword [edi + 0xc], ecx
sbb ecx, ecx
neg ecx
mov dword [esi + 0x43e0], ecx
mov ecx, eax
call fcn.000efa90
mov ecx, edi
call fcn.000efa90
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00150cb2
mov esp, ebp
pop ebp
ret
call fcn.000ee7f0
mov ecx, 0x8000006
call fcn.000ee550
push dword [esi + 0x68]
push str.fatxxfs_open
push str.Unknown_FAT_type_in__s:__d_n
call fcn.000ee5f0
jmp 0x1387e2
call fcn.000ee7f0
mov ecx, 0x8000003
call fcn.000ee550
push dword [esi + 0x415c]
push dword [esi + 0x4158]
push str.Not_a_FATXX_file_system__invalid_first_FAT_sector__llu_
call fcn.000ee5f0
add esp, 0xc
cmp dword [0x1aa220], 0
je 0x138fb5
push dword [esi + 0x415c]
push dword [esi + 0x4158]
push str.fatxxfs_open
push str._s:_Invalid_first_FAT___llu__n
push 2
call fcn.00158e14
add esp, 4
push eax
call fcn.000a3930
add esp, 0x14
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00150cb2
mov esp, ebp
pop ebp
ret
cmp dword [0x1aa220], 0
je 0x138efb
movzx eax, al
push eax
push str.fatxxfs_open
push str._s:_Invalid_number_of_FATS___d__n
push 2
call fcn.00158e14
add esp, 4
push eax
call fcn.000a3930
add esp, 0x10
call fcn.000ee7f0
mov edi, dword [0x1aa224]
push edi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x138f3a
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.Not_a_FATXX_file_system__number_of_FATs_
mov dword [esi], 0x800000a
call fcn.000ee5f0
add esp, 4
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00150cb2
mov esp, ebp
pop ebp
ret
call fcn.000ee7f0
mov ecx, 0x800000a
call fcn.000ee550
push dword [esi + 0x54]
movzx eax, word [esi + 0x4190]
push eax
push str.Error:_sector_size___d__is_not_a_multiple_of_device_size___d__nDo_you_have_a_disk_image_instead_of_a_partition_image_
call fcn.000ee5f0
add esp, 0xc
cmp dword [0x1aa220], 0
je 0x138fb5
movzx eax, word [esi + 0x4190]
push eax
push str.fatxxfs_open
push str._s:_Invalid_sector_size___d__n
push 2
call fcn.00158e14
add esp, 4
push eax
call fcn.000a3930
add esp, 0x10
mov ecx, dword [ebp - 4]
mov al, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00150cb2
mov esp, ebp
pop ebp
ret