Function at 0x414240
Capabilities:
Delete file
Get file size
Move file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x45d4f0
mov eax, dword fs:[0]
push eax
sub esp, 0x220
mov eax, dword [0x474cb0]
xor eax, esp
mov dword [esp + 0x218], eax
push ebx
push esi
push edi
mov eax, dword [0x474cb0]
xor eax, esp
push eax
lea eax, [esp + 0x230]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
sub eax, 1
mov ebx, ecx
je 0x414532
sub eax, 1
je 0x41450d
sub eax, 2
jne 0x4145ec
mov eax, dword [ebx + 0x7c]
cmp eax, dword [ebx + 0x80]
jl 0x414494
mov eax, dword [ebx + 0x38]
cmp eax, 0xc8
je 0x4142cb
cmp eax, 0xce
je 0x4142cb
cmp eax, 0x1a0
jne 0x414494
lea esi, [ebx + 0xd4]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebx + 0xa0]
test eax, eax
je 0x414441
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ecx, dword [ebx + 0x80]
mov edx, dword [ebx + 0xa0]
push 0
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebx + 0xa0]
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov ecx, dword [ebx + 0xa0]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebx + 0xa8]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push eax
mov dword [ebx + 0xa0], 0
call edi
mov eax, dword [ebx + 0xa8]
push eax
lea edx, [esp + 0x20]
push 0x104
push edx
call fcn.004486d2
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
test eax, eax
je 0x41436d
lea ecx, [esp + 0x1c]
push ecx
call fcn.0040dad0
add esp, 4
mov eax, dword [ebx + 0xa8]
mov ecx, dword [ebx + 0xa4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x414401
cmp dword [ebx + 0xac], eax
jne 0x414396
mov eax, dword [ebx + 0xa4]
push eax
call edi
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebx + 0x18], 0
je 0x4143d6
push ecx
mov edx, esp
mov dword [esp + 0x14], esp
push edx
mov ecx, str.failed_to_MoveFile
call fcn.00405480
mov dword [esp + 0x23c], 0
mov ecx, dword [ebx + 0x18]
mov eax, dword [ecx]
mov eax, dword [eax + 8]
push ebx
mov dword [esp + 0x240], 0xffffffff
call eax
mov eax, 1
mov ecx, dword [esp + 0x230]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x218]
xor ecx, esp
call fcn.004462cb
mov esp, ebp
pop ebp
ret 4
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebx + 0x18], 0
je 0x4143d6
sub esp, 0x10
mov eax, esp
mov dword [esp + 0x20], esp
push 0
call fcn.00412bc0
mov dword [esp + 0x248], 1
mov ecx, dword [ebx + 0x18]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
mov dword [esp + 0x24c], 0xffffffff
call edx
jmp 0x4143d6
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebx + 0x18], 0
je 0x4143d6
mov eax, dword [ebx + 0x8c]
mov edi, eax
test eax, eax
jne 0x414460
lea edi, [ebx + 0x90]
sub esp, 0x10
mov esi, esp
mov dword [esp + 0x20], esp
call fcn.00412bf0
mov dword [esp + 0x248], 2
mov ecx, dword [ebx + 0x18]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
push ebx
mov dword [esp + 0x24c], 0xffffffff
call eax
jmp 0x4143d6
lea esi, [ebx + 0xd4]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebx + 0xa0]
test eax, eax
je 0x4144c9
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ecx, dword [ebx + 0xa0]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 0xa0], 0
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebx + 0xac], 0
jne 0x4145ec
mov eax, dword [ebx + 0xa4]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push eax
call esi
test eax, eax
jne 0x4145ec
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [ebx + 0xa4]
push edx
call esi
jmp 0x4145ec
mov eax, dword [ebx + 0x84]
test eax, eax
jl 0x4145ec
push 0
push 0
push eax
mov eax, dword [ebx + 0xa0]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x4145ec
lea eax, [ebx + 0xd4]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebx + 0xa0]
xor esi, esi
cmp eax, esi
je 0x4145df
cmp dword [ebx + 0xac], esi
je 0x4145df
lea ecx, [esp + 0x18]
push ecx
push eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp dword [esp + 0x18], esi
mov dword [esp + 0x14], eax
jl 0x4145df
jg 0x414580
cmp eax, 1
jb 0x4145df
lea edx, [esp + 0x10]
push edx
call fcn.004013e0
mov dword [esp + 0x238], 3
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
sub eax, 1
sbb ecx, esi
push ecx
push eax
push str.bytes_I64u_
lea edi, [esp + 0x1c]
call fcn.004017f0
mov esi, dword [esp + 0x1c]
add esp, 0xc
push ebx
mov ecx, str.Range
call fcn.00413b40
mov edx, dword [esp + 0x14]
dec edx
mov eax, edi
mov dword [ebx + 0x7c], edx
push eax
mov dword [esp + 0x23c], 0xffffffff
call fcn.004014e0
lea eax, [ebx + 0xd4]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebx + 0x18]
test ecx, ecx
je 0x4143d6
mov eax, dword [ebp + 8]
mov edx, dword [ecx]
mov edx, dword [edx + 0xc]
push eax
push ebx
call edx
jmp 0x4143db