Function at 0x402590
Capabilities:
Get common file path

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 0x402860
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]
sub eax, 1
sub esp, 0x10
cmp eax, 0x103
ja 0x402758
test byte [section..data], 8
jne 0x402768
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
sub eax, 1
sub esp, 0xc
cmp eax, 0x103
ja 0x402758
lea ebx, [ebp - 0x214]
test byte [section..data], 8
jne 0x402a78
lea edi, [ebp - 0x638]
mov esi, 7
jmp 0x402693
lea eax, [ebp - 0x624]
cmp eax, edi
je 0x402758
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 0x402680
cmp word [ebp - 0x214], 0
je 0x402ca8
mov eax, ebx
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x4026d0
sub eax, ebx
mov ecx, eax
sar eax, 1
cmp dword [ebp - 0x640], eax
jb 0x402680
cmp ecx, 0x206
ja 0x402680
cmp word [ebp + eax*2 - 0x624], 0x5c
jne 0x402680
mov dword [esp + 8], eax
lea eax, [ebp - 0x624]
mov dword [ebp - 0x64c], ecx
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wcsnicmp]
test eax, eax
jne 0x402680
mov eax, dword [ebp - 0x644]
mov ecx, dword [ebp - 0x64c]
mov dword [eax], esi
lea eax, [ebp + ecx - 0x622]
call fcn.00401be0
mov ebx, dword [ebp - 0x648]
mov dword [ebx], eax
mov dword [esp], eax
call dword [sym.imp.shlwapi.dll_PathRemoveExtensionW]
mov eax, 1
sub esp, 4
jmp 0x40275a
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, edi
shr eax, 0x10
je 0x402990
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 0x4029a3
movzx eax, word [ebp - 0x41c]
test ax, ax
je 0x402e0a
lea esi, [esi]
lea esi, [esi]
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [edi + edx*2 + 2], 0
jne 0x4027b0
mov esi, 0x224c
mov dword [ebp - 0x640], edi
lea ecx, [ebp - 0x212]
mov word [ebp - 0x214], si
jmp 0x402824
cmp ax, 9
je 0x402c58
cmp ax, 0xa
jne 0x402bd1
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea esi, [edx - 1]
test edx, edx
jle 0x402d51
lea eax, [ebp - 0xf2]
cmp ecx, eax
ja 0x402d51
mov eax, dword [ebp - 0x640]
mov edx, esi
movzx eax, word [eax]
add dword [ebp - 0x640], 2
cmp ax, 0xd
je 0x402c40
jbe 0x4027e0
cmp ax, 0x22
je 0x402c28
cmp ax, 0x5c
jne 0x402bc4
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x402800
shr eax, 0x10
je 0x402950
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 0x402963
movzx eax, word [esi]
test ax, ax
je 0x402dc1
lea esi, [esi]
nop
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [esi + edx*2 + 2], 0
jne 0x4028a0
mov ecx, 0x224c
mov dword [ebp - 0x640], esi
mov word [ebp - 0x214], cx
lea ecx, [ebp - 0x212]
jmp 0x402914
cmp ax, 9
je 0x4029d0
cmp ax, 0xa
jne 0x402a06
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea edi, [edx - 1]
test edx, edx
jle 0x402c70
lea eax, [ebp - 0xf2]
cmp ecx, eax
ja 0x402c70
mov eax, dword [ebp - 0x640]
mov edx, edi
movzx eax, word [eax]
add dword [ebp - 0x640], 2
cmp ax, 0xd
je 0x4029e8
jbe 0x4028d0
cmp ax, 0x22
je 0x402a60
cmp ax, 0x5c
jne 0x4029f9
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x4028f0
movzx eax, si
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401470
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x4111fe
mov dword [esp + 8], str.get_link_location
mov dword [esp + 4], 0x40f000
mov dword [esp], 3
call fcn.00401580
jmp 0x4025e9
movzx eax, di
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401470
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x4111fe
mov dword [esp + 8], str.get_link_location
mov dword [esp + 4], 0x40f000
mov dword [esp], 3
call fcn.00401580
jmp 0x40262a
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4028f0
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4028f0
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x402d82
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + str.0123456789abcdef]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + str.0123456789abcdef]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + str.0123456789abcdef]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + str.0123456789abcdef]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x4028f0
mov edi, 0x225c
add ecx, 2
mov word [ecx - 2], di
jmp 0x4028f0
lea eax, [ebp - 0x624]
shr eax, 0x10
je 0x402de2
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 0x402b97
movzx eax, word [ebp - 0x624]
test ax, ax
je 0x402da0
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [ebp + edx*2 - 0x622], 0
jne 0x402ac0
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 0x402b36
cmp ax, 9
je 0x402cd0
cmp ax, 0xa
jne 0x402cee
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea esi, [edx - 1]
test edx, edx
jle 0x402b6b
cmp ecx, edi
ja 0x402b6b
mov eax, dword [ebp - 0x64c]
mov edx, esi
movzx eax, word [eax]
add dword [ebp - 0x64c], 2
cmp ax, 0xd
je 0x402cb8
jbe 0x402b00
cmp ax, 0x22
je 0x402d40
cmp ax, 0x5c
jne 0x402ce1
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x402b20
mov byte [ecx], 0x22
test esi, esi
jle 0x402db9
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 fcn.0040e1f0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x4111fe
mov dword [esp + 8], str.get_link_location
mov dword [esp + 4], 0x40f000
mov dword [esp], 3
call fcn.00401580
jmp 0x40266f
lea esi, [eax - 0x20]
cmp si, 0x5e
jbe 0x402d8c
mov esi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr si, 0xc
movzx esi, si
movzx ebx, byte [esi + str.0123456789abcdef]
mov esi, eax
shr si, 8
and esi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [esi + str.0123456789abcdef]
mov esi, eax
and eax, 0xf
shr si, 4
movzx eax, byte [eax + str.0123456789abcdef]
and esi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [esi + str.0123456789abcdef]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x402800
mov esi, 0x225c
add ecx, 2
mov word [ecx - 2], si
jmp 0x402800
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x402800
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x402800
mov byte [ecx], 0x22
test edi, edi
jle 0x402dda
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 fcn.0040e1f0
jmp 0x402963
xor ecx, ecx
xor eax, eax
jmp 0x4026ef
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x402b20
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x402b20
lea esi, [eax - 0x20]
cmp si, 0x5e
jbe 0x402d96
mov esi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr si, 0xc
movzx esi, si
movzx ebx, byte [esi + str.0123456789abcdef]
mov esi, eax
shr si, 8
and esi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [esi + str.0123456789abcdef]
mov esi, eax
and eax, 0xf
shr si, 4
movzx eax, byte [eax + str.0123456789abcdef]
and esi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [esi + str.0123456789abcdef]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x402b20
mov esi, 0x225c
add ecx, 2
mov word [ecx - 2], si
jmp 0x402b20
mov byte [ecx], 0x22
test esi, esi
jle 0x402e23
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 fcn.0040e1f0
jmp 0x4029a3
mov byte [ecx], al
add ecx, 1
jmp 0x4028f0
mov byte [ecx], al
add ecx, 1
jmp 0x402800
mov byte [ecx], al
add ecx, 1
jmp 0x402b20
mov eax, 0x224c
mov byte [ebp - 0x212], 0x22
lea ecx, [ebp - 0x212]
mov word [ebp - 0x214], ax
lea eax, [ecx + 1]
jmp 0x402b86
mov eax, 0x224c
mov byte [ebp - 0x212], 0x22
lea ecx, [ebp - 0x212]
mov word [ebp - 0x214], ax
lea eax, [ecx + 1]
jmp 0x402c8b
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 fcn.00401470
jmp 0x402b97
mov ebx, 0x224c
mov byte [ebp - 0x212], 0x22
lea ecx, [ebp - 0x212]
mov word [ebp - 0x214], bx
lea eax, [ecx + 1]
jmp 0x402d6c