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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x644
mov eax, dword [0x62819c]
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.0050a260
add esp, 0x10
cmp dword [ebp - 0x638], 0x42ee
jb 0x50999a
push 0x208
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.0054b380
mov eax, dword [str.cldapi.dll]
mov dword [ebp - 0x20c], eax
mov eax, dword [0x5c8bc8]
mov dword [ebp - 0x208], eax
mov eax, dword [0x5c8bcc]
mov dword [ebp - 0x204], eax
mov eax, dword [0x5c8bd0]
mov dword [ebp - 0x200], eax
mov eax, dword [0x5c8bd4]
mov dword [ebp - 0x1fc], eax
mov ax, word [0x5c8bd8]
push 0x1f2
mov word [ebp - 0x1f8], ax
lea eax, [ebp - 0x1f6]
push 0
push eax
call fcn.0054b380
add esp, 0x18
lea eax, [ebp - 0x414]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x50999a
push 2
push 0x5ad728
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.00565afa
push 0x104
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.00565afa
add esp, 0x20
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x50999a
push 0x104
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
test eax, eax
jne 0x509835
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
je 0x509883
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00545ec7
mov esp, ebp
pop ebp
ret
push 2
push 0x5ad728
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.00565afa
push 0x104
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.00565afa
add esp, 0x20
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x50999a
push 0x208
lea eax, [ebp - 0x61c]
push 0
push eax
call fcn.0054b380
push 0x104
lea eax, [ebp - 0x61c]
push eax
push str.hasUsedWpsDrive
push str.SOFTWAREKingsoftWPSCloudusercenterwpsdrive
push 0x80000001
call fcn.0050e540
add esp, 0x20
test eax, eax
jne 0x509911
lea eax, [ebp - 0x61c]
push eax
lea ecx, [ebp - 0x634]
call fcn.0043e5b0
cmp dword [ebp - 0x624], 0
je 0x509906
lea eax, [ebp - 0x634]
push eax
call fcn.00512fa0
add esp, 4
test al, al
je 0x509906
lea ecx, [ebp - 0x634]
call fcn.0042a1f0
mov al, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00545ec7
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x634]
call fcn.0042a1f0
push 0x208
lea eax, [ebp - 0x61c]
push 0
push eax
call fcn.0054b380
push 0x104
lea eax, [ebp - 0x61c]
push eax
push str.hasUsedWpsDriveV2
push str.SOFTWAREKingsoftWPSCloudusercenterwpsdrive
push 0x80000001
call fcn.0050e540
add esp, 0x20
test eax, eax
jne 0x509988
lea eax, [ebp - 0x61c]
push eax
lea ecx, [ebp - 0x634]
call fcn.0043e5b0
cmp dword [ebp - 0x624], 0
je 0x50997d
lea eax, [ebp - 0x634]
push eax
call fcn.00512fa0
add esp, 4
test al, al
jne 0x5098eb
lea ecx, [ebp - 0x634]
call fcn.0042a1f0
push 1
call fcn.00512ff0
add esp, 4
test al, al
jne 0x5098f6
mov ecx, dword [ebp - 4]
xor al, al
xor ecx, ebp
call fcn.00545ec7
mov esp, ebp
pop ebp
ret