Function at 0x40a8e0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41be6d
mov eax, dword fs:[0]
push eax
mov eax, 0x1e4c
call fcn.0041b840
mov eax, dword [0x425024]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1e3c], edx
push 0x41d7ac
lea ecx, [ebp - 0x1e2c]
call fcn.00402e20
lea ecx, [ebp - 0x1e30]
mov dword [ebp - 4], 0
call fcn.0040a270
mov byte [ebp - 4], 1
or edi, 0xffffffff
mov edx, dword [eax]
mov esi, dword [ebp - 0x1e2c]
add esi, 0xfffffff0
lea ecx, [edx - 0x10]
cmp ecx, esi
je 0x40a9a0
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x40a991
mov eax, dword [ecx]
cmp eax, dword [esi]
jne 0x40a991
call fcn.004031a0
mov dword [ebp - 0x1e28], eax
mov ecx, edi
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x40a986
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x1e28]
add eax, 0x10
mov dword [ebp - 0x1e2c], eax
jmp 0x40a9a0
push dword [edx - 0xc]
lea ecx, [ebp - 0x1e2c]
push edx
call fcn.00403200
mov byte [ebp - 4], 0
mov eax, edi
mov edx, dword [ebp - 0x1e30]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40a9c1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x1e2c]
cmp dword [eax - 0xc], 0
jne 0x40a9d4
xor esi, esi
jmp 0x40af30
push 0x400
lea eax, [ebp - 0x1620]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x1620]
push eax
push 0x4200c8
push ecx
call fcn.00409af0
add esp, 0xc
lea eax, [ebp - 0x1220]
push 0x400
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x1220]
push eax
push 0x4200d8
push ecx
call fcn.00409af0
add esp, 0xc
lea eax, [ebp - 0xa20]
push 0x400
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0xa20]
push eax
push 0x4200e8
push ecx
call fcn.00409af0
add esp, 0xc
lea eax, [ebp - 0x418]
push 0x200
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 0x4288d8
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jle 0x40aaae
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push 0x4288d8
push 0
push 0
call esi
push 0
push 0
push eax
lea eax, [ebp - 0x418]
push eax
push 0xffffffffffffffff
push 0x4288d8
push 0
push 0
call esi
cmp byte [ebp - 0x418], 0
mov dword [ebp - 0x1e44], 0xf
mov dword [ebp - 0x1e48], 0
mov byte [ebp - 0x1e58], 0
jne 0x40aad6
xor ecx, ecx
jmp 0x40aae9
lea ecx, [ebp - 0x418]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40aae0
sub ecx, edx
push ecx
lea eax, [ebp - 0x418]
push eax
lea ecx, [ebp - 0x1e58]
call fcn.00402f80
push 0xac
mov byte [ebp - 4], 2
call fcn.0041a791
add esp, 4
mov dword [ebp - 0x1e30], eax
mov ecx, eax
call fcn.00407c10
mov ebx, eax
lea eax, [ebp - 0x1e58]
mov dword [ebp - 0x1e30], ebx
lea ecx, [ebx + 4]
cmp ecx, eax
je 0x40ab39
push 0xffffffffffffffff
push 0
push eax
call fcn.00403080
mov ecx, ebx
call fcn.00407e40
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x1e44]
cmp eax, 0x10
jb 0x40ab5c
inc eax
push eax
push dword [ebp - 0x1e58]
call fcn.004032b0
push 0x400
lea eax, [ebp - 0x1a20]
mov dword [ebp - 0x1e44], 0xf
push 0
push eax
mov dword [ebp - 0x1e48], 0
mov byte [ebp - 0x1e58], 0
call sub.VCRUNTIME140.dll_memset
lea esi, [ebx + 0x34]
add esp, 0xc
cmp dword [esi + 0x14], 0x10
jb 0x40ab98
mov esi, dword [esi]
mov ebx, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test esi, esi
je 0x40abc0
push 0
push 0
push 0xffffffffffffffff
push esi
push 0
push 0
call ebx
push eax
lea eax, [ebp - 0x1a20]
push eax
push 0xffffffffffffffff
push esi
push 0
push 0
call ebx
push 0x400
lea eax, [ebp - 0xe20]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov esi, dword [ebp - 0x1e30]
add esp, 0xc
add esi, 0x64
cmp dword [esi + 0x14], 0x10
jb 0x40abe7
mov esi, dword [esi]
test esi, esi
je 0x40ac09
push 0
push 0
push 0xffffffffffffffff
push esi
push 0
push 0
call ebx
push eax
lea eax, [ebp - 0xe20]
push eax
push 0xffffffffffffffff
push esi
push 0
push 0
call ebx
push 0x400
lea eax, [ebp - 0x1e20]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x1e20]
push eax
push str.2.._uu
push ecx
call fcn.00409af0
add esp, 0xc
lea eax, [ebp - 0xe20]
lea ecx, [ebp - 0x1e24]
push eax
call fcn.00402e20
mov byte [ebp - 4], 3
xor edx, edx
mov eax, dword [ebp - 0x1e24]
xor ecx, ecx
xor esi, esi
mov dword [ebp - 0x1e28], edx
mov ebx, dword [eax - 0xc]
test ebx, ebx
jle 0x40aca6
test ecx, ecx
js 0x40aca6
cmp ecx, dword [eax - 0xc]
jge 0x40aca6
lea eax, [eax + ecx*2]
push 0x2f
push eax
call dword [sym.imp.VCRUNTIME140.dll_wcschr]
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x40aca0
mov eax, dword [ebp - 0x1e24]
sub ecx, eax
sar ecx, 1
cmp ecx, 0xffffffff
je 0x40aca0
mov edx, ecx
inc esi
inc ecx
mov dword [ebp - 0x1e28], edx
cmp esi, ebx
jl 0x40ac63
jmp 0x40aca6
mov edx, dword [ebp - 0x1e28]
push edx
lea eax, [ebp - 0x1e28]
push eax
lea ecx, [ebp - 0x1e24]
call fcn.0040e0d0
mov byte [ebp - 4], 4
mov edx, dword [eax]
mov esi, dword [ebp - 0x1e24]
add esi, 0xfffffff0
lea ecx, [edx - 0x10]
cmp ecx, esi
je 0x40ad1c
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x40ad0d
mov eax, dword [ecx]
cmp eax, dword [esi]
jne 0x40ad0d
call fcn.004031a0
mov dword [ebp - 0x1e30], eax
mov ecx, edi
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x40ad02
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x1e30]
add eax, 0x10
mov dword [ebp - 0x1e24], eax
jmp 0x40ad1c
push dword [edx - 0xc]
lea ecx, [ebp - 0x1e24]
push edx
call fcn.00403200
mov byte [ebp - 4], 3
mov eax, edi
mov edx, dword [ebp - 0x1e28]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40ad3d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x41d7ac
lea ecx, [ebp - 0x1e38]
call fcn.00402e20
lea eax, [ebp - 0xa20]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0x1220]
push eax
push dword [ebp - 0x1e2c]
lea eax, [ebp - 0x1620]
push eax
push dword [ebp - 0x1e24]
lea eax, [ebp - 0x1a20]
push eax
lea eax, [ebp - 0x1e20]
push eax
lea eax, [ebp - 0x1e38]
push str._s_s_s__s__s__s__s
push eax
call fcn.00403880
add esp, 0x24
lea eax, [ebp - 0x218]
push 0x208
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x218]
call fcn.0040a710
push 0x41d7ac
lea ecx, [ebp - 0x1e34]
call fcn.00402e20
mov byte [ebp - 4], 6
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
mov ecx, 0xf4240
div ecx
lea eax, [ebp - 0x1e34]
push edx
push str._06d
push eax
call fcn.00403880
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x218]
add esp, 0xc
push dword [ebp - 0x1e34]
push eax
call esi
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp - 0x218]
push eax
call ebx
test eax, eax
jne 0x40ae24
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
lea eax, [ebp - 0xa20]
push eax
lea eax, [ebp - 0x218]
push eax
call esi
lea eax, [ebp - 0x218]
push eax
call ebx
cmp eax, 1
jne 0x40ae4f
lea eax, [ebp - 0x218]
push eax
call dword [0x428f64]
lea edx, [ebp - 0x218]
call fcn.0040cd50
cmp eax, 1
jne 0x40ae81
lea eax, [ebp - 0x218]
push eax
push 0x104
push dword [ebp - 0x1e3c]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
mov esi, 1
jmp 0x40aecd
push 0x208
lea eax, [ebp - 0x620]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x620]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
lea eax, [ebp - 0x620]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea ecx, [ebp - 0x620]
call fcn.0040c210
xor esi, esi
mov byte [ebp - 4], 5
mov eax, edi
mov edx, dword [ebp - 0x1e34]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40aeee
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 3
mov eax, edi
mov edx, dword [ebp - 0x1e38]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40af0f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, edi
mov edx, dword [ebp - 0x1e24]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40af30
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1e2c]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], edi
dec edi
test edi, edi
jg 0x40af52
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041a772
mov esp, ebp
pop ebp
ret