Function at 0x523a6195
Capabilities:
Check if file exists
Create directory
Get common file path
Get disk information
Get file attributes

Disassembly:
push 0x788
push 0x523a9cb0
call fcn.523a85a4
mov edi, dword [ebp + 8]
mov dword [ebp - 0x790], edi
xor ebx, ebx
mov dword [ebp - 0x784], ebx
mov dword [ebp - 0x780], ebx
push ebx
mov esi, dword [sym.imp.KERNEL32.dll_SetErrorMode]
call esi
mov dword [ebp - 0x794], eax
push 1
call esi
cmp edi, ebx
je 0x523a61d6
cmp byte [edi], bl
jne 0x523a61d9
mov dword [ebp + 0xc], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x798], 1
mov dword [ebp - 0x788], ebx
mov edi, 0x52382dd0
mov esi, 0x105
cmp dword [ebp - 0x788], 4
jae 0x523a653f
mov eax, dword [ebp - 0x788]
sub eax, ebx
je 0x523a6321
dec eax
je 0x523a623b
dec eax
je 0x523a62f3
dec eax
jne 0x523a63d1
push 0x104
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push edi
push esi
jmp 0x523a63c5
push 1
push 0x1c
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
jl 0x523a62f3
lea eax, [ebp - 0x124]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x523a6264
sub eax, edx
push edi
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [ebp - 0x124]
push eax
call fcn.523895ad
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [ebp - 0x124]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x523a6295
sub eax, ecx
push 0x52382dd8
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [ebp - 0x124]
push eax
call fcn.523895ad
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x523a62d6
push ebx
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
jmp 0x523a62d9
xor eax, eax
inc eax
cmp eax, ebx
je 0x523a62f3
lea eax, [ebp - 0x124]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x523a62e6
push edi
jmp 0x523a63be
push 0x104
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x124]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x523a630e
sub eax, ecx
push 0x52381e84
jmp 0x523a63c0
cmp dword [ebp - 0x790], ebx
je 0x523a6534
mov eax, 0x100
push eax
lea ecx, [ebp - 0x63c]
push ecx
push eax
lea eax, [ebp - 0x53c]
push eax
push esi
lea eax, [ebp - 0x43c]
push eax
push 3
lea eax, [ebp - 0x78c]
push eax
push dword [ebp - 0x790]
call sub.msvcrt.dll__splitpath_s
add esp, 0x24
lea eax, [ebp - 0x78c]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 5
je 0x523a6534
cmp byte [ebp - 0x43c], bl
jne 0x523a6393
lea eax, [ebp - 0x124]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
jmp 0x523a63d1
lea eax, [ebp - 0x78c]
push eax
push esi
lea eax, [ebp - 0x124]
push eax
call fcn.5238953f
lea eax, [ebp - 0x124]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x523a63b0
lea ecx, [ebp - 0x43c]
push ecx
sub eax, edx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [ebp - 0x124]
push eax
call fcn.523895ad
cmp dword [ebp + 0xc], ebx
je 0x523a646f
lea eax, [ebp - 0x124]
push eax
push esi
lea eax, [ebp - 0x22c]
push eax
call fcn.5238953f
lea eax, [ebp - 0x22c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x523a63f7
sub eax, edx
lea ecx, [ebp - 0x53c]
push ecx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [ebp - 0x22c]
push eax
call fcn.523895ad
lea eax, [ebp - 0x22c]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x523a6421
sub eax, ecx
lea ecx, [ebp - 0x63c]
push ecx
mov ecx, esi
sub ecx, eax
push ecx
lea eax, [ebp - 0x22c]
push eax
call fcn.523895ad
lea eax, [ebp - 0x77c]
push eax
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x523a646f
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test byte [ebp - 0x77c], 1
jne 0x523a6534
lea eax, [ebp - 0x334]
push eax
push ebx
push 0x52382dd4
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x523a6534
push ebx
mov eax, dword [0x523adfbc]
sub eax, 3
neg eax
sbb eax, eax
and eax, 0x40000000
or eax, 0x20000080
push eax
push 2
push ebx
push ebx
push 0xc0000000
lea eax, [ebp - 0x334]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x784], eax
cmp eax, 0xffffffff
je 0x523a6534
push 0x25c
call fcn.5239450f
pop ecx
cmp eax, ebx
je 0x523a64e2
mov ecx, eax
call fcn.523a51fe
jmp 0x523a64e4
xor eax, eax
mov ecx, eax
mov dword [ebp - 0x780], ecx
call fcn.523a5231
mov eax, dword [ebp - 0x784]
mov dword [ebp - 0x784], ebx
push 1
push eax
lea eax, [ebp - 0x334]
push eax
lea eax, [ebp - 0x124]
push eax
mov ecx, dword [ebp - 0x780]
call fcn.523a5cf1
test eax, eax
jne 0x523a654e
mov ecx, dword [ebp - 0x780]
cmp ecx, ebx
je 0x523a652e
push 1
call fcn.52395933
mov dword [ebp - 0x780], ebx
inc dword [ebp - 0x788]
jmp 0x523a61f6
push ebx
push ebx
push 1
push 0xe0000002
call dword [sym.imp.KERNEL32.dll_RaiseException]
mov dword [ebp - 4], 0xfffffffe
mov dword [ebp - 0x798], 0
call fcn.523a6580
push dword [ebp - 0x794]
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov eax, dword [ebp - 0x780]
call fcn.523a85ec
ret 8