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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x492d38
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x4c51d0]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4105e1
test al, 0x10
je 0x4105f9
mov eax, 1
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi]
mov ebx, 1
push eax
mov dword [esp + 0x24], ebx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
lea ecx, [esp + 0x28]
call fcn.00401c40
mov dword [esp + 0x40], 0
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
mov ecx, section..data
call edx
add eax, 0x10
mov dword [esp + 0x18], eax
push 0
mov byte [esp + 0x44], bl
call fcn.0046fd56
mov ecx, dword [esp + 0x28]
push ecx
push edx
push eax
lea edx, [esp + 0x28]
push str.Tmp_I64d__s
push edx
call fcn.0040d860
lea esi, [esp + 0x40]
call fcn.0040e710
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x30]
push edx
mov ebx, eax
mov byte [esp + 0x60], 2
call fcn.00407870
add esp, 0x20
mov byte [esp + 0x40], 4
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41069b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x14]
mov eax, dword [edi]
push 1
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x4108ab
mov eax, dword [ebp + 0xc]
mov edx, dword [eax]
cmp dword [edx - 0xc], 0
jne 0x4107ba
mov eax, dword [edi]
sub eax, 0x10
push eax
call fcn.004015d0
lea esi, [eax + 0x10]
add esp, 4
mov dword [esp + 0x1c], esi
mov byte [esp + 0x40], 5
cmp dword [esi - 4], 1
jle 0x4106f3
mov eax, dword [esi - 0xc]
push eax
lea ecx, [esp + 0x20]
call fcn.00401970
mov esi, dword [esp + 0x1c]
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.00470d3b
add esp, 8
test eax, eax
js 0x4107b0
cmp eax, dword [esi - 8]
jg 0x4107b0
mov dword [esi - 0xc], eax
xor ecx, ecx
lea edx, [esp + 0x1c]
mov word [esi + eax*2], cx
push edx
lea eax, [esp + 0x34]
push eax
mov ebx, 0x4a56e4
call fcn.00406710
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x38]
push edx
mov ebx, eax
mov byte [esp + 0x50], 6
call fcn.00407870
add esp, 0x10
lea edi, [esp + 0x14]
mov byte [esp + 0x40], 7
call fcn.00404ef0
mov byte [esp + 0x40], 6
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x410781
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x40], 5
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4107a6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x40], 4
lea eax, [esi - 0x10]
jmp 0x410822
push 0x80070057
call fcn.00401af0
push eax
lea ecx, [esp + 0x30]
push ecx
mov ebx, 0x4a56e4
call fcn.00406710
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x3c]
push ecx
mov ebx, eax
mov byte [esp + 0x50], 8
call fcn.00407870
add esp, 0x10
lea edi, [esp + 0x14]
mov byte [esp + 0x40], 9
call fcn.00404ef0
mov byte [esp + 0x40], 8
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x410816
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x40], 4
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41083b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp + 8]
mov edx, dword [esp + 0x14]
mov eax, dword [ecx]
push 1
push edx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x410856
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x14]
cmp dword [eax - 4], 1
jle 0x410871
mov eax, dword [eax - 0xc]
push eax
lea ecx, [esp + 0x18]
call fcn.00401970
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [esp + 0x14]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.00470d3b
add esp, 8
test eax, eax
js 0x4107b0
mov ecx, dword [esp + 0x14]
cmp eax, dword [ecx - 8]
jg 0x4107b0
mov dword [ecx - 0xc], eax
mov edx, dword [esp + 0x14]
xor ecx, ecx
mov word [edx + eax*2], cx
mov eax, dword [esp + 0x14]
push 4
xor ebx, ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x4108c3
mov dword [esp + 0x20], ebx
mov byte [esp + 0x40], 1
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4108e8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x40], bl
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41090c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x40], 0xffffffff
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x410934
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret