Function at 0x401370
Capabilities:
Delete file
Move file

Disassembly:
sub esp, 0x114
push ebx
push ebp
mov ebp, dword [esp + 0x120]
push esi
push edi
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x20]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x20]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push 0x10
rep movsb byte es:[edi], byte [esi]
mov edi, 0x403578
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebp
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
mov dword [esp + 0x18], 0
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll__lopen]
mov edi, eax
cmp edi, 0xffffffff
jne 0x401405
push ebp
push 0x40354c
call sub.MSVCRT.dll_printf
add esp, 8
or eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
mov ebx, dword [sym.imp.KERNEL32.dll__llseek]
push 2
push 0
push edi
call ebx
mov esi, eax
test esi, esi
mov dword [esp + 0x18], esi
jne 0x40143e
push ebp
push 0x403520
call sub.MSVCRT.dll_printf
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll__lclose]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x114
ret
push 0
push 0
push edi
call ebx
push esi
call sub.MSVCRT.dll_malloc
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x401479
push ebp
push 0x4034e4
call sub.MSVCRT.dll_printf
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll__lclose]
pop edi
pop esi
pop ebp
mov eax, 0xfffffffe
pop ebx
add esp, 0x114
ret
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll__lread]
push edi
call dword [sym.imp.KERNEL32.dll__lclose]
lea eax, [esp + 0x20]
push 0
push eax
call dword [sym.imp.KERNEL32.dll__lcreat]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
jne 0x4014c1
push ebp
push 0x4034b0
call sub.MSVCRT.dll_printf
push ebx
call sub.MSVCRT.dll_free
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
mov edx, dword [esp + 0x12c]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
mov edi, dword [esp + 0x130]
not ecx
dec ecx
mov ebp, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [ebx + esi - 1]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x134]
push ecx
push ebp
push edx
push eax
push ebx
mov edi, ebx
call fcn.00401690
mov esi, eax
add esp, 0x14
test esi, esi
je 0x401575
mov edx, esi
sub edx, edi
push edx
push edi
mov edi, dword [esp + 0x1c]
push edi
call dword [sym.imp.KERNEL32.dll__lwrite]
cmp eax, 0xffffffff
je 0x4015ca
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x130]
push eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll__lwrite]
cmp eax, 0xffffffff
je 0x4015ff
mov edx, dword [esp + 0x134]
mov eax, dword [esp + 0x12c]
mov ecx, dword [esp + 0x18]
push edx
push ebp
push eax
lea eax, [ebx + ecx - 1]
lea edi, [esi + ebp]
push eax
push edi
call fcn.00401690
mov ecx, dword [esp + 0x24]
add esp, 0x14
mov esi, eax
inc ecx
test esi, esi
mov dword [esp + 0x10], ecx
jne 0x401509
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
mov ecx, ebx
sub ecx, edi
add ecx, eax
push ecx
push edi
push esi
call dword [sym.imp.KERNEL32.dll__lwrite]
cmp eax, 0xffffffff
jne 0x401634
mov edx, dword [esp + 0x128]
push edx
push 0x40347c
call sub.MSVCRT.dll_printf
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll__lclose]
push ebx
call sub.MSVCRT.dll_free
add esp, 4
mov eax, 0xfffffffd
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
mov edx, dword [esp + 0x128]
push edx
push 0x40347c
call sub.MSVCRT.dll_printf
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll__lclose]
push ebx
call sub.MSVCRT.dll_free
add esp, 4
mov eax, 0xfffffffd
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
mov eax, dword [esp + 0x128]
push eax
push 0x40347c
call sub.MSVCRT.dll_printf
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll__lclose]
push ebx
call sub.MSVCRT.dll_free
add esp, 4
mov eax, 0xfffffffd
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
push esi
call dword [sym.imp.KERNEL32.dll__lclose]
push ebx
call sub.MSVCRT.dll_free
mov esi, dword [esp + 0x12c]
add esp, 4
lea eax, [esp + 0x20]
push 1
push esi
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
jne 0x401676
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push esi
push 0x403450
call sub.MSVCRT.dll_printf
add esp, 8
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret