Function at 0xf1620
Capabilities:
Get file size
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xfc
mov eax, dword [0x1a700c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea eax, [ebp - 0x58]
mov edi, ecx
push eax
mov bl, dl
push edi
mov byte [ebp - 0x59], bl
call fcn.0016144f
add esp, 8
test eax, eax
jns 0xf1795
test bl, bl
je 0xf1719
cmp dword [0x1aa220], 0
je 0xf167c
push edi
push str.raw_open:_ignoring_stat_result_on_Windows_device__S_n
push 2
call fcn.00158e14
add esp, 4
push eax
call fcn.000f0dc0
add esp, 0xc
push 0
push 0
push 3
push 0
push 3
push 1
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0xf1850
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.000ee7f0
mov eax, dword [0x1aa224]
push eax
mov dword [ebp - 0x60], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0xf16e5
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 dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [esi], 0x2000004
cmp ebx, 5
jne 0xf1814
push edi
push str.raw_open:_file___S____access_denied
call fcn.000ee5f0
add esp, 8
lea eax, [ebx - 7]
or edx, 0xffffffff
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 ebx, dword [0x1aa224]
push ebx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0xf1758
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 ebx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [esi], 0x2000005
call fcn.00158d34
push dword [eax]
call fcn.0015d09d
add esp, 4
push eax
push edi
push str.raw_open:_image___S_____s
call fcn.000ee5f0
add esp, 0xc
mov eax, 0xfffffffe
or edx, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00150cb2
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x52]
and eax, 0xf000
cmp eax, 0x4000
jne 0xf167c
call fcn.000ee7f0
mov ebx, dword [0x1aa224]
push ebx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0xf17e7
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 ebx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push edi
push str.raw_open:_image___S____is_a_directory
mov dword [esi], 0x200000a
call fcn.000ee5f0
add esp, 8
mov eax, 0xfffffffd
or edx, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00150cb2
mov esp, ebp
pop ebp
ret
cmp ebx, 0x20
jne 0xf182c
push edi
push str.raw_open:_file___S____sharing_violation
call fcn.000ee5f0
add esp, 8
jmp 0xf177c
cmp ebx, 2
jne 0xf1844
push edi
push str.raw_open:_file___S____file_not_found
call fcn.000ee5f0
add esp, 8
jmp 0xf177c
push ebx
push edi
push str.raw_open:_file___S_____error__d_
jmp 0xf1774
cmp byte [ebp - 0x59], 0
jne 0xf18a2
lea eax, [ebp - 0x64]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0xf1896
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.000ee7f0
mov ecx, 0x2000004
call fcn.000ee550
push esi
push edi
push str.raw_open:_file___S____GetFileSize:__d
call fcn.000ee5f0
or esi, 0xffffffff
add esp, 0xc
or edi, esi
jmp 0xf1943
mov edi, dword [ebp - 0x64]
xor esi, esi
or esi, eax
jmp 0xf1943
mov esi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
lea eax, [ebp - 0x60]
push 0
push eax
push 0x90
lea eax, [ebp - 0xf8]
push eax
push 0
push 0
push 0x70048
push ebx
call esi
test eax, eax
jne 0xf1937
push eax
lea eax, [ebp - 0x60]
push eax
push 0x18
lea eax, [ebp - 0x20]
push eax
push 0
push 0
push 0x70000
push ebx
call esi
test eax, eax
jne 0xf1912
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.000ee7f0
mov ecx, 0x2000004
call fcn.000ee550
push esi
push edi
push str.raw_open:_file___S____DeviceIoControl:__d
call fcn.000ee5f0
or esi, 0xffffffff
add esp, 0xc
or edi, esi
jmp 0xf1943
mov eax, dword [ebp - 0xc]
mul dword [ebp - 0x10]
push 0
push dword [ebp - 0x14]
push edx
push eax
call fcn.00171bf0
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push edx
push eax
call fcn.00171bf0
mov esi, eax
mov edi, edx
jmp 0xf1943
mov esi, dword [ebp - 0xe8]
mov edi, dword [ebp - 0xe4]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov edx, edi
pop edi
mov eax, esi
xor ecx, ebp
pop esi
pop ebx
call fcn.00150cb2
mov esp, ebp
pop ebp
ret