Function at 0x522f10
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x834
mov eax, dword [0x5ea2c4]
xor eax, esp
mov dword [esp + 0x830], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
xor edx, edx
push 0x206
mov dword [esp + 0x10], eax
push edx
lea eax, [esp + 0x432]
push eax
mov dword [esp + 0x1c], ecx
mov word [esp + 0x434], dx
call fcn.0052e300
add esp, 0xc
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x63a]
push edx
mov word [esp + 0x63c], cx
call fcn.0052e300
mov esi, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
add esp, 0xc
push 0
push 0x17
lea eax, [esp + 0x430]
push eax
push 0
call esi
test eax, eax
je 0x523088
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x22a]
push edx
mov word [esp + 0x22c], cx
call fcn.0052e300
add esp, 0xc
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x22]
push ecx
mov word [esp + 0x24], ax
call fcn.0052e300
lea edi, [esp + 0x434]
add esp, 0xc
add edi, 0xfffffffe
lea ecx, [ecx]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x522fe0
mov edx, dword [0x5a9d50]
mov ecx, dword [esp + 0xc]
push 0
lea eax, [esp + 0x634]
push eax
mov dword [edi], edx
push ecx
lea edx, [esp + 0x434]
push edx
mov ecx, ebx
call fcn.005231b0
test al, al
je 0x523088
lea eax, [esp + 0x630]
push eax
lea edi, [esp + 0x224]
call fcn.00522dc0
push 0x104
lea ecx, [esp + 0x1c]
push ecx
mov edx, edi
push edx
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x523042
sub eax, edx
sar eax, 1
je 0x523088
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x18]
mov ecx, eax
sub edx, ecx
nop
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x523060
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x830]
xor ecx, esp
call fcn.005273c3
mov esp, ebp
pop ebp
ret 8
push 0
push 2
lea edx, [esp + 0x430]
push edx
push 0
call esi
test eax, eax
je 0x52318e
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x22]
push ecx
mov word [esp + 0x24], ax
call fcn.0052e300
add esp, 0xc
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x22a]
push eax
mov word [esp + 0x22c], dx
call fcn.0052e300
lea edi, [esp + 0x434]
add esp, 0xc
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x5230e4
mov ecx, dword [0x5a9d50]
mov eax, dword [esp + 0xc]
push 0
lea edx, [esp + 0x634]
push edx
mov dword [edi], ecx
push eax
lea ecx, [esp + 0x434]
push ecx
mov ecx, ebx
call fcn.005231b0
test al, al
je 0x52318e
lea edx, [esp + 0x630]
push edx
lea edi, [esp + 0x1c]
call fcn.00522dc0
push 0x104
lea eax, [esp + 0x224]
push eax
mov ecx, edi
push ecx
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x523146
sub eax, edx
sar eax, 1
je 0x52318e
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x220]
mov ecx, eax
sub edx, ecx
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x523166
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x830]
xor ecx, esp
call fcn.005273c3
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [esp + 0x83c]
pop edi
pop esi
pop ebx
xor ecx, esp
xor al, al
call fcn.005273c3
mov esp, ebp
pop ebp
ret 8