Function at 0x5801f0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ae470
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x618190]
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.0043c5a7
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x580241
push 0x80004005
call fcn.00420690
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 0x580299
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x580266
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x14]
call fcn.004204e0
mov esi, dword [ebp - 0x14]
push esi
call fcn.0057ffe0
add esp, 4
cmp eax, dword [ebp + 0x10]
setb al
test al, al
je 0x580376
mov ebx, dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0
push 0
call ebx
mov edi, eax
test edi, edi
jne 0x5802ee
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
mov ecx, edi
call fcn.0041f920
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 0x5802da
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 0x5802fa
push 0x80070057
call fcn.00420690
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x580317
push edi
lea ecx, [ebp - 0x14]
call fcn.00420400
mov esi, dword [ebp - 0x14]
push esi
push edi
call ebx
push dword [esi - 8]
push esi
call fcn.00553c29
add esp, 8
test eax, eax
js 0x5802f0
cmp eax, dword [esi - 8]
jg 0x5802f0
xor ecx, ecx
mov dword [esi - 0xc], eax
push esi
mov word [esi + eax*2], cx
call fcn.0057ffe0
mov edi, dword [ebp + 0x10]
add esp, 4
cmp eax, edi
jae 0x580371
lea eax, [ebp - 0x14]
push eax
call fcn.0057ff20
mov esi, dword [ebp - 0x14]
add esp, 4
test al, al
je 0x5802ab
push esi
call fcn.0057ffe0
add esp, 4
cmp eax, edi
jb 0x5802ab
mov ebx, 1
call fcn.0043c5a7
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x580392
push 0x80004005
call fcn.00420690
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 0x5803c2
push 0x104
lea ecx, [ebp - 0x18]
call fcn.00420400
mov edi, dword [ebp - 0x18]
push edi
push 0
push 0x5e6ea4
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x580435
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
mov ecx, ebx
call fcn.0041f920
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 0x580403
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 0x580421
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.00553c29
add esp, 8
test eax, eax
js 0x5802f0
cmp eax, dword [edi - 8]
jg 0x5802f0
xor ecx, ecx
mov dword [edi - 0xc], eax
lea ebx, [edi - 0x10]
mov word [edi + eax*2], cx
push ebx
call fcn.004206c0
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 0x58048c
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 0x5804aa
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