Function at 0x40c560
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 0x40c780
mov esi, dword [0x64a798]
test esi, esi
jne 0x40c6db
push 0xc
call fcn.00562f65
add esp, 4
mov edi, eax
mov esi, eax
lea ebx, [ebp - 0x218]
push 0x208
push 0xff
push ebx
call fcn.005679e0
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.00564782
add esp, 4
cmp eax, 0x7ffffff8
jae 0x40c7bb
mov ecx, eax
cmp eax, 4
mov dword [ebp - 0x240], eax
jbe 0x40c79b
mov ebx, ecx
or ebx, 3
inc ebx
js 0x40c7b6
lea eax, [ebx + ebx]
push eax
call fcn.00562f65
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 0x40c7c9
mov ecx, dword [ebp - 0x240]
test ecx, ecx
je 0x40c662
add ecx, ecx
push ecx
push ebx
push eax
call fcn.00567460
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 0x40c6c7
add edx, edx
test edx, edx
je 0x40c6c7
lea eax, [edx - 2]
cmp word [edi + edx - 2], 0x5c
mov edx, eax
jne 0x40c68c
cmp eax, 0xfffffffe
je 0x40c6c7
sar eax, 1
lea edx, [eax + 1]
test cl, cl
jns 0x40c7a5
cmp ebx, eax
jbe 0x40c7c2
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.0053d1f0
mov dword [0x64a798], esi
test byte [0x6460b4], 1
je 0x40c780
xorps xmm0, xmm0
movups xmmword [ebp - 0x22c], xmm0
movups xmmword [ebp - 0x23c], xmm0
mov dword [ebp - 0x21c], 0
cmp byte [esi + 0xb], 0
jns 0x40c70b
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 0x40c738
mov eax, dword [ebp - 0x220]
cmp dword [ebp - 0x21c], 0x40000001
sbb eax, 0
jae 0x40c7d8
mov eax, dword [0x64a798]
cmp byte [eax + 0xb], 0
jns 0x40c745
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 0x40c7f1
mov al, 1
mov dword [ebp - 0x244], eax
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00566245
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 0x40c630
cmp eax, ecx
jae 0x40c7c2
and dl, 0x7f
mov byte [esi + 0xb], dl
mov ecx, esi
jmp 0x40c6c0
call fcn.00593a20
mov ecx, esi
call fcn.00593a00
mov ecx, esi
call fcn.00593c80
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.00590170
mov eax, dword [0x64a798]
cmp byte [eax + 0xb], 0
jns 0x40c7e5
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40c738
mov al, 1
mov dword [ebp - 0x244], eax
lea esi, [ebp - 0x216]
push 0x206
push 0xff
push esi
call fcn.005679e0
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 0x40c845
mov dword [ebp - 0x244], 0
jmp 0x40c780
mov ecx, dword [0x64a798]
push esi
call fcn.0040f2b0
mov ecx, dword [0x64a798]
call fcn.005b0ae0
cmp word [eax], 0x5c
je 0x40c874
mov ecx, dword [0x64a798]
push 1
push 0x623b46
call fcn.0053d1f0
mov ecx, dword [0x64a798]
push 9
push str.debug.log
call fcn.0053d1f0
mov eax, dword [0x64a798]
cmp byte [eax + 0xb], 0
jns 0x40c893
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 0x40c780
mov dword [0x64a794], 0
jmp 0x40c836