Function at 0x408310
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x828
mov eax, dword [0x4c8578]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x4964e8], 1
push esi
push edi
jne 0x40833b
cmp dword [0x50ade4], 0
je 0x408619
push 0x208
lea eax, [ebp - 0x61c]
push 0
push eax
call fcn.00446b20
mov eax, dword [0x502db0]
add esp, 0xc
mov esi, dword [sym.imp.KERNEL32.DLL_FreeLibrary]
test eax, eax
je 0x408363
push eax
call esi
push dword [0x50cff4]
call esi
push 0x104
lea eax, [ebp - 0x20c]
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
push eax
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.00407d30
add esp, 0xc
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionA]
push 0x53c500
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.00449d78
push 0x46c7d0
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.00449dd2
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.00449dd2
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x310]
push 0x104
push eax
call fcn.00449d78
push 0x46c7d0
lea eax, [ebp - 0x310]
push 0x104
push eax
call fcn.00449dd2
push 0x46cf80
lea eax, [ebp - 0x310]
push 0x104
push eax
call fcn.00449dd2
mov edi, dword [sym.imp.KERNEL32.DLL_DeleteFileA]
lea eax, [ebp - 0x310]
add esp, 0x48
push eax
call edi
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.00449d78
push 0x46c7d0
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.00449dd2
push 0x46ddb0
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.00449dd2
add esp, 0x24
lea eax, [ebp - 0x108]
push eax
call edi
lea eax, [ebp - 0x20c]
push eax
push 0x104
lea eax, [ebp - 0x108]
push eax
call fcn.00449d78
push 0x46c7d0
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.00449dd2
push 0x46ddbc
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.00449dd2
add esp, 0x24
lea eax, [ebp - 0x108]
push eax
call edi
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.00449d78
push 0x46c7d0
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.00449dd2
push 0x46ddd4
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.00449dd2
add esp, 0x24
lea eax, [ebp - 0x108]
push eax
call edi
push 0x104
lea eax, [ebp - 0x61c]
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
lea eax, [ebp - 0x61c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x824]
push 0x104
push eax
call fcn.00452e14
push 0x46dddc
lea eax, [ebp - 0x824]
push 0x104
push eax
call fcn.00449d03
add esp, 0x18
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
mov eax, dword [0x502db0]
test eax, eax
je 0x4085a3
push eax
call esi
push 0x50fa28
call edi
test eax, eax
jne 0x4085b5
push 0x50fa28
call edi
sub esp, 0x18
mov eax, 0x53c630
mov edx, esp
lea esi, [eax + 2]
mov dword [edx], 0
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 7
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4085d6
sub eax, esi
mov ecx, edx
sar eax, 1
push eax
push 0x53c630
call fcn.004095e0
mov ecx, 0x50fb50
call fcn.00411d80
test al, al
je 0x40860a
mov ecx, 0x50fb50
call fcn.00411700
lea eax, [ebp - 0x20c]
push eax
call fcn.00408630
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00443fa5
mov esp, ebp
pop ebp
ret