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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x644
mov eax, dword [0x63434c]
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.00512d30
add esp, 0x10
cmp dword [ebp - 0x638], 0x42ee
jb 0x51216a
push 0x208
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.0055c530
mov eax, dword [str.cldapi.dll]
mov dword [ebp - 0x20c], eax
mov eax, dword [0x5d10c0]
mov dword [ebp - 0x208], eax
mov eax, dword [0x5d10c4]
mov dword [ebp - 0x204], eax
mov eax, dword [0x5d10c8]
mov dword [ebp - 0x200], eax
mov eax, dword [0x5d10cc]
mov dword [ebp - 0x1fc], eax
mov ax, word [0x5d10d0]
push 0x1f2
mov word [ebp - 0x1f8], ax
lea eax, [ebp - 0x1f6]
push 0
push eax
call fcn.0055c530
add esp, 0x18
lea eax, [ebp - 0x414]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x51216a
push 2
push 0x5b4804
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.0057a0f7
push 0x104
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.0057a0f7
add esp, 0x20
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x51216a
push 0x104
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
test eax, eax
jne 0x512005
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
je 0x512053
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00557e89
mov esp, ebp
pop ebp
ret
push 2
push 0x5b4804
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.0057a0f7
push 0x104
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.0057a0f7
add esp, 0x20
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x51216a
push 0x208
lea eax, [ebp - 0x61c]
push 0
push eax
call fcn.0055c530
push 0x104
lea eax, [ebp - 0x61c]
push eax
push str.hasUsedWpsDrive
push str.SOFTWAREKingsoftWPSCloudusercenterwpsdrive
push 0x80000001
call fcn.00514220
add esp, 0x20
test eax, eax
jne 0x5120e1
lea eax, [ebp - 0x61c]
push eax
lea ecx, [ebp - 0x634]
call fcn.0043fa80
cmp dword [ebp - 0x624], 0
je 0x5120d6
lea eax, [ebp - 0x634]
push eax
call fcn.00518500
add esp, 4
test al, al
je 0x5120d6
lea ecx, [ebp - 0x634]
call fcn.0042aad0
mov al, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00557e89
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x634]
call fcn.0042aad0
push 0x208
lea eax, [ebp - 0x61c]
push 0
push eax
call fcn.0055c530
push 0x104
lea eax, [ebp - 0x61c]
push eax
push str.hasUsedWpsDriveV2
push str.SOFTWAREKingsoftWPSCloudusercenterwpsdrive
push 0x80000001
call fcn.00514220
add esp, 0x20
test eax, eax
jne 0x512158
lea eax, [ebp - 0x61c]
push eax
lea ecx, [ebp - 0x634]
call fcn.0043fa80
cmp dword [ebp - 0x624], 0
je 0x51214d
lea eax, [ebp - 0x634]
push eax
call fcn.00518500
add esp, 4
test al, al
jne 0x5120bb
lea ecx, [ebp - 0x634]
call fcn.0042aad0
push 1
call fcn.005185c0
add esp, 4
test al, al
jne 0x5120c6
mov ecx, dword [ebp - 4]
xor al, al
xor ecx, ebp
call fcn.00557e89
mov esp, ebp
pop ebp
ret