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

Disassembly:
push 0x54
mov eax, 0x506274
call fcn.004da051
xor ebx, ebx
mov dword [ebp - 0x54], edx
cmp edx, ebx
je 0x430c06
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x430995
sub eax, esi
sar eax, 1
je 0x430c06
push edx
mov dword [ebp - 0x50], 1
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x430a3b
push dword [ebp - 0x54]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x430a3b
cmp dword [0x550334], ebx
je 0x430a3b
push dword [ebp - 0x54]
lea ecx, [ebp - 0x2c]
call fcn.00404466
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], ebx
call fcn.00428a57
pop ecx
mov byte [ebp - 4], 1
cmp dword [eax + 0x14], 0x10
jb 0x4309fe
mov eax, dword [eax]
mov dword [ebp - 0x4c], eax
call esi
push eax
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [0x550334]
push eax
push str._WARN___d___before_create__delete_file__s___error__d_.
call fcn.00427dfb
add esp, 0x10
push ebx
push 1
lea ecx, [ebp - 0x48]
call fcn.00402476
or dword [ebp - 4], 0xffffffff
push ebx
push 1
lea ecx, [ebp - 0x2c]
call fcn.0040476f
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push dword [ebp - 0x54]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x4c], eax
call esi
mov dword [edi], eax
cmp dword [0x550334], ebx
je 0x430ac7
push dword [ebp - 0x54]
lea ecx, [ebp - 0x2c]
call fcn.00404466
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 2
call fcn.00428a57
pop ecx
mov byte [ebp - 4], 3
cmp dword [eax + 0x14], 0x10
jb 0x430a8d
mov eax, dword [eax]
push dword [edi]
push dword [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [0x550334]
push eax
push str._INFO___d___create_file__s___hFile__d___error__d_.
call fcn.00427dfb
add esp, 0x14
push ebx
push 1
lea ecx, [ebp - 0x48]
call fcn.00402476
or dword [ebp - 4], 0xffffffff
push ebx
push 1
lea ecx, [ebp - 0x2c]
call fcn.0040476f
cmp dword [ebp - 0x4c], 0xffffffff
jne 0x430b70
cmp dword [edi], 0xb7
jne 0x430bf8
push ebx
push 0x80
push 3
push ebx
push 3
push 0x40000000
push dword [ebp - 0x54]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x4c], eax
call esi
mov dword [edi], eax
cmp dword [0x550334], ebx
je 0x430b66
push dword [ebp - 0x54]
lea ecx, [ebp - 0x2c]
call fcn.00404466
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 4
call fcn.00428a57
pop ecx
mov byte [ebp - 4], 5
cmp dword [eax + 0x14], 0x10
jb 0x430b30
mov eax, dword [eax]
push dword [edi]
push dword [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [0x550334]
push eax
push str._INFO___d___open_file__s__for_write__hFile__d___error__d_.
call fcn.00427dfb
add esp, 0x14
push ebx
push 1
lea ecx, [ebp - 0x48]
call fcn.00402476
push ebx
push 1
lea ecx, [ebp - 0x2c]
call fcn.0040476f
cmp dword [ebp - 0x4c], 0xffffffff
je 0x430bf8
mov eax, dword [ebp + 0xc]
cmp eax, ebx
jl 0x430bdc
jg 0x430b7e
cmp dword [ebp + 8], ebx
jbe 0x430bdc
mov ecx, dword [ebp + 8]
push ebx
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x5c]
push eax
push ecx
push dword [ebp - 0x4c]
mov dword [ebp - 0x60], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x60], eax
call esi
mov dword [edi], eax
cmp eax, 0x83
jne 0x430bad
mov dword [ebp - 0x50], 2
jmp 0x430bdf
mov eax, dword [ebp - 0x60]
cmp eax, 0xffffffff
je 0x430bdf
cmp eax, dword [ebp + 8]
jne 0x430bdf
mov eax, dword [ebp - 0x5c]
cmp eax, dword [ebp + 0xc]
jne 0x430bdf
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x430bdc
mov dword [ebp - 0x50], 2
call esi
mov dword [edi], eax
jmp 0x430bdf
mov dword [ebp - 0x50], ebx
cmp dword [ebp - 0x4c], ebx
je 0x430bf3
cmp dword [ebp - 0x4c], 0xffffffff
je 0x430bf3
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x50], ebx
je 0x430c01
push dword [ebp - 0x54]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp - 0x50]
jmp 0x430c09
push 3
pop eax
call fcn.004da0d4
ret