Function at 0x10031570
Capabilities:
Check if file exists
Copy file
Delete file
Get file attributes
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100f6f41
mov eax, dword fs:[0]
push eax
sub esp, 0x1c4
mov eax, dword [0x1013cfc4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x9c], edi
mov dword [ebp - 0x90], eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10031b41
call fcn.10009850
mov ecx, eax
test ecx, ecx
je 0x10031b62
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x94], eax
push edi
lea ecx, [ebp - 0x94]
mov dword [ebp - 4], 0
call fcn.10033750
test al, al
jne 0x1003161d
test edi, edi
jne 0x100315fc
xor ecx, ecx
jmp 0x10031610
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10031601
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x94]
call fcn.1000a120
mov esi, dword [ebp - 0x94]
push esi
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x8c], 0
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10031660
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, eax
test cl, 0x10
je 0x10031660
xor eax, eax
mov edx, 1
cmp ecx, 0xffffffff
cmovne eax, edx
mov dword [ebp - 0x8c], eax
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x10031678
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp - 0x8c], 0
jne 0x10031b41
mov esi, dword [ebp + 0x10]
xor eax, eax
test esi, esi
sete al
push eax
push dword [ebp - 0x90]
mov dword [ebp - 0xa0], eax
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov edi, eax
mov dword [ebp - 0x8c], edi
test edi, edi
jne 0x10031b39
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x50
jne 0x100316cc
test esi, esi
jne 0x100316cc
lea esi, [eax - 0x4f]
jmp 0x10031b43
call fcn.10078910
mov ecx, eax
push 1
mov edx, dword [eax]
mov eax, dword [edx + 8]
call eax
movzx eax, al
sub eax, 1
jne 0x1003185e
call edi
push 0x74
push str.d:jenkins.jenkinsworkspacelib_commonjs_basic_branchjs_basicjs_basicjs_basicjsexternalcpp_interface_misc.cc
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0xf
mov byte [ebp - 0x70], 0
call fcn.1000af60
push 3
push 0x10104f40
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 1
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
call fcn.1000af60
mov byte [ebp - 4], 2
call fcn.10078910
mov dword [ebp - 0x98], eax
lea ecx, [ebp - 0x138]
push 0x914
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.10007c00
mov edi, eax
push str.Failed_to_copy_file
push edi
mov byte [ebp - 4], 3
call fcn.10005ad0
mov eax, dword [ebp - 0x9c]
mov esi, str._null_
test eax, eax
mov ecx, esi
cmovne ecx, eax
push ecx
push edi
call fcn.10005ad0
push str._to
push edi
call fcn.10005ad0
mov eax, dword [ebp - 0x90]
test eax, eax
cmovne esi, eax
push esi
push edi
call fcn.10005ad0
push str.__err:
push edi
call fcn.10005ad0
add esp, 0x28
mov ecx, edi
push dword [ebp - 0x94]
call fcn.10014680
mov ecx, dword [ebp - 0x98]
push edi
mov eax, dword [ecx]
call dword [eax + 0x1c]
lea ecx, [ebp - 0x138]
call fcn.10009000
mov edx, dword [ebp - 0x14]
mov byte [ebp - 4], 1
cmp edx, 0x10
jb 0x10031811
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10031807
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10031b6c
push edx
push ecx
call fcn.100ab24f
add esp, 8
mov edx, dword [ebp - 0x5c]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
mov dword [ebp - 4], 0xffffffff
cmp edx, 0x10
jb 0x1003185e
mov ecx, dword [ebp - 0x70]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10031854
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10031b71
push edx
push ecx
call fcn.100ab24f
add esp, 8
mov edi, dword [ebp - 0x90]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10031b39
mov ecx, edi
mov dword [ebp - 0x18], 0
xor eax, eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10031890
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x28]
call fcn.1000b050
push 4
push str..tmp
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 4
call fcn.10018610
mov dword [ebp - 0x30], 0
xor ecx, ecx
mov dword [ebp - 0x2c], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x40], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x30], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
mov edx, dword [ebp - 0x14]
mov byte [ebp - 4], 6
cmp edx, 8
jb 0x1003192f
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10031925
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10031b76
push edx
push ecx
call fcn.100ab24f
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
cmp dword [ebp - 0x2c], 8
mov word [ebp - 0x28], ax
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push eax
mov dword [ebp - 0x14], 7
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
mov dword [ebp - 0x98], eax
call fcn.10078910
push 1
mov ecx, eax
mov edx, dword [eax]
mov edx, dword [edx + 8]
call edx
movzx ecx, al
sub ecx, 1
jne 0x10031ada
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x74
push str.d:jenkins.jenkinsworkspacelib_commonjs_basic_branchjs_basicjs_basicjs_basicjsexternalcpp_interface_misc.cc
lea ecx, [ebp - 0x88]
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x74], 0xf
mov byte [ebp - 0x88], 0
call fcn.1000af60
push 3
push 0x10104f40
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 7
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0xf
mov byte [ebp - 0x58], 0
call fcn.1000af60
mov byte [ebp - 4], 8
call fcn.10078910
mov edi, eax
lea ecx, [ebp - 0x1d0]
push 0x91c
lea eax, [ebp - 0x88]
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.10007c00
mov esi, eax
push str.Move_ret:
push esi
mov byte [ebp - 4], 9
call fcn.10005ad0
add esp, 8
mov ecx, esi
push dword [ebp - 0x98]
call fcn.100144d0
push 0x101080ec
push esi
call fcn.10005ad0
add esp, 8
mov ecx, esi
push dword [ebp - 0x8c]
call fcn.10014680
mov eax, dword [edi]
mov ecx, edi
push esi
call dword [eax + 0x1c]
lea ecx, [ebp - 0x1d0]
call fcn.10009000
mov edx, dword [ebp - 0x44]
cmp edx, 0x10
jb 0x10031a8b
mov ecx, dword [ebp - 0x58]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10031a81
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10031b7b
push edx
push ecx
call fcn.100ab24f
add esp, 8
mov edx, dword [ebp - 0x74]
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0xf
mov byte [ebp - 0x58], 0
cmp edx, 0x10
jb 0x10031ad4
mov ecx, dword [ebp - 0x88]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10031aca
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10031b80
push edx
push ecx
call fcn.100ab24f
add esp, 8
mov edi, dword [ebp - 0x90]
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [ebp - 0xa0]
push edi
push dword [ebp - 0x9c]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov edx, dword [ebp - 0x2c]
mov esi, eax
cmp edx, 8
jb 0x10031b43
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10031b2d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10031b85
push edx
push ecx
call fcn.100ab24f
add esp, 8
jmp 0x10031b43
mov esi, dword [ebp - 0x8c]
jmp 0x10031b43
xor esi, esi
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100ab5ce
mov esp, ebp
pop ebp
ret 0xc
push 0x80004005
call fcn.10009640
call fcn.100c9e7a
call fcn.100c9e7a
call fcn.100c9e7a
call fcn.100c9e7a
call fcn.100c9e7a
call fcn.100c9e7a
int3