Function at 0x10021bb0
Capabilities:
Check if file exists
Delete file
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1009deac
mov eax, dword fs:[0]
push eax
sub esp, 0x65c
mov eax, dword [0x100d07a8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x420]
push 0x208
push 0
push eax
mov dword [ebp - 0x65c], ebx
call fcn.10075650
add esp, 0xc
lea eax, [ebp - 0x420]
push 0x104
push eax
push dword [0x100d32e4]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov esi, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x420]
push eax
call esi
lea eax, [ebp - 0x420]
push eax
call esi
mov eax, dword [ebx]
xor esi, esi
cmp dword [eax - 0xc], esi
jl 0x10021d97
lea ecx, [ebp - 0x420]
push ecx
push eax
call fcn.10075a03
add esp, 8
test eax, eax
je 0x10021d97
mov edi, dword [ebx]
sub eax, edi
sar eax, 1
js 0x10021d97
push 0x100a8e20
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ebx, eax
test ebx, ebx
je 0x10021c93
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.Wow64DisableWow64FsRedirection
push ebx
call esi
push str.Wow64RevertWow64FsRedirection
push ebx
mov dword [ebp - 0x664], eax
call esi
mov dword [ebp - 0x660], eax
jmp 0x10021c99
mov eax, dword [ebp - 0x660]
mov ecx, dword [ebp - 0x664]
test ecx, ecx
je 0x10021cb0
test eax, eax
je 0x10021cb0
lea eax, [ebp - 0x668]
push eax
call ecx
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov esi, eax
cmp dword [ebp - 0x664], 0
mov dword [ebp - 4], 0
je 0x10021cdb
mov ecx, dword [ebp - 0x660]
test ecx, ecx
je 0x10021cdb
push dword [ebp - 0x668]
call ecx
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x10021d8c
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x10021d8c
push 0x208
push eax
lea eax, [ebp - 0x628]
push eax
call fcn.10075650
add esp, 0xc
lea eax, [ebp - 0x628]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.10075650
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
call fcn.100847e1
add esi, eax
lea eax, [ebp - 0x628]
push esi
push eax
push str._slds__u.tmp
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.100240b0
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea eax, [ebp - 0x218]
add esp, 0x14
push 1
push eax
push edi
call esi
push 4
push 0
test eax, eax
je 0x10021d89
lea eax, [ebp - 0x218]
push eax
jmp 0x10021d8a
push edi
call esi
mov ebx, dword [ebp - 0x65c]
mov esi, 1
call fcn.10003000
mov ecx, eax
test ecx, ecx
je 0x10021f90
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x65c], eax
push esi
push dword [ebx]
lea eax, [ebp - 0x65c]
mov dword [ebp - 4], 1
push str.Delete_LinkFile:_s_result:_d
push eax
call fcn.10002ef0
add esp, 0x10
call fcn.100689b0
mov ecx, eax
push 1
mov edx, dword [eax]
mov eax, dword [edx + 8]
call eax
mov esi, dword [ebp - 0x65c]
movzx eax, al
sub eax, 1
jne 0x10021f53
push 0x5c
push str.d:jenkins.jenkinsworkspacelib_commonpop_popexpoppop_popexpoppopexeserialrunner.cpp
lea ecx, [ebp - 0x658]
mov dword [ebp - 0x648], 0
mov dword [ebp - 0x644], 0xf
mov byte [ebp - 0x658], 0
call fcn.1000a260
push 3
push 0x100a680c
lea ecx, [ebp - 0x640]
mov byte [ebp - 4], 2
mov dword [ebp - 0x630], 0
mov dword [ebp - 0x62c], 0xf
mov byte [ebp - 0x640], 0
call fcn.1000a260
mov byte [ebp - 4], 3
call fcn.100689b0
mov ebx, eax
lea ecx, [ebp - 0xa8]
push 0x3e
lea eax, [ebp - 0x658]
push eax
lea eax, [ebp - 0x640]
push eax
call fcn.10004790
mov edi, eax
test esi, esi
mov byte [ebp - 4], 4
mov ecx, 0x100a68c0
cmovne ecx, esi
push ecx
push edi
call fcn.10003800
mov eax, dword [ebx]
add esp, 8
mov ecx, ebx
push edi
call dword [eax + 0x1c]
lea ecx, [ebp - 0xa8]
call fcn.10005bc0
mov edx, dword [ebp - 0x62c]
mov byte [ebp - 4], 2
cmp edx, 0x10
jb 0x10021ee3
mov ecx, dword [ebp - 0x640]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10021ed9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10021f9a
push edx
push ecx
call fcn.1006a15b
add esp, 8
mov edx, dword [ebp - 0x644]
mov dword [ebp - 0x630], 0
mov dword [ebp - 0x62c], 0xf
mov byte [ebp - 0x640], 0
mov byte [ebp - 4], 1
cmp edx, 0x10
jb 0x10021f38
mov ecx, dword [ebp - 0x658]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10021f2e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10021f9f
push edx
push ecx
call fcn.1006a15b
add esp, 8
mov dword [ebp - 0x648], 0
mov dword [ebp - 0x644], 0xf
mov byte [ebp - 0x658], 0
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x10021f72
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1006a4da
mov esp, ebp
pop ebp
ret 4
push 0x80004005
call fcn.10002c70
call fcn.10078889
call fcn.10078889
int3