Function at 0x4086e0
Capabilities:
Get common file path

Disassembly:
push ebp
push edi
push esi
push ebx
push eax
mov eax, 0x10d8
call fcn.0040fcc0
xor esi, esi
sub esp, eax
mov eax, dword [esp + eax]
mov edi, eax
mov word [eax], si
movzx eax, word [edx]
test ax, ax
je 0x40883d
lea ebp, [edx + 2]
mov esi, ecx
xor edx, edx
jmp 0x40872e
test edx, edx
je 0x408820
mov word [edx], ax
add edx, 2
movzx eax, word [ebp]
add ebp, 2
test ax, ax
je 0x40883d
cmp ax, 0x25
jne 0x408710
test edx, edx
je 0x408858
xor ecx, ecx
lea ebx, [esp + 0x8d0]
mov word [edx], cx
mov dword [esp + 4], str.TEMP
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x408a20
mov dword [esp + 4], str.PROGRAM
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x408a78
mov dword [esp + 4], str.PROGRAM_BASE
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x4089a0
mov dword [esp + 4], 0x4170b2
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x408c10
mov dword [esp + 4], str.HOME
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x408ae8
mov dword [esp + 4], str.CACHE_DIR
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
jne 0x408870
lea eax, [esp + 0x2c8]
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 0x408b80
add esp, 0x10dc
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
test esi, esi
je 0x408813
mov word [edi], ax
movzx eax, word [ebp]
sub esi, 1
add edi, 2
add ebp, 2
test ax, ax
jne 0x40872e
xor eax, eax
mov word [edi], ax
add esp, 0x10dc
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
xor ebx, ebx
lea edx, [esp + 0x8d0]
mov word [esp + 0x8d0], bx
jmp 0x40871e
mov dword [esp + 4], str.TIME
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
jne 0x408813
lea eax, [esp + 0x38]
mov dword [esp + 0x38], 0
mov dword [esp], eax
mov dword [esp + 0x3c], 0
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
sub esp, 4
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
lea ebx, [esp + 0x4d0]
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 [edi], 0
je 0x408d15
mov eax, esi
mov edx, edi
lea esi, [esi]
add edx, 2
sub eax, 1
cmp word [edx], 0
jne 0x4088e8
movzx ecx, byte [esp + 0x4d0]
mov byte [esp + 0x24], cl
test cl, cl
je 0x4089f8
add eax, ebx
mov dword [esp + 0x28], ebp
xor ecx, ecx
mov ebp, ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], edi
movzx edi, byte [esp + 0x24]
mov dword [esp + 0x24], esi
mov esi, edx
lea esi, [esi]
mov eax, dword [esp + 0x20]
mov ebx, esi
sub eax, ebp
test cx, cx
je 0x408944
lea esi, [esi]
add ebx, 2
sub eax, 1
cmp word [ebx], 0
jne 0x408938
test eax, eax
je 0x415d30
mov dword [esp], ebx
add ebp, 1
call sub.msvcrt.dll_wcslen
mov ecx, edi
mov dword [esp + 8], 2
mov byte [esp + 0x2c8], cl
lea eax, [ebx + eax*2]
lea ecx, [esp + 0x2c8]
mov dword [esp + 4], ecx
mov dword [esp], eax
mov byte [esp + 0x2c9], 0
call sub.msvcrt.dll_mbstowcs
movzx edi, byte [ebp]
mov eax, edi
test al, al
je 0x408bf0
movzx ecx, word [esi]
jmp 0x408928
mov dword [esp], edi
call sub.msvcrt.dll_wcslen
mov ecx, esi
mov edx, str._PROGRAM_
sub ecx, eax
mov eax, edi
call fcn.004086e0
test al, al
je 0x408813
mov dword [esp], edi
call sub.msvcrt.dll_wcslen
cmp eax, 3
jbe 0x408ad1
lea ebx, [edi + eax*2 - 8]
mov dword [esp + 4], str..exe
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
jne 0x408ad1
xor eax, eax
mov word [ebx], ax
cmp word [edi], 0
je 0x408a10
xor eax, eax
lea esi, [esi]
add edi, 2
sub esi, 1
cmp word [edi], 0
jne 0x408a40
test al, al
jne 0x408a63
xor edx, edx
jmp 0x40871e
mov dword [esp + 4], edi
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
sub esp, 8
cmp word [edi], 0
je 0x408a63
mov eax, 1
lea esi, [esi]
nop
add edi, 2
sub esi, 1
cmp word [edi], 0
jne 0x408a40
test al, al
je 0x408a10
jmp 0x408a63
sub edi, 2
xor edx, edx
add esi, 1
mov word [edi], dx
cmp word [edi - 2], 0x5c
je 0x408a58
xor edx, edx
jmp 0x40871e
mov eax, dword [sym.imp.msvcrt.dll___wargv]
cmp word [edi], 0
mov edx, esi
mov eax, dword [eax]
mov ecx, dword [eax]
mov eax, edi
je 0x408a9c
lea esi, [esi]
nop
add eax, 2
sub edx, 1
cmp word [eax], 0
jne 0x408a90
movzx ebx, word [ecx]
test bx, bx
je 0x408acc
test edx, edx
jne 0x408ab8
jmp 0x408d34
test edx, edx
je 0x415d30
add ecx, 2
mov word [eax], bx
add eax, 2
sub edx, 1
movzx ebx, word [ecx]
test bx, bx
jne 0x408ab0
xor edx, edx
mov word [eax], dx
cmp word [edi], 0
je 0x408a10
xor eax, eax
jmp 0x408a00
lea ebx, [esp + 0xc0]
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 0x408813
cmp word [edi], 0
mov edx, esi
mov eax, edi
je 0x408b3c
lea esi, [esi]
add eax, 2
sub edx, 1
cmp word [eax], 0
jne 0x408b30
movzx ecx, word [esp + 0xc0]
test cx, cx
je 0x408b6c
lea esi, [esi]
test edx, edx
je 0x415d30
add ebx, 2
mov word [eax], cx
add eax, 2
sub edx, 1
movzx ecx, word [ebx]
test cx, cx
jne 0x408b50
xor ecx, ecx
mov word [eax], cx
cmp word [edi], 0
jne 0x408a36
jmp 0x408a63
cmp word [edi], 0
mov edx, esi
mov eax, edi
je 0x408b9c
lea esi, [esi]
add eax, 2
sub edx, 1
cmp word [eax], 0
jne 0x408b90
movzx ecx, word [esp + 0x2c8]
test cx, cx
je 0x408b6c
test edx, edx
je 0x415d30
lea ebx, [esp + 0x2c8]
jmp 0x408bc8
test edx, edx
je 0x415d30
add ebx, 2
mov word [eax], cx
add eax, 2
sub edx, 1
movzx ecx, word [ebx]
test cx, cx
jne 0x408bc0
xor ecx, ecx
mov word [eax], cx
cmp word [edi], 0
jne 0x408a36
jmp 0x408a63
mov edi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
cmp word [edi], 0
je 0x408a10
xor eax, eax
jmp 0x408a00
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea ebx, [esp + 0x40]
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 [edi], 0
je 0x408cf9
mov eax, esi
mov edx, edi
lea esi, [esi]
add edx, 2
sub eax, 1
cmp word [edx], 0
jne 0x408c48
movzx ecx, byte [esp + 0x40]
mov byte [esp + 0x24], cl
test cl, cl
je 0x4089f8
add eax, ebx
mov dword [esp + 0x28], ebp
xor ecx, ecx
mov ebp, ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], edi
movzx edi, byte [esp + 0x24]
mov dword [esp + 0x24], esi
mov esi, edx
lea esi, [esi]
mov eax, dword [esp + 0x20]
mov ebx, esi
sub eax, ebp
test cx, cx
je 0x408ca4
lea esi, [esi]
add ebx, 2
sub eax, 1
cmp word [ebx], 0
jne 0x408c98
test eax, eax
je 0x415d30
mov dword [esp], ebx
add ebp, 1
call sub.msvcrt.dll_wcslen
mov ecx, edi
mov dword [esp + 8], 2
mov byte [esp + 0x4d0], cl
lea eax, [ebx + eax*2]
lea ecx, [esp + 0x4d0]
mov dword [esp + 4], ecx
mov dword [esp], eax
mov byte [esp + 0x4d1], 0
call sub.msvcrt.dll_mbstowcs
movzx edi, byte [ebp]
mov eax, edi
test al, al
je 0x408bf0
movzx ecx, word [esi]
jmp 0x408c88
movzx ecx, byte [esp + 0x40]
mov eax, esi
mov edx, edi
mov byte [esp + 0x24], cl
test cl, cl
jne 0x408c65
xor edx, edx
jmp 0x40871e
movzx ecx, byte [esp + 0x4d0]
mov eax, esi
mov edx, edi
mov byte [esp + 0x24], cl
test cl, cl
jne 0x408908
xor edx, edx
jmp 0x40871e
jmp 0x415d30
call sub.msvcrt.dll_abort