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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57ed59
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x636f58]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x48], edi
mov dword [ebp - 4], 0
xor eax, eax
mov dword [ebp - 0x58], 0
push eax
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
push 0x611bc8
mov dword [ebp - 0x5c], edi
mov word [edi], ax
call fcn.00402ed0
mov dword [ebp - 4], 0
mov dword [ebp - 0x58], 1
mov dword [ebp - 0x4c], 0
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
lea ecx, [ebp - 0x4c]
push ecx
push eax
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
jne 0x4052b1
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x50]
push eax
push 1
push 0
push 0
call dword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
xor ecx, ecx
mov dword [ebp - 0x44], ecx
cmp dword [ebp - 0x48], ecx
jbe 0x4052a8
xor esi, esi
nop
mov eax, dword [ebp - 0x50]
cmp dword [esi + eax + 8], 0
jne 0x40527e
lea ecx, [ebp - 0x4c]
push ecx
push dword [esi + eax]
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
jne 0x4052a8
mov ecx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x50]
cmp dword [esi + eax + 8], 1
jne 0x40529c
lea ecx, [ebp - 0x4c]
push ecx
push dword [esi + eax]
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
jne 0x4052a8
mov ecx, dword [ebp - 0x44]
inc ecx
add esi, 0xc
mov dword [ebp - 0x44], ecx
cmp ecx, dword [ebp - 0x48]
jb 0x405260
push dword [ebp - 0x50]
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov esi, dword [sym.imp.USERENV.dll_GetUserProfileDirectoryW]
lea eax, [ebp - 0x54]
push eax
push 0
push dword [ebp - 0x4c]
mov dword [ebp - 0x54], 0x1000
call esi
mov eax, dword [ebp - 0x54]
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00413757
mov ecx, eax
mov eax, dword [ebp - 0x54]
inc eax
mov dword [ebp - 0x44], ecx
push eax
push 0
push ecx
call fcn.005557e0
add esp, 0x10
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0x44]
push dword [ebp - 0x4c]
call esi
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x405317
cmp eax, 0xffffffff
je 0x405317
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x44]
xor eax, eax
mov ecx, esi
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405333
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x28]
call fcn.00402ed0
push esi
mov dword [ebp - 0x58], 3
call fcn.00413752
lea eax, [ebp - 0x28]
add esp, 4
cmp edi, eax
je 0x40537d
mov ecx, edi
call fcn.00402560
movups xmm0, xmmword [ebp - 0x28]
movups xmmword [edi], xmm0
movq xmm0, qword [ebp - 0x18]
movq qword [edi + 0x10], xmm0
jmp 0x4053b7
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x4053b7
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4053ad
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405566
push edx
push ecx
call fcn.0054d506
add esp, 8
push 0x611d78
mov ecx, edi
call fcn.00402a10
push str.Foxit_Software_
mov ecx, edi
call fcn.00402a10
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x4053d9
mov eax, dword [edi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4053f7
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x4053ee
mov eax, dword [edi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
xor eax, eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov dword [ebp - 4], 1
call fcn.00404ec0
test al, al
jne 0x405427
mov eax, str.Classic
mov ecx, 7
jmp 0x405431
mov eax, str.Continuous
mov ecx, 0xa
push ecx
push eax
lea ecx, [ebp - 0x40]
call fcn.00402ed0
push 0x611a4c
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x28]
call fcn.00402a90
add esp, 4
mov byte [ebp - 4], 2
mov edx, eax
cmp dword [eax + 0x14], 8
jb 0x40545c
mov edx, dword [eax]
mov ecx, dword [eax + 0x10]
mov esi, dword [edi + 0x10]
mov eax, dword [edi + 0x14]
sub eax, esi
mov dword [ebp - 0x48], esi
cmp ecx, eax
ja 0x4054a0
cmp dword [edi + 0x14], 8
lea eax, [esi + ecx]
mov dword [ebp - 0x44], eax
mov esi, edi
mov dword [edi + 0x10], eax
jb 0x405481
mov esi, dword [edi]
lea eax, [ecx + ecx]
push eax
mov eax, dword [ebp - 0x48]
push edx
lea eax, [esi + eax*2]
push eax
call fcn.00554910
mov eax, dword [ebp - 0x44]
add esp, 0xc
xor ecx, ecx
mov word [esi + eax*2], cx
jmp 0x4054b1
push ecx
push edx
mov byte [ebp - 0x48], 0
push dword [ebp - 0x48]
push ecx
mov ecx, edi
call fcn.00402b90
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x4054eb
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4054e1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40556b
push edx
push ecx
call fcn.0054d506
add esp, 8
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x4054f5
mov eax, dword [edi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x405513
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x40550a
mov eax, dword [edi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x405549
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40553f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405570
push edx
push ecx
call fcn.0054d506
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0054d4f5
mov esp, ebp
pop ebp
ret
call fcn.00559439
call fcn.00559439
call fcn.00559439
int3