Function at 0x5050d0
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 0x50ca8a
mov eax, dword fs:[0]
push eax
sub esp, 0x11c
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 - 0xfc], 0
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x50558e
push 0x7c
call fcn.00418aea
add esp, 4
mov dword [ebp - 0x84], eax
mov dword [ebp - 4], 0
cmp dword [ebp - 0x84], 0
je 0x505161
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 - 0x100], eax
jmp 0x50516b
mov dword [ebp - 0x100], 0
mov edx, dword [ebp - 0x100]
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 0x524ea4
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 0x50552a
push 0x524ea8
mov eax, dword [ebp - 0x5c]
push eax
call fcn.00401000
add esp, 8
test eax, eax
je 0x5052a1
push 0x524eac
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 - 0xfc]
or edx, 1
mov dword [ebp - 0xfc], 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 0x5052a1
mov dword [ebp - 0x104], 1
jmp 0x5052ab
mov dword [ebp - 0x104], 0
mov al, byte [ebp - 0x104]
mov byte [ebp - 0x89], al
mov dword [ebp - 4], 2
mov ecx, dword [ebp - 0xfc]
and ecx, 1
je 0x5052db
and dword [ebp - 0xfc], 0xfffffffe
lea ecx, [ebp - 0xa8]
call fcn.00401260
movzx edx, byte [ebp - 0x89]
test edx, edx
je 0x50552a
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0xac], esp
push 4
call fcn.004eac00
mov dword [ebp - 0x108], eax
mov eax, dword [ebp - 0x108]
mov dword [ebp - 0x10c], eax
mov byte [ebp - 4], 4
push 0x524eb8
push 0x524eb0
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 - 0x110], eax
mov eax, dword [ebp - 0x110]
mov dword [ebp - 0x114], eax
mov byte [ebp - 4], 5
push 0x524ed4
push 0x524ecc
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 0x524eec
push 0x524ee4
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 [0x55bc34]
push eax
call fcn.004ed9d0
mov dword [ebp - 0x118], eax
mov ecx, dword [ebp - 0x118]
mov dword [ebp - 0x11c], ecx
mov byte [ebp - 4], 7
push 0x524f04
push 0x524efc
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 edx, dword [ebp + 0xc]
push edx
lea ecx, [ebp - 0xec]
call fcn.004edc90
mov byte [ebp - 4], 8
lea eax, [ebp - 0xec]
push eax
push 0x524f28
push 0x524f20
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 - 0xec]
call fcn.004eb3f0
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0xf0], esp
mov edx, dword [ebp + 0xc]
push edx
call fcn.004edc90
mov dword [ebp - 0x120], eax
mov eax, dword [ebp - 0x120]
mov dword [ebp - 0x124], eax
mov byte [ebp - 4], 9
push 0x524f44
lea ecx, [ebp - 0x54]
call fcn.004ee360
mov byte [ebp - 4], 2
mov ecx, eax
call fcn.004eb520
lea ecx, [ebp - 0x54]
push ecx
lea edx, [ebp - 0x7c]
push edx
lea ecx, [ebp - 0x38]
call fcn.004ea3e0
mov byte [ebp - 4], 0xa
push 0x80
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0x524f50
mov ecx, dword [ebp + 8]
push ecx
call fcn.0041625a
add esp, 8
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp - 0x3c]
push edx
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 eax, dword [ebp - 0x3c]
push eax
call fcn.00416bf5
add esp, 4
mov dword [ebp - 0x10], 1
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x7c]
call fcn.00401260
mov ecx, dword [ebp - 0x60]
mov dword [ebp - 0xf8], ecx
mov edx, dword [ebp - 0xf8]
mov dword [ebp - 0xf4], edx
cmp dword [ebp - 0xf4], 0
je 0x50555d
push 1
mov ecx, dword [ebp - 0xf4]
call fcn.00413240
mov dword [ebp - 0x128], eax
jmp 0x505567
mov dword [ebp - 0x128], 0
mov eax, dword [ebp - 0x5c]
push eax
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