Function at 0x40602a
Capabilities:
Check if file exists
Delete file

Disassembly:
push 0x3d4
mov eax, 0x43fe38
call fcn.004253f8
and dword [ebp - 0x3d8], 0
and dword [ebp - 0x3d4], 0
mov edi, edx
mov ebx, ecx
mov ecx, dword [edi]
lea eax, [ebp - 0x3d4]
push eax
lea edx, [ebp - 0x3d8]
mov dword [ebp - 0x3e0], ebx
call fcn.0040e9f9
pop ecx
test al, al
je 0x4062f6
push dword [edi]
mov esi, 0x104
lea eax, [ebp - 0x118]
push esi
push eax
call fcn.004226d4
add esp, 0xc
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
push str._amend.dat
lea eax, [ebp - 0x118]
push esi
push eax
call fcn.0042273c
mov esi, dword [ebx + 0xac]
add esp, 0xc
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
push eax
push esi
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineA]
call fcn.0041822d
push eax
lea ecx, [ebp - 0x3d0]
call fcn.00401bc3
and dword [ebp - 4], 0
push edi
lea ecx, [ebp - 0x3c4]
call fcn.00408cb1
mov byte [ebp - 4], 1
push 0x5c
push dword [ebp - 0x3c4]
call fcn.004226bd
pop ecx
pop ecx
test eax, eax
jne 0x406106
or eax, 0xffffffff
jmp 0x40610c
sub eax, dword [ebp - 0x3c4]
push eax
lea eax, [ebp - 0x3cc]
push eax
lea ecx, [ebp - 0x3c4]
call fcn.004077e3
push eax
lea ecx, [ebp - 0x3c4]
mov byte [ebp - 4], 2
call fcn.00408d3c
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x3cc]
add ecx, 0xfffffff0
call fcn.00401c0b
mov edi, dword [ebp - 0x3c4]
mov esi, dword [edi - 0xc]
push 0x5c
push edi
call fcn.004226bd
pop ecx
pop ecx
test eax, eax
jne 0x40615d
or eax, 0xffffffff
jmp 0x40615f
sub eax, edi
sub esi, eax
dec esi
push esi
lea eax, [ebp - 0x3cc]
push eax
lea ecx, [ebp - 0x3c4]
call fcn.0040779d
push eax
lea ecx, [ebp - 0x3d0]
mov byte [ebp - 4], 3
call fcn.00408d3c
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x3cc]
add ecx, 0xfffffff0
call fcn.00401c0b
call fcn.0043dae0
push eax
lea ecx, [ebp - 0x3c8]
call fcn.00402597
lea eax, [ebp - 0x3d0]
push eax
lea eax, [ebp - 0x3dc]
push str.config_
push eax
mov byte [ebp - 4], 4
call fcn.004078d0
add esp, 0xc
push str._ncstudio.fmt
push eax
lea eax, [ebp - 0x3cc]
push eax
mov byte [ebp - 4], 5
call fcn.00407878
add esp, 0xc
push eax
lea ecx, [ebp - 0x3c8]
mov byte [ebp - 4], 6
call fcn.00407d22
mov ecx, dword [ebp - 0x3cc]
add ecx, 0xfffffff0
call fcn.00401c0b
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x3dc]
add ecx, 0xfffffff0
call fcn.00401c0b
push dword [ebp - 0x3c8]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x406241
call fcn.0043dae0
push eax
lea ecx, [ebp - 0x3c8]
call fcn.00402715
push str.ncstudio.fmt
lea ecx, [ebp - 0x3c8]
call fcn.00402367
lea eax, [ebp - 0x3c0]
push eax
call fcn.004096a0
lea eax, [ebp - 0x118]
push eax
mov byte [ebp - 4], 7
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 0x3c8]
lea eax, [ebp - 0x118]
push dword [ebp - 0x3d8]
push dword [ebp - 0x3d4]
push eax
lea eax, [ebp - 0x3c0]
push eax
call fcn.00409bac
lea esi, [ebp - 0x3c0]
mov bl, al
call fcn.004097d2
test bl, bl
jne 0x4062b0
mov eax, dword [0x455c10]
mov eax, dword [eax*4 + 0x452a90]
mov ecx, dword [ebp - 0x3e0]
push 0
push 0
push eax
call fcn.00412d35
push dword [ebp - 0x3d4]
call fcn.00410c63
pop ecx
call fcn.0040f318
lea ecx, [ebp - 0x3c0]
mov byte [ebp - 4], 4
call fcn.0040973a
mov ecx, dword [ebp - 0x3c8]
add ecx, 0xfffffff0
call fcn.00401c0b
lea ecx, [edi - 0x10]
call fcn.00401c0b
mov ecx, dword [ebp - 0x3d0]
add ecx, 0xfffffff0
call fcn.00401c0b
mov al, bl
call fcn.0042547b
ret