Function at 0x51dd70
Capabilities:
Get common file path

Disassembly:
sub esp, 0x218
mov eax, dword [0x554e0c]
push ebx
push ebp
push esi
mov ebp, ecx
push edi
mov dword [esp + 0x20], eax
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x24]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x20]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea edx, [esp + 0x20]
lea edi, [ebp + 0x2c]
test edx, edx
jne 0x51ddb1
xor eax, eax
jmp 0x51ddbc
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [esp + 0x20]
push ecx
push eax
mov ecx, edi
call fcn.00405870
mov edx, dword [0x547570]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov eax, str.tmp_media.html
mov dword [esp + 0x14], edx
test eax, eax
je 0x51de18
push eax
call ebx
mov esi, eax
test esi, esi
je 0x51de18
push esi
lea ecx, [esp + 0x18]
call fcn.00405530
test eax, eax
je 0x51de18
mov ecx, dword [esp + 0x14]
inc esi
push esi
push str.tmp_media.html
push ecx
call fcn.00405400
add esp, 0xc
lea ecx, [esp + 0x14]
push 0xffffffffffffffff
call fcn.00405bb0
mov edx, dword [0x547570]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], edx
push eax
mov eax, dword [eax - 8]
push eax
mov eax, dword [esp + 0x234]
push eax
mov ecx, dword [eax - 8]
push ecx
lea ecx, [esp + 0x2c]
call fcn.004059f0
lea edx, [esp + 0x1c]
lea ecx, [esp + 0x18]
push edx
call fcn.00405440
lea ecx, [esp + 0x1c]
call fcn.00405700
mov eax, dword [esp + 0x18]
mov ecx, edi
push eax
mov eax, dword [eax - 8]
push eax
call fcn.00405a90
mov eax, dword [esp + 0x18]
mov edx, dword [0x547574]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x51de98
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x51de98
mov edx, dword [esp + 0x18]
add edx, 0xfffffff4
push edx
call fcn.00532222
add esp, 4
mov eax, dword [esp + 0x14]
mov edx, dword [0x547574]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x51dec3
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x51dec3
mov edx, dword [esp + 0x14]
add edx, 0xfffffff4
push edx
call fcn.00532222
add esp, 4
mov eax, dword [0x547570]
mov ecx, str.MEDIA
test ecx, ecx
mov dword [esp + 0x10], eax
je 0x51df0b
push ecx
call ebx
mov esi, eax
test esi, esi
je 0x51df0b
push esi
lea ecx, [esp + 0x14]
call fcn.00405530
test eax, eax
je 0x51df0b
mov edx, dword [esp + 0x10]
inc esi
push esi
push str.MEDIA
push edx
call fcn.00405400
add esp, 0xc
lea ecx, [esp + 0x10]
push 0xffffffffffffffff
call fcn.00405bb0
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x51df5a
cmp dword [0x55b29c], 6
jb 0x51df5a
mov eax, str.MEDIA2018
test eax, eax
je 0x51df2b
push eax
call ebx
mov esi, eax
jmp 0x51df2d
xor esi, esi
push esi
lea ecx, [esp + 0x14]
call fcn.00405660
test eax, eax
je 0x51df5a
mov ecx, dword [esp + 0x10]
inc esi
push esi
push str.MEDIA2018
push ecx
call fcn.00405400
add esp, 0xc
lea ecx, [esp + 0x10]
push 0xffffffffffffffff
call fcn.00405bb0
mov eax, dword [esp + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push ecx
mov edx, dword [eax - 0xc]
mov ecx, esp
test edx, edx
jl 0x51df7c
mov dword [ecx], eax
mov edx, dword [esp + 0x14]
add edx, 0xfffffff4
push edx
call ebx
jmp 0x51df8d
mov eax, dword [0x547570]
mov dword [ecx], eax
mov edx, dword [esp + 0x14]
push edx
call fcn.00405920
lea eax, [esp + 0x1c]
push eax
call fcn.0048da00
mov ecx, dword [ebp + 0x28]
mov edi, eax
lea esi, [ebp + 0x28]
add esp, 8
mov eax, dword [edi]
cmp ecx, eax
je 0x51dfe2
mov edx, dword [ecx - 0xc]
test edx, edx
jge 0x51dfbc
mov edx, dword [0x547574]
add ecx, 0xfffffff4
cmp ecx, edx
jne 0x51dfc3
mov ecx, dword [eax - 0xc]
test ecx, ecx
jge 0x51dfd1
mov ecx, dword [eax - 8]
push eax
push ecx
mov ecx, esi
call fcn.00405870
jmp 0x51dfe2
mov ecx, esi
call fcn.004124c0
mov eax, dword [edi]
mov dword [esi], eax
add eax, 0xfffffff4
push eax
call ebx
lea ecx, [esp + 0x18]
call fcn.00405700
lea ecx, [esp + 0x10]
call fcn.00405700
lea ecx, [esp + 0x22c]
call fcn.00405700
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x218
ret 4