Function at 0x408770
Capabilities:
Get common file path

Disassembly:
push ebp
mov eax, 0x10ec
push edi
push esi
push ebx
call fcn.0040fe68
xor esi, esi
mov edi, 0x42b0c0
mov ebp, 0x1000
xor edx, edx
sub esp, eax
mov word [0x42b0c0], si
mov eax, 0x25
mov esi, 0x4170ae
jmp 0x4087c5
test edx, edx
je 0x408938
mov word [edx], ax
add edx, 2
movzx eax, word [esi]
add esi, 2
test ax, ax
je 0x40891d
cmp ax, 0x25
jne 0x4087a8
test edx, edx
je 0x408950
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 0x408a28
mov dword [esp + 4], str.PROGRAM
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x408a40
mov dword [esp + 4], 0x4170fe
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x408aa8
mov dword [esp + 4], str.HOME
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x408998
mov dword [esp + 4], str.CACHE_DIR
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
jne 0x408970
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
jne 0x408988
cmp word [edi], 0
mov edx, ebp
mov eax, edi
je 0x4088ac
lea esi, [esi]
add eax, 2
sub edx, 1
cmp word [eax], 0
jne 0x4088a0
movzx ecx, word [esp + 0x2d8]
test cx, cx
je 0x4088ec
test edx, edx
je 0x415eb0
lea ebx, [esp + 0x2d8]
jmp 0x4088d8
test edx, edx
je 0x415eb0
add ebx, 2
mov word [eax], cx
add eax, 2
sub edx, 1
movzx ecx, word [ebx]
test cx, cx
jne 0x4088d0
xor edx, edx
mov word [eax], dx
movzx ebx, word [edi]
test bx, bx
je 0x40890c
lea esi, [esi]
add edi, 2
sub ebp, 1
cmp word [edi], 0
jne 0x408900
movzx eax, word [esi]
xor edx, edx
add esi, 2
test ax, ax
jne 0x4087c5
xor eax, eax
mov word [edi], ax
add esp, 0x10ec
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
test ebp, ebp
je 0x408988
mov word [edi], ax
sub ebp, 1
add edi, 2
jmp 0x4087b6
xor ebx, ebx
lea edx, [esp + 0x8e0]
mov word [esp + 0x8e0], bx
jmp 0x4087b6
mov dword [esp + 4], str.TIME
mov dword [esp], ebx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x408bac
add esp, 0x10ec
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
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 0x408988
cmp word [edi], 0
mov edx, ebp
mov eax, edi
je 0x4089ec
lea esi, [esi]
add eax, 2
sub edx, 1
cmp word [eax], 0
jne 0x4089e0
movzx ecx, word [esp + 0xd0]
test cx, cx
je 0x4088ec
lea esi, [esi]
test edx, edx
je 0x415eb0
add ebx, 2
mov word [eax], cx
add eax, 2
sub edx, 1
movzx ecx, word [ebx]
test cx, cx
jne 0x408a00
jmp 0x4088ec
mov dword [esp + 4], edi
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
movzx ebx, word [edi]
sub esp, 8
jmp 0x4088f4
mov eax, dword [sym.imp.msvcrt.dll___wargv]
cmp word [edi], 0
mov edx, ebp
mov eax, dword [eax]
mov ecx, dword [eax]
mov eax, edi
je 0x408a64
lea esi, [esi]
nop
add eax, 2
sub edx, 1
cmp word [eax], 0
jne 0x408a58
movzx ebx, word [ecx]
test bx, bx
je 0x4088ec
test edx, edx
jne 0x408a88
jmp 0x408cdb
test edx, edx
je 0x415eb0
add ecx, 2
mov word [eax], bx
add eax, 2
sub edx, 1
movzx ebx, word [ecx]
test bx, bx
jne 0x408a80
jmp 0x4088ec
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea edx, [esp + 0x50]
mov dword [esp + 8], 0x417106
mov dword [esp], edx
mov dword [esp + 0xc], eax
mov dword [esp + 4], pe_nt_image_headers32
call fcn.00401c30
movzx ebx, word [edi]
mov eax, ebp
lea edx, [esp + 0x50]
test bx, bx
je 0x408cc9
mov ecx, edi
lea esi, [esi]
add ecx, 2
sub eax, 1
cmp word [ecx], 0
jne 0x408ae8
mov dword [esp + 0x30], ecx
movzx ecx, byte [esp + 0x50]
add eax, edx
mov dword [esp + 0x2c], eax
test cl, cl
je 0x4088f4
mov dword [esp + 0x3c], esi
mov esi, dword [esp + 0x30]
mov dword [esp + 0x34], edi
mov edi, ecx
xor ecx, ecx
mov dword [esp + 0x38], ebp
mov ebp, edx
lea esi, [esi]
mov eax, dword [esp + 0x2c]
mov ebx, esi
sub eax, ebp
test cx, cx
je 0x408b44
lea esi, [esi]
add ebx, 2
sub eax, 1
cmp word [ebx], 0
jne 0x408b38
test eax, eax
je 0x415eb0
mov dword [esp], ebx
add ebp, 1
call sub.msvcrt.dll_wcslen
mov ecx, edi
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 edi, byte [ebp]
mov eax, edi
test al, al
je 0x408b98
movzx ecx, word [esi]
jmp 0x408b28
mov edi, dword [esp + 0x34]
mov ebp, dword [esp + 0x38]
mov esi, dword [esp + 0x3c]
movzx ebx, word [edi]
jmp 0x4088f4
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 edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x48]
mov dword [esp + 8], str._lld
mov dword [esp + 4], 0x400
mov dword [esp + 0x10], edx
lea edx, [esp + 0x4e0]
mov dword [esp], edx
mov dword [esp + 0xc], eax
call fcn.00401c30
movzx ebx, word [edi]
mov eax, ebp
lea edx, [esp + 0x4e0]
test bx, bx
je 0x408cd2
mov ecx, edi
lea esi, [esi]
add ecx, 2
sub eax, 1
cmp word [ecx], 0
jne 0x408c18
mov dword [esp + 0x30], ecx
movzx ecx, byte [esp + 0x4e0]
add eax, edx
mov dword [esp + 0x2c], eax
test cl, cl
je 0x4088f4
mov dword [esp + 0x3c], esi
mov esi, dword [esp + 0x30]
mov dword [esp + 0x34], edi
mov edi, ecx
xor ecx, ecx
mov dword [esp + 0x38], ebp
mov ebp, edx
lea esi, [esi]
mov eax, dword [esp + 0x2c]
mov ebx, esi
sub eax, ebp
test cx, cx
je 0x408c74
lea esi, [esi]
add ebx, 2
sub eax, 1
cmp word [ebx], 0
jne 0x408c68
test eax, eax
je 0x415eb0
mov dword [esp], ebx
add ebp, 1
call sub.msvcrt.dll_wcslen
mov ecx, edi
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 edi, byte [ebp]
mov eax, edi
test al, al
je 0x408b98
movzx ecx, word [esi]
jmp 0x408c58
mov dword [esp + 0x30], edi
jmp 0x408af8
mov dword [esp + 0x30], edi
jmp 0x408c28
jmp 0x415eb0
add esp, 0x2c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.msvcrt.dll_abort
or esi, 0xffffffff
jmp 0x40c19c