Function at 0x512e10
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x644
mov eax, dword [0x639354]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x63c]
mov dword [ebp - 0x644], 0
push eax
lea eax, [ebp - 0x638]
mov dword [ebp - 0x640], 0
push eax
lea eax, [ebp - 0x640]
mov dword [ebp - 0x638], 0
push eax
lea eax, [ebp - 0x644]
mov dword [ebp - 0x63c], 0
push eax
call fcn.00513cb0
add esp, 0x10
cmp dword [ebp - 0x638], 0x42ee
jb 0x5130ea
push 0x208
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.00560a80
mov eax, dword [str.cldapi.dll]
mov dword [ebp - 0x20c], eax
mov eax, dword [0x5d6160]
mov dword [ebp - 0x208], eax
mov eax, dword [0x5d6164]
mov dword [ebp - 0x204], eax
mov eax, dword [0x5d6168]
mov dword [ebp - 0x200], eax
mov eax, dword [0x5d616c]
mov dword [ebp - 0x1fc], eax
mov ax, word [0x5d6170]
push 0x1f2
mov word [ebp - 0x1f8], ax
lea eax, [ebp - 0x1f6]
push 0
push eax
call fcn.00560a80
add esp, 0x18
lea eax, [ebp - 0x414]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x5130ea
push 2
push 0x5b9804
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.0057e687
push 0x104
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.0057e687
add esp, 0x20
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x5130ea
push 0x104
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
test eax, eax
jne 0x512f85
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
je 0x512fd3
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055c3a9
mov esp, ebp
pop ebp
ret
push 2
push 0x5b9804
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.0057e687
push 0x104
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.0057e687
add esp, 0x20
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x5130ea
push 0x208
lea eax, [ebp - 0x61c]
push 0
push eax
call fcn.00560a80
push 0x104
lea eax, [ebp - 0x61c]
push eax
push str.hasUsedWpsDrive
push str.SOFTWAREKingsoftWPSCloudusercenterwpsdrive
push 0x80000001
call fcn.005151a0
add esp, 0x20
test eax, eax
jne 0x513061
lea eax, [ebp - 0x61c]
push eax
lea ecx, [ebp - 0x634]
call fcn.0043f5c0
cmp dword [ebp - 0x624], 0
je 0x513056
lea eax, [ebp - 0x634]
push eax
call fcn.005194a0
add esp, 4
test al, al
je 0x513056
lea ecx, [ebp - 0x634]
call fcn.0042ab30
mov al, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055c3a9
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x634]
call fcn.0042ab30
push 0x208
lea eax, [ebp - 0x61c]
push 0
push eax
call fcn.00560a80
push 0x104
lea eax, [ebp - 0x61c]
push eax
push str.hasUsedWpsDriveV2
push str.SOFTWAREKingsoftWPSCloudusercenterwpsdrive
push 0x80000001
call fcn.005151a0
add esp, 0x20
test eax, eax
jne 0x5130d8
lea eax, [ebp - 0x61c]
push eax
lea ecx, [ebp - 0x634]
call fcn.0043f5c0
cmp dword [ebp - 0x624], 0
je 0x5130cd
lea eax, [ebp - 0x634]
push eax
call fcn.005194a0
add esp, 4
test al, al
jne 0x51303b
lea ecx, [ebp - 0x634]
call fcn.0042ab30
push 1
call fcn.00519560
add esp, 4
test al, al
jne 0x513046
mov ecx, dword [ebp - 4]
xor al, al
xor ecx, ebp
call fcn.0055c3a9
mov esp, ebp
pop ebp
ret