Function at 0x405d80
Capabilities:
Check if file exists
Delete file
Move file

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x436e8b
push eax
mov eax, dword [0x44f670]
mov dword fs:[0], esp
sub esp, 0x310
push ebx
xor ebx, ebx
push ebp
push esi
cmp eax, ebx
push edi
jne 0x405fa5
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x119]
mov byte [esp + 0x118], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x21d]
mov byte [esp + 0x21c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x15]
mov byte [esp + 0x14], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x14]
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x405fa5
mov ebp, dword [esp + 0x334]
lea ecx, [esp + 0x14]
push ebp
push ecx
call fcn.00405be0
add esp, 8
test eax, eax
je 0x405fa5
mov ecx, 0x104
lea eax, [esp + 0x14]
mov dl, byte [eax]
mov edi, dword [esp + 0x330]
cmp dl, bl
je 0x405e48
inc eax
dec ecx
jne 0x405e35
jmp 0x405e88
cmp ecx, ebx
je 0x405e88
lea edx, [esp + 0x10]
test edx, edx
je 0x405e5d
mov eax, 0x104
sub eax, ecx
jmp 0x405e61
mov eax, dword [esp + 0x10]
mov edx, 0x104
sub edx, eax
lea eax, [esp + eax + 0x14]
je 0x405e88
mov esi, edi
sub esi, eax
mov cl, byte [esi + eax]
cmp cl, bl
je 0x405e81
mov byte [eax], cl
inc eax
dec edx
jne 0x405e72
jmp 0x405e85
cmp edx, ebx
jne 0x405e86
dec eax
mov byte [eax], bl
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x40604f
push 0x4418fc
push edi
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
test eax, eax
je 0x405ebb
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
jmp 0x405fa7
lea edx, [esp + 0x14]
push edx
call fcn.00402ac0
add esp, 4
test eax, eax
je 0x405edc
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
jmp 0x405fa7
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_4
push 0x104
push 0x104
lea ecx, [esp + 0x18]
mov dword [esp + 0x330], ebx
call sub.MFC42.DLL_CString::GetBuffer
push eax
call fcn.00402c90
add esp, 8
lea ecx, [esp + 0x10]
push 0x104
call sub.MFC42.DLL_CString::GetBuffer
mov edx, 0x104
mov ecx, eax
cmp byte [ecx], bl
je 0x405f27
inc ecx
dec edx
jne 0x405f1d
jmp 0x405f55
cmp edx, ebx
je 0x405f55
lea ecx, [esp + 0x10]
test ecx, ecx
je 0x405f3c
mov ecx, 0x104
sub ecx, edx
jmp 0x405f40
mov ecx, dword [esp + 0x10]
mov edx, 0x104
push 0x4418c8
sub edx, ecx
add ecx, eax
push edx
push ecx
call fcn.00402320
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
cmp eax, ebx
je 0x406021
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [esp + 0x118]
push 0x104
push eax
call fcn.004039a0
add esp, 8
cmp eax, ebx
jne 0x405fc0
lea ecx, [esp + 0x10]
mov dword [esp + 0x328], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
mov ecx, dword [esp + 0x320]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x31c
ret
lea ecx, [esp + 0x21c]
push ebx
push ecx
push ebx
push ebx
push edi
call dword [sym.imp.MSVCRT.dll__splitpath]
push ebx
push ebp
lea edx, [esp + 0x134]
push ebx
push edx
lea eax, [esp + 0x240]
push edi
push eax
call fcn.00402f00
lea ecx, [esp + 0x40]
push ecx
call fcn.00402ac0
add esp, 0x30
test eax, eax
je 0x405f91
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea ecx, [esp + 0x10]
mov esi, eax
mov dword [esp + 0x328], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, esi
jmp 0x405fa7
lea ecx, [esp + 0x10]
mov dword [0x44f670], 1
mov dword [esp + 0x328], 0xffffffff
call sub.MFC42.DLL_CString::CString
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
jmp 0x405fa7
lea ecx, [esp + 0x118]
push 0x104
push ecx
call fcn.004039a0
add esp, 8
test eax, eax
je 0x405fa5
lea edx, [esp + 0x21c]
push ebx
push edx
push ebx
push ebx
push edi
call dword [sym.imp.MSVCRT.dll__splitpath]
push ebx
push ebp
lea eax, [esp + 0x134]
push ebx
push eax
lea ecx, [esp + 0x240]
push edi
push ecx
call fcn.00402f00
add esp, 0x2c
push 0x4418fc
push edi
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
test eax, eax
je 0x4060ba
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
jmp 0x405fa7
lea eax, [esp + 0x14]
push eax
call fcn.00402ac0
add esp, 4
test eax, eax
je 0x405fa5
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
jmp 0x405fa7