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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2e30
call fcn.00440b60
mov eax, dword [0x4fa2a0]
xor eax, esp
mov dword [esp + 0x2e2c], eax
mov eax, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], edi
test edi, edi
je 0x40d80d
test ebx, ebx
je 0x40d80d
push 0x800
lea ecx, [esp + 0x181c]
push 0
push ecx
call fcn.00436f70
push 0x400
lea edx, [esp + 0x1828]
push ebx
push edx
call fcn.0042f9e6
add esp, 0x18
lea eax, [esp + 0x1818]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea ecx, [esp + 0x1818]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push 0x800
lea edx, [esp + 0x81c]
push 0
push edx
call fcn.00436f70
add esp, 0xc
lea eax, [esp + 0x818]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x40d47d
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
push 3
push ebx
push edi
call esi
test eax, eax
je 0x40d498
mov eax, 1
pop edi
pop esi
mov ecx, dword [esp + 0x2e2c]
xor ecx, esp
call fcn.0042cf67
mov esp, ebp
pop ebp
ret 4
push 0x800
lea ecx, [esp + 0x101c]
push 0
push ecx
call fcn.00436f70
add esp, 0xc
lea edx, [esp + 0x1018]
push edx
push 0
push str.neocell
lea eax, [esp + 0x824]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x40d7a6
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x2a2a]
push edx
mov word [esp + 0x2a2c], cx
call fcn.00436f70
lea edx, [esp + 0x2a2c]
add esp, 0xc
mov eax, ebx
sub edx, ebx
nop
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40d500
lea eax, [esp + 0x2a20]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea edi, [esp + 0x2a20]
add edi, 0xfffffffe
jmp 0x40d530
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x40d530
mov ecx, dword [0x4d4c6c]
push 0x800
lea edx, [esp + 0x201c]
push 0
push edx
mov dword [edi], ecx
call fcn.00436f70
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x2c3e]
push ecx
mov word [esp + 0x2c40], ax
call fcn.00436f70
add esp, 0x18
lea edx, [esp + 0x2c28]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [esp + 0x2018]
push eax
push 0
push str.neocell
lea ecx, [esp + 0x2c34]
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [esp + 0x2018]
lea esi, [esp + 8]
call fcn.00403290
lea edx, [esp + 0x2a20]
push edx
lea eax, [esp + 0x2c2c]
push eax
mov ecx, esi
push ecx
call fcn.0040a110
mov edi, dword [esp + 8]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x2822]
push eax
mov word [esp + 0x2824], dx
call fcn.00436f70
lea ecx, [esp + 0x2824]
add esp, 0xc
mov eax, ebx
sub ecx, ebx
jmp 0x40d610
movzx edx, word [eax]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x40d610
lea ecx, [esp + 0x2818]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [esp + 0x2818]
add eax, 0xfffffffe
jmp 0x40d640
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x40d640
mov edx, dword [str.Temp_]
mov ecx, dword [0x4d59cc]
mov dword [eax], edx
mov edx, dword [0x4d59d0]
mov dword [eax + 4], ecx
mov cx, word [0x4d59d4]
mov dword [eax + 8], edx
mov word [eax + 0xc], cx
lea eax, [esp + 0x1018]
lea esi, [esp + 0x10]
call fcn.00403290
lea edx, [esp + 0x2818]
push edx
lea eax, [esp + 0x81c]
push eax
mov ecx, esi
push ecx
call fcn.0040a110
push 0x800
lea edx, [esp + 0x1c]
push 0
push edx
call fcn.00436f70
mov esi, dword [esp + 0x1c]
push 0x400
lea eax, [esp + 0x28]
push esi
push eax
call fcn.0042f9e6
add esp, 0x18
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea edx, [esp + 0x18]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push 3
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
call edi
test eax, eax
je 0x40d716
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40d705
call fcn.0040d380
test eax, eax
jne 0x40d705
push 4
push eax
mov eax, esi
push eax
call edi
mov esi, dword [esp + 8]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40d738
jmp 0x40d71a
mov esi, dword [esp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40d738
call fcn.0040d380
test eax, eax
jne 0x40d738
mov ecx, dword [esp + 8]
push 4
push eax
push ecx
call edi
mov edx, dword [esp + 0xc]
push 0
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov esi, eax
test esi, esi
jne 0x40d758
mov eax, dword [esp + 0xc]
push 3
push ebx
push eax
call edi
mov esi, eax
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d778
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d798
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test esi, esi
jne 0x40d7f5
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov edi, dword [esp + 0xc]
push 0x800
lea ecx, [esp + 0x1c]
push 0
push ecx
call fcn.00436f70
add esp, 0xc
lea edx, [esp + 0x18]
push edx
push 0
push str.neocell
lea eax, [esp + 0x824]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push 3
lea ecx, [esp + 0x1c]
push ecx
push edi
call esi
push 5
push ebx
lea edx, [esp + 0x20]
push edx
call esi
mov esi, eax
mov eax, dword [esp + 0x14]
mov byte [eax + 0x2084], 0
mov eax, esi
pop edi
pop esi
mov ecx, dword [esp + 0x2e2c]
xor ecx, esp
call fcn.0042cf67
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esp + 0x2e34]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.0042cf67
mov esp, ebp
pop ebp
ret 4