Function at 0x4054bd
Capabilities:
Delete file
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x314
push ebx
push esi
push edi
xor ebx, ebx
push 0x7f02
mov esi, ecx
push ebx
call dword [sym.imp.USER32.dll_LoadCursorA]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
cmp dword [esi + 0x23c], ebx
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
je 0x405585
push ebx
push 0x80
push 2
push ebx
lea eax, [esi + 0x1c]
push ebx
push 0x40000000
push eax
call edi
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x40557c
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [ebp - 8], eax
lea eax, [esi + 0x1c]
push eax
lea eax, [ebp - 0x314]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [ebp - 8]
lea eax, [ebp + eax - 0x314]
cmp eax, ebx
je 0x40554d
cmp byte [eax], 0x5c
je 0x40554d
lea ecx, [ebp - 0x314]
cmp eax, ecx
je 0x405559
dec eax
jne 0x40553b
lea ecx, [ebp - 0x314]
cmp eax, ecx
je 0x405559
mov byte [eax], bl
lea eax, [ebp - 0x314]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x40557c
lea eax, [ebp - 0x314]
mov ecx, esi
push eax
lea eax, [ebp - 4]
push eax
call fcn.004058df
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esi + 0x23c], ebx
jne 0x4055e7
push dword [esi + 0x228]
lea eax, [esi + 0x1c]
mov ecx, esi
mov dword [ebp - 8], eax
push dword [esi + 0x224]
push eax
call fcn.00405a7b
test eax, eax
jne 0x4055e7
push dword [ebp - 8]
lea eax, [ebp - 0x10c]
push 0x4179e8
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x10c]
push 4
push 0x41709c
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
xor ecx, ecx
cmp eax, 6
setne cl
mov eax, ecx
jmp 0x405844
cmp dword [esi + 0x234], ebx
jne 0x40562d
cmp dword [esi + 0x238], ebx
jne 0x40562d
push ebx
push 0x80
push 3
push ebx
push ebx
lea eax, [esi + 0x1c]
push 0x40000000
push eax
call edi
mov edi, eax
lea eax, [esi + 4]
push eax
lea eax, [esi + 0xc]
add esi, 0x14
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40580d
mov eax, dword [ebp + 8]
cmp dword [eax], ebx
je 0x40564b
push dword [ebp + 0xc]
call fcn.0040a9d0
test eax, eax
pop ecx
jbe 0x40564b
push dword [ebp + 0xc]
mov ecx, esi
call fcn.00405b79
lea eax, [ebp - 0x210]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp - 0x210]
push str.WinPatchTemp.tmp
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push ebx
push 0x80
push 2
push ebx
push ebx
lea eax, [ebp - 0x210]
push 0x40000000
push eax
call edi
cmp eax, ebx
mov dword [ebp + 0xc], eax
je 0x405812
cmp eax, 0xffffffff
je 0x405812
cmp dword [esi + 0x248], ebx
je 0x4056ed
push ebx
push 0x80
push 3
push ebx
lea eax, [esi + 0x1c]
push 1
push 0x80000000
push eax
mov dword [ebp - 8], eax
call edi
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x405706
cmp eax, 0xffffffff
je 0x405706
mov edi, dword [esi + 0x248]
cmp edi, ebx
je 0x4056e4
push dword [ebp + 0xc]
mov ecx, edi
push dword [ebp - 4]
call fcn.0040542a
mov edi, dword [edi + 4]
jmp 0x4056ce
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esi + 0x240]
push dword [ebp + 0xc]
cmp edi, ebx
je 0x405740
mov ecx, edi
call fcn.00405378
mov edi, dword [edi + 4]
jmp 0x4056f3
push dword [ebp - 8]
lea eax, [ebp - 0x10c]
push 0x417084
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x10c]
push ebx
push 0x41709c
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4057dc
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi + 0x22c]
lea eax, [ebp - 0x210]
mov ecx, esi
push dword [esi + 0x230]
push eax
call fcn.00405a7b
test eax, eax
jne 0x40579c
add esi, 0x1c
lea eax, [ebp - 0x10c]
push esi
push 0x417948
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x10c]
push 4
push 0x41709c
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 6
je 0x4057dc
push 1
pop ebx
jmp 0x4057dc
lea edi, [esi + 0x1c]
lea eax, [ebp - 0x210]
push edi
push eax
mov ecx, esi
call fcn.00405cd3
test eax, eax
jne 0x4057ed
push edi
lea eax, [ebp - 0x10c]
push str.CopyFile_failed_for_file:_n_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x10c]
push ebx
push 0x41709c
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, ebx
jmp 0x405844
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0x7f00
push ebx
call dword [sym.imp.USER32.dll_LoadCursorA]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
push 1
pop eax
jmp 0x405844
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x10c]
push 0x4170ac
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x10c]
push ebx
push 0x41709c
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8