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

Disassembly:
push 0x54
mov eax, 0x5066bf
call fcn.004d998f
xor ebx, ebx
mov dword [ebp - 0x54], edx
cmp edx, ebx
je 0x430548
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4302d7
sub eax, esi
sar eax, 1
je 0x430548
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 0x43037d
push dword [ebp - 0x54]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x43037d
cmp dword [0x5500d4], ebx
je 0x43037d
push dword [ebp - 0x54]
lea ecx, [ebp - 0x2c]
call fcn.0040edaa
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], ebx
call fcn.00428265
pop ecx
mov byte [ebp - 4], 1
cmp dword [eax + 0x14], 0x10
jb 0x430340
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 [0x5500d4]
push eax
push str._WARN___d___before_create__delete_file__s___error__d_.
call fcn.00427581
add esp, 0x10
push ebx
push 1
lea ecx, [ebp - 0x48]
call fcn.0040241d
or dword [ebp - 4], 0xffffffff
push ebx
push 1
lea ecx, [ebp - 0x2c]
call fcn.00403da4
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 [0x5500d4], ebx
je 0x430409
push dword [ebp - 0x54]
lea ecx, [ebp - 0x2c]
call fcn.0040edaa
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 2
call fcn.00428265
pop ecx
mov byte [ebp - 4], 3
cmp dword [eax + 0x14], 0x10
jb 0x4303cf
mov eax, dword [eax]
push dword [edi]
push dword [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [0x5500d4]
push eax
push str._INFO___d___create_file__s___hFile__d___error__d_.
call fcn.00427581
add esp, 0x14
push ebx
push 1
lea ecx, [ebp - 0x48]
call fcn.0040241d
or dword [ebp - 4], 0xffffffff
push ebx
push 1
lea ecx, [ebp - 0x2c]
call fcn.00403da4
cmp dword [ebp - 0x4c], 0xffffffff
jne 0x4304b2
cmp dword [edi], 0xb7
jne 0x43053a
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 [0x5500d4], ebx
je 0x4304a8
push dword [ebp - 0x54]
lea ecx, [ebp - 0x2c]
call fcn.0040edaa
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 4
call fcn.00428265
pop ecx
mov byte [ebp - 4], 5
cmp dword [eax + 0x14], 0x10
jb 0x430472
mov eax, dword [eax]
push dword [edi]
push dword [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [0x5500d4]
push eax
push str._INFO___d___open_file__s__for_write__hFile__d___error__d_.
call fcn.00427581
add esp, 0x14
push ebx
push 1
lea ecx, [ebp - 0x48]
call fcn.0040241d
push ebx
push 1
lea ecx, [ebp - 0x2c]
call fcn.00403da4
cmp dword [ebp - 0x4c], 0xffffffff
je 0x43053a
mov eax, dword [ebp + 0xc]
cmp eax, ebx
jl 0x43051e
jg 0x4304c0
cmp dword [ebp + 8], ebx
jbe 0x43051e
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 0x4304ef
mov dword [ebp - 0x50], 2
jmp 0x430521
mov eax, dword [ebp - 0x60]
cmp eax, 0xffffffff
je 0x430521
cmp eax, dword [ebp + 8]
jne 0x430521
mov eax, dword [ebp - 0x5c]
cmp eax, dword [ebp + 0xc]
jne 0x430521
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x43051e
mov dword [ebp - 0x50], 2
call esi
mov dword [edi], eax
jmp 0x430521
mov dword [ebp - 0x50], ebx
cmp dword [ebp - 0x4c], ebx
je 0x430535
cmp dword [ebp - 0x4c], 0xffffffff
je 0x430535
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x50], ebx
je 0x430543
push dword [ebp - 0x54]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp - 0x50]
jmp 0x43054b
push 3
pop eax
call fcn.004d9a12
ret