Function at 0x5873a0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59e870
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x608190]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor eax, eax
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x10], ax
call fcn.004440f9
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x5873f1
push 0x80004005
call fcn.0042ec10
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
mov edx, dword [ebp + 0xc]
mov ebx, 1
mov dword [ebp - 4], 0
test edx, edx
je 0x587449
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x587416
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x14]
call fcn.0042e990
mov esi, dword [ebp - 0x14]
push esi
call fcn.00587190
add esp, 4
cmp eax, dword [ebp + 0x10]
setb al
test al, al
je 0x587526
mov ebx, dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0
push 0
call ebx
mov edi, eax
test edi, edi
jne 0x58749e
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
mov ecx, edi
call fcn.0042d950
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x58748a
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
jns 0x5874aa
push 0x80070057
call fcn.0042ec10
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x5874c7
push edi
lea ecx, [ebp - 0x14]
call fcn.0042e7b0
mov esi, dword [ebp - 0x14]
push esi
push edi
call ebx
push dword [esi - 8]
push esi
call fcn.0055b6ad
add esp, 8
test eax, eax
js 0x5874a0
cmp eax, dword [esi - 8]
jg 0x5874a0
xor ecx, ecx
mov dword [esi - 0xc], eax
push esi
mov word [esi + eax*2], cx
call fcn.00587190
mov edi, dword [ebp + 0x10]
add esp, 4
cmp eax, edi
jae 0x587521
lea eax, [ebp - 0x14]
push eax
call fcn.005870d0
mov esi, dword [ebp - 0x14]
add esp, 4
test al, al
je 0x58745b
push esi
call fcn.00587190
add esp, 4
cmp eax, edi
jb 0x58745b
mov ebx, 1
call fcn.004440f9
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x587542
push 0x80004005
call fcn.0042ec10
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x18], edi
mov eax, dword [edi - 8]
sub ebx, dword [edi - 4]
sub eax, 0x104
or eax, ebx
mov byte [ebp - 4], 1
jge 0x587572
push 0x104
lea ecx, [ebp - 0x18]
call fcn.0042e7b0
mov edi, dword [ebp - 0x18]
push edi
push 0
push 0x5d5e24
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x5875e5
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
mov ecx, ebx
call fcn.0042d950
lea edx, [edi - 0x10]
mov byte [ebp - 4], 0
or edi, 0xffffffff
lea ecx, [edx + 0xc]
mov eax, edi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x5875b3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x5875d1
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [edi - 8]
push edi
call fcn.0055b6ad
add esp, 8
test eax, eax
js 0x5874a0
cmp eax, dword [edi - 8]
jg 0x5874a0
xor ecx, ecx
mov dword [edi - 0xc], eax
lea ebx, [edi - 0x10]
mov word [edi + eax*2], cx
push ebx
call fcn.0042ec70
mov ecx, dword [ebp + 8]
add eax, 0x10
or edi, 0xffffffff
mov byte [ebp - 4], 0
add esp, 4
mov dword [ecx], eax
lea ecx, [ebx + 0xc]
mov eax, edi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x58763c
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x58765a
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret