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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x46d2a8
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x4921d0]
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 0x40d371
test al, 0x10
je 0x40d389
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.00401c60
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.0044ce16
mov ecx, dword [esp + 0x28]
push ecx
push edx
push eax
lea edx, [esp + 0x28]
push str.Tmp_I64d__s
push edx
call fcn.0040b970
lea esi, [esp + 0x40]
call fcn.0040bf50
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x30]
push edx
mov ebx, eax
mov byte [esp + 0x60], 2
call fcn.00407390
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 0x40d42b
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 0x40d63b
mov eax, dword [ebp + 0xc]
mov edx, dword [eax]
cmp dword [edx - 0xc], 0
jne 0x40d54a
mov eax, dword [edi]
sub eax, 0x10
push eax
call fcn.004015f0
lea esi, [eax + 0x10]
add esp, 4
mov dword [esp + 0x1c], esi
mov byte [esp + 0x40], 5
cmp dword [esi - 4], 1
jle 0x40d483
mov eax, dword [esi - 0xc]
push eax
lea ecx, [esp + 0x20]
call fcn.00401990
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.0044ddfb
add esp, 8
test eax, eax
js 0x40d540
cmp eax, dword [esi - 8]
jg 0x40d540
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, 0x47bd18
call fcn.004060a0
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x38]
push edx
mov ebx, eax
mov byte [esp + 0x50], 6
call fcn.00407390
add esp, 0x10
lea edi, [esp + 0x14]
mov byte [esp + 0x40], 7
call fcn.00404aa0
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 0x40d511
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 0x40d536
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 0x40d5b2
push 0x80070057
call fcn.00401b10
push eax
lea ecx, [esp + 0x30]
push ecx
mov ebx, 0x47bd18
call fcn.004060a0
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x3c]
push ecx
mov ebx, eax
mov byte [esp + 0x50], 8
call fcn.00407390
add esp, 0x10
lea edi, [esp + 0x14]
mov byte [esp + 0x40], 9
call fcn.00404aa0
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 0x40d5a6
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 0x40d5cb
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 0x40d5e6
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x14]
cmp dword [eax - 4], 1
jle 0x40d601
mov eax, dword [eax - 0xc]
push eax
lea ecx, [esp + 0x18]
call fcn.00401990
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.0044ddfb
add esp, 8
test eax, eax
js 0x40d540
mov ecx, dword [esp + 0x14]
cmp eax, dword [ecx - 8]
jg 0x40d540
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 0x40d653
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 0x40d678
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 0x40d69c
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 0x40d6c4
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