Function at 0x40af70
Capabilities:
Check if file exists
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41bf50
mov eax, dword fs:[0]
push eax
mov eax, 0x2de4
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
push 0x41d7ac
lea ecx, [ebp - 0x2cf4]
call fcn.00402e20
lea ecx, [ebp - 0x2cf8]
mov dword [ebp - 4], 0
call fcn.0040a270
mov byte [ebp - 4], 1
or edi, 0xffffffff
mov edx, dword [eax]
mov esi, dword [ebp - 0x2cf4]
add esi, 0xfffffff0
lea ecx, [edx - 0x10]
cmp ecx, esi
je 0x40b02a
cmp dword [esi + 0xc], 0
lea ebx, [esi + 0xc]
jl 0x40b01b
mov eax, dword [ecx]
cmp eax, dword [esi]
jne 0x40b01b
call fcn.004031a0
mov dword [ebp - 0x2cfc], eax
mov ecx, edi
lock xadd dword [ebx], ecx
dec ecx
test ecx, ecx
jg 0x40b010
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x2cfc]
add eax, 0x10
mov dword [ebp - 0x2cf4], eax
jmp 0x40b02a
push dword [edx - 0xc]
lea ecx, [ebp - 0x2cf4]
push edx
call fcn.00403200
mov byte [ebp - 4], 0
mov eax, edi
mov edx, dword [ebp - 0x2cf8]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40b04b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x2cf4]
cmp dword [eax - 0xc], 0
jne 0x40b05e
xor ebx, ebx
jmp 0x40bb11
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x420]
call fcn.0040a710
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40b0ae
lea eax, [ebp - 0x420]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push 6
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0
push 0x41da04
lea ecx, [ebp - 0x2c58]
mov dword [ebp - 0x2c44], 0xf
mov dword [ebp - 0x2c48], 0
mov byte [ebp - 0x2c58], 0
call fcn.00402f80
mov byte [ebp - 4], 2
lea eax, [ebp - 0x2cec]
push 3
push dword [ebp - 0x2cf4]
lea ecx, [ebp - 0x2cf0]
mov dword [ebp - 0x2cf0], eax
call fcn.0040e7f0
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x2cf0]
mov dword [ebp - 0x2c2c], 0xf
mov dword [ebp - 0x2c30], 0
mov byte [ebp - 0x2c40], 0
cmp byte [edx], 0
jne 0x40b12c
xor ecx, ecx
jmp 0x40b13a
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40b131
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x2c40]
call fcn.00402f80
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x2c40]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x2c58]
call fcn.004083f0
mov eax, dword [ebp - 0x2c2c]
cmp eax, 0x10
jb 0x40b179
inc eax
push eax
push dword [ebp - 0x2c40]
call fcn.004032b0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x2cec]
mov eax, dword [ebp - 0x2cf0]
mov dword [ebp - 0x2c2c], 0xf
mov dword [ebp - 0x2c30], 0
mov byte [ebp - 0x2c40], 0
cmp eax, ecx
je 0x40b1b2
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
lea ecx, [ebp - 0x2c40]
call fcn.0040fae0
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x2c58]
mov byte [ebp - 4], 5
call fcn.004083f0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x2c2c]
cmp eax, 0x10
jb 0x40b1ed
inc eax
push eax
push dword [ebp - 0x2c40]
call fcn.004032b0
push 0x1388
mov dword [ebp - 0x2c2c], 0xf
mov dword [ebp - 0x2c30], 0
mov byte [ebp - 0x2c40], 0
call dword [0x428f8c]
lea ecx, [ebp - 0x2c40]
call fcn.0040ff90
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x2c58]
mov byte [ebp - 4], 6
call fcn.004083f0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x2c2c]
cmp eax, 0x10
jb 0x40b24e
inc eax
push eax
push dword [ebp - 0x2c40]
call fcn.004032b0
push 0x1388
mov dword [ebp - 0x2c2c], 0xf
mov dword [ebp - 0x2c30], 0
mov byte [ebp - 0x2c40], 0
call dword [0x428f8c]
lea ecx, [ebp - 0x2c40]
call fcn.00410440
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x2c58]
mov byte [ebp - 4], 7
call fcn.004083f0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x2c2c]
cmp eax, 0x10
jb 0x40b2af
inc eax
push eax
push dword [ebp - 0x2c40]
call fcn.004032b0
push 0x1388
mov dword [ebp - 0x2c2c], 0xf
mov dword [ebp - 0x2c30], 0
mov byte [ebp - 0x2c40], 0
call dword [0x428f8c]
lea ecx, [ebp - 0x2c40]
call fcn.00410840
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x2c58]
mov byte [ebp - 4], 8
call fcn.004083f0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x2c2c]
cmp eax, 0x10
jb 0x40b310
inc eax
push eax
push dword [ebp - 0x2c40]
call fcn.004032b0
push 0x1388
mov dword [ebp - 0x2c2c], 0xf
mov dword [ebp - 0x2c30], 0
mov byte [ebp - 0x2c40], 0
call dword [0x428f8c]
lea ecx, [ebp - 0x2c40]
call fcn.00410d30
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x2c58]
mov byte [ebp - 4], 9
call fcn.004083f0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x2c2c]
cmp eax, 0x10
jb 0x40b371
inc eax
push eax
push dword [ebp - 0x2c40]
call fcn.004032b0
push 0x1388
mov dword [ebp - 0x2c2c], 0xf
mov dword [ebp - 0x2c30], 0
mov byte [ebp - 0x2c40], 0
call dword [0x428f8c]
lea ecx, [ebp - 0x2c40]
call fcn.004111e0
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x2c58]
mov byte [ebp - 4], 0xa
call fcn.004083f0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x2c2c]
cmp eax, 0x10
jb 0x40b3d2
inc eax
push eax
push dword [ebp - 0x2c40]
call fcn.004032b0
push 0x1388
mov dword [ebp - 0x2c2c], 0xf
mov dword [ebp - 0x2c30], 0
mov byte [ebp - 0x2c40], 0
call dword [0x428f8c]
lea ecx, [ebp - 0x2c40]
call fcn.00411740
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x2c58]
mov byte [ebp - 4], 0xb
call fcn.004083f0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x2c2c]
cmp eax, 0x10
jb 0x40b433
inc eax
push eax
push dword [ebp - 0x2c40]
call fcn.004032b0
push 0x1388
mov dword [ebp - 0x2c2c], 0xf
mov dword [ebp - 0x2c30], 0
mov byte [ebp - 0x2c40], 0
call dword [0x428f8c]
lea ecx, [ebp - 0x2c40]
call fcn.00411bb0
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x2c58]
mov byte [ebp - 4], 0xc
call fcn.004083f0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x2c2c]
cmp eax, 0x10
jb 0x40b494
inc eax
push eax
push dword [ebp - 0x2c40]
call fcn.004032b0
push 0x1388
mov dword [ebp - 0x2c2c], 0xf
mov dword [ebp - 0x2c30], 0
mov byte [ebp - 0x2c40], 0
call dword [0x428f8c]
push 0x208
lea eax, [ebp - 0x828]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x2c68]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [ebp - 0x2c68]
push eax
movzx eax, word [ebp - 0x2c62]
push eax
movzx eax, word [ebp - 0x2c66]
push eax
movzx eax, word [ebp - 0x2c5c]
push eax
movzx eax, word [ebp - 0x2c5e]
push eax
movzx eax, word [ebp - 0x2c60]
push eax
lea eax, [ebp - 0x828]
push str._d_d_d__d_d_d
push eax
call fcn.00408a80
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x2c
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x218]
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 - 0x828]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x2d34]
call fcn.0040df80
sub esp, 0xc
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x2df0]
push dword [eax]
call fcn.0040d470
mov byte [ebp - 4], 0xf
mov eax, edi
mov edx, dword [ebp - 0x2d34]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40b5ab
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [ebp - 0x2c58]
lea ecx, [ebp - 0x2df0]
call fcn.0040ed30
lea ecx, [ebp - 0x2df0]
call fcn.0040d3f0
push 0x400
lea eax, [ebp - 0xc28]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0xc28]
push eax
push 0x41d864
push ecx
call fcn.00409af0
add esp, 0xc
lea edx, [ebp - 0xc28]
lea ecx, [ebp - 0x218]
call fcn.0040c740
test eax, eax
je 0x40b613
cmp eax, 5
je 0x40b613
xor ebx, ebx
jmp 0x40ba8e
lea eax, [ebp - 0x2d28]
mov dword [ebp - 0x2d00], 0
push eax
mov dword [ebp - 0x2cf8], 0
mov dword [ebp - 0x2d3c], 0
mov dword [ebp - 0x2cfc], 0
mov dword [ebp - 0x2d30], 0
mov dword [ebp - 0x2d2c], 0
mov dword [ebp - 0x2d10], 0
mov dword [ebp - 0x2d0c], 0
mov dword [ebp - 0x2d08], 0
mov dword [ebp - 0x2d04], 0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 0x10
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push 0x400
mov dword [ebp - 0x2d38], eax
lea eax, [ebp - 0x1428]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x1428]
push eax
push 0x41d928
push ecx
call fcn.00409af0
add esp, 0xc
lea eax, [ebp - 0x620]
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 0x40b71f
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 - 0x620]
push eax
push 0xffffffffffffffff
push 0x4288d8
push 0
push 0
call esi
sub esp, 0x18
mov edx, esp
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0
mov dword [edx + 0x14], 0xf
cmp dword [edx + 0x14], 0x10
mov dword [edx + 0x10], 0
jb 0x40b74a
mov eax, dword [edx]
jmp 0x40b74c
mov eax, edx
mov byte [eax], 0
cmp byte [ebp - 0x620], 0
jne 0x40b75c
xor ecx, ecx
jmp 0x40b76e
lea ecx, [ebp - 0x620]
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40b765
sub ecx, esi
push ecx
lea eax, [ebp - 0x620]
mov ecx, edx
push eax
call fcn.00402f80
call fcn.00408320
push 0x400
mov ebx, eax
lea eax, [ebp - 0x1028]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
lea esi, [ebx + 0x34]
add esp, 0x24
cmp dword [esi + 0x14], 0x10
jb 0x40b7a5
mov esi, dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test esi, esi
je 0x40b7cd
push 0
push 0
push 0xffffffffffffffff
push esi
push 0
push 0
call edi
push eax
lea eax, [ebp - 0x1028]
push eax
push 0xffffffffffffffff
push esi
push 0
push 0
call edi
push 0x400
lea eax, [ebp - 0x2828]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
lea esi, [ebx + 0x64]
add esp, 0xc
cmp dword [esi + 0x14], 0x10
jb 0x40b7ee
mov esi, dword [esi]
test esi, esi
je 0x40b810
push 0
push 0
push 0xffffffffffffffff
push esi
push 0
push 0
call edi
push eax
lea eax, [ebp - 0x2828]
push eax
push 0xffffffffffffffff
push esi
push 0
push 0
call edi
push 0x400
lea eax, [ebp - 0x2c28]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x2c28]
push eax
push str.2.._uu
push ecx
call fcn.00409af0
add esp, 0xc
lea eax, [ebp - 0x2428]
push 0x400
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x2428]
push eax
push str._36_
push ecx
call fcn.00409af0
add esp, 0xc
lea eax, [ebp - 0x1828]
push 0x400
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x1828]
push eax
push str.6341j
push ecx
call fcn.00409af0
add esp, 0xc
lea eax, [ebp - 0x1c28]
push 0x400
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x1c28]
push eax
push 0x420140
push ecx
call fcn.00409af0
add esp, 0xc
lea eax, [ebp - 0x2028]
push 0x400
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x2028]
push eax
push str.34_5j
push ecx
call fcn.00409af0
add esp, 8
mov dword [ebp - 0x2d04], 0xfde9
lea eax, [ebp - 0x1028]
lea ecx, [ebp - 0x2d30]
push eax
lea eax, [ebp - 0x1428]
push eax
call fcn.00406e80
lea ecx, [ebp - 0x2d30]
call fcn.00407050
mov esi, eax
test esi, esi
je 0x40b943
mov edx, dword [ebp - 0x2d04]
lea ecx, [ebp - 0x1828]
call fcn.00407ab0
mov dword [esi + 4], eax
lea ecx, [ebp - 0x1c28]
mov edx, dword [ebp - 0x2d04]
call fcn.00407ab0
mov dword [esi + 8], eax
mov edi, dword [ebp - 0x2cf4]
test edi, edi
je 0x40b982
lea ecx, [ebp - 0x2d30]
call fcn.00407050
mov esi, eax
test esi, esi
je 0x40b982
mov edx, dword [ebp - 0x2d04]
lea ecx, [ebp - 0x2028]
call fcn.00407ab0
mov dword [esi + 4], eax
mov ecx, edi
mov edx, dword [ebp - 0x2d04]
call fcn.00407ab0
mov dword [esi + 8], eax
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x2d38]
lea eax, [ebp - 0x2428]
push eax
lea ecx, [ebp - 0x2d30]
call fcn.00407180
lea eax, [ebp - 0x2cfc]
push eax
lea eax, [ebp - 0x2cf8]
push eax
lea eax, [ebp - 0x2d3c]
push eax
lea eax, [ebp - 0x2d00]
push eax
lea eax, [ebp - 0x2828]
push eax
lea ecx, [ebp - 0x2d30]
call fcn.00407320
mov eax, dword [ebp - 0x2d00]
test eax, eax
je 0x40b9e2
push eax
call fcn.0041a7e7
add esp, 4
mov eax, dword [ebp - 0x2cf8]
test eax, eax
je 0x40b9f5
push eax
call fcn.0041a7e7
add esp, 4
mov eax, dword [ebp - 0x2d30]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
test eax, eax
je 0x40ba12
push eax
call esi
mov dword [ebp - 0x2d30], 0
mov eax, dword [ebp - 0x2d2c]
test eax, eax
je 0x40ba29
push eax
call esi
mov dword [ebp - 0x2d2c], 0
lea eax, [ebp - 0x218]
push eax
call dword [0x428f64]
mov eax, dword [ebp - 0x2d30]
xor ebx, ebx
cmp dword [ebp - 0x2cfc], 0xc8
sete bl
test eax, eax
je 0x40ba5c
push eax
call esi
mov dword [ebp - 0x2d30], 0
mov eax, dword [ebp - 0x2d2c]
test eax, eax
je 0x40ba73
push eax
call esi
mov dword [ebp - 0x2d2c], 0
lea ecx, [ebp - 0x2d30]
call fcn.00406f50
lea eax, [ebp - 0x2d28]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
or edi, 0xffffffff
mov eax, dword [ebp - 0x2df0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x2df0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x2df4], eax
lea ecx, [ebp - 0x2dec]
call fcn.0040de30
lea ecx, [ebp - 0x2de8]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void_]
lea ecx, [ebp - 0x2d88]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
mov eax, dword [ebp - 0x2c44]
cmp eax, 0x10
jb 0x40baf0
inc eax
push eax
push dword [ebp - 0x2c58]
call fcn.004032b0
mov eax, dword [ebp - 0x2cf4]
mov dword [ebp - 0x2c44], 0xf
mov dword [ebp - 0x2c48], 0
mov byte [ebp - 0x2c58], 0
mov dword [ebp - 4], 0xffffffff
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], edi
dec edi
test edi, edi
jg 0x40bb2d
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
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