Function at 0x401710
Capabilities:
Delete file
Move file

Disassembly:
push 0xffffffffffffffff
push 0x41f7db
mov eax, dword fs:[0]
push eax
sub esp, 0x25c
mov eax, dword [0x428c20]
xor eax, esp
mov dword [esp + 0x258], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x428c20]
xor eax, esp
push eax
lea eax, [esp + 0x270]
mov dword fs:[0], eax
mov ebx, ecx
mov esi, dword [ebx]
mov eax, dword [esi - 0xc]
mov edi, 1
test eax, eax
je 0x401917
push 0x250
lea eax, [esp + 0x20]
push 0
push eax
call fcn.0040f180
add esp, 0xc
lea ecx, [esp + 0x1c]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x401917
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebx]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4018ff
mov esi, dword [ebx]
mov ecx, dword [esi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
sub esi, 0x10
call eax
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x4017c9
cmp eax, dword [esi]
jne 0x4017c9
mov edi, esi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x401805
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
jne 0x4017e2
call fcn.004020a0
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax + 2]
push ecx
add esi, 0x10
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [edi + 0x10]
push eax
call fcn.0040c814
add esp, 0x10
add edi, 0x10
mov dword [esp + 0x18], edi
push 2
push 0x423c10
lea ecx, [esp + 0x20]
mov dword [esp + 0x280], 0
call fcn.00401e00
mov ebp, dword [esp + 0x18]
mov eax, dword [ebx]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
lea eax, [esp + 0x18]
jne 0x40183f
mov eax, ebx
mov esi, dword [eax]
mov ecx, dword [esi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
sub esi, 0x10
call eax
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x401868
cmp eax, dword [esi]
jne 0x401868
mov edi, esi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x4018a4
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
jne 0x401881
call fcn.004020a0
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax + 2]
push ecx
add esi, 0x10
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [edi + 0x10]
push eax
call fcn.0040c814
add esp, 0x10
lea esi, [edi + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4018bc
push 4
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4018d8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebp - 0x10]
mov dword [esp + 0x278], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4018ff
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [ebx]
lea ecx, [esp + 0x1c]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
xor edx, edx
cmp eax, 0xffffffff
sete dl
mov edi, edx
mov eax, edi
mov ecx, dword [esp + 0x270]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x258]
xor ecx, esp
call fcn.0040c7b4
add esp, 0x268
ret