Function at 0x424140
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.00471a30
cmp eax, 2
jne 0x424172
mov edi, dword [esp + 0x24]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x424172
test al, 2
je 0x424172
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
mov dword [esi + 0x14], ebp
mov eax, dword [ecx]
cmp edx, ebp
mov dword [esp + 0x18], ebp
mov dword [esi + 0x18], eax
je 0x4241a9
cmp eax, ebp
jne 0x4241a9
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov eax, dword [esi + 0x14]
cmp eax, edx
jge 0x4241a9
inc eax
mov dword [esi + 0x14], eax
mov eax, dword [ecx + eax*4]
cmp eax, ebp
mov dword [esi + 0x18], eax
je 0x424194
mov eax, dword [esi + 0x18]
cmp eax, ebp
je 0x424257
mov eax, dword [eax + 8]
push 0x4ed9d0
push eax
call fcn.004b3100
add esp, 8
test eax, eax
je 0x424216
mov edx, dword [esi + 0x18]
cmp dword [edx + 8], ebp
je 0x424216
mov ecx, dword [edx + 0xc]
mov ebx, 1
cmp ecx, ebp
je 0x4241ec
mov al, byte [ecx]
test al, al
je 0x4241ec
cmp al, 0x20
je 0x4241e9
xor ebx, ebx
inc ecx
jne 0x4241dd
mov eax, dword [edx + 0x10]
mov edi, 1
cmp eax, ebp
je 0x42420a
mov cl, byte [eax]
test cl, cl
je 0x42420a
cmp cl, 0x20
jne 0x424208
inc eax
jne 0x4241f8
jmp 0x42420a
xor edi, edi
cmp ebx, ebp
je 0x424212
cmp edi, ebp
jne 0x424216
inc dword [esp + 0x18]
mov eax, dword [esi + 0x18]
cmp eax, ebp
je 0x424223
mov ecx, dword [eax + 4]
mov dword [esi + 0x18], ecx
cmp dword [esi + 0x18], ebp
jne 0x424246
mov eax, dword [esi + 8]
lea ecx, [eax - 1]
mov eax, dword [esi + 0x14]
cmp eax, ecx
jge 0x424246
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 0x42422e
mov eax, dword [esi + 0x18]
cmp eax, ebp
jne 0x4241b4
cmp dword [esp + 0x18], ebp
jne 0x424271
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]
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
jne 0x42429d
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 0x4242ce
cmp eax, ebp
jne 0x4242ce
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov eax, dword [esi + 0x14]
cmp eax, edx
jge 0x4242ce
inc eax
mov dword [esi + 0x14], eax
mov eax, dword [ecx + eax*4]
cmp eax, ebp
mov dword [esi + 0x18], eax
je 0x4242b9
mov ebp, dword [esi + 0x18]
test ebp, ebp
je 0x4244ad
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x424470
mov ecx, dword [ebp + 0xc]
mov edi, 1
test ecx, ecx
je 0x4242ff
mov al, byte [ecx]
test al, al
je 0x4242ff
cmp al, 0x20
je 0x4242fc
xor edi, edi
inc ecx
jne 0x4242f0
mov eax, dword [ebp + 0x10]
mov edx, 1
test eax, eax
je 0x42431d
mov cl, byte [eax]
test cl, cl
je 0x42431d
cmp cl, 0x20
jne 0x42431b
inc eax
jne 0x42430b
jmp 0x42431d
xor edx, edx
test edi, edi
je 0x424329
test edx, edx
jne 0x424470
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 8]
push 0x20
push eax
call fcn.004a8857
mov edi, eax
add esp, 8
neg edi
sbb edi, edi
mov byte [esp + 0x12], 0x22
neg edi
je 0x424367
mov edx, dword [esp + 0x18]
mov ebx, dword [sym.imp.KERNEL32.dll__lwrite]
lea ecx, [esp + 0x12]
push 1
push ecx
push edx
call ebx
jmp 0x42436d
mov ebx, dword [sym.imp.KERNEL32.dll__lwrite]
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebp + 8]
mov edx, dword [esp + 0x18]
push eax
push ecx
push edx
call ebx
cmp eax, dword [esp + 0x1c]
jl 0x4244ad
test edi, edi
je 0x424399
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 0x4244ad
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x424428
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x424414
lea ecx, [edi + 1]
push ecx
call fcn.004bd49b
mov edx, dword [ebp + 0xc]
add esp, 4
mov ebx, eax
push ebx
push edx
call dword [sym.imp.USER32.dll_CharToOemA]
mov eax, dword [esp + 0x18]
push edi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll__lwrite]
push ebx
mov dword [esp + 0x20], eax
call fcn.004bd4c4
mov eax, dword [esp + 0x20]
add esp, 4
cmp eax, edi
jl 0x4244ad
mov ebx, dword [sym.imp.KERNEL32.dll__lwrite]
jmp 0x424428
mov ecx, dword [ebp + 0xc]
mov edx, dword [esp + 0x18]
push edi
push ecx
push edx
call ebx
cmp eax, edi
jl 0x4244ad
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x424448
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 0x18]
mov edi, eax
mov eax, dword [ebp + 0x10]
push edi
push eax
push ecx
call ebx
cmp eax, edi
jl 0x4244ad
mov dx, word [0x4edff8]
mov al, byte [0x4edffa]
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 0x4244ad
mov eax, dword [esi + 0x18]
test eax, eax
je 0x42447d
mov eax, dword [eax + 4]
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x18]
test eax, eax
jne 0x4244a2
mov eax, dword [esi + 8]
lea ecx, [eax - 1]
mov eax, dword [esi + 0x14]
cmp eax, ecx
jge 0x4244a2
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 0x42448a
mov ebp, dword [esi + 0x18]
test ebp, ebp
jne 0x4242d9
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll__lclose]
cmp eax, 0xffffffff
jne 0x4244c9
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 0x4244e4
test al, 2
jne 0x4244f3
or al, 2
jmp 0x4244eb
test al, 2
je 0x4244f3
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