Function at 0x409710
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0x658]
lea esi, [ebp - 0x860]
push ebx
lea ebx, [ebp - 0x75c]
sub esp, 0x88c
mov dword [esp + 4], eax
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryA]
sub esp, 8
mov dword [esp + 4], esi
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetTempPathA]
sub esp, 8
mov dword [esp + 4], 0x50f
mov dword [esp], str..._wine_dlls_msvcp120_tests_msvcp120.c
call fcn.00413590
mov eax, dword [sym.imp.kernel32.dll_SetCurrentDirectoryA]
mov dword [esp], esi
mov dword [ebp - 0x878], eax
call eax
sub esp, 4
mov dword [esp], eax
mov dword [esp + 4], str.SetCurrentDirectoryA_to_temp_path_failed_n
call fcn.00413800
mov dword [esp], ebx
call dword [0x41b15c]
mov dword [esp + 4], 0x511
mov dword [esp], str..._wine_dlls_msvcp120_tests_msvcp120.c
mov edi, eax
call fcn.00413590
xor eax, eax
cmp edi, ebx
mov dword [esp + 4], str.p_tr2_sys__Current_get_returned_different_buffer_n
sete al
mov dword [esp], eax
call fcn.00413800
mov dword [esp], edi
call sub.msvcrt.dll_strlen
mov ecx, 0x5c
mov word [edi + eax], cx
mov dword [esp + 4], 0x513
mov dword [esp], str..._wine_dlls_msvcp120_tests_msvcp120.c
call fcn.00413590
mov eax, dword [sym.imp.msvcrt.dll_strcmp]
mov dword [esp], esi
mov dword [esp + 4], ebx
mov dword [ebp - 0x87c], eax
call eax
mov dword [esp + 8], esi
test eax, eax
mov dword [esp + 0xc], ebx
sete al
mov dword [esp + 4], str.test_tr2_sys__Current_get__:_expect:__s__got__s_n
movzx eax, al
mov dword [esp], eax
call fcn.00413800
lea eax, [ebp - 0x428]
mov dword [esp], 0x104
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_GetTempPathW]
sub esp, 8
mov dword [esp + 4], 0x516
mov dword [esp], str..._wine_dlls_msvcp120_tests_msvcp120.c
call fcn.00413590
lea eax, [ebp - 0x428]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_SetCurrentDirectoryW]
sub esp, 4
mov dword [esp], eax
mov dword [esp + 4], str.SetCurrentDirectoryW_to_temp_path_wchar_failed_n
call fcn.00413800
lea eax, [ebp - 0x220]
mov dword [esp], eax
call dword [0x41b158]
mov dword [esp + 4], 0x518
mov dword [esp], str..._wine_dlls_msvcp120_tests_msvcp120.c
mov esi, eax
call fcn.00413590
lea eax, [ebp - 0x220]
mov dword [esp + 4], str.p_tr2_sys__Current_get_wchar_returned_different_buffer_n
cmp esi, eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00413800
mov dword [esp + 4], 0x418660
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll_wcscat]
mov dword [esp + 4], 0x51a
mov dword [esp], str..._wine_dlls_msvcp120_tests_msvcp120.c
call fcn.00413590
lea eax, [ebp - 0x220]
shr eax, 0x10
je 0x409dd0
lea eax, [ebp - 0x220]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x874], str._invalid_
sub esp, 8
test eax, eax
jne 0x4099ec
cmp word [ebp - 0x220], 0
je 0x40992e
lea esi, [esi]
add eax, 1
cmp word [ebp + eax*2 - 0x220], 0
jne 0x409920
mov edx, 0x224c
lea esi, [ebp - 0x432]
lea ecx, [ebp - 0x220]
mov word [ebp - 0x554], dx
lea edx, [ebp - 0x552]
mov dword [ebp - 0x870], esi
lea esi, [eax - 1]
mov dword [ebp - 0x86c], ecx
cmp edx, dword [ebp - 0x870]
ja 0x4099bb
test eax, eax
jle 0x4099bb
add dword [ebp - 0x86c], 2
mov eax, dword [ebp - 0x86c]
movzx eax, word [eax - 2]
cmp ax, 0xd
je 0x409d00
ja 0x409c00
cmp ax, 9
je 0x409d73
cmp ax, 0xa
jne 0x409d13
mov eax, 0x6e5c
add edx, 2
mov word [edx - 2], ax
mov eax, esi
lea esi, [esi]
lea esi, [eax - 1]
cmp edx, dword [ebp - 0x870]
jbe 0x409963
mov byte [edx], 0x22
lea eax, [edx + 1]
test esi, esi
jle 0x4099d5
mov ecx, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], cx
mov byte [eax], 0
lea eax, [ebp - 0x554]
mov dword [esp], eax
call fcn.004142c0
mov dword [ebp - 0x874], eax
lea eax, [ebp - 0x428]
shr eax, 0x10
je 0x409da3
lea eax, [ebp - 0x428]
mov dword [esp + 4], 0xffffffff
mov esi, str._invalid_
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x409af8
cmp word [ebp - 0x428], 0
je 0x409a3e
lea esi, [esi]
add eax, 1
cmp word [ebp + eax*2 - 0x428], 0
jne 0x409a30
mov edx, 0x224c
lea ecx, [ebp - 0x428]
lea edi, [ebp - 0x432]
mov word [ebp - 0x554], dx
lea esi, [eax - 1]
lea edx, [ebp - 0x552]
mov dword [ebp - 0x870], edi
mov dword [ebp - 0x86c], ecx
cmp edx, dword [ebp - 0x870]
ja 0x409acb
test eax, eax
jle 0x409acb
add dword [ebp - 0x86c], 2
mov eax, dword [ebp - 0x86c]
movzx eax, word [eax - 2]
cmp ax, 0xd
je 0x409cb3
ja 0x409c30
cmp ax, 9
je 0x409cd0
cmp ax, 0xa
jne 0x409c53
mov eax, 0x6e5c
add edx, 2
mov word [edx - 2], ax
mov eax, esi
lea esi, [esi]
lea esi, [eax - 1]
cmp edx, dword [ebp - 0x870]
jbe 0x409a73
mov byte [edx], 0x22
lea eax, [edx + 1]
test esi, esi
jle 0x409ae5
mov ecx, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], cx
mov byte [eax], 0
lea eax, [ebp - 0x554]
mov dword [esp], eax
call fcn.004142c0
mov esi, eax
lea eax, [ebp - 0x220]
mov dword [esp + 4], eax
lea eax, [ebp - 0x428]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_wcscmp]
mov ecx, dword [ebp - 0x874]
mov dword [esp + 8], esi
test eax, eax
mov dword [esp + 4], str.test_tr2_sys__Current_get__:_expect:__s__got__s_n
sete al
mov dword [esp + 0xc], ecx
movzx eax, al
mov dword [esp], eax
call fcn.00413800
mov dword [esp + 4], 0x51c
mov dword [esp], str..._wine_dlls_msvcp120_tests_msvcp120.c
call fcn.00413590
lea eax, [ebp - 0x658]
mov dword [esp], eax
mov eax, dword [ebp - 0x878]
call eax
sub esp, 4
mov dword [esp], eax
mov dword [esp + 4], str.SetCurrentDirectoryA_to_origin_path_failed_n
call fcn.00413800
mov dword [esp], ebx
call dword [0x41b15c]
mov dword [esp + 4], 0x51e
mov dword [esp], str..._wine_dlls_msvcp120_tests_msvcp120.c
mov esi, eax
call fcn.00413590
xor eax, eax
cmp esi, ebx
mov dword [esp + 4], str.p_tr2_sys__Current_get_returned_different_buffer_n
sete al
mov dword [esp], eax
call fcn.00413800
mov dword [esp + 4], 0x51f
mov dword [esp], str..._wine_dlls_msvcp120_tests_msvcp120.c
call fcn.00413590
lea eax, [ebp - 0x658]
mov dword [esp + 4], ebx
mov dword [esp], eax
mov eax, dword [ebp - 0x87c]
call eax
mov dword [esp + 0xc], ebx
lea ebx, [ebp - 0x658]
test eax, eax
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.test_tr2_sys__Current_get__:_expect:__s__got__s_n
movzx eax, al
mov dword [esp], eax
call fcn.00413800
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp ax, 0x22
je 0x409d90
cmp ax, 0x5c
jne 0x409d13
mov edi, 0x5c5c
add edx, 2
mov eax, esi
mov word [edx - 2], di
jmp 0x4099b0
cmp ax, 0x22
je 0x409ce3
cmp ax, 0x5c
jne 0x409c53
mov edi, 0x5c5c
add edx, 2
mov eax, esi
mov word [edx - 2], di
jmp 0x409ac0
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x409e00
mov edi, eax
mov byte [edx], 0x5c
add edx, 5
shr di, 0xc
movzx edi, di
movzx ecx, byte [edi + str.0123456789abcdef]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [edx - 4], cl
movzx ecx, byte [edi + str.0123456789abcdef]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + str.0123456789abcdef]
and edi, 0xf
mov byte [edx - 3], cl
movzx ecx, byte [edi + str.0123456789abcdef]
mov byte [edx - 1], al
mov eax, esi
mov byte [edx - 2], cl
jmp 0x409ac0
mov eax, 0x725c
add edx, 2
mov word [edx - 2], ax
mov eax, esi
jmp 0x409ac0
mov eax, 0x745c
add edx, 2
mov word [edx - 2], ax
mov eax, esi
jmp 0x409ac0
mov eax, 0x225c
add edx, 2
mov word [edx - 2], ax
mov eax, esi
jmp 0x409ac0
mov eax, 0x725c
add edx, 2
mov word [edx - 2], ax
mov eax, esi
jmp 0x4099b0
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x409e10
mov edi, eax
mov byte [edx], 0x5c
add edx, 5
shr di, 0xc
movzx edi, di
movzx ecx, byte [edi + str.0123456789abcdef]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [edx - 4], cl
movzx ecx, byte [edi + str.0123456789abcdef]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + str.0123456789abcdef]
and edi, 0xf
mov byte [edx - 3], cl
movzx ecx, byte [edi + str.0123456789abcdef]
mov byte [edx - 1], al
mov eax, esi
mov byte [edx - 2], cl
jmp 0x4099b0
mov eax, 0x745c
add edx, 2
mov word [edx - 2], ax
mov eax, esi
jmp 0x4099b0
mov eax, 0x225c
add edx, 2
mov word [edx - 2], ax
mov eax, esi
jmp 0x4099b0
lea eax, [ebp - 0x428]
mov dword [esp], str._04x
mov dword [ebp - 0x86c], eax
movzx eax, word [ebp - 0x86c]
mov dword [esp + 4], eax
call fcn.00403d70
mov esi, eax
jmp 0x409af8
lea eax, [ebp - 0x220]
mov dword [esp], str._04x
mov dword [ebp - 0x86c], eax
movzx eax, word [ebp - 0x86c]
mov dword [esp + 4], eax
call fcn.00403d70
mov dword [ebp - 0x874], eax
jmp 0x4099ec
mov byte [edx], al
add edx, 1
mov eax, esi
jmp 0x409ac0
mov byte [edx], al
add edx, 1
mov eax, esi
jmp 0x4099b0