Function at 0x5131d0
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x414]
sub esp, 0x414
push 0xffffffffffffffff
push 0x5c70a7
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x72cec4]
xor eax, ebp
mov dword [ebp + 0x410], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0x41c]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x10], 0
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
lea eax, [ebp + 0x208]
mov dword [ebp - 4], 0
push eax
push 0x104
mov dword [ebp - 0x10], 1
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov ebx, eax
or edi, 0xffffffff
test ebx, ebx
je 0x51333a
push 0x104
lea eax, [ebp]
push eax
lea eax, [ebp + 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
je 0x513293
cmp eax, 0x104
jae 0x513293
push eax
lea eax, [ebp]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.004b6680
add esp, 0xc
mov edx, eax
lea ebx, [edi + 4]
jmp 0x5132ae
push ebx
lea eax, [ebp + 0x208]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.004b6680
add esp, 0xc
mov edx, eax
mov ebx, 5
mov ecx, dword [esi]
mov eax, dword [edx]
mov dword [esi], eax
mov eax, dword [edx + 4]
mov dword [edx], ecx
mov ecx, dword [esi + 4]
mov dword [esi + 4], eax
mov eax, dword [edx + 8]
mov dword [edx + 4], ecx
mov ecx, dword [esi + 8]
mov dword [esi + 8], eax
mov dword [ebp - 0x10], ebx
mov dword [edx + 8], ecx
test bl, 4
je 0x513302
mov ecx, dword [ebp - 0x30]
and ebx, 0xfffffffb
mov dword [ebp - 0x10], ebx
test ecx, ecx
je 0x513302
mov eax, edi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x513302
push 4
push 2
push dword [ebp - 0x30]
call fcn.00461780
add esp, 0xc
mov dword [ebp - 4], 0
test bl, 2
je 0x51333a
mov ecx, dword [ebp - 0x1c]
and ebx, 0xfffffffd
mov dword [ebp - 0x10], ebx
test ecx, ecx
je 0x51333a
mov eax, edi
lock xadd dword [ecx], eax
cmp eax, 1
setne al
test al, al
jne 0x51333a
push 4
push 2
push dword [ebp - 0x1c]
call fcn.00461780
add esp, 0xc
cmp dword [esi + 8], 0
je 0x5133b1
mov ebx, 0x5c
push 1
push ecx
mov eax, esp
mov ecx, esi
mov word [eax], bx
call fcn.00492aa0
test al, al
je 0x513363
push 1
mov ecx, esi
call fcn.00491ec0
jmp 0x513345
lea eax, [ebp - 0x1c]
push esi
push eax
call fcn.004e5410
mov ecx, dword [esi]
mov edx, eax
add esp, 8
mov eax, dword [edx]
mov dword [esi], eax
mov eax, dword [edx + 4]
mov dword [edx], ecx
mov ecx, dword [esi + 4]
mov dword [esi + 4], eax
mov eax, dword [edx + 8]
mov dword [edx + 4], ecx
mov ecx, dword [esi + 8]
mov dword [esi + 8], eax
mov dword [edx + 8], ecx
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x5133b1
lock xadd dword [eax], edi
cmp edi, 1
jne 0x5133b1
push 4
push 2
push dword [ebp - 0x1c]
call fcn.00461780
add esp, 0xc
mov eax, dword [esi + 8]
test eax, eax
jne 0x5133c8
push str.C:_tmp
push 6
mov ecx, esi
call fcn.0048f5f0
jmp 0x51341a
cmp eax, 2
jl 0x51341a
mov eax, dword [esi]
test eax, eax
je 0x5133da
mov eax, dword [eax]
cmp eax, 1
jle 0x5133e6
push 1
push dword [esi + 8]
mov ecx, esi
call fcn.00495780
mov eax, dword [esi + 4]
cmp word [eax + 2], 0x3a
jne 0x51341a
movzx ecx, word [eax]
call fcn.00497f80
movzx edi, ax
mov eax, dword [esi]
test eax, eax
je 0x513408
mov eax, dword [eax]
cmp eax, 1
jle 0x513414
push 1
push dword [esi + 8]
mov ecx, esi
call fcn.00495780
mov eax, dword [esi + 4]
mov word [eax], di
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x410]
xor ecx, ebp
call fcn.00596709
lea esp, [ebp + 0x414]
pop ebp
ret