Function at 0x40f3c9
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov edx, eax
lea eax, [ebp - 0x30]
mov dword [esp + 4], eax
mov dword [esp], edx
call dbg.oldfid
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40f409
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dbg.seterror
jmp 0x40f864
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x1ac]
mov eax, dword [ebp + 8]
movzx eax, word [eax + 0x1a8]
movzx edx, ax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x1ac]
mov dword [esp + 0xc], ecx
lea ecx, [t.actime]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call dbg.convM2D
cmp eax, 2
ja 0x40f45c
mov dword [esp + 4], str.bogus_wstat_buffer
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dbg.seterror
jmp 0x40f864
lea eax, [ebp - 0x30]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call dbg.fidstat
test eax, eax
jns 0x40f489
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dbg.seterror
jmp 0x40f864
mov dword [ebp - 0x10], 0xffffffff
mov eax, dword [ebp - 0x38]
movzx eax, byte [eax]
test al, al
je 0x40f50d
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call dbg.gname2user
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x40f4c6
mov dword [esp + 4], str.unknown_group
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dbg.seterror
jmp 0x40f864
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call dbg.gid2user
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + 0x38]
lea ecx, [ebp - 0x30]
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov dword [esp], edx
call dbg.groupchange
test eax, eax
jns 0x40f50d
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dbg.seterror
jmp 0x40f864
mov eax, dword [ebp - 0x58]
cmp eax, 0xffffffff
je 0x40f552
mov eax, dword [ebp - 0x58]
shr eax, 0x1f
mov edx, eax
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 0xe]
movzx eax, ax
and eax, 0xf000
cmp eax, 0x4000
sete al
xor eax, edx
test al, al
je 0x40f552
mov dword [esp + 4], str.wstat_cant_convert_between_files_and_directories
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dbg.seterror
jmp 0x40f864
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
mov dword [esp + 4], 0x4dad5b
mov dword [esp], eax
call sym._strcmp
test eax, eax
jne 0x40f584
mov dword [esp + 4], str.no_wstat_of_root
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dbg.seterror
jmp 0x40f864
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
mov dword [esp], eax
call dbg.rootpath
mov dword [esp], eax
call dbg.estrdup
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x58]
cmp eax, 0xffffffff
je 0x40f621
lea eax, [t.actime]
mov dword [esp], eax
call dbg.unixmode
movzx eax, ax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._chmod
test eax, eax
jns 0x40f621
mov eax, dword [0x52a760]
test eax, eax
je 0x40f5fc
lea eax, [t.actime]
mov dword [esp], eax
call dbg.unixmode
movzx eax, ax
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], str.chmod__s__0_luo__failed_n
mov dword [esp], 2
call dbg.fprint
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dbg.seterror
jmp 0x40f864
mov eax, dword [ebp - 0x50]
cmp eax, 0xffffffff
je 0x40f695
mov dword [ebp - 0x78], 0
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x74], eax
lea eax, [ebp - 0x78]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._utime
test eax, eax
jns 0x40f695
mov eax, dword [0x52a760]
test eax, eax
je 0x40f670
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], str.utime__s__failed_n
mov dword [esp], 2
call dbg.fprint
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dbg.seterror
jmp 0x40f864
mov eax, dword [ebp - 0x40]
movzx eax, byte [eax]
test al, al
je 0x40f7f1
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
mov dword [esp], eax
call dbg.estrdup
mov dword [ebp - 0x20], eax
mov dword [esp + 4], 0x2f
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._strrchr
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x20]
jb 0x40f728
mov eax, dword [ebp - 0x24]
mov byte [eax], 0
mov eax, dword [ebp - 0x40]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call dbg.estrpath
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call dbg.rootpath
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._strcmp
test eax, eax
je 0x40f7c7
jmp 0x40f740
mov dword [esp + 4], str.whoops:_cant_happen_in_u9fs
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dbg.seterror
jmp 0x40f864
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._rename
test eax, eax
jns 0x40f7c7
mov eax, dword [0x52a760]
test eax, eax
je 0x40f781
mov eax, dword [ebp - 0x28]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], eax
mov dword [esp + 4], str.rename__s___s__failed_n
mov dword [esp], 2
call dbg.fprint
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dbg.seterror
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sym._free
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._free
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._free
jmp 0x40f864
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x28]
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._free
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._free
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sym._free
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x44]
not eax
not edx
or eax, edx
test eax, eax
je 0x40f864
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x44]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call dbg.truncate
test eax, eax
jns 0x40f864
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x44]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edx
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], str.truncate__s___lld__failed_n
mov dword [esp], 2
call dbg.fprint
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dbg.seterror
nop
leave
ret