Function at 0x47d280
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5b4
mov eax, dword [0x4c32cc]
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 0x47d2e1
push str.FileExists___called_with_a_NULL_file____
mov esi, 0x4bb120
call fcn.0047fb10
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.004a01d6
mov esp, ebp
pop ebp
ret
push edi
mov edx, 0x7ffffffe
mov eax, 0x104
lea ecx, [esp + 0x2b4]
call fcn.00401000
cmp dword [0x4d2afc], 0
je 0x47d5e1
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 0x47d340
push str.Wow64DisableWow64FsRedirection
push esi
call ebx
test eax, eax
je 0x47d339
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 0x47d3bd
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x4d2afc], 0
lea eax, [esp + 0x14]
mov dword [esp + 0x10], eax
je 0x47d3a3
push str.KERNEL32.DLL
call edi
mov esi, eax
test esi, esi
je 0x47d3a3
push str.Wow64RevertWow64FsRedirection
push esi
call ebx
test eax, eax
je 0x47d39c
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.004a01d6
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 0x47d3eb
inc eax
dec edx
jne 0x47d3e0
jmp 0x47d413
test edx, edx
je 0x47d413
mov ecx, 0x104
sub ecx, edx
mov eax, 0x104
sub eax, ecx
push 0x4b17dc
lea ecx, [esp + ecx + 0xa4]
mov edx, 0x7fffffff
call fcn.00401000
mov edx, 0x104
lea eax, [esp + 0xa0]
nop
cmp byte [eax], 0
je 0x47d42b
inc eax
dec edx
jne 0x47d420
jmp 0x47d456
test edx, edx
je 0x47d456
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.00401000
push 0
push 0
push 3
push 0
push 1
push 0x80000000
lea ecx, [esp + 0xb8]
push ecx
call esi
cmp eax, 0xffffffff
je 0x47d4d9
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x4d2afc], 0
lea edx, [esp + 0x14]
mov dword [esp + 0x10], edx
je 0x47d3a3
push str.KERNEL32.DLL
call edi
mov esi, eax
test esi, esi
je 0x47d3a3
push str.Wow64RevertWow64FsRedirection
push esi
call ebx
test eax, eax
je 0x47d39c
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.004a01d6
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 0x47d503
inc ecx
dec eax
jne 0x47d4f8
jmp 0x47d52b
test eax, eax
je 0x47d52b
mov ecx, 0x104
sub ecx, eax
mov eax, 0x104
sub eax, ecx
push 0x4b17dc
lea ecx, [esp + ecx + 0xa4]
mov edx, 0x7fffffff
call fcn.00401000
mov edx, 0x104
lea eax, [esp + 0xa0]
cmp byte [eax], 0
je 0x47d542
inc eax
dec edx
jne 0x47d537
jmp 0x47d56d
test edx, edx
je 0x47d56d
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.00401000
push 0
push 0
push 3
push 0
push 1
push 0x80000000
lea ecx, [esp + 0xb8]
push ecx
call esi
cmp eax, 0xffffffff
je 0x47d5bb
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0x14]
push edx
push 1
call fcn.0047db40
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.004a01d6
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x14]
push eax
push 1
call fcn.0047db40
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.004a01d6
mov esp, ebp
pop ebp
ret
push edi
call esi
test eax, eax
jle 0x47d2ca
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 0x47d78c
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 0x47d3a3
mov ebx, 0x270f
cmp dword [0x4c643c], ebx
jge 0x47d690
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 0x20
jle 0x47d690
lea edi, [esp + 0x3b8]
call fcn.00483860
push str.GetLastError:__
mov esi, edi
call fcn.0047fb10
add esp, 4
push str.FileExists___OpenFile_OF_EXISTS____
lea esi, [esp + 0x1ac]
call fcn.0047fb10
add esp, 4
push str.Original_Filename_
lea esi, [esp + 0x2b4]
call fcn.0047fb10
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 0x47d6d3
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.004a01d6
mov esp, ebp
pop ebp
ret
cmp dword [0x4c643c], ebx
jge 0x47d706
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 0x20
jle 0x47d706
lea edi, [esp + 0x3b8]
call fcn.00483860
push str.GetLastError:__
mov esi, edi
call fcn.0047fb10
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 0x47d7e4
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 0x20
jle 0x47d7e4
push str.FileExists___OpenFile_Original_Filename_
mov esi, 0x4b7c68
call fcn.0047fb10
lea edx, [esp + 0x2b4]
add esp, 4
push edx
lea esi, [esp + 0x1ac]
call fcn.0047fb10
add esp, 4
push 0x4b7c68
mov esi, 0x4b7c68
call fcn.0047fb10
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5b0]
xor ecx, esp
call fcn.004a01d6
mov esp, ebp
pop ebp
ret
cmp dword [0x4c643c], 0x270f
jge 0x47d7e4
push edi
call esi
cmp eax, 0x20
jle 0x47d7e4
lea edi, [esp + 0x3b8]
call fcn.00483860
push str.GetLastError:__
mov esi, edi
call fcn.0047fb10
mov esi, dword [esp + 0x14]
add esp, 4
push str.FileExits___GetShortPathName_Error____
call fcn.0047fb10
add esp, 4
push str.Original_Filename_
lea esi, [esp + 0x2b4]
call fcn.0047fb10
mov edi, dword [esp + 0x14]
add esp, 4
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
push edi
call ebx
cmp eax, 0x20
jge 0x47d92e
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 0x47d820
inc ecx
dec eax
jne 0x47d815
jmp 0x47d848
test eax, eax
je 0x47d848
mov ecx, 0x104
sub ecx, eax
mov eax, 0x104
sub eax, ecx
push 0x4b17dc
lea ecx, [esp + ecx + 0xa4]
mov edx, 0x7fffffff
call fcn.00401000
mov eax, 0x104
lea ecx, [esp + 0xa0]
cmp byte [ecx], 0
je 0x47d85f
inc ecx
dec eax
jne 0x47d854
jmp 0x47d883
test eax, eax
je 0x47d883
mov ecx, 0x104
sub ecx, eax
mov eax, 0x104
sub eax, ecx
push edi
lea ecx, [esp + ecx + 0xa4]
mov edx, 0x7fffffff
call fcn.00401000
push str.FileExists___FullPath_
lea esi, [esp + 0xa4]
call fcn.0047fb10
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 0x47d96b
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 0x47d911
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.00401000
mov ecx, dword [esp + 0x5bc]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.004a01d6
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 0x47d8de
push edi
call ebx
cmp eax, 0x20
jge 0x47d2ca
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 0x47d960
cmp byte [ecx], 0
je 0x47d994
inc ecx
dec eax
jne 0x47d960
jmp 0x47d9bc
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 0x47d92e
lea ecx, [esp + 0xa0]
jmp 0x47d8e5
test eax, eax
je 0x47d9bc
mov ecx, 0x104
sub ecx, eax
mov eax, 0x104
sub eax, ecx
push 0x4b17dc
lea ecx, [esp + ecx + 0xa4]
mov edx, 0x7fffffff
call fcn.00401000
mov eax, 0x104
lea ecx, [esp + 0xa0]
cmp byte [ecx], 0
je 0x47d9d3
inc ecx
dec eax
jne 0x47d9c8
jmp 0x47d9f7
test eax, eax
je 0x47d9f7
mov ecx, 0x104
sub ecx, eax
mov eax, 0x104
sub eax, ecx
push edi
lea ecx, [esp + ecx + 0xa4]
mov edx, 0x7fffffff
call fcn.00401000
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 0x47da7a
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 0x47da4c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x1a8]
push eax
jmp 0x47d8e6
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 0x47d2ca
lea eax, [esp + 0xa0]
push eax
jmp 0x47d8e6
push 0x104
lea ecx, [esp + 0xa4]
push ecx
call esi
mov eax, 0x104
lea ecx, [esp + 0xa0]
cmp byte [ecx], 0
je 0x47daa0
inc ecx
dec eax
jne 0x47da95
jmp 0x47dac8
test eax, eax
je 0x47dac8
mov ecx, 0x104
sub ecx, eax
mov eax, 0x104
sub eax, ecx
push 0x4b17dc
lea ecx, [esp + ecx + 0xa4]
mov edx, 0x7fffffff
call fcn.00401000
mov edx, 0x104
lea eax, [esp + 0xa0]
cmp byte [eax], 0
je 0x47dadf
inc eax
dec edx
jne 0x47dad4
jmp 0x47db0a
test edx, edx
je 0x47db0a
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.00401000
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 0x47d2ca
lea edx, [esp + 0xa0]
push edx
jmp 0x47d8e6