Function at 0x4b7be0
Capabilities:
Check if file exists
Create directory
Get common file path

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x525d35
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x268
mov eax, dword [0x575054]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x268], eax
cmp dword [eax], 0
je 0x4b7c35
mov al, 1
jmp 0x4b7eb4
mov dword [ebp - 4], 0
xor eax, eax
mov dword [ebp - 0x250], 0
mov dword [ebp - 0x24c], 0
mov dword [ebp - 0x250], 0
mov dword [ebp - 0x24c], 7
mov word [ebp - 0x260], ax
push 0x20a
push eax
lea eax, [ebp - 0x248]
mov dword [ebp - 4], 1
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x248]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x4b7e8e
lea ecx, [ebp - 0x248]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4b7cb0
sub ecx, edx
lea eax, [ebp - 0x248]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x260]
call fcn.00405d80
push 0x12
push str.Temp2345_Crashes
lea ecx, [ebp - 0x260]
call fcn.00405d80
cmp dword [ebp - 0x24c], 8
lea eax, [ebp - 0x260]
cmovae eax, dword [ebp - 0x260]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4b7d28
cmp dword [ebp - 0x24c], 8
lea eax, [ebp - 0x260]
push 0
cmovae eax, dword [ebp - 0x260]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4b7e8e
push 0x100
call fcn.0050f8f0
mov edi, eax
add esp, 4
mov dword [ebp - 0x26c], edi
mov byte [ebp - 4], 6
test edi, edi
je 0x4b7d53
xor eax, eax
mov word [edi], ax
mov word [edi + 0x80], ax
jmp 0x4b7d55
xor edi, edi
push 0x53f338
push 0x40
mov byte [ebp - 4], 1
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
push edi
call esi
add esp, 0xc
lea eax, [ebp - 0x34]
xorps xmm0, xmm0
movups xmmword [ebp - 0x34], xmm0
push 0xa
push 0x10
push eax
mov eax, dword [ebp - 0x268]
movups xmmword [ebp - 0x24], xmm0
push dword [eax + 0x1c]
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__itow_s]
lea eax, [ebp - 0x34]
push eax
lea eax, [edi + 0x80]
push 0x40
push eax
call esi
add esp, 0x1c
mov dword [ebp - 0x274], edi
mov dword [ebp - 0x270], 1
push 0xc8
call fcn.0050f2a1
mov esi, eax
add esp, 4
mov dword [ebp - 0x26c], esi
mov edi, dword [ebp - 0x268]
add edi, 4
mov byte [ebp - 4], 7
cmp dword [edi + 0x14], 8
jb 0x4b7dda
mov edi, dword [edi]
lea ecx, [esi + 0x10]
mov dword [esi + 0xc], 0
call fcn.00403340
lea ecx, [esi + 0x28]
call fcn.00403340
lea ecx, [esi + 0x40]
call fcn.00403340
push 0x18
mov dword [esi + 0xc0], 0
mov dword [esi + 0xc4], 0
call fcn.0050f2a1
add esp, 4
mov esi, eax
push esi
push 4
call fcn.00402320
lea ecx, [esi + 4]
push ecx
push 4
mov dword [eax], esi
call fcn.00402320
add esp, 0x10
lea ecx, [ebp - 0x274]
mov dword [eax], esi
mov eax, dword [ebp - 0x26c]
push edi
push ecx
sub esp, 0x20
lea ecx, [ebp - 0x260]
mov dword [eax + 0xc0], esi
push ecx
mov ecx, eax
call fcn.00509507
mov eax, dword [ebp - 0x268]
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x26c]
mov esi, dword [eax]
mov dword [eax], ecx
test esi, esi
je 0x4b7e85
mov ecx, esi
call fcn.0050978c
push 0xc8
push esi
call fcn.0050f64c
add esp, 8
mov byte [ebp - 0x261], 1
jmp 0x4b7e95
mov byte [ebp - 0x261], 0
lea ecx, [ebp - 0x260]
mov dword [ebp - 4], 8
call fcn.00403370
mov al, byte [ebp - 0x261]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0050f27d
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4