Function at 0x507ad0
Capabilities:
Check if file exists
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50cb26
mov eax, dword fs:[0]
push eax
sub esp, 0xf4
mov eax, dword [0x531304]
xor eax, ebp
mov dword [ebp - 0x14], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0xdc], 0
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x507ef5
push 0x7c
call fcn.00418aea
add esp, 4
mov dword [ebp - 0x84], eax
mov dword [ebp - 4], 0
cmp dword [ebp - 0x84], 0
je 0x507b61
lea ecx, [ebp - 0x88]
push ecx
call fcn.004eee80
add esp, 4
push eax
mov ecx, dword [ebp - 0x84]
call fcn.004ef190
mov dword [ebp - 0xe0], eax
jmp 0x507b6b
mov dword [ebp - 0xe0], 0
mov edx, dword [ebp - 0xe0]
mov dword [ebp - 0x80], edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x60], eax
push 0
lea ecx, [ebp - 0x54]
call fcn.004ebad0
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x38]
call fcn.004e7500
mov byte [ebp - 4], 2
push 0x525a98
mov ecx, dword [ebp + 8]
push ecx
call fcn.0041625a
add esp, 8
mov dword [ebp - 0x3c], eax
push 2
push 0
mov edx, dword [ebp - 0x3c]
push edx
call fcn.00416afd
add esp, 0xc
mov eax, dword [ebp - 0x3c]
push eax
call fcn.004169d3
add esp, 4
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x58]
add ecx, 1
push ecx
call fcn.00415d52
add esp, 4
mov dword [ebp - 0x5c], eax
mov edx, dword [ebp - 0x58]
add edx, 1
push edx
push 0
mov eax, dword [ebp - 0x5c]
push eax
call fcn.00415fc0
add esp, 0xc
push 0
push 0
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.00416afd
add esp, 0xc
mov edx, dword [ebp - 0x3c]
push edx
push 1
mov eax, dword [ebp - 0x58]
push eax
mov ecx, dword [ebp - 0x5c]
push ecx
call fcn.0041651a
add esp, 0x10
mov edx, dword [ebp - 0x3c]
push edx
call fcn.00416bf5
add esp, 4
cmp dword [ebp - 0x58], 0x64
jle 0x507e91
push 0x525a9c
mov eax, dword [ebp - 0x5c]
push eax
call fcn.00401000
add esp, 8
test eax, eax
je 0x507ca1
push 0x525aa0
mov ecx, dword [ebp - 0x5c]
push ecx
call fcn.00401000
add esp, 8
push eax
lea ecx, [ebp - 0xa8]
call fcn.00401e20
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0xdc]
or edx, 1
mov dword [ebp - 0xdc], edx
push 1
lea eax, [ebp - 0x54]
push eax
lea ecx, [ebp - 0xa8]
push ecx
mov ecx, dword [ebp - 0x60]
call fcn.004f3df0
movzx edx, al
test edx, edx
je 0x507ca1
mov dword [ebp - 0xe4], 1
jmp 0x507cab
mov dword [ebp - 0xe4], 0
mov al, byte [ebp - 0xe4]
mov byte [ebp - 0x89], al
mov dword [ebp - 4], 2
mov ecx, dword [ebp - 0xdc]
and ecx, 1
je 0x507cdb
and dword [ebp - 0xdc], 0xfffffffe
lea ecx, [ebp - 0xa8]
call fcn.00401260
movzx edx, byte [ebp - 0x89]
test edx, edx
je 0x507e91
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0xac], esp
push 4
call fcn.004eac00
mov dword [ebp - 0xe8], eax
mov eax, dword [ebp - 0xe8]
mov dword [ebp - 0xec], eax
mov byte [ebp - 4], 4
push 0x525aac
push 0x525aa4
lea ecx, [ebp - 0x54]
call fcn.004ee360
mov ecx, eax
call fcn.004ee360
mov byte [ebp - 4], 2
mov ecx, eax
call fcn.004eb520
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0xb0], esp
mov edx, dword [0x55bc34]
push edx
call fcn.004ed9d0
mov dword [ebp - 0xf0], eax
mov eax, dword [ebp - 0xf0]
mov dword [ebp - 0xf4], eax
mov byte [ebp - 4], 5
push 0x525ac8
push 0x525ac0
lea ecx, [ebp - 0x54]
call fcn.004ee360
mov ecx, eax
call fcn.004ee360
mov byte [ebp - 4], 2
mov ecx, eax
call fcn.004eb520
mov ecx, dword [ebp + 0xc]
push ecx
lea ecx, [ebp - 0xcc]
call fcn.004edc90
mov byte [ebp - 4], 6
lea edx, [ebp - 0xcc]
push edx
push 0x525aec
push 0x525ae4
lea ecx, [ebp - 0x54]
call fcn.004ee360
mov ecx, eax
call fcn.004ee360
mov ecx, eax
call fcn.004ee2a0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xcc]
call fcn.004eb3f0
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0xd0], esp
mov eax, dword [ebp + 0xc]
push eax
call fcn.004edc90
mov dword [ebp - 0xf8], eax
mov ecx, dword [ebp - 0xf8]
mov dword [ebp - 0xfc], ecx
mov byte [ebp - 4], 7
push 0x525b08
lea ecx, [ebp - 0x54]
call fcn.004ee360
mov byte [ebp - 4], 2
mov ecx, eax
call fcn.004eb520
lea edx, [ebp - 0x54]
push edx
lea eax, [ebp - 0x7c]
push eax
lea ecx, [ebp - 0x38]
call fcn.004ea3e0
mov byte [ebp - 4], 8
push 0x80
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0x525b14
mov edx, dword [ebp + 8]
push edx
call fcn.0041625a
add esp, 8
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
push eax
push 1
lea ecx, [ebp - 0x7c]
call fcn.004012e0
push eax
call fcn.00415e20
add esp, 4
push eax
lea ecx, [ebp - 0x7c]
call fcn.004012e0
push eax
call fcn.004167ae
add esp, 0x10
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.00416bf5
add esp, 4
mov dword [ebp - 0x10], 1
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x7c]
call fcn.00401260
mov edx, dword [ebp - 0x60]
mov dword [ebp - 0xd8], edx
mov eax, dword [ebp - 0xd8]
mov dword [ebp - 0xd4], eax
cmp dword [ebp - 0xd4], 0
je 0x507ec4
push 1
mov ecx, dword [ebp - 0xd4]
call fcn.00413240
mov dword [ebp - 0x100], eax
jmp 0x507ece
mov dword [ebp - 0x100], 0
mov ecx, dword [ebp - 0x5c]
push ecx
call fcn.00415c75
add esp, 4
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x38]
call fcn.00410630
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x54]
call fcn.004eb3f0
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004158f4
mov esp, ebp
pop ebp
ret