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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe4
mov eax, dword [0x58f860]
xor eax, ebp
mov dword [ebp - 0x48], eax
mov dword [ebp - 0xe4], ecx
mov eax, dword [ebp - 0xe4]
cmp dword [eax + 0x20c], 0
jle 0x496e6f
xor eax, eax
jmp 0x497259
lea ecx, [ebp - 0x30]
call fcn.0042e670
push 0
mov ecx, dword [ebp - 0xe4]
add ecx, 4
push ecx
call fcn.0042cf40
add esp, 8
mov dword [ebp - 0x38], eax
push ecx
mov ecx, esp
mov edx, dword [ebp - 0x38]
push edx
call fcn.0041c8a0
lea eax, [ebp - 0xb0]
push eax
lea ecx, [ebp - 0x30]
call fcn.0042e6e0
mov ecx, dword [ebp - 0x38]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0xb8], eax
cmp dword [ebp - 0xb8], 0xffffffff
je 0x496eed
mov edx, dword [ebp - 0xb8]
and edx, 1
je 0x496eed
mov eax, dword [ebp - 0xb8]
and eax, 0xfffffffe
mov dword [ebp - 0xb8], eax
mov ecx, dword [ebp - 0xb8]
push ecx
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [ebp - 0x38], 0
je 0x496f12
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0xc4], eax
mov ecx, dword [ebp - 0xc4]
push ecx
call fcn.005124eb
add esp, 4
mov dword [ebp - 0x38], 0
lea ecx, [ebp - 0xb0]
call fcn.0041cb20
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x496f3f
push ecx
mov ecx, esp
lea edx, [ebp - 0xb0]
push edx
call fcn.0041c880
lea ecx, [ebp - 0x30]
call fcn.00443530
mov dword [ebp - 0x40], 0
push ecx
mov ecx, esp
lea eax, [ebp - 0xb0]
push eax
call fcn.0041c880
lea ecx, [ebp - 0xac]
push ecx
lea ecx, [ebp - 0x30]
call fcn.00497270
push 0
lea ecx, [ebp - 0xac]
call fcn.0041cb20
push eax
call fcn.00420250
add esp, 8
mov dword [ebp - 4], eax
lea ecx, [ebp - 0xa8]
call fcn.00414a10
lea edx, [ebp - 0xa8]
push edx
mov eax, dword [ebp - 0xe4]
mov ecx, dword [eax + 0x210]
mov edx, dword [ebp - 0xe4]
mov eax, dword [edx + 0x210]
mov edx, dword [ecx]
mov ecx, eax
mov eax, dword [edx + 0x40]
call eax
lea ecx, [ebp - 0xa8]
call fcn.004972f0
mov dword [ebp - 0x14], eax
push 0xfde9
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.0042cf40
add esp, 8
push eax
lea ecx, [ebp - 0x3c]
call fcn.00497510
lea ecx, [ebp - 0x3c]
call fcn.00497570
push eax
call fcn.0051330e
add esp, 4
lea edx, [eax + eax + 4]
mov dword [ebp - 0x34], edx
mov eax, dword [ebp - 0x34]
push eax
call fcn.004c8580
add esp, 4
mov dword [ebp - 0xd0], eax
mov ecx, dword [ebp - 0xd0]
push ecx
lea ecx, [ebp - 0x18]
call fcn.0048b9f0
mov edx, dword [ebp - 0x34]
push edx
push 0
lea ecx, [ebp - 0x18]
call fcn.0048ba50
push eax
call fcn.00512af0
add esp, 0xc
mov eax, 0xfeff
mov word [ebp - 0x10], ax
push 2
lea ecx, [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x34]
push edx
lea ecx, [ebp - 0x18]
call fcn.0048ba50
push eax
call fcn.00517ac7
add esp, 0x10
mov eax, dword [ebp - 0x34]
sub eax, 2
push eax
lea ecx, [ebp - 0x3c]
call fcn.00497570
push eax
mov ecx, dword [ebp - 0x34]
sub ecx, 2
push ecx
lea ecx, [ebp - 0x18]
call fcn.0048ba50
add eax, 2
push eax
call fcn.00517ac7
add esp, 0x10
mov dword [ebp - 0xc], 0
push 0
lea ecx, [ebp - 0xb4]
call fcn.0048b9f0
mov edx, dword [ebp - 0xe4]
cmp dword [edx + 0x22c], 0
je 0x4970ce
lea eax, [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
lea ecx, [ebp - 0x18]
call fcn.0048ba50
push eax
mov edx, dword [ebp - 0xe4]
add edx, 0x230
push edx
call fcn.00497310
add esp, 0x10
push eax
lea ecx, [ebp - 0xb4]
call fcn.004974b0
jmp 0x49711d
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.004c8580
add esp, 4
mov dword [ebp - 0xd4], eax
mov edx, dword [ebp - 0xd4]
push edx
lea ecx, [ebp - 0xb4]
call fcn.004974b0
mov eax, dword [ebp - 0x34]
push eax
lea ecx, [ebp - 0x18]
call fcn.0048ba50
push eax
mov ecx, dword [ebp - 0xc]
push ecx
lea ecx, [ebp - 0xb4]
call fcn.0048ba50
push eax
call fcn.00517ac7
add esp, 0x10
mov dword [ebp - 8], 0
push 0x564634
mov edx, dword [ebp - 4]
push edx
lea eax, [ebp - 8]
push eax
call fcn.005125c9
add esp, 0xc
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
jne 0x4971d7
cmp dword [ebp - 8], 0
je 0x4971d7
mov ecx, dword [ebp - 8]
push ecx
push 1
mov edx, dword [ebp - 0xc]
push edx
lea ecx, [ebp - 0xb4]
call fcn.0048ba50
push eax
call fcn.00513294
add esp, 0x10
mov eax, dword [ebp - 8]
push eax
call fcn.00512a79
add esp, 4
mov dword [ebp - 0xbc], 0
jmp 0x497195
mov ecx, dword [ebp - 0xbc]
add ecx, 1
mov dword [ebp - 0xbc], ecx
cmp dword [ebp - 0xbc], 0xa
jge 0x4971c0
mov edx, dword [ebp - 0xe4]
add edx, 4
push ecx
mov ecx, esp
push edx
call fcn.0047d960
call fcn.0042cfc0
add esp, 4
test eax, eax
je 0x4971be
jmp 0x4971c0
jmp 0x497186
mov eax, dword [ebp - 0xe4]
add eax, 4
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov dword [ebp - 0x40], eax
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 4], 0
je 0x497206
mov eax, dword [ebp - 4]
mov dword [ebp - 0xdc], eax
mov ecx, dword [ebp - 0xdc]
push ecx
call fcn.005124eb
add esp, 4
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x40]
mov dword [ebp - 0xe0], edx
lea ecx, [ebp - 0xb4]
call fcn.0048ba10
lea ecx, [ebp - 0x18]
call fcn.0048ba10
lea ecx, [ebp - 0x3c]
call fcn.00497530
lea ecx, [ebp - 0xa8]
call fcn.00414be0
lea ecx, [ebp - 0xac]
call fcn.0040f740
lea ecx, [ebp - 0xb0]
call fcn.0040f740
lea ecx, [ebp - 0x30]
call fcn.0042e690
mov eax, dword [ebp - 0xe0]
mov ecx, dword [ebp - 0x48]
xor ecx, ebp
call fcn.00512610
mov esp, ebp
pop ebp
ret