Function at 0x4046a2
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 0x40476a
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 0x404761
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 0x404732
cmp byte [eax], 0x5c
je 0x404732
lea ecx, [ebp - 0x314]
cmp eax, ecx
je 0x40473e
dec eax
jne 0x404720
lea ecx, [ebp - 0x314]
cmp eax, ecx
je 0x40473e
mov byte [eax], bl
lea eax, [ebp - 0x314]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x404761
lea eax, [ebp - 0x314]
mov ecx, esi
push eax
lea eax, [ebp - 4]
push eax
call fcn.00404acc
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esi + 0x23c], ebx
jne 0x4047cc
push dword [esi + 0x228]
lea eax, [esi + 0x1c]
mov ecx, esi
mov dword [ebp - 8], eax
push dword [esi + 0x224]
push eax
call fcn.00404c68
test eax, eax
jne 0x4047cc
push dword [ebp - 8]
lea eax, [ebp - 0x10c]
push 0x41a52c
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x10c]
push 4
push 0x41a09c
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
xor ecx, ecx
cmp eax, 6
setne cl
mov eax, ecx
jmp 0x404a31
cmp dword [esi + 0x234], ebx
jne 0x404812
cmp dword [esi + 0x238], ebx
jne 0x404812
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 0x4049fa
cmp dword [esi + 0x23c], ebx
jne 0x404838
mov eax, dword [ebp + 8]
cmp dword [eax], ebx
je 0x404838
push dword [ebp + 0xc]
call fcn.0040be60
test eax, eax
pop ecx
jbe 0x404838
push dword [ebp + 0xc]
mov ecx, esi
call fcn.00404d66
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 0x4049ff
cmp eax, 0xffffffff
je 0x4049ff
cmp dword [esi + 0x248], ebx
je 0x4048da
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 0x4048f3
cmp eax, 0xffffffff
je 0x4048f3
mov edi, dword [esi + 0x248]
cmp edi, ebx
je 0x4048d1
push dword [ebp + 0xc]
mov ecx, edi
push dword [ebp - 4]
call fcn.0040460f
mov edi, dword [edi + 4]
jmp 0x4048bb
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esi + 0x240]
push dword [ebp + 0xc]
cmp edi, ebx
je 0x40492d
mov ecx, edi
call fcn.0040455d
mov edi, dword [edi + 4]
jmp 0x4048e0
push dword [ebp - 8]
lea eax, [ebp - 0x10c]
push 0x41a084
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x10c]
push ebx
push 0x41a09c
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4049c9
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.00404c68
test eax, eax
jne 0x404989
add esi, 0x1c
lea eax, [ebp - 0x10c]
push esi
push 0x41a48c
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x10c]
push 4
push 0x41a09c
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 6
je 0x4049c9
push 1
pop ebx
jmp 0x4049c9
lea edi, [esi + 0x1c]
lea eax, [ebp - 0x210]
push edi
push eax
mov ecx, esi
call fcn.00404ec0
test eax, eax
jne 0x4049da
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 0x41a09c
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 0x404a31
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 0x404a31
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x10c]
push 0x41a0ac
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x10c]
push ebx
push 0x41a09c
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8