Function at 0x422b70
Capabilities:
Check if file exists
Delete file
Move file
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x457eb6
mov eax, dword fs:[0]
push eax
sub esp, 0x644
mov eax, dword [0x46e3d0]
xor eax, esp
mov dword [esp + 0x640], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x46e3d0]
xor eax, esp
push eax
lea eax, [esp + 0x658]
mov dword fs:[0], eax
mov ebx, ecx
cmp dword [ebx + 0x18], 8
jb 0x422bb8
mov eax, dword [ebx + 4]
jmp 0x422bbb
lea eax, [ebx + 4]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x422d94
cmp dword [ebx + 0x14], 0
je 0x422d94
mov ebp, 1
push ebp
sub esp, 0x1c
mov edi, esp
push str._s_d
push 0x208
lea eax, [esp + 0x74]
push 0x104
mov ecx, 7
mov esi, ebx
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.0043ef21
add esp, 0x30
lea ecx, [esp + 0x4c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x422c5f
lea edx, [esp + 0x4c]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x422c5f
add ebp, 1
push ebp
sub esp, 0x1c
mov edi, esp
push str._s_d
push 0x208
lea eax, [esp + 0x74]
push 0x104
mov ecx, 7
mov esi, ebx
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.0043ef21
add esp, 0x30
lea ecx, [esp + 0x4c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x422c13
mov ebp, 8
cmp dword [ebx + 0x18], ebp
jb 0x422c6e
mov eax, dword [ebx + 4]
jmp 0x422c71
lea eax, [ebx + 4]
lea edx, [esp + 0x4c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x422d98
mov eax, ebx
call fcn.00406b10
push eax
push 0x4636b8
push 0x400
lea eax, [esp + 0x260]
push 0x200
push eax
call fcn.0043ef21
add esp, 0x14
lea ecx, [esp + 0x30]
call fcn.0042a750
xor edi, edi
mov dword [esp + 0x660], edi
mov ebx, 7
lea eax, [esp + 0x254]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], edi
mov word [esp + 0x18], di
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x422ce0
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x258]
push ecx
lea esi, [esp + 0x1c]
call fcn.00406f20
mov edx, esi
push edi
push edx
or eax, 0xffffffff
lea esi, [esp + 0x38]
mov byte [esp + 0x668], 1
call fcn.00406d90
cmp dword [esp + 0x2c], ebp
jb 0x422d2c
mov eax, dword [esp + 0x18]
push eax
call fcn.0043ef40
add esp, 4
cmp dword [esp + 0x48], ebp
mov edx, dword [esp + 0x34]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], edi
mov word [esp + 0x18], di
jae 0x422d47
lea edx, [esp + 0x34]
mov ebx, dword [0x471b30]
cmp ebx, edi
je 0x422d81
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x422d56
sub eax, esi
sar eax, 1
push ebx
lea ecx, [eax + eax]
push ecx
push 1
push edx
call fcn.0043fe21
mov edx, dword [0x471b30]
push edx
call fcn.004402ef
add esp, 0x14
cmp dword [esp + 0x48], ebp
jb 0x422d94
mov eax, dword [esp + 0x34]
push eax
call fcn.0043ef40
add esp, 4
xor eax, eax
jmp 0x422dd4
lea ecx, [esp + 0x4c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x422dc4
lea edx, [esp + 0x4c]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x422dc4
push 4
push eax
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea ecx, [esp + 0x4c]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, 1
mov ecx, dword [esp + 0x658]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x640]
xor ecx, esp
call fcn.0043ef12
add esp, 0x650
ret