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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1016396c
mov eax, dword fs:[0]
push eax
mov eax, 0x1094
call fcn.10148b90
mov eax, dword [0x10438fc0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [ebx]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
setne al
test al, al
jne 0x1004a3aa
call fcn.10023ad0
cmp eax, 2
je 0x1004a3aa
mov eax, 0x80004005
jmp 0x1004a63b
xor edi, edi
push edi
push edi
push 1
lea esi, [ebp - 0x1094]
mov dword [ebp - 0x1094], edi
call fcn.100163a0
mov esi, dword [ebp - 0x1094]
mov eax, 0x2a
mov word [esi], ax
mov dword [esi - 4], 1
push edi
lea ecx, [ebp - 0x218]
push ecx
lea edx, [ebp - 0x418]
push edx
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], edi
mov eax, dword [ebx]
push ecx
push eax
call dword [sym.imp.MSVCR100.dll__wsplitpath]
push esi
lea edx, [ebp - 0x218]
push edx
lea eax, [ebp - 0x418]
push eax
lea ecx, [ebp - 0x18]
push ecx
lea edx, [ebp - 0xa28]
push edx
call dword [sym.imp.MSVCR100.dll__wmakepath]
add esp, 0x28
lea edi, [ebp - 0xa28]
mov eax, ebx
call fcn.10016670
lea eax, [esi - 0xc]
mov dword [ebp - 4], 0xffffffff
test eax, eax
je 0x1004a444
add esi, 0xfffffff4
dec dword [esi]
jne 0x1004a444
push esi
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
push ebx
lea esi, [ebp - 0x109c]
call fcn.100176f0
mov edi, eax
push 1
push ebx
lea esi, [ebp - 0x1098]
mov dword [ebp - 4], 1
call fcn.100175b0
mov edx, dword [edi]
mov ecx, dword [eax]
lea ebx, [ebp - 0x1090]
mov dword [ebp - 0x1090], 0xffffffff
mov byte [ebp - 0xe3c], 1
call fcn.10023da0
mov eax, dword [ebp - 0x1098]
test eax, eax
je 0x1004a4a9
lea ecx, [eax - 0xc]
test ecx, ecx
je 0x1004a4a9
add eax, 0xfffffff4
dec dword [eax]
jne 0x1004a4a9
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x109c]
test eax, eax
je 0x1004a4cf
lea edx, [eax - 0xc]
test edx, edx
je 0x1004a4cf
add eax, 0xfffffff4
dec dword [eax]
jne 0x1004a4cf
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov ecx, dword [ebp - 0x1090]
cmp ecx, 0xffffffff
je 0x1004a639
cmp byte [ebp - 0xe3c], 0
je 0x1004a4eb
mov al, 1
jmp 0x1004a504
lea eax, [ebp - 0x108c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov ecx, dword [ebp - 0x1090]
test eax, eax
setne al
mov byte [ebp - 0xe3c], 0
test al, al
je 0x1004a62d
lea ecx, [ebp - 0xc32]
push ecx
lea edx, [ebp - 0xe3a]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x1060]
push eax
lea ecx, [ebp - 0xe3a]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0xe3a]
mov dword [ebp - 0x1094], 0
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1004a550
sub eax, edx
push 0
sar eax, 1
mov ebx, eax
push 0
push ebx
lea esi, [ebp - 0x1094]
call fcn.100163a0
mov edi, dword [ebp - 0x1094]
lea eax, [ebp - 0xe3a]
mov edx, edi
mov ecx, eax
sub edx, ecx
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x1004a583
mov dword [edi - 4], ebx
mov eax, 4
lea esi, [ebp - 0x18]
lea ecx, [ebp - 0x1094]
mov byte [ebp - 4], 4
call fcn.10016dc0
mov eax, dword [eax]
test eax, eax
je 0x1004a5c3
push 0x10414ac4
push eax
call dword [sym.imp.MSVCR100.dll__wcsicmp]
add esp, 8
jmp 0x1004a5c8
mov eax, SysReAllocString
test eax, eax
mov eax, dword [ebp - 0x18]
sete bl
test eax, eax
je 0x1004a5ec
lea edx, [eax - 0xc]
test edx, edx
je 0x1004a5ec
add eax, 0xfffffff4
dec dword [eax]
jne 0x1004a5ec
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
test bl, bl
je 0x1004a607
lea eax, [edi - 0xc]
test eax, eax
mov byte [ebp - 4], 3
je 0x1004a4cf
lea eax, [edi - 0xc]
jmp 0x1004a4c1
test byte [ebp - 0x108c], 0x10
push edi
jne 0x1004a61e
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [edi - 0xc]
test ecx, ecx
jmp 0x1004a5f5
call fcn.10023900
lea ecx, [edi - 0xc]
add esp, 4
test ecx, ecx
jmp 0x1004a5f5
cmp ecx, 0xffffffff
je 0x1004a639
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10148524
mov esp, ebp
pop ebp
ret