Function at 0x41cca0
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov esi, ecx
call fcn.0043d380
cmp eax, 2
jne 0x41ccd2
mov edi, dword [esp + 0x24]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x41ccd2
test al, 2
je 0x41ccd2
xor eax, 2
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov ecx, dword [esi + 4]
mov edx, dword [esi + 0xc]
xor ebp, ebp
xor edi, edi
mov dword [esi + 0x14], ebp
mov eax, dword [ecx]
cmp edx, ebp
mov dword [esi + 0x18], eax
je 0x41cd07
cmp eax, ebp
jne 0x41cd07
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov eax, dword [esi + 0x14]
cmp eax, edx
jge 0x41cd07
inc eax
mov dword [esi + 0x14], eax
mov eax, dword [ecx + eax*4]
cmp eax, ebp
mov dword [esi + 0x18], eax
je 0x41ccf2
mov eax, dword [esi + 0x18]
cmp eax, ebp
je 0x41cd67
mov eax, dword [eax + 8]
push str.descript.ion
push eax
call fcn.004a7820
add esp, 8
test eax, eax
je 0x41cd30
mov ecx, dword [esi + 0x18]
call fcn.0041c990
test eax, eax
jne 0x41cd30
inc edi
mov eax, dword [esi + 0x18]
cmp eax, ebp
je 0x41cd3d
mov eax, dword [eax + 4]
mov dword [esi + 0x18], eax
cmp dword [esi + 0x18], ebp
jne 0x41cd60
mov eax, dword [esi + 8]
lea ecx, [eax - 1]
mov eax, dword [esi + 0x14]
cmp eax, ecx
jge 0x41cd60
mov edx, dword [esi + 4]
inc eax
mov dword [esi + 0x14], eax
mov eax, dword [edx + eax*4]
cmp eax, ebp
mov dword [esi + 0x18], eax
je 0x41cd48
mov eax, dword [esi + 0x18]
cmp eax, ebp
jne 0x41cd0e
cmp edi, ebp
jne 0x41cd85
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0xc
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
neg ecx
sbb ecx, ecx
and ecx, 2
push ecx
push edx
call dword [sym.imp.KERNEL32.dll__lcreat]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x18], ebx
jne 0x41cdb3
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0xc
mov ecx, dword [esi + 4]
mov edx, dword [esi + 0xc]
mov dword [esi + 0x14], ebp
cmp edx, ebp
mov eax, dword [ecx]
mov dword [esi + 0x18], eax
je 0x41cde4
cmp eax, ebp
jne 0x41cde4
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov eax, dword [esi + 0x14]
cmp eax, edx
jge 0x41cde4
inc eax
mov dword [esi + 0x14], eax
mov eax, dword [ecx + eax*4]
cmp eax, ebp
mov dword [esi + 0x18], eax
je 0x41cdcf
mov edi, dword [esi + 0x18]
cmp edi, ebp
je 0x41cf87
jmp 0x41cdf5
mov ebx, dword [esp + 0x18]
mov ecx, edi
call fcn.0041c990
test eax, eax
jne 0x41cf4a
mov eax, dword [edi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [edi + 8]
push 0x20
push ecx
mov dword [esp + 0x24], eax
call fcn.00498920
mov ebp, eax
add esp, 8
neg ebp
sbb ebp, ebp
mov byte [esp + 0x12], 0x22
neg ebp
je 0x41ce41
lea edx, [esp + 0x12]
push 1
push edx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll__lwrite]
call ebx
jmp 0x41ce47
mov ebx, dword [sym.imp.KERNEL32.dll__lwrite]
mov eax, dword [esp + 0x1c]
mov ecx, dword [edi + 8]
mov edx, dword [esp + 0x18]
push eax
push ecx
push edx
call ebx
cmp eax, dword [esp + 0x1c]
jl 0x41cf87
test ebp, ebp
je 0x41ce73
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x12]
push 1
push eax
push ecx
call ebx
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x13]
push 1
push edx
push eax
mov byte [esp + 0x1f], 0x20
call ebx
cmp eax, 1
jl 0x41cf87
mov eax, dword [edi + 0xc]
test eax, eax
je 0x41cf02
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebp, eax
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x41ceee
lea ecx, [ebp + 1]
push ecx
call fcn.004985f0
mov edx, dword [edi + 0xc]
add esp, 4
mov ebx, eax
push ebx
push edx
call dword [sym.imp.USER32.dll_CharToOemA]
mov eax, dword [esp + 0x18]
push ebp
push ebx
push eax
call dword [sym.imp.KERNEL32.dll__lwrite]
push ebx
mov dword [esp + 0x20], eax
call fcn.00498600
mov eax, dword [esp + 0x20]
add esp, 4
cmp eax, ebp
jl 0x41cf87
mov ebx, dword [sym.imp.KERNEL32.dll__lwrite]
jmp 0x41cf02
mov ecx, dword [edi + 0xc]
mov edx, dword [esp + 0x18]
push ebp
push ecx
push edx
call ebx
cmp eax, ebp
jl 0x41cf87
mov eax, dword [edi + 0x10]
test eax, eax
je 0x41cf22
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 0x18]
mov ebp, eax
mov eax, dword [edi + 0x10]
push ebp
push eax
push ecx
call ebx
cmp eax, ebp
jl 0x41cf87
mov dx, word [0x4be9a4]
mov al, byte [0x4be9a6]
mov word [esp + 0x14], dx
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x14]
push 2
push ecx
push edx
mov byte [esp + 0x22], al
call ebx
cmp eax, 2
jl 0x41cf87
mov eax, dword [esi + 0x18]
test eax, eax
je 0x41cf57
mov eax, dword [eax + 4]
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x18]
test eax, eax
jne 0x41cf7c
mov eax, dword [esi + 8]
lea ecx, [eax - 1]
mov eax, dword [esi + 0x14]
cmp eax, ecx
jge 0x41cf7c
mov edx, dword [esi + 4]
inc eax
mov dword [esi + 0x14], eax
mov eax, dword [edx + eax*4]
test eax, eax
mov dword [esi + 0x18], eax
je 0x41cf64
mov edi, dword [esi + 0x18]
test edi, edi
jne 0x41cdf1
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll__lclose]
cmp eax, 0xffffffff
jne 0x41cfa3
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0xc
mov esi, dword [esp + 0x24]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x41cfc2
test al, 2
jne 0x41cfbe
or al, 2
jmp 0x41cfc9
test ecx, ecx
jne 0x41cfd1
test al, 2
je 0x41cfd1
xor eax, 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10
ret 0xc