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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57820b
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x260
mov eax, dword [0x5bd250]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x224], ecx
mov eax, dword [ebp - 0x224]
cmp dword [eax + 0x210], 0
je 0x504e34
push 0x1000
mov ecx, dword [ebp - 0x224]
add ecx, 0x258
push ecx
mov ecx, dword [ebp - 0x224]
call fcn.00504b10
mov dword [ebp - 0x270], 0xa
mov dword [ebp - 0x26c], 0xa
xorpd xmm0, xmm0
movlpd qword [ebp - 0x238], xmm0
xorpd xmm0, xmm0
movlpd qword [ebp - 0x230], xmm0
mov edx, dword [ebp - 0x224]
cmp dword [edx + 0x20c], 0
jne 0x504e7b
mov dword [ebp - 0x23c], 1
jmp 0x504e85
mov dword [ebp - 0x23c], 0
mov al, byte [ebp - 0x23c]
mov byte [ebp - 0x225], al
mov dword [ebp - 4], 0
wait
mov dword [ebp - 0x268], 0
xor ecx, ecx
mov dword [ebp - 0x264], ecx
mov dword [ebp - 0x260], ecx
mov dword [ebp - 0x25c], ecx
mov dword [ebp - 0x258], ecx
mov dword [ebp - 0x254], ecx
mov dword [ebp - 0x250], ecx
mov dword [ebp - 0x24c], ecx
mov dword [ebp - 0x248], ecx
mov dword [ebp - 0x244], ecx
mov dword [ebp - 0x240], ecx
mov edx, dword [ebp - 0x224]
add edx, 0x258
mov dword [ebp - 0x268], edx
mov dword [ebp - 0x264], 0x493e0
mov eax, dword [ebp - 0x224]
add eax, 0x1258
mov dword [ebp - 0x260], eax
movzx ecx, byte [ebp - 0x225]
test ecx, ecx
je 0x504f37
mov dword [ebp - 0x244], 0x506430
mov edx, dword [ebp - 0x224]
mov eax, dword [edx + 0x208]
mov dword [ebp - 0x240], eax
jmp 0x504f41
mov dword [ebp - 0x248], 3
push 0x57f0f0
push 0x598710
sub esp, 8
movsd xmm0, qword [0x5a7cb0]
movsd qword [esp], xmm0
mov ecx, dword [ebp - 0x22c]
push ecx
mov edx, dword [ebp - 0x230]
push edx
mov eax, dword [ebp - 0x234]
push eax
mov ecx, dword [ebp - 0x238]
push ecx
push 3
mov ecx, dword [ebp - 0x224]
call fcn.00504c20
lea edx, [ebp - 0x268]
push edx
call fcn.00419d90
add esp, 4
test eax, eax
je 0x5051cb
movzx eax, byte [ebp - 0x225]
test eax, eax
je 0x50507c
mov ecx, dword [ebp - 0x224]
add ecx, 0x1258
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x50507c
xor edx, edx
mov word [ebp - 0x220], dx
push 0x208
push 0
lea eax, [ebp - 0x21e]
push eax
call fcn.0053e230
add esp, 0xc
push 0
push 0x10
lea ecx, [ebp - 0x220]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov edx, dword [ebp - 0x224]
add edx, 0x2f58
push edx
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov ecx, dword [ebp - 0x224]
add ecx, 0x49d8
push ecx
lea edx, [ebp - 0x220]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 0
lea eax, [ebp - 0x220]
push eax
mov ecx, dword [ebp - 0x224]
add ecx, 0x1258
push ecx
call fcn.00412060
add esp, 0xc
mov edx, dword [ebp - 0x224]
add edx, 0x1258
push edx
call fcn.00412670
add esp, 4
lea eax, [ebp - 0x220]
push eax
push 0x400
mov ecx, dword [ebp - 0x224]
add ecx, 0x1258
push ecx
call fcn.0041f950
push 0x57f0fc
push 0x598710
sub esp, 8
movsd xmm0, qword [0x5a7cb0]
movsd qword [esp], xmm0
mov edx, dword [ebp - 0x22c]
push edx
mov eax, dword [ebp - 0x230]
push eax
mov ecx, dword [ebp - 0x234]
push ecx
mov edx, dword [ebp - 0x238]
push edx
push 5
mov ecx, dword [ebp - 0x224]
call fcn.00504c20
test eax, eax
je 0x5051cb
mov eax, dword [ebp - 0x224]
cmp dword [eax + 0x214], 0
je 0x5051c6
movzx ecx, byte [ebp - 0x225]
test ecx, ecx
je 0x505156
mov edx, dword [ebp - 0x224]
add edx, 0x2258
push edx
mov esi, dword [ebp - 0x224]
add esi, 0x2358
mov eax, 0x4294
call fcn.0053fec0
mov ecx, 0x10a5
mov edi, esp
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x224]
add eax, 0x1a58
push eax
mov ecx, dword [ebp - 0x224]
add ecx, 0x1258
push ecx
mov edx, dword [ebp - 0x224]
add edx, 0x258
push edx
mov eax, dword [ebp - 0x224]
add eax, 0x218
push eax
mov ecx, 0x5c18ac
call fcn.005081f0
mov ecx, eax
call fcn.00503ff0
jmp 0x5051c6
mov ecx, dword [ebp - 0x224]
add ecx, 0x2258
push ecx
mov esi, dword [ebp - 0x224]
add esi, 0x65ec
mov eax, 0x2a34
call fcn.0053fec0
mov ecx, 0xa8d
mov edi, esp
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebp - 0x224]
add edx, 0x1a58
push edx
mov eax, dword [ebp - 0x224]
add eax, 0x1258
push eax
mov ecx, dword [ebp - 0x224]
add ecx, 0x258
push ecx
mov edx, dword [ebp - 0x224]
add edx, 0x218
push edx
mov ecx, 0x5c18ac
call fcn.005081f0
mov ecx, eax
call fcn.00504120
xor eax, eax
wait
jmp 0x505231
wait
jmp 0x5051d4
mov dword [ebp - 4], 0xffffffff
jmp 0x5051e4
movzx eax, byte [ebp - 0x225]
test eax, eax
je 0x50522f
push 0
push 0x598710
sub esp, 8
movsd xmm0, qword [0x5a7cb0]
movsd qword [esp], xmm0
mov ecx, dword [ebp - 0x22c]
push ecx
mov edx, dword [ebp - 0x230]
push edx
mov eax, dword [ebp - 0x234]
push eax
mov ecx, dword [ebp - 0x238]
push ecx
push 0x20
mov ecx, dword [ebp - 0x224]
call fcn.00504c20
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0053f9bc
mov esp, ebp
pop ebp
ret