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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45e51b
mov eax, dword fs:[0]
push eax
sub esp, 0xa8
mov eax, dword [0x476458]
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 edi, ecx
mov ebx, dword [edi + 0x114]
cmp ebx, dword [edi + 0x118]
je 0x4053a3
mov edi, edi
mov eax, dword [ebx + 0x78]
push eax
push 1
push 1
lea esi, [ebx + 0xa0]
mov ecx, edi
call fcn.00405030
add ebx, 0x12c
cmp ebx, dword [edi + 0x118]
jne 0x405380
mov ebx, dword [edi + 0x128]
cmp ebx, dword [edi + 0x12c]
je 0x4053d4
mov eax, dword [ebx + 0x78]
push eax
push 3
push 5
lea esi, [ebx + 0xa0]
mov ecx, edi
call fcn.00405030
add ebx, 0x12c
cmp ebx, dword [edi + 0x12c]
jne 0x4053b1
mov ebx, dword [edi + 0x150]
cmp ebx, dword [edi + 0x154]
je 0x405405
mov eax, dword [ebx + 0x78]
push eax
push 2
push 5
lea esi, [ebx + 0xa0]
mov ecx, edi
call fcn.00405030
add ebx, 0x12c
cmp ebx, dword [edi + 0x154]
jne 0x4053e2
xor ebx, ebx
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x2c], bl
lea eax, [edi + 0x1d0]
push eax
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], ebx
call fcn.004353a0
cmp dword [ebp - 0x1c], ebx
jne 0x40543e
cmp dword [ebp - 0x18], 0x10
jb 0x4055aa
mov ecx, dword [ebp - 0x2c]
push ecx
jmp 0x4055a2
cmp dword [edi + 0x1f4], 8
jb 0x40544f
mov eax, dword [edi + 0x1e0]
jmp 0x405455
lea eax, [edi + 0x1e0]
cmp eax, ebx
jne 0x40545e
mov eax, 0x464c78
xor edx, edx
mov ecx, eax
mov dword [ebp - 0x34], 7
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], dx
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x405473
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [ebp - 0x48]
call fcn.00408f90
mov eax, esi
push eax
lea ecx, [ebp - 0xac]
mov byte [ebp - 4], 1
push ecx
mov dword [ebp - 0xb0], vtable.af_path_temp_class_af_path_impl_win_tempW__class_af_stringW_.0
call fcn.004039c0
mov esi, 8
mov byte [ebp - 4], 3
cmp dword [ebp - 0x34], esi
jb 0x4054c2
mov edx, dword [ebp - 0x48]
push edx
call fcn.004410cb
add esp, 4
mov ecx, dword [ebp - 0xa4]
xor eax, eax
push ecx
mov dword [ebp - 0x34], 7
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], ax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4054fa
mov edx, dword [ebp - 0xa4]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4054fa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xb4], ebx
cmp dword [edi + 0x1f4], esi
jb 0x405510
mov eax, dword [edi + 0x1e0]
jmp 0x405516
lea eax, [edi + 0x1e0]
cmp eax, ebx
jne 0x40551f
mov eax, 0x464c78
xor ecx, ecx
mov word [ebp - 0x64], cx
mov ecx, eax
mov dword [ebp - 0x50], 7
mov dword [ebp - 0x54], ebx
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x405534
sub ecx, esi
sar ecx, 1
push ecx
lea esi, [ebp - 0x64]
call fcn.00408f90
mov edx, dword [ebp - 0x2c]
mov esi, 0x10
cmp dword [ebp - 0x18], esi
jae 0x40555c
lea edx, [ebp - 0x2c]
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0x64]
push eax
push ecx
lea ecx, [ebp - 0xb4]
call fcn.00415710
add esp, 8
cmp dword [ebp - 0x50], 8
jb 0x405584
mov edx, dword [ebp - 0x64]
push edx
call fcn.004410cb
add esp, 4
lea ecx, [ebp - 0xac]
mov dword [ebp - 0xb0], vtable.af_path_temp_class_af_path_impl_win_tempW__class_af_stringW_.0
call fcn.00403ac0
cmp dword [ebp - 0x18], esi
jb 0x4055aa
mov eax, dword [ebp - 0x2c]
push eax
call fcn.004410cb
add esp, 4
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.00440ba3
mov esp, ebp
pop ebp
ret