Function at 0x4058b0
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 0x41a435
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x268
mov eax, dword [0x42801c]
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 0x405905
mov al, 1
jmp 0x405be2
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 0x405b68
lea eax, [ebp - 0x248]
push eax
call fcn.00403160
add esp, 4
lea ecx, [ebp - 0x260]
push eax
lea eax, [ebp - 0x248]
push eax
call fcn.004046e0
push str.Temp2345_Crashes
call fcn.00403160
add esp, 4
lea ecx, [ebp - 0x260]
push eax
push str.Temp2345_Crashes
call fcn.004046e0
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 0x4059f7
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 0x405b68
push 0x100
call fcn.00418ea4
mov edi, eax
add esp, 4
mov dword [ebp - 0x26c], edi
mov byte [ebp - 4], 6
test edi, edi
je 0x405a22
xor eax, eax
mov word [edi], ax
mov word [edi + 0x80], ax
jmp 0x405a24
xor edi, edi
push str.fulldump
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.0041874f
mov esi, eax
add esp, 4
mov dword [ebp - 0x26c], esi
mov edi, dword [ebp - 0x268]
lea eax, [edi + 4]
mov byte [ebp - 4], 7
cmp dword [eax + 0x14], 8
mov dword [ebp - 0x268], eax
jb 0x405ab5
mov eax, dword [eax]
mov dword [ebp - 0x268], eax
lea ecx, [esi + 0x10]
mov dword [esi + 0xc], 0
call fcn.00402f20
lea ecx, [esi + 0x28]
call fcn.00402f20
lea ecx, [esi + 0x40]
call fcn.00402f20
push 0x18
mov dword [esi + 0xc0], 0
mov dword [esi + 0xc4], 0
call fcn.0041874f
add esp, 4
mov esi, eax
push esi
push 4
call fcn.00401ef0
lea ecx, [esi + 4]
push ecx
push 4
mov dword [eax], esi
call fcn.00401ef0
add esp, 0x10
lea ecx, [ebp - 0x274]
mov dword [eax], esi
push dword [ebp - 0x268]
mov eax, dword [ebp - 0x26c]
push ecx
sub esp, 0x20
lea ecx, [ebp - 0x260]
mov dword [eax + 0xc0], esi
push ecx
mov ecx, eax
call fcn.00413ac4
mov byte [ebp - 4], 1
mov esi, dword [edi]
mov eax, dword [ebp - 0x26c]
mov dword [edi], eax
test esi, esi
je 0x405b5f
mov ecx, esi
call fcn.00413d49
push 0xc8
push esi
call fcn.004189fc
add esp, 8
mov byte [ebp - 0x261], 1
jmp 0x405b6f
mov byte [ebp - 0x261], 0
mov dword [ebp - 4], 8
mov edx, dword [ebp - 0x24c]
cmp edx, 8
jb 0x405bb8
mov ecx, dword [ebp - 0x260]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405bae
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x405bae
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004189fc
add esp, 8
xor eax, eax
mov dword [ebp - 0x250], 0
mov dword [ebp - 0x24c], 7
mov word [ebp - 0x260], ax
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.0041873e
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4