Function at 0x575090
Capabilities:
Get common file path

Disassembly:
push ebp
mov ecx, 0x9b
mov ebp, esp
push edi
push esi
lea edi, [ebp - 0x278]
mov esi, 0x57fa60
push ebx
lea ebx, [ebp - 0x278]
sub esp, 0x5a0
rep movsd dword es:[edi], dword [esi]
xor esi, esi
jmp 0x57519d
cmp edx, 1
je 0x575830
mov dword [esp + 0xc], str.failed
xor eax, eax
mov dword [esp + 8], esi
mov dword [esp + 4], str.GetVolumePathName_test__d__s_unexpectedly._n
mov ecx, dword [ebp - 0x590]
mov dword [ebp - 0x594], edx
test ecx, ecx
sete al
cmp eax, edx
mov edx, dword [0x8f0770]
sete cl
xor eax, eax
test edx, edx
sete al
and eax, ecx
mov dword [esp], eax
call fcn.005744b0
mov edx, dword [ebp - 0x594]
test edx, edx
jne 0x575286
mov edx, 1
cmp dword [ebp - 0x588], edi
je 0x57513e
mov eax, dword [0x8f0770]
test eax, eax
sete al
xor edx, edx
cmp dword [ebp - 0x590], edi
sete dl
and edx, eax
mov dword [ebp - 0x590], edx
call fcn.0057d110
mov dword [eax], 0x601b57
mov dword [eax + 4], 0x351
mov eax, dword [ebp - 0x588]
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], eax
mov dword [esp + 8], esi
mov dword [esp + 4], str.GetVolumePathName_test__d_unexpectedly_returned_error_0x_lx__expected_0x_lx_._n
mov edx, dword [ebp - 0x590]
mov dword [esp], edx
call fcn.005744b0
cmp dword [ebp - 0x58c], 0x103
jbe 0x5752f8
add esi, 1
add ebx, 0x14
cmp esi, 0x1f
je 0x575341
mov eax, dword [ebx + 0x10]
lea edi, [ebp - 0x584]
mov ecx, dword [ebx + 8]
mov byte [ebp - 0x584], 0
mov dword [ebp - 0x590], eax
mov eax, dword [ebx + 4]
mov dword [ebp - 0x58c], ecx
test eax, eax
mov dword [ebp - 0x598], eax
mov eax, 0
cmovne eax, edi
mov edi, dword [ebx + 0xc]
mov dword [ebp - 0x588], edi
cmp ecx, 0x103
ja 0x5751e8
mov byte [ebp + ecx - 0x584], 0x11
mov edx, dword [ebp - 0x58c]
mov edi, dword fs:[0x18]
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebx]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetVolumePathNameA]
mov edi, dword [edi + 0x34]
sub esp, 0xc
mov dword [ebp - 0x594], eax
call fcn.0057d110
mov ecx, dword [ebp - 0x588]
mov edx, dword [ebp - 0x594]
mov dword [eax], 0x601b57
test ecx, ecx
mov dword [eax + 4], 0x342
je 0x5750c0
test edx, edx
je 0x575858
mov dword [esp + 0xc], str.succeeded
xor eax, eax
mov dword [esp + 8], esi
mov dword [esp + 4], str.GetVolumePathName_test__d__s_unexpectedly._n
mov ecx, dword [ebp - 0x590]
mov edi, dword [0x8f0770]
test ecx, ecx
sete al
cmp eax, edx
sete dl
xor eax, eax
test edi, edi
sete al
and eax, edx
mov dword [esp], eax
call fcn.005744b0
call fcn.0057d110
mov dword [eax], 0x601b57
mov dword [eax + 4], 0x348
mov eax, dword [ebp - 0x598]
mov dword [esp + 4], eax
lea eax, [ebp - 0x584]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_strcmp]
mov edx, eax
mov eax, 1
test edx, edx
jne 0x575880
mov edi, dword [ebp - 0x598]
mov dword [esp + 8], esi
mov dword [esp + 4], str.GetVolumePathName_test__d_unexpectedly_returned_path__s__expected__s_._n
mov dword [esp + 0x10], edi
lea edi, [ebp - 0x584]
mov dword [esp + 0xc], edi
mov dword [esp], eax
call fcn.005744b0
cmp dword [ebp - 0x58c], 0x103
ja 0x57518e
call fcn.0057d110
mov dword [eax], 0x601b57
mov dword [eax + 4], 0x356
mov dword [esp + 8], esi
mov dword [esp + 4], str.GetVolumePathName_test__d_corrupted_byte_after_end_of_buffer._n
mov eax, dword [ebp - 0x58c]
cmp byte [ebp + eax - 0x584], 0x11
sete al
add esi, 1
add ebx, 0x14
movzx eax, al
mov dword [esp], eax
call fcn.005744b0
cmp esi, 0x1f
jne 0x57519d
lea eax, [ebp - 0x480]
mov dword [esp], 0x104
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryA]
sub esp, 8
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x601b57
mov dword [eax + 4], 0x35b
mov esi, dword fs:[0x18]
mov eax, dword [esi + 0x34]
mov dword [ebp - 0x58c], esi
mov dword [esp], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], str.Failed_to_obtain_the_current_working_directory__error__lu._n
call fcn.005744b0
lea eax, [ebp - 0x37c]
mov dword [esp + 8], 0x104
mov dword [esp + 4], eax
lea eax, [ebp - 0x480]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetVolumePathNameA]
sub esp, 0xc
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x601b57
mov dword [eax + 4], 0x35d
mov eax, dword [esi + 0x34]
mov dword [esp], ebx
xor ebx, ebx
mov dword [esp + 8], eax
mov dword [esp + 4], str.Failed_to_obtain_the_current_volume_path__error__lu._n
call fcn.005744b0
mov esi, dword [ebx*4 + 0x6035e0]
lea eax, [ebp - 0x584]
mov dword [esp + 8], 0x104
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_GetVolumePathNameA]
sub esp, 0xc
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x601b57
mov dword [eax + 4], 0x362
mov eax, dword [ebp - 0x58c]
mov ecx, dword [eax + 0x34]
mov eax, esi
mov dword [ebp - 0x588], ecx
call fcn.00573bf0
mov ecx, dword [ebp - 0x588]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 4], str.GetVolumePathName__s__failed_unexpectedly__error__lu._n
call fcn.005744b0
call fcn.0057d110
mov dword [eax], 0x601b57
mov dword [eax + 4], 0x364
lea eax, [ebp - 0x584]
call fcn.00573bf0
mov dword [ebp - 0x588], eax
lea eax, [ebp - 0x37c]
call fcn.00573bf0
mov edi, eax
mov eax, esi
call fcn.00573bf0
mov esi, eax
lea eax, [ebp - 0x37c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x584]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_strcmp]
mov ecx, dword [ebp - 0x588]
mov dword [esp + 0xc], edi
test eax, eax
mov dword [esp + 8], esi
sete al
mov dword [esp + 0x10], ecx
add ebx, 1
movzx eax, al
mov dword [esp + 4], str._s:_expected__s__got__s._n
mov dword [esp], eax
call fcn.005744b0
cmp ebx, 3
jne 0x5753e4
mov eax, dword fs:[0x18]
mov byte [ebp - 0x47d], 0
xor ebx, ebx
mov dword [ebp - 0x58c], eax
mov esi, dword [ebx*4 + 0x603594]
lea eax, [ebp - 0x584]
mov dword [esp + 8], 0x104
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_GetVolumePathNameA]
sub esp, 0xc
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x601b57
mov dword [eax + 4], 0x36c
mov eax, dword [ebp - 0x58c]
mov ecx, dword [eax + 0x34]
mov eax, esi
mov dword [ebp - 0x588], ecx
call fcn.00573bf0
mov ecx, dword [ebp - 0x588]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 4], str.GetVolumePathName__s__failed_unexpectedly__error__lu._n
call fcn.005744b0
call fcn.0057d110
mov dword [eax], 0x601b57
mov dword [eax + 4], 0x36e
lea eax, [ebp - 0x584]
call fcn.00573bf0
mov dword [ebp - 0x588], eax
lea eax, [ebp - 0x480]
call fcn.00573bf0
mov edi, eax
mov eax, esi
call fcn.00573bf0
mov esi, eax
lea eax, [ebp - 0x480]
mov dword [esp + 4], eax
lea eax, [ebp - 0x584]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_strcmp]
mov ecx, dword [ebp - 0x588]
mov dword [esp + 0xc], edi
test eax, eax
mov dword [esp + 8], esi
sete al
mov dword [esp + 0x10], ecx
add ebx, 1
movzx eax, al
mov dword [esp + 4], str._s:_expected__s__got__s._n
mov dword [esp], eax
call fcn.005744b0
cmp ebx, 4
jne 0x5754ee
lea eax, [ebp - 0x37c]
mov dword [esp + 8], 0x104
mov dword [esp + 4], eax
mov dword [esp], 0x6021b9
call dword [sym.imp.kernel32.dll_GetVolumePathNameA]
sub esp, 0xc
mov ebx, eax
call fcn.0057d110
mov edi, dword [ebp - 0x58c]
mov dword [eax], 0x601b57
mov dword [eax + 4], 0x373
mov eax, dword [edi + 0x34]
mov dword [esp], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], str.Failed_to_obtain_the_volume_path__error__lu._n
call fcn.005744b0
lea eax, [ebp - 0x584]
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], 0x6021ee
call dword [sym.imp.kernel32.dll_GetVolumePathNameA]
sub esp, 0xc
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x601b57
mov dword [eax + 4], 0x377
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 4], str.Expected_failure._n
mov dword [esp], eax
call fcn.005744b0
call fcn.0057d110
mov dword [eax], 0x601b57
mov dword [eax + 4], 0x378
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.Got_error__lu._n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [edi + 0x34], 0xce
sete al
mov dword [esp], eax
call fcn.005744b0
lea eax, [ebp - 0x584]
mov dword [esp + 8], 0x104
mov dword [esp + 4], eax
mov dword [esp], 0x6021ee
call dword [sym.imp.kernel32.dll_GetVolumePathNameA]
sub esp, 0xc
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x601b57
mov dword [eax + 4], 0x37b
mov eax, dword [edi + 0x34]
mov dword [esp], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], str.Failed_to_obtain_the_volume_path__error__lu._n
call fcn.005744b0
call fcn.0057d110
mov dword [eax], 0x601b57
mov dword [eax + 4], 0x37c
lea eax, [ebp - 0x584]
call fcn.00573bf0
mov esi, eax
lea eax, [ebp - 0x37c]
call fcn.00573bf0
mov ebx, eax
lea eax, [ebp - 0x37c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x584]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_strcmp]
mov dword [esp + 0xc], esi
test eax, eax
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.Expected__s__got__s._n
movzx eax, al
mov dword [esp], eax
call fcn.005744b0
lea eax, [ebp - 0x584]
mov dword [esp + 8], 0x104
mov dword [esp + 4], eax
mov dword [esp], str.C:ABC:DEF:AnInvalidFolder
call dword [sym.imp.kernel32.dll_GetVolumePathNameA]
sub esp, 0xc
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x601b57
mov dword [eax + 4], 0x380
mov eax, dword [edi + 0x34]
mov dword [esp], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], str.Failed_to_obtain_the_volume_path__error__lu._n
call fcn.005744b0
call fcn.0057d110
mov dword [eax], 0x601b57
mov dword [eax + 4], 0x381
lea eax, [ebp - 0x584]
call fcn.00573bf0
mov esi, eax
lea eax, [ebp - 0x37c]
call fcn.00573bf0
mov ebx, eax
lea eax, [ebp - 0x37c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x584]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_strcmp]
mov dword [esp + 0xc], esi
test eax, eax
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.Expected__s__got__s._n
movzx eax, al
mov dword [esp], eax
call fcn.005744b0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0xc], str.failed
mov dword [esp + 8], esi
mov dword [esp + 4], str.GetVolumePathName_test__d__s_unexpectedly._n
mov dword [esp], 1
call fcn.005744b0
jmp 0x575286
mov dword [esp + 0xc], str.succeeded
mov dword [esp + 8], esi
mov dword [esp + 4], str.GetVolumePathName_test__d__s_unexpectedly._n
mov dword [esp], 1
call fcn.005744b0
jmp 0x57511a
mov eax, dword [ebp - 0x598]
mov dword [esp + 4], eax
lea eax, [ebp - 0x584]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__stricmp]
or eax, dword [0x8f0770]
sete al
movzx eax, al
jmp 0x5752c0