Function at 0x407c40
Capabilities:
Get common file path

Disassembly:
push ebp
push edi
push esi
push ebx
push eax
mov eax, 0x10e8
call fcn.0040fc7c
xor edi, edi
sub esp, eax
mov eax, dword [esp + eax]
mov ebx, eax
mov word [eax], di
movzx eax, word [edx]
test ax, ax
je 0x407cb2
lea edi, [edx + 2]
mov ebp, ecx
xor edx, edx
jmp 0x407c81
mov word [edx], ax
add edx, 2
movzx eax, word [edi]
add edi, 2
test ax, ax
je 0x407cb2
cmp ax, 0x7b
je 0x407cd0
cmp ax, 0x7d
je 0x407ce8
test edx, edx
jne 0x407c70
test ebp, ebp
je 0x407de5
xor ecx, ecx
mov word [ebx], ax
sub ebp, 1
add ebx, 2
mov word [ebx], cx
movzx eax, word [edi]
add edi, 2
test ax, ax
jne 0x407c81
xor eax, eax
mov word [ebx], ax
add esp, 0x10ec
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
xor esi, esi
lea edx, [esp + 0x8e0]
mov word [esp + 0x8e0], si
jmp 0x407c76
xor ecx, ecx
lea eax, [esp + 0x8e0]
mov word [edx], cx
mov dword [esp + 4], str.TEMP
mov dword [esp], eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x407e70
lea eax, [esp + 0x8e0]
mov dword [esp + 4], 0x417076
mov dword [esp], eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x407ee0
lea eax, [esp + 0x8e0]
mov dword [esp + 4], str.PROGRAM_BASE
mov dword [esp], eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x407df8
lea eax, [esp + 0x8e0]
mov dword [esp + 4], 0x4170be
mov dword [esp], eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x4081c8
lea eax, [esp + 0x8e0]
mov dword [esp + 4], 0x4170ca
mov dword [esp], eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x407f58
lea eax, [esp + 0x8e0]
mov dword [esp + 4], str.CACHE_DIR
mov dword [esp], eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x408120
lea eax, [esp + 0x8e0]
mov dword [esp + 4], str.VERSION
mov dword [esp], eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x4082b0
lea eax, [esp + 0x8e0]
mov dword [esp + 4], str.TIME
mov dword [esp], eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x407ff0
add esp, 0x10ec
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], ebx
call sub.msvcrt.dll_wcslen
mov ecx, ebp
mov edx, str.PROGRAM
sub ecx, eax
mov eax, ebx
call fcn.00407c40
test al, al
je 0x407de5
mov dword [esp], ebx
call sub.msvcrt.dll_wcslen
cmp eax, 3
jbe 0x407f41
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 0x407f41
xor eax, eax
mov word [esi], ax
cmp word [ebx], 0
je 0x407e60
xor eax, eax
nop
add ebx, 2
sub ebp, 1
cmp word [ebx], 0
jne 0x407e90
test al, al
jne 0x407ecb
xor edx, edx
jmp 0x407c76
mov dword [esp + 4], ebx
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
sub esp, 8
cmp word [ebx], 0
je 0x407ecb
mov eax, 1
lea esi, cs:[esi]
add ebx, 2
sub ebp, 1
cmp word [ebx], 0
jne 0x407e90
test al, al
je 0x407e60
jmp 0x407ecb
sub ebx, 2
xor esi, esi
add ebp, 1
mov word [ebx], si
cmp word [ebx - 2], 0x5c
je 0x407ec0
xor edx, edx
jmp 0x407c76
mov eax, dword [sym.imp.msvcrt.dll___wargv]
cmp word [ebx], 0
mov edx, ebp
mov eax, dword [eax]
mov esi, dword [eax]
mov eax, ebx
je 0x407f34
lea esi, cs:[esi]
lea esi, cs:[esi]
add eax, 2
sub edx, 1
cmp word [eax], 0
je 0x407f34
add eax, 2
sub edx, 1
cmp word [eax], 0
jne 0x407f00
jmp 0x407f34
test edx, edx
je 0x415cc0
mov word [eax], cx
add eax, 2
add esi, 2
sub edx, 1
movzx ecx, word [esi]
test cx, cx
jne 0x407f20
xor edx, edx
mov word [eax], dx
cmp word [ebx], 0
je 0x407e60
xor eax, eax
jmp 0x407e50
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 0x407de5
cmp word [ebx], 0
mov edx, ebp
mov eax, ebx
je 0x407fac
lea esi, [esi]
add eax, 2
sub edx, 1
cmp word [eax], 0
jne 0x407fa0
movzx ecx, word [esp + 0xd0]
test cx, cx
je 0x407fdc
lea esi, [esi]
test edx, edx
je 0x415cc0
add esi, 2
mov word [eax], cx
add eax, 2
sub edx, 1
movzx ecx, word [esi]
test cx, cx
jne 0x407fc0
xor ecx, ecx
mov word [eax], cx
cmp word [ebx], 0
jne 0x407e86
jmp 0x407ecb
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.00401a60
cmp word [ebx], 0
je 0x408319
mov ecx, ebp
mov edx, ebx
lea esi, [esi]
add edx, 2
sub ecx, 1
cmp word [edx], 0
jne 0x408050
movzx eax, byte [esp + 0x4e0]
test al, al
je 0x407e4c
mov dword [esp + 0x28], ebx
add ecx, esi
mov dword [esp + 0x20], esi
mov esi, ecx
mov dword [esp + 0x2c], ebp
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x24], edi
mov edi, edx
lea esi, cs:[esi]
nop
mov byte [esp + 0x3e], al
lea eax, [esp + 0x3e]
mov ebx, esi
mov dword [esp + 4], eax
lea eax, [esp + 0x44]
sub ebx, ebp
mov dword [esp + 8], 2
mov dword [esp], eax
mov byte [esp + 0x3f], 0
call sub.msvcrt.dll_mbstowcs
cmp eax, 1
jne 0x415cc0
cmp word [edi], 0
movzx ecx, word [esp + 0x44]
mov eax, edi
je 0x4080dc
nop
add eax, 2
sub ebx, 1
cmp word [eax], 0
jne 0x4080d0
test ebx, ebx
je 0x415cc0
xor edx, edx
add ebp, 1
mov word [eax], cx
add edi, 2
mov word [eax + 2], dx
movzx eax, byte [ebp]
test al, al
jne 0x408090
mov ebx, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
mov ebp, dword [esp + 0x2c]
cmp word [ebx], 0
je 0x407e60
xor eax, eax
jmp 0x407e50
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 0x407de5
cmp word [ebx], 0
mov edx, ebp
mov eax, ebx
je 0x40817c
lea esi, cs:[esi]
lea esi, [esi]
add eax, 2
sub edx, 1
cmp word [eax], 0
jne 0x408170
movzx ecx, word [esp + 0x2d8]
test cx, cx
je 0x407fdc
lea esi, cs:[esi]
lea esi, cs:[esi]
lea esi, [esi]
test edx, edx
je 0x415cc0
add esi, 2
mov word [eax], cx
add eax, 2
sub edx, 1
movzx ecx, word [esi]
test cx, cx
jne 0x4081a0
jmp 0x407fdc
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea esi, [esp + 0x50]
mov dword [esp + 8], 0x4170c6
mov dword [esp + 0xc], eax
mov dword [esp + 4], pe_nt_image_headers32
mov dword [esp], esi
call fcn.00401a60
cmp word [ebx], 0
je 0x408301
mov ecx, ebp
mov edx, ebx
lea esi, [esi]
add edx, 2
sub ecx, 1
cmp word [edx], 0
jne 0x408200
movzx eax, byte [esp + 0x50]
test al, al
je 0x407e4c
mov dword [esp + 0x28], ebx
add ecx, esi
mov dword [esp + 0x20], esi
mov esi, ecx
mov dword [esp + 0x2c], ebp
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x24], edi
mov edi, edx
lea esi, cs:[esi]
lea esi, cs:[esi]
mov byte [esp + 0x3c], al
lea eax, [esp + 0x3c]
mov ebx, esi
mov dword [esp + 4], eax
lea eax, [esp + 0x40]
sub ebx, ebp
mov dword [esp + 8], 2
mov dword [esp], eax
mov byte [esp + 0x3d], 0
call sub.msvcrt.dll_mbstowcs
cmp eax, 1
jne 0x415cc0
cmp word [edi], 0
movzx ecx, word [esp + 0x40]
mov eax, edi
je 0x40828c
nop
add eax, 2
sub ebx, 1
cmp word [eax], 0
jne 0x408280
test ebx, ebx
je 0x415cc0
xor ebx, ebx
add ebp, 1
mov word [eax], cx
add edi, 2
mov word [eax + 2], bx
movzx eax, byte [ebp]
test al, al
jne 0x408240
jmp 0x4080fb
cmp word [ebx], 0
mov edx, ebp
mov eax, ebx
je 0x4082cc
lea esi, [esi]
add eax, 2
sub edx, 1
cmp word [eax], 0
jne 0x4082c0
mov esi, 0x31
mov ecx, str.1.0.1
lea esi, cs:[esi]
nop
test edx, edx
je 0x415cc0
add ecx, 2
mov word [eax], si
add eax, 2
sub edx, 1
movzx esi, word [ecx]
test si, si
jne 0x4082e0
jmp 0x407f3c
movzx eax, byte [esp + 0x50]
mov ecx, ebp
mov edx, ebx
test al, al
jne 0x408219
xor edx, edx
jmp 0x407c76
movzx eax, byte [esp + 0x4e0]
mov ecx, ebp
mov edx, ebx
test al, al
jne 0x40806c
xor edx, edx
jmp 0x407c76
add esp, 0x2c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.msvcrt.dll_abort
or edi, 0xffffffff
jmp 0x40c085