Function at 0x5974e0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c6ff0
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x639210]
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.00440143
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x597531
push 0x80004005
call fcn.0041e590
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 0x597589
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x597556
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x14]
call fcn.0041e3e0
mov esi, dword [ebp - 0x14]
push esi
call fcn.005972d0
add esp, 4
cmp eax, dword [ebp + 0x10]
setb al
test al, al
je 0x597666
mov ebx, dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0
push 0
call ebx
mov edi, eax
test edi, edi
jne 0x5975de
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
mov ecx, edi
call fcn.0041d880
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 0x5975ca
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 0x5975ea
push 0x80070057
call fcn.0041e590
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x597607
push edi
lea ecx, [ebp - 0x14]
call fcn.0041e300
mov esi, dword [ebp - 0x14]
push esi
push edi
call ebx
push dword [esi - 8]
push esi
call fcn.0056a2b4
add esp, 8
test eax, eax
js 0x5975e0
cmp eax, dword [esi - 8]
jg 0x5975e0
xor ecx, ecx
mov dword [esi - 0xc], eax
push esi
mov word [esi + eax*2], cx
call fcn.005972d0
mov edi, dword [ebp + 0x10]
add esp, 4
cmp eax, edi
jae 0x597661
lea eax, [ebp - 0x14]
push eax
call fcn.00597210
mov esi, dword [ebp - 0x14]
add esp, 4
test al, al
je 0x59759b
push esi
call fcn.005972d0
add esp, 4
cmp eax, edi
jb 0x59759b
mov ebx, 1
call fcn.00440143
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x597682
push 0x80004005
call fcn.0041e590
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 0x5976b2
push 0x104
lea ecx, [ebp - 0x18]
call fcn.0041e300
mov edi, dword [ebp - 0x18]
push edi
push 0
push 0x601834
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x597725
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
mov ecx, ebx
call fcn.0041d880
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 0x5976f3
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 0x597711
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.0056a2b4
add esp, 8
test eax, eax
js 0x5975e0
cmp eax, dword [edi - 8]
jg 0x5975e0
xor ecx, ecx
mov dword [edi - 0xc], eax
lea ebx, [edi - 0x10]
mov word [edi + eax*2], cx
push ebx
call fcn.0041e5c0
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 0x59777c
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 0x59779a
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