Function at 0x7021dbb0
Capabilities:
Check if file exists
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x70313d98
mov eax, dword fs:[0]
push eax
sub esp, 0x2d8
mov eax, dword [0x7034b250]
xor eax, esp
mov dword [esp + 0x2d0], eax
push ebx
push esi
push edi
mov eax, dword [0x7034b250]
xor eax, esp
push eax
lea eax, [esp + 0x2e8]
mov dword fs:[0], eax
mov edi, ecx
call fcn.70201910
cmp dword [eax], 1
jne 0x7021e0c2
xor esi, esi
cmp edi, esi
je 0x7021e0c2
mov eax, dword [0x70354c08]
mov ebx, eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], esi
cmp eax, 0xffffffff
je 0x7021dc36
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x18], eax
cmp eax, esi
jne 0x7021dc36
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [esp + 0x2f0], esi
cmp dword [esp + 0x18], 1
je 0x7021e0af
call fcn.7021ce40
test eax, eax
je 0x7021e0af
lea eax, [esp + 0x6c]
xor ebx, ebx
call fcn.7021dac0
mov byte [esp + 0x2f0], 1
mov dword [esp + 0x6c], esi
mov dword [esp + 0x70], esi
call fcn.70201910
call fcn.7021e6c0
cmp eax, esi
je 0x7021dc87
mov dword [esp + 0x70], eax
jmp 0x7021dd1e
mov eax, 7
xor ecx, ecx
mov dword [esp + 0x68], eax
mov dword [esp + 0x64], esi
mov word [esp + 0x54], cx
xor edx, edx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x48], esi
mov word [esp + 0x38], dx
mov byte [esp + 0x2f0], 3
call fcn.70201910
call fcn.70215c20
test eax, eax
jne 0x7021dcfa
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x38]
call fcn.7021e400
cmp eax, esi
je 0x7021dcfa
push 0xffffffffffffffff
push esi
lea eax, [esp + 0x58]
lea ecx, [esp + 0x7c]
mov ebx, 1
call fcn.7020f220
push 0xffffffffffffffff
push esi
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x98]
call fcn.7020f220
lea esi, [esp + 0x34]
call fcn.7021ae80
lea esi, [esp + 0x50]
mov byte [esp + 0x2f0], 1
call fcn.7021ae80
test ebx, ebx
je 0x7021e0a0
xor esi, esi
mov eax, dword [edi + 0x10]
cmp eax, esi
je 0x7021dde8
push 5
push 0x70328408
push eax
call fcn.702e5fbe
add esp, 0xc
test eax, eax
jne 0x7021dde8
mov eax, dword [edi + 0x10]
lea ecx, [esp + 0x34]
call fcn.7021b650
lea ecx, [esp + 0x1c]
mov bl, 4
mov byte [esp + 0x2f0], bl
push ecx
lea eax, [esp + 0x38]
mov dword [esp + 0x20], 0x2f
call fcn.7021f790
cmp eax, 0xffffffff
je 0x7021ddd0
lea edx, [esp + 0x34]
push edx
mov ecx, eax
lea esi, [esp + 0x54]
call fcn.7021f650
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0x3c]
mov byte [esp + 0x2f8], 5
call fcn.7020f220
mov byte [esp + 0x2f0], bl
call fcn.7021ae80
cmp dword [esp + 0x4c], 8
mov eax, dword [esp + 0x38]
jae 0x7021ddb1
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x7021ddd0
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x3c]
lea ecx, [esp + 0xb4]
call fcn.7020f220
lea esi, [esp + 0x34]
mov byte [esp + 0x2f0], 1
call fcn.7021ae80
xor esi, esi
jmp 0x7021df90
mov eax, dword [edi + 0x10]
cmp eax, esi
je 0x7021de11
push 0x703272c0
push eax
call fcn.702e3fa7
add esp, 8
test eax, eax
je 0x7021de11
lea eax, [esp + 0xac]
push eax
mov eax, dword [edi + 0x10]
jmp 0x7021df8b
mov eax, dword [edi + 0x10]
cmp eax, esi
je 0x7021df42
cmp word [eax], si
je 0x7021df42
xor ecx, ecx
mov dword [esp + 0x4c], 7
mov dword [esp + 0x48], esi
mov word [esp + 0x38], cx
mov byte [esp + 0x2f0], 6
mov eax, dword [edi + 0x18]
cmp eax, esi
je 0x7021dea9
cmp word [eax], si
je 0x7021dea9
lea edx, [esp + 0x34]
push edx
call fcn.7020f580
lea eax, [esp + 0x34]
push eax
mov eax, 0x703272c0
call fcn.70219390
mov eax, dword [edi + 0x10]
lea ecx, [esp + 0x34]
push ecx
call fcn.70219390
push 0xffffffffffffffff
push esi
lea eax, [esp + 0x3c]
lea ecx, [esp + 0xb4]
call fcn.7020f220
cmp dword [esp + 0x48], esi
je 0x7021dea9
cmp dword [esp + 0x4c], 8
mov eax, dword [esp + 0x38]
jae 0x7021de9a
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x7021df2d
push 0x208
lea eax, [esp + 0xd2]
xor edx, edx
push esi
push eax
mov word [esp + 0xd8], dx
call fcn.702e95e0
mov edx, dword [edi + 0x10]
mov ecx, dword [edi + 0x18]
add esp, 0xc
push 0x104
push edx
lea eax, [esp + 0xd4]
push eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], esi
call fcn.702e3f5d
add esp, 0xc
push 0x13
push esi
mov esi, dword [sym.imp.SHELL32.dll_PathResolve]
lea ecx, [esp + 0xd4]
push ecx
call esi
test eax, eax
jne 0x7021df19
push 0x17
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0xd4]
push ecx
call esi
test eax, eax
je 0x7021df2d
lea edx, [esp + 0xac]
push edx
lea eax, [esp + 0xd0]
call fcn.7020f580
lea esi, [esp + 0x34]
mov byte [esp + 0x2f0], 1
call fcn.7021ae80
xor esi, esi
jmp 0x7021df90
mov edi, dword [edi + 0x24]
cmp edi, esi
je 0x7021df90
push 0x208
lea ecx, [esp + 0xd2]
xor eax, eax
push esi
push ecx
mov word [esp + 0xd8], ax
call fcn.702e95e0
add esp, 0xc
lea edx, [esp + 0xcc]
push edx
push edi
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
test eax, eax
je 0x7021df90
lea eax, [esp + 0xac]
push eax
lea eax, [esp + 0xd0]
call fcn.7020f580
cmp dword [esp + 0xc0], esi
je 0x7021e0a0
lea ecx, [esp + 0xac]
push ecx
lea edx, [esp + 0x38]
push edx
call fcn.7021ee50
mov byte [esp + 0x2f0], 7
cmp dword [esp + 0x48], esi
je 0x7021e097
cmp dword [esp + 0x4c], 8
mov eax, dword [esp + 0x38]
jae 0x7021dfd0
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x7021e097
push 0xffffffffffffffff
push esi
lea eax, [esp + 0x3c]
lea ecx, [esp + 0xb4]
call fcn.7020f220
lea ebx, [esp + 0x1c]
lea edi, [esp + 0xac]
call fcn.7021f5c0
mov ecx, dword [eax]
mov esi, dword [eax + 4]
lea ebx, [esp + 0x2c]
mov dword [esp + 0x24], ecx
call fcn.7021f570
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x24], edx
cmp eax, esi
je 0x7021e036
cmp word [eax], 0x2f
jne 0x7021e02f
mov ecx, 0x5c
mov word [eax], cx
add eax, 2
cmp eax, esi
jne 0x7021e021
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x6c], eax
call fcn.70201910
mov edx, dword [esp + 0x6c]
mov dword [eax + 4], edx
call fcn.70201910
add eax, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.70201910
mov esi, eax
mov edi, dword [esi + 0x38]
mov ecx, dword [edi + 4]
add esi, 0x24
lea eax, [esp + 0x6c]
push eax
push ecx
push edi
call fcn.7021f910
mov ecx, esi
mov ebx, eax
call fcn.7021f9b0
mov dword [edi + 4], ebx
mov edx, dword [ebx + 4]
mov dword [edx], ebx
call fcn.70201910
add eax, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea esi, [esp + 0x34]
call fcn.7021ae80
lea esi, [esp + 0x6c]
call fcn.7021daf0
mov ebx, dword [esp + 0x14]
xor esi, esi
cmp dword [esp + 0x18], esi
jne 0x7021e0c2
cmp ebx, 0xffffffff
je 0x7021e0c2
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [esp + 0x2e8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2d0]
xor ecx, esp
call fcn.702e1c2f
mov esp, ebp
pop ebp
ret