Function at 0x51d0b0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x218
mov eax, dword [0x553d9c]
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 0x51d0f1
xor eax, eax
jmp 0x51d0fc
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 [0x546560]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov eax, str.tmp_media.html
mov dword [esp + 0x14], edx
test eax, eax
je 0x51d158
push eax
call ebx
mov esi, eax
test esi, esi
je 0x51d158
push esi
lea ecx, [esp + 0x18]
call fcn.00405530
test eax, eax
je 0x51d158
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 [0x546560]
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 [0x546564]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x51d1d8
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x51d1d8
mov edx, dword [esp + 0x18]
add edx, 0xfffffff4
push edx
call fcn.00531732
add esp, 4
mov eax, dword [esp + 0x14]
mov edx, dword [0x546564]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x51d203
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x51d203
mov edx, dword [esp + 0x14]
add edx, 0xfffffff4
push edx
call fcn.00531732
add esp, 4
mov eax, dword [0x546560]
mov ecx, str.MEDIA
test ecx, ecx
mov dword [esp + 0x10], eax
je 0x51d24b
push ecx
call ebx
mov esi, eax
test esi, esi
je 0x51d24b
push esi
lea ecx, [esp + 0x14]
call fcn.00405530
test eax, eax
je 0x51d24b
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 0x51d29a
cmp dword [0x55a1fc], 6
jb 0x51d29a
mov eax, str.MEDIA2018
test eax, eax
je 0x51d26b
push eax
call ebx
mov esi, eax
jmp 0x51d26d
xor esi, esi
push esi
lea ecx, [esp + 0x14]
call fcn.00405660
test eax, eax
je 0x51d29a
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 0x51d2bc
mov dword [ecx], eax
mov edx, dword [esp + 0x14]
add edx, 0xfffffff4
push edx
call ebx
jmp 0x51d2cd
mov eax, dword [0x546560]
mov dword [ecx], eax
mov edx, dword [esp + 0x14]
push edx
call fcn.00405920
lea eax, [esp + 0x1c]
push eax
call fcn.0048cab0
mov ecx, dword [ebp + 0x28]
mov edi, eax
lea esi, [ebp + 0x28]
add esp, 8
mov eax, dword [edi]
cmp ecx, eax
je 0x51d322
mov edx, dword [ecx - 0xc]
test edx, edx
jge 0x51d2fc
mov edx, dword [0x546564]
add ecx, 0xfffffff4
cmp ecx, edx
jne 0x51d303
mov ecx, dword [eax - 0xc]
test ecx, ecx
jge 0x51d311
mov ecx, dword [eax - 8]
push eax
push ecx
mov ecx, esi
call fcn.00405870
jmp 0x51d322
mov ecx, esi
call fcn.00412670
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