Function at 0x475740
Capabilities:
Check if file exists
Delete file
Move file
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b993d
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x4e4018]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov ebx, ecx
mov dword [ebp - 0x24], ebx
push ebx
lea ecx, [ebp - 0x10]
call fcn.004066c0
mov dword [ebp - 4], 0
mov edx, 1
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax - 8]
sub edx, dword [eax - 4]
sub ecx, 0x104
or ecx, edx
jge 0x4757a7
push 0x104
lea ecx, [ebp - 0x10]
call fcn.00404650
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov eax, dword [ebp - 0x10]
push dword [eax - 8]
push eax
call fcn.0048fe2b
mov edx, eax
add esp, 8
test edx, edx
js 0x475958
mov ecx, dword [ebp - 0x10]
cmp edx, dword [ecx - 8]
jg 0x475958
mov dword [ecx - 0xc], edx
xor ecx, ecx
mov eax, dword [ebp - 0x10]
mov word [eax + edx*2], cx
push dword [ebp - 0x10]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4757f6
push dword [ebp - 0x10]
push eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
call fcn.00404a90
mov ecx, eax
test ecx, ecx
je 0x475962
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
lea edx, [ebp - 0x14]
mov byte [ebp - 4], 1
mov ecx, esi
call fcn.00475bc0
mov edi, dword [ebp - 0x14]
or esi, 0xffffffff
test eax, eax
je 0x475908
mov eax, dword [edi - 0xc]
mov dword [ebp - 0x1c], eax
test ebx, ebx
je 0x475908
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x475908
call fcn.00404a90
mov ecx, eax
test ecx, ecx
je 0x47596c
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
push ebx
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 2
push str._s.write_cache
push eax
call fcn.00403d00
mov esi, dword [ebp - 0x18]
add esp, 0xc
xor ebx, ebx
push ebx
push 0x80
push 2
push ebx
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x20], eax
cmp eax, 0xffffffff
je 0x4758e8
push ebx
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], ebx
push ecx
push dword [ebp - 0x1c]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x1c]
cmp dword [ebp - 0x18], eax
push dword [ebp - 0x20]
sete bl
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x4758e8
mov ebx, dword [ebp - 0x24]
push 0x80
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 1
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea edx, [esi - 0x10]
mov byte [ebp - 4], 1
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x47590a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x47590a
xor ebx, ebx
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x475925
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], esi
dec esi
test esi, esi
jg 0x475944
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00404860
push 0x80004005
call fcn.00404860
push 0x80004005
call fcn.00404860
int3