Function at 0x40ca30
Capabilities:
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x23c
mov eax, dword [0x644040]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov al, 1
mov dword [ebp - 0x244], eax
cmp dword [0x64a794], 0
jne 0x40cc50
mov esi, dword [0x64a798]
test esi, esi
jne 0x40cbab
push 0xc
call fcn.00562bc5
add esp, 4
mov edi, eax
mov esi, eax
lea ebx, [ebp - 0x218]
push 0x208
push 0xff
push ebx
call fcn.00567640
add esp, 0xc
push 0x104
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
dec eax
mov dword [edi], eax
mov dword [edi + 4], eax
mov dword [edi + 8], eax
push ebx
call fcn.005643e2
add esp, 4
cmp eax, 0x7ffffff8
jae 0x40cc8b
mov ecx, eax
cmp eax, 4
mov dword [ebp - 0x240], eax
jbe 0x40cc6b
mov ebx, ecx
or ebx, 3
inc ebx
js 0x40cc86
lea eax, [ebx + ebx]
push eax
call fcn.00562bc5
add esp, 4
mov dword [esi], eax
or ebx, 0x80000000
mov dword [esi + 8], ebx
mov ecx, dword [ebp - 0x240]
mov dword [esi + 4], ecx
lea ebx, [ebp - 0x218]
lea edx, [eax + ecx*2]
cmp eax, ebx
seta cl
mov dword [ebp - 0x248], edx
cmp edx, ebx
setbe dl
or dl, cl
je 0x40cc99
mov ecx, dword [ebp - 0x240]
test ecx, ecx
je 0x40cb32
add ecx, ecx
push ecx
push ebx
push eax
call fcn.005670c0
add esp, 0xc
mov eax, dword [ebp - 0x248]
mov word [eax], 0
movsx ecx, byte [esi + 0xb]
test ecx, ecx
mov ebx, dword [esi + 4]
mov edx, ecx
cmovs edx, ebx
mov eax, dword [esi]
mov dword [ebp - 0x240], eax
cmovs edi, eax
test edx, edx
je 0x40cb97
add edx, edx
test edx, edx
je 0x40cb97
lea eax, [edx - 2]
cmp word [edi + edx - 2], 0x5c
mov edx, eax
jne 0x40cb5c
cmp eax, 0xfffffffe
je 0x40cb97
sar eax, 1
lea edx, [eax + 1]
test cl, cl
jns 0x40cc75
cmp ebx, eax
jbe 0x40cc92
mov dword [esi + 4], edx
mov ecx, dword [ebp - 0x240]
mov word [ecx + eax*2 + 2], 0
mov ecx, esi
push 9
push str.debug.log
call fcn.0053d9b0
mov dword [0x64a798], esi
test byte [0x6460b4], 1
je 0x40cc50
xorps xmm0, xmm0
movups xmmword [ebp - 0x22c], xmm0
movups xmmword [ebp - 0x23c], xmm0
mov dword [ebp - 0x21c], 0
cmp byte [esi + 0xb], 0
jns 0x40cbdb
mov esi, dword [esi]
lea eax, [ebp - 0x23c]
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x40cc08
mov eax, dword [ebp - 0x220]
cmp dword [ebp - 0x21c], 0x40000001
sbb eax, 0
jae 0x40cca8
mov eax, dword [0x64a798]
cmp byte [eax + 0xb], 0
jns 0x40cc15
mov eax, dword [eax]
sub esp, 0x1c
movaps xmm0, xmmword [0x62ee20]
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x80
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x64a794], eax
inc eax
cmp eax, 1
jbe 0x40ccc1
mov al, 1
mov dword [ebp - 0x244], eax
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00565ea5
mov eax, dword [ebp - 0x244]
add esp, 0x23c
pop esi
pop edi
pop ebx
pop ebp
ret
mov byte [esi + 0xb], cl
mov eax, esi
jmp 0x40cb00
cmp eax, ecx
jae 0x40cc92
and dl, 0x7f
mov byte [esi + 0xb], dl
mov ecx, esi
jmp 0x40cb90
call fcn.00593680
mov ecx, esi
call fcn.00593660
mov ecx, esi
call fcn.00593900
push str....._third_partylibc_srcinclude__stringchar_traits.h:222:_assertion__std::__is_pointer_in_range___s1____s1____n____s2__failed:_char_traits::copy:_source_and_destination_ranges_overlap_n
push 0x622e92
call fcn.0058fdd0
mov eax, dword [0x64a798]
cmp byte [eax + 0xb], 0
jns 0x40ccb5
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40cc08
mov al, 1
mov dword [ebp - 0x244], eax
lea esi, [ebp - 0x216]
push 0x206
push 0xff
push esi
call fcn.00567640
add esp, 0xc
mov word [esi - 2], 0
lea esi, [ebp - 0x218]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
add eax, 0xfffffefb
cmp eax, 0xfffffefc
jae 0x40cd15
mov dword [ebp - 0x244], 0
jmp 0x40cc50
mov ecx, dword [0x64a798]
push esi
call fcn.0040f780
mov ecx, dword [0x64a798]
call fcn.005b0760
cmp word [eax], 0x5c
je 0x40cd44
mov ecx, dword [0x64a798]
push 1
push 0x623b46
call fcn.0053d9b0
mov ecx, dword [0x64a798]
push 9
push str.debug.log
call fcn.0053d9b0
mov eax, dword [0x64a798]
cmp byte [eax + 0xb], 0
jns 0x40cd63
mov eax, dword [eax]
sub esp, 0x1c
movaps xmm0, xmmword [0x62ee20]
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x80
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x64a794], eax
inc eax
cmp eax, 1
ja 0x40cc50
mov dword [0x64a794], 0
jmp 0x40cd06