Function at 0x47af20
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5b4
mov eax, dword [0x4f72bc]
xor eax, esp
mov dword [esp + 0x5b0], eax
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push edi
mov edi, ecx
push edi
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], 0
call esi
test eax, eax
jne 0x47af81
push str.FileExists___called_with_a_NULL_file____
mov esi, 0x4ebff4
call fcn.0047da70
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.004cf2b6
mov esp, ebp
pop ebp
ret
push edi
mov edx, 0x7ffffffe
mov eax, 0x104
lea ecx, [esp + 0x2b4]
call fcn.004010b0
cmp dword [0x506e0c], 0
je 0x47b281
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea eax, [esp + 0x14]
push str.KERNEL32.DLL
mov dword [esp + 0x14], eax
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x47afe0
push str.Wow64DisableWow64FsRedirection
push esi
call ebx
test eax, eax
je 0x47afd9
lea ecx, [esp + 0x10]
push ecx
call eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
lea edx, [esp + 0x2c8]
push edx
call esi
cmp eax, 0xffffffff
je 0x47b05d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x506e0c], 0
lea eax, [esp + 0x14]
mov dword [esp + 0x10], eax
je 0x47b043
push str.KERNEL32.DLL
call edi
mov esi, eax
test esi, esi
je 0x47b043
push str.Wow64RevertWow64FsRedirection
push esi
call ebx
test eax, eax
je 0x47b03c
lea ecx, [esp + 0x10]
push ecx
call eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.004cf2b6
mov esp, ebp
pop ebp
ret
push 0x104
lea edx, [esp + 0xa4]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edx, 0x104
lea eax, [esp + 0xa0]
lea esp, [esp]
cmp byte [eax], 0
je 0x47b08b
inc eax
dec edx
jne 0x47b080
jmp 0x47b0b3
test edx, edx
je 0x47b0b3
mov ecx, 0x104
sub ecx, edx
mov eax, 0x104
sub eax, ecx
push 0x4e28bc
lea ecx, [esp + ecx + 0xa4]
mov edx, 0x7fffffff
call fcn.004010b0
mov edx, 0x104
lea eax, [esp + 0xa0]
nop
cmp byte [eax], 0
je 0x47b0cb
inc eax
dec edx
jne 0x47b0c0
jmp 0x47b0f6
test edx, edx
je 0x47b0f6
lea eax, [esp + 0x2b0]
push eax
mov ecx, 0x104
sub ecx, edx
mov eax, 0x104
sub eax, ecx
lea ecx, [esp + ecx + 0xa4]
mov edx, 0x7fffffff
call fcn.004010b0
push 0
push 0
push 3
push 0
push 1
push 0x80000000
lea ecx, [esp + 0xb8]
push ecx
call esi
cmp eax, 0xffffffff
je 0x47b179
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x506e0c], 0
lea edx, [esp + 0x14]
mov dword [esp + 0x10], edx
je 0x47b043
push str.KERNEL32.DLL
call edi
mov esi, eax
test esi, esi
je 0x47b043
push str.Wow64RevertWow64FsRedirection
push esi
call ebx
test eax, eax
je 0x47b03c
lea ecx, [esp + 0x10]
push ecx
call eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.004cf2b6
mov esp, ebp
pop ebp
ret
push 0x104
lea edx, [esp + 0xa4]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov eax, 0x104
lea ecx, [esp + 0xa0]
cmp byte [ecx], 0
je 0x47b1a3
inc ecx
dec eax
jne 0x47b198
jmp 0x47b1cb
test eax, eax
je 0x47b1cb
mov ecx, 0x104
sub ecx, eax
mov eax, 0x104
sub eax, ecx
push 0x4e28bc
lea ecx, [esp + ecx + 0xa4]
mov edx, 0x7fffffff
call fcn.004010b0
mov edx, 0x104
lea eax, [esp + 0xa0]
cmp byte [eax], 0
je 0x47b1e2
inc eax
dec edx
jne 0x47b1d7
jmp 0x47b20d
test edx, edx
je 0x47b20d
lea eax, [esp + 0x2b0]
push eax
mov ecx, 0x104
sub ecx, edx
mov eax, 0x104
sub eax, ecx
lea ecx, [esp + ecx + 0xa4]
mov edx, 0x7fffffff
call fcn.004010b0
push 0
push 0
push 3
push 0
push 1
push 0x80000000
lea ecx, [esp + 0xb8]
push ecx
call esi
cmp eax, 0xffffffff
je 0x47b25b
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0x14]
push edx
push 1
call fcn.0047b7e0
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.004cf2b6
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x14]
push eax
push 1
call fcn.0047b7e0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.004cf2b6
mov esp, ebp
pop ebp
ret
push edi
call esi
test eax, eax
jle 0x47af6a
push 0x104
lea ecx, [esp + 0x1ac]
push ecx
lea edx, [esp + 0x2b8]
push edx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test eax, eax
je 0x47b42c
push 0x4000
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x1b0]
push ecx
call dword [sym.imp.KERNEL32.dll_OpenFile]
cmp eax, 1
je 0x47b043
mov ebx, 0x270f
cmp dword [0x4f8b70], ebx
jge 0x47b330
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 0x20
jle 0x47b330
lea edi, [esp + 0x3b8]
call fcn.004834a0
push str.GetLastError:__
mov esi, edi
call fcn.0047da70
add esp, 4
push str.FileExists___OpenFile_OF_EXISTS____
lea esi, [esp + 0x1ac]
call fcn.0047da70
add esp, 4
push str.Original_Filename_
lea esi, [esp + 0x2b4]
call fcn.0047da70
mov edi, dword [esp + 0x14]
add esp, 4
push 0
push 0
push 3
push 0
push 1
push 0x80000000
lea edx, [esp + 0x1c0]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x47b373
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.004cf2b6
mov esp, ebp
pop ebp
ret
cmp dword [0x4f8b70], ebx
jge 0x47b3a6
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 0x20
jle 0x47b3a6
lea edi, [esp + 0x3b8]
call fcn.004834a0
push str.GetLastError:__
mov esi, edi
call fcn.0047da70
mov edi, dword [esp + 0x14]
add esp, 4
push 0x4000
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x2b8]
push ecx
call dword [sym.imp.KERNEL32.dll_OpenFile]
cmp eax, 1
jne 0x47b484
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 0x20
jle 0x47b484
push str.FileExists___OpenFile_Original_Filename_
mov esi, 0x4e8d38
call fcn.0047da70
lea edx, [esp + 0x2b4]
add esp, 4
push edx
lea esi, [esp + 0x1ac]
call fcn.0047da70
add esp, 4
push 0x4e8d38
mov esi, 0x4e8d38
call fcn.0047da70
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.004cf2b6
mov esp, ebp
pop ebp
ret
cmp dword [0x4f8b70], 0x270f
jge 0x47b484
push edi
call esi
cmp eax, 0x20
jle 0x47b484
lea edi, [esp + 0x3b8]
call fcn.004834a0
push str.GetLastError:__
mov esi, edi
call fcn.0047da70
mov esi, dword [esp + 0x14]
add esp, 4
push str.FileExits___GetShortPathName_Error____
call fcn.0047da70
add esp, 4
push str.Original_Filename_
lea esi, [esp + 0x2b4]
call fcn.0047da70
mov edi, dword [esp + 0x14]
add esp, 4
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
push edi
call ebx
cmp eax, 0x20
jge 0x47b5ce
push 0x104
lea eax, [esp + 0xa4]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov eax, 0x104
lea ecx, [esp + 0xa0]
cmp byte [ecx], 0
je 0x47b4c0
inc ecx
dec eax
jne 0x47b4b5
jmp 0x47b4e8
test eax, eax
je 0x47b4e8
mov ecx, 0x104
sub ecx, eax
mov eax, 0x104
sub eax, ecx
push 0x4e28bc
lea ecx, [esp + ecx + 0xa4]
mov edx, 0x7fffffff
call fcn.004010b0
mov eax, 0x104
lea ecx, [esp + 0xa0]
cmp byte [ecx], 0
je 0x47b4ff
inc ecx
dec eax
jne 0x47b4f4
jmp 0x47b523
test eax, eax
je 0x47b523
mov ecx, 0x104
sub ecx, eax
mov eax, 0x104
sub eax, ecx
push edi
lea ecx, [esp + ecx + 0xa4]
mov edx, 0x7fffffff
call fcn.004010b0
push str.FileExists___FullPath_
lea esi, [esp + 0xa4]
call fcn.0047da70
add esp, 4
push 0x104
lea ecx, [esp + 0x1ac]
push ecx
mov edx, esi
push edx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test eax, eax
je 0x47b60b
push 0
push 0
push 3
push 0
push 1
push 0x80000000
lea eax, [esp + 0x1c0]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x47b5b1
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x1a8]
push ecx
mov edx, 0x7ffffffe
mov eax, 0x104
mov ecx, edi
call fcn.004010b0
mov ecx, dword [esp + 0x5bc]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.004cf2b6
mov esp, ebp
pop ebp
ret
push 0x4000
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x1b0]
push eax
call dword [sym.imp.KERNEL32.dll_OpenFile]
cmp eax, 1
je 0x47b57e
push edi
call ebx
cmp eax, 0x20
jge 0x47af6a
mov esi, dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push 0x104
lea edx, [esp + 0xa4]
push edx
call esi
mov eax, 0x104
lea ecx, [esp + 0xa0]
jmp 0x47b600
cmp byte [ecx], 0
je 0x47b634
inc ecx
dec eax
jne 0x47b600
jmp 0x47b65c
push 0x4000
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0xa8]
push eax
call dword [sym.imp.KERNEL32.dll_OpenFile]
cmp eax, 1
jne 0x47b5ce
lea ecx, [esp + 0xa0]
jmp 0x47b585
test eax, eax
je 0x47b65c
mov ecx, 0x104
sub ecx, eax
mov eax, 0x104
sub eax, ecx
push 0x4e28bc
lea ecx, [esp + ecx + 0xa4]
mov edx, 0x7fffffff
call fcn.004010b0
mov eax, 0x104
lea ecx, [esp + 0xa0]
cmp byte [ecx], 0
je 0x47b673
inc ecx
dec eax
jne 0x47b668
jmp 0x47b697
test eax, eax
je 0x47b697
mov ecx, 0x104
sub ecx, eax
mov eax, 0x104
sub eax, ecx
push edi
lea ecx, [esp + ecx + 0xa4]
mov edx, 0x7fffffff
call fcn.004010b0
push 0x104
lea eax, [esp + 0x1ac]
push eax
lea ecx, [esp + 0xa8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test eax, eax
je 0x47b71a
push 0
push 0
push 3
push 0
push 1
push 0x80000000
lea edx, [esp + 0x1c0]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x47b6ec
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x1a8]
push eax
jmp 0x47b586
push 0x4000
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0xa8]
push edx
call dword [sym.imp.KERNEL32.dll_OpenFile]
cmp eax, 1
jne 0x47af6a
lea eax, [esp + 0xa0]
push eax
jmp 0x47b586
push 0x104
lea ecx, [esp + 0xa4]
push ecx
call esi
mov eax, 0x104
lea ecx, [esp + 0xa0]
cmp byte [ecx], 0
je 0x47b740
inc ecx
dec eax
jne 0x47b735
jmp 0x47b768
test eax, eax
je 0x47b768
mov ecx, 0x104
sub ecx, eax
mov eax, 0x104
sub eax, ecx
push 0x4e28bc
lea ecx, [esp + ecx + 0xa4]
mov edx, 0x7fffffff
call fcn.004010b0
mov edx, 0x104
lea eax, [esp + 0xa0]
cmp byte [eax], 0
je 0x47b77f
inc eax
dec edx
jne 0x47b774
jmp 0x47b7aa
test edx, edx
je 0x47b7aa
mov ecx, 0x104
sub ecx, edx
lea edx, [esp + 0x2b0]
mov eax, 0x104
push edx
sub eax, ecx
lea ecx, [esp + ecx + 0xa4]
mov edx, 0x7fffffff
call fcn.004010b0
push 0x4000
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0xa8]
push ecx
call dword [sym.imp.KERNEL32.dll_OpenFile]
cmp eax, 1
jne 0x47af6a
lea edx, [esp + 0xa0]
push edx
jmp 0x47b586