Function at 0x41cdb0
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.00443d80
cmp eax, 2
jne 0x41cde2
mov edi, dword [esp + 0x24]
push edi
call dword [sym.imp.kernel32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x41cde2
test al, 2
je 0x41cde2
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 0x41ce17
cmp eax, ebp
jne 0x41ce17
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov eax, dword [esi + 0x14]
cmp eax, edx
jge 0x41ce17
inc eax
mov dword [esi + 0x14], eax
mov eax, dword [ecx + eax*4]
cmp eax, ebp
mov dword [esi + 0x18], eax
je 0x41ce02
mov eax, dword [esi + 0x18]
cmp eax, ebp
je 0x41ce7b
mov eax, dword [eax + 8]
push 0x4ee7c8
push eax
call fcn.004d52d0
add esp, 8
test eax, eax
je 0x41ce40
mov ecx, dword [esi + 0x18]
call fcn.0041ca50
test eax, eax
jne 0x41ce40
inc edi
mov eax, dword [esi + 0x18]
cmp eax, ebp
je 0x41ce4d
mov ecx, dword [eax + 4]
mov dword [esi + 0x18], ecx
cmp dword [esi + 0x18], ebp
jne 0x41ce70
mov eax, dword [esi + 8]
lea ecx, [eax - 1]
mov eax, dword [esi + 0x14]
cmp eax, ecx
jge 0x41ce70
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 0x41ce58
mov eax, dword [esi + 0x18]
cmp eax, ebp
jne 0x41ce1e
cmp edi, ebp
jne 0x41ce95
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.kernel32.dll_DeleteFileA]
pop edi
pop esi
pop ebp
mov eax, 1
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 0x41cec3
pop edi
pop esi
pop ebp
xor eax, eax
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 0x41cef4
cmp eax, ebp
jne 0x41cef4
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov eax, dword [esi + 0x14]
cmp eax, edx
jge 0x41cef4
inc eax
mov dword [esi + 0x14], eax
mov eax, dword [ecx + eax*4]
cmp eax, ebp
mov dword [esi + 0x18], eax
je 0x41cedf
mov edi, dword [esi + 0x18]
cmp edi, ebp
je 0x41d097
jmp 0x41cf05
mov ebx, dword [esp + 0x18]
mov ecx, edi
call fcn.0041ca50
test eax, eax
jne 0x41d05a
mov eax, dword [edi + 8]
push eax
call dword [sym.imp.kernel32.dll_lstrlen]
mov ecx, dword [edi + 8]
push 0x20
push ecx
mov dword [esp + 0x24], eax
call fcn.004c81f0
mov ebp, eax
add esp, 8
neg ebp
sbb ebp, ebp
mov byte [esp + 0x12], 0x22
neg ebp
je 0x41cf51
lea edx, [esp + 0x12]
push 1
push edx
push ebx
mov ebx, dword [sym.imp.kernel32.dll__hwrite]
call ebx
jmp 0x41cf57
mov ebx, dword [sym.imp.kernel32.dll__hwrite]
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 0x41d097
test ebp, ebp
je 0x41cf83
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 0x41d097
mov eax, dword [edi + 0xc]
test eax, eax
je 0x41d012
push eax
call dword [sym.imp.kernel32.dll_lstrlen]
mov ebp, eax
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x41cffe
lea ecx, [ebp + 1]
push ecx
call fcn.004c7e90
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__hwrite]
push ebx
mov dword [esp + 0x20], eax
call fcn.004c7e56
mov eax, dword [esp + 0x20]
add esp, 4
cmp eax, ebp
jl 0x41d097
mov ebx, dword [sym.imp.kernel32.dll__hwrite]
jmp 0x41d012
mov ecx, dword [edi + 0xc]
mov edx, dword [esp + 0x18]
push ebp
push ecx
push edx
call ebx
cmp eax, ebp
jl 0x41d097
mov eax, dword [edi + 0x10]
test eax, eax
je 0x41d032
push eax
call dword [sym.imp.kernel32.dll_lstrlen]
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 0x41d097
mov dx, word [0x4ee78c]
mov al, byte [0x4ee78e]
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 0x41d097
mov eax, dword [esi + 0x18]
test eax, eax
je 0x41d067
mov eax, dword [eax + 4]
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x18]
test eax, eax
jne 0x41d08c
mov eax, dword [esi + 8]
lea ecx, [eax - 1]
mov eax, dword [esi + 0x14]
cmp eax, ecx
jge 0x41d08c
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 0x41d074
mov edi, dword [esi + 0x18]
test edi, edi
jne 0x41cf01
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.kernel32.dll__lclose]
cmp eax, 0xffffffff
jne 0x41d0b3
pop edi
pop esi
pop ebp
xor eax, eax
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 0x41d0ce
test al, 2
jne 0x41d0dd
or al, 2
jmp 0x41d0d5
test al, 2
je 0x41d0dd
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