Function at 0x6904a880
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x37c
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov edx, ebx
call fcn.690449b0
test eax, eax
je 0x6904aa80
mov dword [esp], ebx
lea edi, [ebp - 0x220]
call dword [sym.imp.shlwapi.dll_PathAddBackslashW]
sub esp, 4
test byte [0x6907604c], 8
jne 0x6904a990
mov dword [esp], esi
call dword [sym.imp.shlwapi.dll_PathIsRelativeW]
sub esp, 4
test eax, eax
je 0x6904a940
cmp word [ebx], 0
mov edx, ebx
je 0x6904a8e9
lea esi, [esi]
nop
add edx, 2
cmp word [edx], 0
jne 0x6904a8e0
xor eax, eax
lea esi, [esi]
nop
movzx ecx, word [esi + eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x6904a8f0
mov dword [esp + 4], ebx
mov dword [esp], edi
call dword [sym.imp.shlwapi.dll_PathCanonicalizeW]
xor eax, eax
sub esp, 8
lea esi, [esi]
movzx edx, word [edi + eax]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x6904a918
test byte [0x6907604c], 8
jne 0x6904aaa0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], esi
call dword [sym.imp.shlwapi.dll_PathGetDriveNumberW]
mov edx, eax
sub esp, 4
xor eax, eax
cmp edx, 0xffffffff
je 0x6904a970
lea esi, [esi]
movzx edx, word [esi + eax]
mov word [ebx + eax], dx
add eax, 2
test dx, dx
jne 0x6904a958
jmp 0x6904a900
movzx edx, word [esi + eax]
mov word [ebx + eax + 4], dx
add eax, 2
test dx, dx
jne 0x6904a970
jmp 0x6904a900
test esi, esi
je 0x6904afd6
mov eax, esi
shr eax, 0x10
je 0x6904abc8
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x360], 0x6907869d
sub esp, 8
mov ecx, eax
test eax, eax
jne 0x6904abe1
movzx eax, word [esi]
test ax, ax
je 0x6904b031
lea esi, [esi]
nop
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [esi + edx*2 + 2], 0
jne 0x6904a9e0
mov ecx, 0x224c
mov dword [ebp + 0xc], esi
mov word [ebp - 0x220], cx
lea ecx, [ebp - 0x21e]
mov dword [ebp + 0x10], ebx
jmp 0x6904aa4e
cmp ax, 9
je 0x6904ade8
cmp ax, 0xa
jne 0x6904ad76
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea edi, [edx - 1]
test edx, edx
jle 0x6904af60
lea eax, [ebp - 0xfe]
cmp ecx, eax
ja 0x6904af60
movzx eax, word [esi]
mov edx, edi
add esi, 2
cmp ax, 0xd
je 0x6904ae18
jbe 0x6904aa10
cmp ax, 0x22
je 0x6904add0
cmp ax, 0x5c
jne 0x6904ad69
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x6904aa30
mov dword [esp + 4], ebx
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
sub esp, 8
jmp 0x6904a8a4
mov eax, ebx
shr eax, 0x10
je 0x6904ab80
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, 0x6907869d
test ecx, ecx
jne 0x6904ab93
movzx eax, word [ebx]
test ax, ax
je 0x6904afef
lea esi, [esi]
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x6904aae0
mov ecx, 0x224c
lea esi, [ebp - 0x34a]
lea edi, [ebp - 0x22a]
mov word [ebp - 0x34c], cx
jmp 0x6904ab48
cmp ax, 9
je 0x6904ae00
cmp ax, 0xa
jne 0x6904aebe
mov eax, 0x6e5c
add esi, 2
mov word [esi - 2], ax
lea ecx, [edx - 1]
test edx, edx
jle 0x6904af28
cmp esi, edi
ja 0x6904af28
movzx eax, word [ebx]
mov edx, ecx
add ebx, 2
cmp ax, 0xd
je 0x6904ae30
jbe 0x6904ab10
cmp ax, 0x22
je 0x6904af10
cmp ax, 0x5c
jne 0x6904aeb1
mov eax, 0x5c5c
add esi, 2
mov word [esi - 2], ax
jmp 0x6904ab30
movzx ebx, bx
mov dword [esp], 0x690786a7
mov dword [esp + 4], ebx
call fcn.69044a60
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.canon_s_n
mov dword [esp + 8], str.COMDLG32_GetCanonicalPath
mov dword [esp + 4], 0x6907604c
mov dword [esp], 3
call fcn.69044e10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
movzx eax, si
mov dword [esp], 0x690786a7
mov dword [esp + 4], eax
call fcn.69044a60
mov dword [ebp - 0x360], eax
test ebx, ebx
je 0x6904afe5
mov eax, ebx
shr eax, 0x10
je 0x6904afa0
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, 0x6907869d
test ecx, ecx
jne 0x6904ad06
movzx eax, word [ebx]
test ax, ax
je 0x6904b010
lea esi, [esi]
nop
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x6904ac28
mov ecx, 0x224c
mov dword [ebp - 0x35c], ebx
mov word [ebp - 0x220], cx
lea ecx, [ebp - 0x21e]
mov dword [ebp + 0xc], esi
mov dword [ebp + 0x10], ebx
jmp 0x6904ac9c
cmp ax, 9
je 0x6904ad58
cmp ax, 0xa
jne 0x6904ae4e
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea esi, [esi]
nop
lea eax, [ebp - 0xfe]
lea esi, [edx - 1]
cmp ecx, eax
ja 0x6904acd8
test edx, edx
jle 0x6904acd8
mov eax, dword [ebp - 0x35c]
mov edx, esi
movzx eax, word [eax]
add dword [ebp - 0x35c], 2
cmp ax, 0xd
je 0x6904ad40
jbe 0x6904ac58
cmp ax, 0x22
je 0x6904aea0
cmp ax, 0x5c
jne 0x6904ae41
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x6904ac80
mov eax, esi
mov ebx, dword [ebp + 0x10]
mov esi, dword [ebp + 0xc]
mov byte [ecx], 0x22
test eax, eax
jle 0x6904b029
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
mov byte [eax], 0
mov dword [esp], edi
call fcn.69075320
mov ecx, dword [ebp - 0x360]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.current_directory_s__file_s_n
mov dword [esp + 0x14], ecx
mov dword [esp + 8], str.COMDLG32_GetCanonicalPath
mov dword [esp + 4], 0x6907604c
mov dword [esp], 3
call fcn.69044e10
jmp 0x6904a8c3
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x6904ac80
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x6904ac80
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x6904afb8
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + str.0123456789abcdefFILEDLG95_Handle_GetFilePath]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + str.0123456789abcdefFILEDLG95_Handle_GetFilePath]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + str.0123456789abcdefFILEDLG95_Handle_GetFilePath]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + str.0123456789abcdefFILEDLG95_Handle_GetFilePath]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x6904aa30
mov edi, 0x225c
add ecx, 2
mov word [ecx - 2], di
jmp 0x6904aa30
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x6904aa30
mov eax, 0x745c
add esi, 2
mov word [esi - 2], ax
jmp 0x6904ab30
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x6904aa30
mov eax, 0x725c
add esi, 2
mov word [esi - 2], ax
jmp 0x6904ab30
lea esi, [eax - 0x20]
cmp si, 0x5e
jbe 0x6904afcc
mov esi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr si, 0xc
movzx esi, si
movzx ebx, byte [esi + str.0123456789abcdefFILEDLG95_Handle_GetFilePath]
mov esi, eax
shr si, 8
and esi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [esi + str.0123456789abcdefFILEDLG95_Handle_GetFilePath]
mov esi, eax
and eax, 0xf
shr si, 4
movzx eax, byte [eax + str.0123456789abcdefFILEDLG95_Handle_GetFilePath]
and esi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [esi + str.0123456789abcdefFILEDLG95_Handle_GetFilePath]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x6904ac80
mov esi, 0x225c
add ecx, 2
mov word [ecx - 2], si
jmp 0x6904ac80
lea ecx, [eax - 0x20]
cmp cx, 0x5e
jbe 0x6904afc2
mov ecx, eax
mov byte [esi], 0x5c
add esi, 5
shr cx, 0xc
movzx ecx, cx
movzx ecx, byte [ecx + str.0123456789abcdefFILEDLG95_Handle_GetFilePath]
mov byte [esi - 4], cl
mov ecx, eax
shr cx, 8
and ecx, 0xf
movzx ecx, byte [ecx + str.0123456789abcdefFILEDLG95_Handle_GetFilePath]
mov byte [esi - 3], cl
mov ecx, eax
and eax, 0xf
shr cx, 4
movzx eax, byte [eax + str.0123456789abcdefFILEDLG95_Handle_GetFilePath]
and ecx, 0xf
movzx ecx, byte [ecx + str.0123456789abcdefFILEDLG95_Handle_GetFilePath]
mov byte [esi - 1], al
mov byte [esi - 2], cl
jmp 0x6904ab30
mov eax, 0x225c
add esi, 2
mov word [esi - 2], ax
jmp 0x6904ab30
mov byte [esi], 0x22
test ecx, ecx
jle 0x6904b008
mov ebx, 0x2e2e
mov byte [esi + 3], 0x2e
lea eax, [esi + 4]
mov word [esi + 1], bx
mov byte [eax], 0
lea eax, [ebp - 0x34c]
mov dword [esp], eax
call fcn.69075320
jmp 0x6904ab93
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
mov byte [ecx], 0x22
test edi, edi
jle 0x6904b04a
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
lea edi, [ebp - 0x220]
mov byte [eax], 0
mov dword [esp], edi
call fcn.69075320
mov dword [ebp - 0x360], eax
jmp 0x6904abe1
movzx eax, bx
mov dword [esp], 0x690786a7
mov dword [esp + 4], eax
call fcn.69044a60
jmp 0x6904ad06
mov byte [ecx], al
add ecx, 1
jmp 0x6904aa30
mov byte [esi], al
add esi, 1
jmp 0x6904ab30
mov byte [ecx], al
add ecx, 1
jmp 0x6904ac80
mov dword [ebp - 0x360], 0x69078696
jmp 0x6904abe1
mov eax, 0x69078696
jmp 0x6904ad06
mov eax, 0x224c
mov byte [ebp - 0x34a], 0x22
lea esi, [ebp - 0x34a]
mov word [ebp - 0x34c], ax
lea eax, [esi + 1]
jmp 0x6904af43
mov eax, 0x224c
mov byte [ebp - 0x21e], 0x22
lea ecx, [ebp - 0x21e]
mov word [ebp - 0x220], ax
lea eax, [ecx + 1]
jmp 0x6904acfb
mov edi, 0x224c
mov byte [ebp - 0x21e], 0x22
lea ecx, [ebp - 0x21e]
mov word [ebp - 0x220], di
lea eax, [ecx + 1]
jmp 0x6904af81