Function at 0x4086e0
Capabilities:
Get common file path

Disassembly:
push ebp
push edi
push esi
push ebx
push eax
mov eax, 0x10e8
call fcn.0040fcd0
xor esi, esi
sub esp, eax
mov eax, dword [esp + eax]
mov ebp, eax
mov word [eax], si
movzx eax, word [edx]
test ax, ax
je 0x40883d
lea edi, [edx + 2]
mov esi, ecx
xor edx, edx
jmp 0x40872d
test edx, edx
je 0x408820
mov word [edx], ax
add edx, 2
movzx eax, word [edi]
add edi, 2
test ax, ax
je 0x40883d
cmp ax, 0x25
jne 0x408710
test edx, edx
je 0x408858
xor ecx, ecx
lea ebx, [esp + 0x8e0]
mov word [edx], cx
mov dword [esp + 4], str.TEMP
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x408a40
mov dword [esp + 4], str.PROGRAM
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x408aa0
mov dword [esp + 4], str.PROGRAM_BASE
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x4089e0
mov dword [esp + 4], 0x4170b2
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x408c30
mov dword [esp + 4], str.HOME
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x408b10
mov dword [esp + 4], str.CACHE_DIR
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
jne 0x408870
lea eax, [esp + 0x2d8]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x1c
mov dword [esp], 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
sub esp, 0x14
test eax, eax
je 0x408bb8
add esp, 0x10ec
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
test esi, esi
je 0x408812
mov word [ebp], ax
movzx eax, word [edi]
sub esi, 1
add ebp, 2
add edi, 2
test ax, ax
jne 0x40872d
xor eax, eax
mov word [ebp], ax
add esp, 0x10ec
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
xor ebx, ebx
lea edx, [esp + 0x8e0]
mov word [esp + 0x8e0], bx
jmp 0x40871e
mov dword [esp + 4], str.TIME
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
jne 0x408812
lea eax, [esp + 0x48]
mov dword [esp + 0x48], 0
mov dword [esp], eax
mov dword [esp + 0x4c], 0
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
sub esp, 4
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x4c]
lea ebx, [esp + 0x4e0]
mov dword [esp + 8], str._lld
mov dword [esp + 4], 0x400
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edx
mov dword [esp], ebx
call fcn.00401c30
cmp word [ebp], 0
je 0x408d2c
mov eax, esi
mov edx, ebp
lea esi, [esi]
add edx, 2
sub eax, 1
cmp word [edx], 0
jne 0x4088e8
movzx ecx, byte [esp + 0x4e0]
mov byte [esp + 0x33], cl
test cl, cl
je 0x4089ae
add eax, ebx
mov dword [esp + 0x3c], esi
movzx esi, byte [esp + 0x33]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x34], edi
mov edi, edx
mov dword [esp + 0x38], ebp
mov ebp, ebx
lea esi, [esi]
nop
mov eax, dword [esp + 0x2c]
mov ebx, edi
sub eax, ebp
cmp word [edi], 0
je 0x40894c
lea esi, [esi]
lea esi, [esi]
add ebx, 2
sub eax, 1
cmp word [ebx], 0
jne 0x408940
test eax, eax
je 0x415d40
mov dword [esp], ebx
add ebp, 1
add edi, 2
call sub.msvcrt.dll_wcslen
mov ecx, esi
mov dword [esp + 8], 2
mov byte [esp + 0x2d8], cl
lea eax, [ebx + eax*2]
lea ecx, [esp + 0x2d8]
mov dword [esp + 4], ecx
mov dword [esp], eax
mov byte [esp + 0x2d9], 0
call sub.msvcrt.dll_mbstowcs
movzx esi, byte [ebp]
mov eax, esi
test al, al
jne 0x408928
mov ebp, dword [esp + 0x38]
mov edi, dword [esp + 0x34]
mov esi, dword [esp + 0x3c]
cmp word [ebp], 0
je 0x4089d0
xor eax, eax
add ebp, 2
sub esi, 1
cmp word [ebp], 0
jne 0x408a60
test al, al
jne 0x408a8c
lea esi, [esi]
xor edx, edx
jmp 0x40871e
mov dword [esp], ebp
call sub.msvcrt.dll_wcslen
mov ecx, esi
mov edx, str._PROGRAM_
sub ecx, eax
mov eax, ebp
call fcn.004086e0
test al, al
je 0x408812
mov dword [esp], ebp
call sub.msvcrt.dll_wcslen
cmp eax, 3
jbe 0x408af9
lea ebx, [ebp + eax*2 - 8]
mov dword [esp + 4], str..exe
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
jne 0x408af9
xor eax, eax
mov word [ebx], ax
cmp word [ebp], 0
je 0x4089d0
xor eax, eax
jmp 0x4089b0
mov dword [esp + 4], ebp
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
sub esp, 8
cmp word [ebp], 0
je 0x408a8c
mov eax, 1
lea esi, [esi]
add ebp, 2
sub esi, 1
cmp word [ebp], 0
jne 0x408a60
test al, al
je 0x4089d0
jmp 0x408a8c
sub ebp, 2
xor edx, edx
add esi, 1
mov word [ebp], dx
cmp word [ebp - 2], 0x5c
je 0x408a80
xor edx, edx
jmp 0x40871e
mov eax, dword [sym.imp.msvcrt.dll___wargv]
cmp word [ebp], 0
mov edx, esi
mov eax, dword [eax]
mov ecx, dword [eax]
mov eax, ebp
je 0x408ac4
lea esi, [esi]
add eax, 2
sub edx, 1
cmp word [eax], 0
jne 0x408ab8
movzx ebx, word [ecx]
test bx, bx
je 0x408af4
test edx, edx
jne 0x408ae0
jmp 0x408d4b
test edx, edx
je 0x415d40
add ecx, 2
mov word [eax], bx
add eax, 2
sub edx, 1
movzx ebx, word [ecx]
test bx, bx
jne 0x408ad8
xor edx, edx
mov word [eax], dx
cmp word [ebp], 0
je 0x4089d0
xor eax, eax
jmp 0x4089b0
lea ebx, [esp + 0xd0]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x28
mov dword [esp], 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
sub esp, 0x14
test eax, eax
jne 0x408812
cmp word [ebp], 0
mov edx, esi
mov eax, ebp
je 0x408b6c
lea esi, [esi]
lea esi, [esi]
add eax, 2
sub edx, 1
cmp word [eax], 0
jne 0x408b60
movzx ecx, word [esp + 0xd0]
test cx, cx
je 0x408b9c
lea esi, [esi]
test edx, edx
je 0x415d40
add ebx, 2
mov word [eax], cx
add eax, 2
sub edx, 1
movzx ecx, word [ebx]
test cx, cx
jne 0x408b80
xor ecx, ecx
mov word [eax], cx
cmp word [ebp], 0
jne 0x408a57
jmp 0x408a8c
cmp word [ebp], 0
mov edx, esi
mov eax, ebp
je 0x408bd4
lea esi, [esi]
nop
add eax, 2
sub edx, 1
cmp word [eax], 0
jne 0x408bc8
movzx ecx, word [esp + 0x2d8]
test cx, cx
je 0x408b9c
test edx, edx
je 0x415d40
lea ebx, [esp + 0x2d8]
jmp 0x408c00
test edx, edx
je 0x415d40
add ebx, 2
mov word [eax], cx
add eax, 2
sub edx, 1
movzx ecx, word [ebx]
test cx, cx
jne 0x408bf8
xor ecx, ecx
mov word [eax], cx
cmp word [ebp], 0
jne 0x408a57
jmp 0x408a8c
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea ebx, [esp + 0x50]
mov dword [esp + 8], 0x4170ba
mov dword [esp + 0xc], eax
mov dword [esp + 4], pe_nt_image_headers32
mov dword [esp], ebx
call fcn.00401c30
cmp word [ebp], 0
je 0x408d10
mov eax, esi
mov edx, ebp
lea esi, [esi]
add edx, 2
sub eax, 1
cmp word [edx], 0
jne 0x408c68
movzx ecx, byte [esp + 0x50]
mov byte [esp + 0x33], cl
test cl, cl
je 0x4089ae
add eax, ebx
mov dword [esp + 0x3c], esi
movzx esi, byte [esp + 0x33]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x34], edi
mov edi, edx
mov dword [esp + 0x38], ebp
mov ebp, ebx
mov eax, dword [esp + 0x2c]
mov ebx, edi
sub eax, ebp
cmp word [edi], 0
je 0x408cbc
nop
add ebx, 2
sub eax, 1
cmp word [ebx], 0
jne 0x408cb0
test eax, eax
je 0x415d40
mov dword [esp], ebx
add ebp, 1
add edi, 2
call sub.msvcrt.dll_wcslen
mov ecx, esi
mov dword [esp + 8], 2
mov byte [esp + 0x4e0], cl
lea eax, [ebx + eax*2]
lea ecx, [esp + 0x4e0]
mov dword [esp + 4], ecx
mov dword [esp], eax
mov byte [esp + 0x4e1], 0
call sub.msvcrt.dll_mbstowcs
movzx esi, byte [ebp]
mov eax, esi
test al, al
jne 0x408ca0
jmp 0x40899b
movzx ecx, byte [esp + 0x50]
mov eax, esi
mov edx, ebp
mov byte [esp + 0x33], cl
test cl, cl
jne 0x408c85
xor edx, edx
jmp 0x40871e
movzx ecx, byte [esp + 0x4e0]
mov eax, esi
mov edx, ebp
mov byte [esp + 0x33], cl
test cl, cl
jne 0x408908
xor edx, edx
jmp 0x40871e
jmp 0x415d40
call sub.msvcrt.dll_abort