Function at 0x407780
Capabilities:
Get common file path
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x654
mov dword [ebp - 0x644], edx
mov dword [ebp - 0x648], ecx
mov dword [ebp - 0x638], 0x10
mov dword [ebp - 0x634], 0xb
mov dword [ebp - 0x630], 0x18
mov dword [ebp - 0x62c], 0x19
mov dword [ebp - 0x628], 0x16
test byte [section..data], 8
jne 0x407a90
lea edi, [ebp - 0x41c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], edi
mov dword [esp + 4], 0x104
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_GetFullPathNameW]
dec eax
sub esp, 0x10
cmp eax, 0x103
ja 0x407990
test byte [section..data], 8
jne 0x4079a0
lea eax, [ebp - 0x624]
mov dword [esp + 8], 0x104
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_GetLongPathNameW]
mov dword [ebp - 0x640], eax
dec eax
sub esp, 0xc
cmp eax, 0x103
ja 0x407990
lea ebx, [ebp - 0x214]
test byte [section..data], 8
jne 0x407ca8
lea edi, [ebp - 0x638]
mov esi, 7
jmp 0x407883
lea eax, [ebp - 0x624]
cmp eax, edi
je 0x407990
mov esi, dword [edi]
add edi, 4
mov dword [esp + 0xc], 0
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov dword [esp], 0
call dword [sym.imp.shell32.dll_SHGetSpecialFolderPathW]
sub esp, 0x10
test eax, eax
je 0x407870
cmp word [ebp - 0x214], 0
je 0x407ed8
mov eax, ebx
lea esi, cs:[esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x4078c0
sub eax, ebx
mov edx, eax
mov ecx, eax
sar edx, 1
cmp eax, 0x206
ja 0x407870
cmp dword [ebp - 0x640], edx
jb 0x407870
cmp word [ebp + edx*2 - 0x624], 0x5c
jne 0x407870
lea eax, [ebp - 0x624]
mov dword [ebp - 0x64c], ecx
mov dword [esp + 8], edx
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wcsnicmp]
test eax, eax
jne 0x407870
mov ecx, dword [ebp - 0x64c]
mov eax, dword [ebp - 0x644]
mov dword [eax], esi
lea esi, [ebp + ecx - 0x622]
movzx ebx, word [esi]
test bx, bx
je 0x40805d
mov eax, esi
lea esi, cs:[esi]
add eax, 2
cmp word [eax], 0
jne 0x407938
sub eax, esi
add eax, 2
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov edx, eax
test eax, eax
je 0x40807a
xor eax, eax
jmp 0x407964
movzx ebx, word [esi + eax]
mov word [edx + eax], bx
add eax, 2
test bx, bx
jne 0x407960
mov eax, dword [ebp - 0x648]
mov dword [eax], edx
mov dword [esp], edx
call dword [sym.imp.shlwapi.dll_PathRemoveExtensionW]
mov eax, 1
sub esp, 4
jmp 0x407992
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, edi
shr eax, 0x10
je 0x407bc0
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, str._invalid_
test ecx, ecx
jne 0x407bd3
movzx eax, word [ebp - 0x41c]
test ax, ax
je 0x40803c
nop
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [edi + edx*2 + 2], 0
jne 0x4079e0
mov esi, 0x224c
mov dword [ebp - 0x640], edi
lea ecx, [ebp - 0x212]
mov word [ebp - 0x214], si
jmp 0x407a54
cmp ax, 9
je 0x407df8
cmp ax, 0xa
jne 0x407e16
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea esi, [edx - 1]
test edx, edx
jle 0x407f89
lea eax, [ebp - 0xf2]
cmp ecx, eax
ja 0x407f89
mov eax, dword [ebp - 0x640]
mov edx, esi
movzx eax, word [eax]
add dword [ebp - 0x640], 2
cmp ax, 0xd
je 0x407e88
jbe 0x407a10
cmp ax, 0x22
je 0x407e70
cmp ax, 0x5c
jne 0x407e09
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x407a30
shr eax, 0x10
je 0x407b80
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, str._invalid_
test ecx, ecx
jne 0x407b93
movzx eax, word [esi]
test ax, ax
je 0x407ff3
lea esi, cs:[esi]
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [esi + edx*2 + 2], 0
jne 0x407ad0
mov ecx, 0x224c
mov dword [ebp - 0x640], esi
mov word [ebp - 0x214], cx
lea ecx, [ebp - 0x212]
jmp 0x407b44
cmp ax, 9
je 0x407c18
cmp ax, 0xa
jne 0x407c36
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea edi, [edx - 1]
test edx, edx
jle 0x407ea0
lea eax, [ebp - 0xf2]
cmp ecx, eax
ja 0x407ea0
mov eax, dword [ebp - 0x640]
mov edx, edi
movzx eax, word [eax]
add dword [ebp - 0x640], 2
cmp ax, 0xd
je 0x407c00
jbe 0x407b00
cmp ax, 0x22
je 0x407c90
cmp ax, 0x5c
jne 0x407c29
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x407b20
movzx eax, si
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x40d3df
mov dword [esp + 8], str.get_link_location
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x4077d9
movzx eax, di
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x40d3df
mov dword [esp + 8], str.get_link_location
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x407818
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x407b20
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x407b20
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x407fba
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + str.0123456789abcdefGCC:__GNU__10.3.0]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + str.0123456789abcdefGCC:__GNU__10.3.0]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + str.0123456789abcdefGCC:__GNU__10.3.0]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + str.0123456789abcdefGCC:__GNU__10.3.0]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x407b20
mov edi, 0x225c
add ecx, 2
mov word [ecx - 2], di
jmp 0x407b20
lea eax, [ebp - 0x624]
shr eax, 0x10
je 0x408014
lea eax, [ebp - 0x624]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, str._invalid_
test ecx, ecx
jne 0x407dc7
movzx eax, word [ebp - 0x624]
test ax, ax
je 0x407fd2
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [ebp + edx*2 - 0x622], 0
jne 0x407cf0
mov edi, 0x224c
lea ebx, [ebp - 0x624]
lea ecx, [ebp - 0x212]
mov word [ebp - 0x214], di
lea edi, [ebp - 0xf2]
mov dword [ebp - 0x64c], ebx
jmp 0x407d66
cmp ax, 9
je 0x407ee8
cmp ax, 0xa
jne 0x407f06
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea esi, [edx - 1]
test edx, edx
jle 0x407d9b
cmp ecx, edi
ja 0x407d9b
mov eax, dword [ebp - 0x64c]
mov edx, esi
movzx eax, word [eax]
add dword [ebp - 0x64c], 2
cmp ax, 0xd
je 0x407f60
jbe 0x407d30
cmp ax, 0x22
je 0x407f78
cmp ax, 0x5c
jne 0x407ef9
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x407d50
mov byte [ecx], 0x22
test esi, esi
jle 0x407feb
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
lea ebx, [ebp - 0x214]
mov byte [eax], 0
mov dword [esp], ebx
call sym.___wine_dbg_strdup
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x40d3df
mov dword [esp + 8], str.get_link_location
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40785b
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x407a30
lea esi, [eax - 0x20]
cmp si, 0x5e
jbe 0x407fc2
mov esi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr si, 0xc
movzx esi, si
movzx ebx, byte [esi + str.0123456789abcdefGCC:__GNU__10.3.0]
mov esi, eax
shr si, 8
and esi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [esi + str.0123456789abcdefGCC:__GNU__10.3.0]
mov esi, eax
and eax, 0xf
shr si, 4
movzx eax, byte [eax + str.0123456789abcdefGCC:__GNU__10.3.0]
and esi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [esi + str.0123456789abcdefGCC:__GNU__10.3.0]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x407a30
mov esi, 0x225c
add ecx, 2
mov word [ecx - 2], si
jmp 0x407a30
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x407a30
mov byte [ecx], 0x22
test edi, edi
jle 0x40800c
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
lea ebx, [ebp - 0x214]
mov byte [eax], 0
mov dword [esp], ebx
call sym.___wine_dbg_strdup
jmp 0x407b93
xor ecx, ecx
xor edx, edx
jmp 0x4078e0
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x407d50
lea esi, [eax - 0x20]
cmp si, 0x5e
jbe 0x407fca
mov esi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr si, 0xc
movzx esi, si
movzx ebx, byte [esi + str.0123456789abcdefGCC:__GNU__10.3.0]
mov esi, eax
shr si, 8
and esi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [esi + str.0123456789abcdefGCC:__GNU__10.3.0]
mov esi, eax
and eax, 0xf
shr si, 4
movzx eax, byte [eax + str.0123456789abcdefGCC:__GNU__10.3.0]
and esi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [esi + str.0123456789abcdefGCC:__GNU__10.3.0]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x407d50
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x407d50
mov esi, 0x225c
add ecx, 2
mov word [ecx - 2], si
jmp 0x407d50
mov byte [ecx], 0x22
test esi, esi
jle 0x408055
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
lea ebx, [ebp - 0x214]
mov byte [eax], 0
mov dword [esp], ebx
call sym.___wine_dbg_strdup
jmp 0x407bd3
mov byte [ecx], al
inc ecx
jmp 0x407b20
mov byte [ecx], al
inc ecx
jmp 0x407a30
mov byte [ecx], al
inc ecx
jmp 0x407d50
mov eax, 0x224c
mov byte [ebp - 0x212], 0x22
lea ecx, [ebp - 0x212]
mov word [ebp - 0x214], ax
lea eax, [ecx + 1]
jmp 0x407db6
mov eax, 0x224c
mov byte [ebp - 0x212], 0x22
lea ecx, [ebp - 0x212]
mov word [ebp - 0x214], ax
lea eax, [ecx + 1]
jmp 0x407ebb
lea eax, [ebp - 0x624]
mov dword [esp], str._04x
mov dword [ebp - 0x64c], eax
movzx eax, word [ebp - 0x64c]
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
jmp 0x407dc7
mov ebx, 0x224c
mov byte [ebp - 0x212], 0x22
lea ecx, [ebp - 0x212]
mov word [ebp - 0x214], bx
lea eax, [ecx + 1]
jmp 0x407fa4
mov dword [esp], 2
call dword [sym.imp.ucrtbase.dll_malloc]
mov edx, eax
test eax, eax
je 0x40807a
xor eax, eax
mov word [edx], ax
jmp 0x407970
test byte [section..data], 2
jne 0x408090
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [esp + 0xc], str.out_of_memory_n
mov dword [esp + 8], str.xmalloc
mov dword [esp + 4], 0x40c000
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x408083