Function at 0x100058c6
Capabilities:
Check if file exists
Encode data using xor

Disassembly:
mov eax, 0x1008aa24
call fcn.1008a65c
sub esp, 0x538
push ebx
push esi
mov eax, ecx
push edi
push 0x1008f94c
mov dword [ebp - 0x1c], eax
lea edi, [eax + 0x1a8]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
xor ebx, ebx
inc ebx
cmp eax, ebx
jne 0x1000593e
push 0x1008f95c
lea ecx, [ebp - 0x54]
call fcn.10006726
and dword [ebp - 4], 0
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x24]
mov ecx, edi
push eax
call fcn.100074fa
push str.steam_api.tnk
mov esi, dword [eax]
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
push eax
push str.steam_api.tnk
lea ecx, [esi + 0x20]
call fcn.10006c1f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x54]
call fcn.10006af4
push 0x1008f994
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
cmp eax, ebx
jne 0x10005994
push str.steam_api64.dll
lea ecx, [ebp - 0x6c]
call fcn.10006726
lea eax, [ebp - 0x6c]
mov dword [ebp - 4], ebx
push eax
lea eax, [ebp - 0x34]
mov ecx, edi
push eax
call fcn.100074fa
push str.steam_api64.tnk
mov esi, dword [eax]
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
push eax
push str.steam_api64.tnk
lea ecx, [esi + 0x20]
call fcn.10006c1f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6c]
call fcn.10006af4
push 0x1008f9e4
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
cmp eax, ebx
jne 0x100059f7
push str.sdkencryptedappticket.dll
lea ecx, [ebp - 0x84]
call fcn.10006726
lea eax, [ebp - 0x84]
mov dword [ebp - 4], 2
push eax
lea eax, [ebp - 0x3c]
mov ecx, edi
push eax
call fcn.100074fa
push str.sdkencryptedappticket.tnk
mov esi, dword [eax]
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
push eax
push str.sdkencryptedappticket.tnk
lea ecx, [esi + 0x20]
call fcn.10006c1f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x84]
call fcn.10006af4
push 0x1008fa68
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
cmp eax, ebx
jne 0x10005a57
push str.sdkencryptedappticket64.dll
lea ecx, [ebp - 0x9c]
call fcn.10006726
lea eax, [ebp - 0x9c]
mov dword [ebp - 4], 3
push eax
lea eax, [ebp - 0x2c]
mov ecx, edi
push eax
call fcn.100074fa
mov edi, str.sdkencryptedappticket64.tnk
push edi
mov esi, dword [eax]
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
push eax
push edi
lea ecx, [esi + 0x20]
call fcn.10006c1f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x9c]
call fcn.10006af4
mov dword [ebp - 0x18], 0x70
xor edx, edx
mov byte [ebp - 0x14], 0x36
mov byte [ebp - 0x13], 0x31
mov byte [ebp - 0x12], 0x3b
mov byte [ebp - 0x11], 0x35
mov byte [ebp - 0x10], 0x23
mov al, byte [ebp - 0x14]
mov byte [ebp - 0xf], 0
mov al, byte [ebp + edx - 0x14]
mov ecx, dword [ebp - 0x18]
xor cl, al
mov byte [ebp + edx - 0x14], cl
inc edx
cmp edx, 5
jb 0x10005a7b
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0x14]
mov byte [ebp - 0xf], 0
call fcn.100552dc
mov ecx, eax
mov dword [ebp - 0x20], ecx
test ecx, ecx
je 0x10005bc6
xor edx, edx
call fcn.10055240
mov esi, eax
mov dword [ebp + 8], esi
test esi, esi
je 0x10005bc6
mov eax, dword [ebp - 0x1c]
add eax, 0x1a8
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x134]
mov edx, esi
push 0x80
push eax
call fcn.10001f6c
push esi
call dword [sym.imp.msvcrt.dll_strlen]
mov esi, eax
lea eax, [ebp - 0x134]
push eax
call dword [sym.imp.msvcrt.dll_strlen]
push 0x208
mov edi, eax
lea eax, [ebp - 0x544]
push 0
push eax
call sub.msvcrt.dll_memset
push 0x208
lea eax, [ebp - 0x33c]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0x28
lea eax, [ebp - 0x544]
push 0x104
push eax
push esi
push dword [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push 0
call esi
push 0x104
lea eax, [ebp - 0x33c]
push eax
push edi
lea eax, [ebp - 0x134]
push eax
push 0
push 0
call esi
lea eax, [ebp - 0x544]
push eax
lea ecx, [ebp - 0xb4]
call fcn.10006726
mov ecx, dword [ebp - 0x1c]
lea eax, [ebp - 0xb4]
push eax
lea eax, [ebp - 0x2c]
mov dword [ebp - 4], 4
push eax
call fcn.100074fa
mov esi, dword [eax]
lea eax, [ebp - 0x33c]
push eax
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
push eax
lea eax, [ebp - 0x33c]
push eax
lea ecx, [esi + 0x20]
call fcn.10006c1f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xb4]
call fcn.10006af4
mov ecx, dword [ebp - 0x20]
mov edx, ebx
call fcn.10055240
mov esi, eax
inc ebx
mov dword [ebp + 8], esi
test esi, esi
jne 0x10005ac9
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4