Function at 0x47b090
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 0x4b8edd
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x4e3018]
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.00406470
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 0x47b0f7
push 0x104
lea ecx, [ebp - 0x10]
call fcn.00404400
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.0048ee69
mov edx, eax
add esp, 8
test edx, edx
js 0x47b2a8
mov ecx, dword [ebp - 0x10]
cmp edx, dword [ecx - 8]
jg 0x47b2a8
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 0x47b146
push dword [ebp - 0x10]
push eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
call fcn.00404840
mov ecx, eax
test ecx, ecx
je 0x47b2b2
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.0047b510
mov edi, dword [ebp - 0x14]
or esi, 0xffffffff
test eax, eax
je 0x47b258
mov eax, dword [edi - 0xc]
mov dword [ebp - 0x1c], eax
test ebx, ebx
je 0x47b258
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x47b258
call fcn.00404840
mov ecx, eax
test ecx, ecx
je 0x47b2bc
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.00403ab0
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 0x47b238
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 0x47b238
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 0x47b25a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x47b25a
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 0x47b275
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 0x47b294
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.00404610
push 0x80004005
call fcn.00404610
push 0x80004005
call fcn.00404610
int3