Function at 0x407710
Capabilities:
Get common file path

Disassembly:
push ebp
push edi
push esi
push ebx
push eax
mov eax, 0x10e8
call fcn.0040f9d8
xor esi, esi
sub esp, eax
mov eax, dword [esp + eax]
mov ebx, eax
mov word [eax], si
movzx eax, word [edx]
test ax, ax
je 0x407784
lea ebp, [edx + 2]
mov edi, ecx
xor edx, edx
jmp 0x407752
mov word [edx], ax
add edx, 2
movzx eax, word [ebp]
add ebp, 2
test ax, ax
je 0x407784
cmp ax, 0x7b
je 0x4077a0
cmp ax, 0x7d
je 0x4077b8
test edx, edx
jne 0x407740
test edi, edi
je 0x4078f8
xor ecx, ecx
mov word [ebx], ax
sub edi, 1
add ebx, 2
mov word [ebx], cx
movzx eax, word [ebp]
add ebp, 2
test ax, ax
jne 0x407752
xor eax, eax
mov word [ebx], ax
mov eax, 1
add esp, 0x10ec
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
lea edx, [esp + 0x8e0]
mov word [esp + 0x8e0], ax
jmp 0x407746
xor esi, esi
lea eax, [esp + 0x8e0]
mov word [edx], si
mov dword [esp + 4], str.TEMP
mov dword [esp], eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x4079b8
lea eax, [esp + 0x8e0]
mov dword [esp + 4], 0x4170ac
mov dword [esp], eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x407900
lea eax, [esp + 0x8e0]
mov dword [esp + 4], str.PROGRAM_BASE
mov dword [esp], eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x407960
lea eax, [esp + 0x8e0]
mov dword [esp + 4], 0x4170f4
mov dword [esp], eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x407b78
lea eax, [esp + 0x8e0]
mov dword [esp + 4], 0x417100
mov dword [esp], eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x4079e0
lea eax, [esp + 0x8e0]
mov dword [esp + 4], str.CACHE_DIR
mov dword [esp], eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x407ae8
lea eax, [esp + 0x8e0]
mov dword [esp + 4], str.COMPANY
mov dword [esp], eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x407d7f
lea eax, [esp + 0x8e0]
mov dword [esp + 4], str.PRODUCT
mov dword [esp], eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x407dd1
lea eax, [esp + 0x8e0]
mov dword [esp + 4], str.VERSION
mov dword [esp], eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x407a80
lea eax, [esp + 0x8e0]
mov dword [esp + 4], str.TIME
mov dword [esp], eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x407c77
lea esi, [esi]
nop
xor eax, eax
jmp 0x40778e
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
sub esp, 0xc
test eax, eax
je 0x4078f8
cmp word [ebx], 0
je 0x407938
xor eax, eax
lea esi, [esi]
add ebx, 2
sub edi, 1
cmp word [ebx], 0
jne 0x407928
test al, al
jne 0x40794b
xor edx, edx
jmp 0x407746
sub ebx, 2
xor esi, esi
add edi, 1
mov word [ebx], si
cmp word [ebx - 2], 0x5c
je 0x407940
xor edx, edx
jmp 0x407746
mov dword [esp], ebx
call sub.msvcrt.dll_wcslen
mov ecx, edi
mov edx, str.PROGRAM
sub ecx, eax
mov eax, ebx
call fcn.00407710
test al, al
je 0x4078f8
mov dword [esp], ebx
call sub.msvcrt.dll_wcslen
cmp eax, 3
jbe 0x40791c
lea esi, [ebx + eax*2 - 8]
mov dword [esp + 4], str..exe
mov dword [esp], esi
call sub.msvcrt.dll__wcsicmp
test eax, eax
jne 0x40791c
xor ecx, ecx
mov word [esi], cx
jmp 0x40791c
mov dword [esp + 4], ebx
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
sub esp, 8
cmp word [ebx], 0
je 0x40794b
mov eax, 1
jmp 0x407928
lea esi, [esp + 0xd0]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], esi
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 0x4078f8
cmp word [ebx], 0
mov edx, edi
mov eax, ebx
je 0x407a34
lea esi, [esi]
add eax, 2
sub edx, 1
cmp word [eax], 0
jne 0x407a28
movzx ecx, word [esp + 0xd0]
test cx, cx
je 0x407a6c
test edx, edx
jne 0x407a58
jmp 0x407e54
test edx, edx
je 0x407e59
add esi, 2
mov word [eax], cx
add eax, 2
sub edx, 1
movzx ecx, word [esi]
test cx, cx
jne 0x407a50
xor esi, esi
mov word [eax], si
cmp word [ebx], 0
jne 0x4079d2
jmp 0x40794b
cmp word [ebx], 0
mov edx, edi
mov eax, ebx
je 0x407a9c
lea esi, [esi]
add eax, 2
sub edx, 1
cmp word [eax], 0
jne 0x407a90
test edx, edx
je 0x415a10
mov esi, 0x31
mov ecx, str.1.0.1
jmp 0x407ab8
test edx, edx
je 0x415a10
add ecx, 2
mov word [eax], si
add eax, 2
sub edx, 1
movzx esi, word [ecx]
test si, si
jne 0x407ab0
xor ecx, ecx
mov word [eax], cx
cmp word [ebx], 0
jne 0x407922
xor edx, edx
jmp 0x407746
lea esi, [esp + 0x2d8]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], esi
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 0x4078f8
cmp word [ebx], 0
mov edx, edi
mov eax, ebx
je 0x407b3c
lea esi, [esi]
add eax, 2
sub edx, 1
cmp word [eax], 0
jne 0x407b30
movzx ecx, word [esp + 0x2d8]
test cx, cx
je 0x407a6c
lea esi, [esi]
test edx, edx
je 0x415a10
add esi, 2
mov word [eax], cx
add eax, 2
sub edx, 1
movzx ecx, word [esi]
test cx, cx
jne 0x407b50
jmp 0x407a6c
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea esi, [esp + 0x50]
mov dword [esp + 8], 0x4170fc
mov dword [esp + 0xc], eax
mov dword [esp + 4], pe_nt_image_headers32
mov dword [esp], esi
call fcn.00401ad0
cmp word [ebx], 0
je 0x407e21
mov ecx, edi
mov edx, ebx
lea esi, [esi]
add edx, 2
sub ecx, 1
cmp word [edx], 0
jne 0x407bb0
movzx eax, byte [esp + 0x50]
test al, al
je 0x407922
mov dword [esp + 0x28], ebx
add ecx, esi
mov dword [esp + 0x20], esi
mov esi, ecx
mov dword [esp + 0x2c], edi
mov edi, dword [esp + 0x20]
mov dword [esp + 0x24], ebp
mov ebp, edx
lea esi, [esi]
nop
mov byte [esp + 0x3c], al
lea eax, [esp + 0x3c]
mov ebx, esi
mov dword [esp + 4], eax
lea eax, [esp + 0x40]
sub ebx, edi
mov dword [esp + 8], 2
mov dword [esp], eax
mov byte [esp + 0x3d], 0
call sub.msvcrt.dll_mbstowcs
cmp eax, 1
jne 0x415a10
cmp word [ebp], 0
movzx ecx, word [esp + 0x40]
mov eax, ebp
je 0x407c3c
lea esi, [esi]
nop
add eax, 2
sub ebx, 1
cmp word [eax], 0
jne 0x407c30
test ebx, ebx
je 0x415a10
xor edx, edx
add edi, 1
mov word [eax], cx
add ebp, 2
mov word [eax + 2], dx
movzx eax, byte [edi]
test al, al
jne 0x407be8
mov ebx, dword [esp + 0x28]
mov ebp, dword [esp + 0x24]
mov edi, dword [esp + 0x2c]
cmp word [ebx], 0
jne 0x407922
xor edx, edx
jmp 0x407746
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 esi, [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], esi
call fcn.00401ad0
cmp word [ebx], 0
je 0x407e39
mov ecx, edi
mov edx, ebx
lea esi, [esi]
add edx, 2
sub ecx, 1
cmp word [edx], 0
jne 0x407cd8
movzx eax, byte [esp + 0x4e0]
test al, al
je 0x407922
mov dword [esp + 0x28], ebx
add ecx, esi
mov dword [esp + 0x20], esi
mov esi, ecx
mov dword [esp + 0x2c], edi
mov edi, dword [esp + 0x20]
mov dword [esp + 0x24], ebp
mov ebp, edx
nop
mov byte [esp + 0x3e], al
lea eax, [esp + 0x3e]
mov ebx, esi
mov dword [esp + 4], eax
lea eax, [esp + 0x44]
sub ebx, edi
mov dword [esp + 8], 2
mov dword [esp], eax
mov byte [esp + 0x3f], 0
call sub.msvcrt.dll_mbstowcs
cmp eax, 1
jne 0x415a10
cmp word [ebp], 0
movzx ecx, word [esp + 0x44]
mov eax, ebp
je 0x407d5c
add eax, 2
sub ebx, 1
cmp word [eax], 0
jne 0x407d50
test ebx, ebx
je 0x415a10
xor edx, edx
add edi, 1
mov word [eax], cx
add ebp, 2
mov word [eax + 2], dx
movzx eax, byte [edi]
test al, al
jne 0x407d10
jmp 0x407c5a
cmp word [ebx], 0
mov edx, edi
mov eax, ebx
je 0x407d9c
lea esi, [esi]
add eax, 2
sub edx, 1
cmp word [eax], 0
jne 0x407d90
test edx, edx
je 0x415a10
mov esi, 0xffff91cd
mov ecx, 0x417060
jmp 0x407db8
test edx, edx
je 0x415a10
add ecx, 2
mov word [eax], si
add eax, 2
sub edx, 1
movzx esi, word [ecx]
test si, si
jne 0x407db0
jmp 0x407acc
cmp word [ebx], 0
mov edx, edi
mov eax, ebx
je 0x407dec
lea esi, [esi]
nop
add eax, 2
sub edx, 1
cmp word [eax], 0
jne 0x407de0
test edx, edx
je 0x415a10
mov esi, 0x6a61
mov ecx, 0x41707a
jmp 0x407e08
test edx, edx
je 0x415a10
add ecx, 2
mov word [eax], si
add eax, 2
sub edx, 1
movzx esi, word [ecx]
test si, si
jne 0x407e00
jmp 0x407acc
movzx eax, byte [esp + 0x50]
mov ecx, edi
mov edx, ebx
test al, al
jne 0x407bc9
xor edx, edx
jmp 0x407746
movzx eax, byte [esp + 0x4e0]
mov ecx, edi
mov edx, ebx
test al, al
jne 0x407cf4
xor edx, edx
jmp 0x407746
jmp 0x415a10
jmp 0x415a10
call sub.msvcrt.dll_abort