Function at 0x4086e0
Capabilities:
Get common file path

Disassembly:
push ebp
push edi
push esi
push ebx
push eax
mov eax, 0x10d8
call fcn.0040fe30
xor ebx, ebx
sub esp, eax
mov eax, dword [esp + eax]
mov edi, eax
mov word [eax], bx
movzx eax, word [edx]
test ax, ax
je 0x408865
lea ebp, [edx + 2]
mov esi, ecx
xor edx, edx
jmp 0x40872e
test edx, edx
je 0x408848
mov word [edx], ax
add edx, 2
movzx eax, word [ebp]
add ebp, 2
test ax, ax
je 0x408865
cmp ax, 0x25
jne 0x408710
test edx, edx
je 0x408880
xor eax, eax
lea ebx, [esp + 0x8d0]
mov word [edx], ax
mov dword [esp + 4], str.TEMP
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x408920
mov dword [esp + 4], str.PROGRAM
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x408978
mov dword [esp + 4], str.PROGRAM_BASE
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x4088a0
mov dword [esp + 4], 0x4170ee
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x408c50
mov dword [esp + 4], str.HOME
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x4089e8
mov dword [esp + 4], str.CACHE_DIR
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x408a80
mov dword [esp + 4], str.COMPANY
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x408daa
mov dword [esp + 4], str.PRODUCT
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x408e06
mov dword [esp + 4], str.VERSION
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x408d39
mov dword [esp + 4], str.TIME
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x408b19
add esp, 0x10dc
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
test esi, esi
je 0x408838
mov word [edi], ax
movzx eax, word [ebp]
sub esi, 1
add edi, 2
add ebp, 2
test ax, ax
jne 0x40872e
xor esi, esi
mov eax, 1
mov word [edi], si
add esp, 0x10dc
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
lea edx, [esp + 0x8d0]
mov word [esp + 0x8d0], ax
jmp 0x40871e
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 0x408838
mov dword [esp], edi
call sub.msvcrt.dll_wcslen
cmp eax, 3
jbe 0x4089d1
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 0x4089d1
xor ecx, ecx
mov word [ebx], cx
cmp word [edi], 0
je 0x408910
xor eax, eax
lea esi, [esi]
add edi, 2
sub esi, 1
cmp word [edi], 0
jne 0x408940
test al, al
jne 0x408963
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 0x408963
mov eax, 1
lea esi, [esi]
nop
add edi, 2
sub esi, 1
cmp word [edi], 0
jne 0x408940
test al, al
je 0x408910
jmp 0x408963
sub edi, 2
xor eax, eax
add esi, 1
mov word [edi], ax
cmp word [edi - 2], 0x5c
je 0x408958
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 0x40899c
lea esi, [esi]
nop
add eax, 2
sub edx, 1
cmp word [eax], 0
jne 0x408990
movzx ebx, word [ecx]
test bx, bx
je 0x4089cc
test edx, edx
jne 0x4089b8
jmp 0x408e9c
test edx, edx
je 0x415ea0
add ecx, 2
mov word [eax], bx
add eax, 2
sub edx, 1
movzx ebx, word [ecx]
test bx, bx
jne 0x4089b0
xor ebx, ebx
mov word [eax], bx
cmp word [edi], 0
je 0x408910
xor eax, eax
jmp 0x408900
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 0x408838
cmp word [edi], 0
mov edx, esi
mov eax, edi
je 0x408a3c
lea esi, [esi]
add eax, 2
sub edx, 1
cmp word [eax], 0
jne 0x408a30
movzx ecx, word [esp + 0xc0]
test cx, cx
je 0x408a6c
lea esi, [esi]
test edx, edx
je 0x415ea0
add ebx, 2
mov word [eax], cx
add eax, 2
sub edx, 1
movzx ecx, word [ebx]
test cx, cx
jne 0x408a50
xor edx, edx
mov word [eax], dx
cmp word [edi], 0
jne 0x408936
jmp 0x408963
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
jne 0x408838
cmp word [edi], 0
mov edx, esi
mov eax, edi
je 0x408ad4
lea esi, [esi]
add eax, 2
sub edx, 1
cmp word [eax], 0
jne 0x408ac8
movzx ecx, word [esp + 0x2c8]
test cx, cx
je 0x408a6c
test edx, edx
je 0x415ea0
lea ebx, [esp + 0x2c8]
jmp 0x408b00
test edx, edx
je 0x415ea0
add ebx, 2
mov word [eax], cx
add eax, 2
sub edx, 1
movzx ecx, word [ebx]
test cx, cx
jne 0x408af8
jmp 0x408a6c
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 0x408e7d
mov eax, esi
mov edx, edi
lea esi, [esi]
lea esi, [esi]
add edx, 2
sub eax, 1
cmp word [edx], 0
jne 0x408b80
movzx ecx, byte [esp + 0x4d0]
mov byte [esp + 0x24], cl
test cl, cl
je 0x4088f8
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 0x408bdc
lea esi, [esi]
add ebx, 2
sub eax, 1
cmp word [ebx], 0
jne 0x408bd0
test eax, eax
je 0x415ea0
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 0x408c30
movzx ecx, word [esi]
jmp 0x408bc0
mov edi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
cmp word [edi], 0
je 0x408910
xor eax, eax
jmp 0x408900
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea ebx, [esp + 0x40]
mov dword [esp + 8], 0x4170f6
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 0x408e61
mov eax, esi
mov edx, edi
lea esi, [esi]
add edx, 2
sub eax, 1
cmp word [edx], 0
jne 0x408c88
movzx ecx, byte [esp + 0x40]
mov byte [esp + 0x24], cl
test cl, cl
je 0x4088f8
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 0x408ce4
lea esi, [esi]
add ebx, 2
sub eax, 1
cmp word [ebx], 0
jne 0x408cd8
test eax, eax
je 0x415ea0
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 0x408c30
movzx ecx, word [esi]
jmp 0x408cc8
cmp word [edi], 0
mov eax, esi
mov edx, edi
je 0x408d54
lea esi, [esi]
nop
add edx, 2
sub eax, 1
cmp word [edx], 0
jne 0x408d48
test eax, eax
je 0x408eab
mov ebx, 0x31
lea ecx, [edx + 2]
sub eax, 1
mov word [edx], bx
mov ebx, 0x2e
mov edx, 0x41708e
lea esi, [esi]
test eax, eax
je 0x415ea0
add edx, 2
mov word [ecx], bx
add ecx, 2
sub eax, 1
movzx ebx, word [edx]
test bx, bx
jne 0x408d78
xor eax, eax
mov word [ecx], ax
cmp word [edi], 0
je 0x408910
xor eax, eax
jmp 0x408900
cmp word [edi], 0
mov eax, esi
mov edx, edi
je 0x408dc4
lea esi, [esi]
add edx, 2
sub eax, 1
cmp word [edx], 0
jne 0x408db8
test eax, eax
je 0x408ea6
mov ebx, 0x77
lea ecx, [edx + 2]
sub eax, 1
mov word [edx], bx
mov ebx, 0x77
mov edx, 0x417062
lea esi, [esi]
test eax, eax
je 0x415ea0
add edx, 2
mov word [ecx], bx
add ecx, 2
sub eax, 1
movzx ebx, word [edx]
test bx, bx
jne 0x408de8
jmp 0x408d94
cmp word [edi], 0
mov eax, esi
mov edx, edi
je 0x408e1c
add edx, 2
sub eax, 1
cmp word [edx], 0
jne 0x408e10
test eax, eax
je 0x408ea1
mov ebx, 0x57
lea ecx, [edx + 2]
sub eax, 1
mov word [edx], bx
mov ebx, 0x50
mov edx, 0x417078
lea esi, [esi]
test eax, eax
je 0x415ea0
add edx, 2
mov word [ecx], bx
add ecx, 2
sub eax, 1
movzx ebx, word [edx]
test bx, bx
jne 0x408e40
jmp 0x408d94
movzx ecx, byte [esp + 0x40]
mov eax, esi
mov edx, edi
mov byte [esp + 0x24], cl
test cl, cl
jne 0x408ca5
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 0x408ba0
xor edx, edx
jmp 0x40871e
jmp 0x415ea0
jmp 0x415ea0
jmp 0x415ea0
jmp 0x415ea0
call sub.msvcrt.dll_abort