Function at 0x40d435
Capabilities:
Check if file exists
Delete file
Get common file path

Disassembly:
push ebp
sub esp, 0x618
lea ebp, [esp - 4]
mov eax, dword [0x4528a0]
xor eax, ebp
mov dword [ebp + 0x618], eax
push 0x14
mov eax, 0x43c2af
call fcn.00422277
mov ecx, dword [ebp + 0x624]
xor esi, esi
push 0x4549e4
mov dword [ebp - 4], esi
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x10], esi
call fcn.00402e40
mov ebx, 0x208
push ebx
lea eax, [ebp + 0x208]
push esi
push eax
mov dword [ebp - 4], esi
mov dword [ebp - 0x10], 1
call fcn.00420210
add esp, 0xc
mov edi, 0x104
push edi
lea eax, [ebp + 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
push str.dbghelp.dll
lea eax, [ebp + 0x208]
push eax
call esi
push ebx
lea eax, [ebp]
push 0
push eax
call fcn.00420210
add esp, 0xc
push edi
lea eax, [ebp]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push str.dbghelp.dll
lea eax, [ebp]
push eax
call esi
push ebx
xor ebx, ebx
lea eax, [ebp + 0x410]
push ebx
push eax
call fcn.00420210
add esp, 0xc
lea eax, [ebp + 0x410]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp + 0x410]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push str.MyDbghelp.dll
lea eax, [ebp + 0x410]
push eax
call esi
call fcn.00410f96
test eax, eax
je 0x40d6e9
lea eax, [ebp + 0x410]
push eax
lea eax, [ebp + 0x208]
push eax
push str.dumpuper._szSysDbghelpDllsdDbghelpDll:__s_s
call fcn.00402abd
add esp, 0xc
lea eax, [ebp + 0x208]
push eax
lea ecx, [ebp - 0x14]
call fcn.00405a89
push ebx
push ebx
push 0xb
lea eax, [ebp - 0x14]
push 6
push eax
call fcn.0040a74c
mov ecx, dword [ebp - 0x14]
add esp, 0x14
add ecx, 0xfffffff0
mov esi, eax
call fcn.00402a0d
cmp esi, ebx
jne 0x40d6e9
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp]
push eax
call esi
push 3
pop edi
test eax, eax
je 0x40d5c1
lea eax, [ebp]
push eax
lea ecx, [ebp - 0x14]
call fcn.00405a89
lea eax, [ebp - 0x14]
push eax
mov dword [ebp - 4], 1
mov dword [ebp - 0x10], edi
call fcn.00417ee7
pop ecx
mov byte [ebp - 0x15], 1
test eax, eax
jne 0x40d5c5
mov byte [ebp - 0x15], 0
push 2
mov dword [ebp - 4], ebx
pop ebx
test byte [ebp - 0x10], bl
je 0x40d5df
mov ecx, dword [ebp - 0x14]
and dword [ebp - 0x10], 0xfffffffd
add ecx, 0xfffffff0
call fcn.00402a0d
cmp byte [ebp - 0x15], 0
je 0x40d5ed
lea eax, [ebp]
jmp 0x40d6ef
lea eax, [ebp + 0x410]
push eax
call esi
test eax, eax
je 0x40d622
lea eax, [ebp + 0x410]
push eax
lea ecx, [ebp - 0x14]
call fcn.00405a89
or dword [ebp - 0x10], 4
lea eax, [ebp - 0x14]
push eax
mov dword [ebp - 4], ebx
call fcn.00417ee7
pop ecx
test eax, eax
je 0x40d622
mov bl, 1
jmp 0x40d624
xor bl, bl
and dword [ebp - 4], 0
test byte [ebp - 0x10], 4
je 0x40d63d
mov ecx, dword [ebp - 0x14]
and dword [ebp - 0x10], 0xfffffffb
add ecx, 0xfffffff0
call fcn.00402a0d
lea eax, [ebp + 0x410]
push eax
test bl, bl
jne 0x40d6f0
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
call esi
lea eax, [ebp + 0x410]
push eax
lea ecx, [ebp - 0x20]
call fcn.00405a89
or dword [ebp - 0x10], 8
lea eax, [ebp - 0x20]
push 0x1d4c0
push eax
mov dword [ebp - 4], edi
call fcn.004181f4
pop ecx
pop ecx
test eax, eax
je 0x40d6aa
lea eax, [ebp + 0x410]
push eax
lea ecx, [ebp - 0x14]
call fcn.00405a89
or dword [ebp - 0x10], 0x10
lea eax, [ebp - 0x14]
push eax
mov dword [ebp - 4], 4
call fcn.00417ee7
pop ecx
test eax, eax
je 0x40d6aa
inc bl
jmp 0x40d6ac
xor bl, bl
test byte [ebp - 0x10], 0x10
je 0x40d6c1
mov ecx, dword [ebp - 0x14]
and dword [ebp - 0x10], 0xffffffef
add ecx, 0xfffffff0
call fcn.00402a0d
and dword [ebp - 4], 0
test byte [ebp - 0x10], 8
je 0x40d6da
mov ecx, dword [ebp - 0x20]
and dword [ebp - 0x10], 0xfffffff7
add ecx, 0xfffffff0
call fcn.00402a0d
lea eax, [ebp + 0x410]
push eax
test bl, bl
jne 0x40d6f0
call esi
jmp 0x40d6f8
lea eax, [ebp + 0x208]
push eax
mov ecx, dword [ebp - 0x1c]
call fcn.004055ff
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x618]
xor ecx, ebp
call fcn.004201f5
add ebp, 0x61c
leave
ret