Function at 0x505c17
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
cmp dword [0x56bbc8], 0
jne 0x505edb
mov dword [0x56bbc8], 1
push dword [ebp + 8]
call sub.USER32.dll_GetParent
mov dword [ebp - 8], eax
test edi, edi
je 0x505c58
push 0x3e7
push 0x585e28
call fcn.0042e3f0
push 0x585ca8
push 0x180
call sub.KERNEL32.dll_GetCurrentDirectoryA
push 0x585ca8
call fcn.0042e417
mov byte [0x57ac8f], 0
push 0x57ac8f
push 0x3dd
push 0x464
push dword [ebp - 8]
call sub.USER32.dll_SendMessageA
mov byte [0x57b06c], 0
cmp byte [0x57ac8f], 0
jne 0x505cbf
push 0x57ac8f
push 0x3dd
push 0xd
push 0x480
push dword [ebp - 8]
call sub.USER32.dll_SendDlgItemMessageA
mov byte [0x57b06c], 0
xor eax, eax
mov dword [ebp - 0xc], eax
xor edx, edx
mov dword [ebp - 4], edx
mov esi, 0x57ac8f
jmp 0x505dfa
inc esi
cmp byte [esi], 0x20
je 0x505cd5
cmp byte [esi], 0x22
jne 0x505cfb
inc esi
mov ebx, esi
jmp 0x505ce6
inc ebx
mov al, byte [ebx]
test al, al
je 0x505cf0
cmp al, 0x22
jne 0x505ce5
cmp byte [ebx], 0x22
jne 0x505d05
mov byte [ebx], 0
inc ebx
jmp 0x505d05
mov ebx, esi
jmp 0x505d00
inc ebx
cmp byte [ebx], 0
jne 0x505cff
cmp byte [esi], 0
je 0x505df8
test edi, edi
je 0x505d91
push 0x585e28
call fcn.0054c2d0
pop ecx
push eax
push esi
call fcn.0054c2d0
pop ecx
pop edx
add edx, eax
cmp edx, 0x3b5
jbe 0x505d6f
push 0x10
push 0
push 0x13ed
call fcn.0042c564
push eax
push 0
push 0x13ef
call fcn.0042c564
push eax
push dword [ebp - 8]
call sub.USER32.dll_MessageBoxA
push 0x3e7
push 0x585e28
call fcn.0042e3f0
xor eax, eax
mov dword [0x56bbc8], eax
jmp 0x505edb
push esi
push 0x585e28
call fcn.0054c1f4
add esp, 8
push 0x56bc02
push 0x585e28
call fcn.0054c1f4
add esp, 8
jmp 0x505df8
push esi
push edi
mov esi, 0x57a8a8
mov edi, 0x585ca8
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
xchg edi, esi
mov eax, edi
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
push esi
push 0x57a8a8
call fcn.0054c1f4
add esp, 8
push 0
push 0x57a8a8
call sub.KERNEL32.dll__lopen
mov esi, eax
cmp esi, 0xffffffff
je 0x505df8
push 2
push 0
push esi
call sub.KERNEL32.dll__llseek
cmp eax, 0xffffffff
je 0x505def
add dword [ebp - 4], eax
push esi
call sub.KERNEL32.dll__lclose
inc dword [ebp - 0xc]
mov esi, ebx
cmp byte [esi], 0
jne 0x505cd6
test edi, edi
je 0x505e13
xor eax, eax
mov dword [0x56bbc8], eax
jmp 0x505edb
cmp dword [ebp - 0xc], 1
jne 0x505e3a
push 0
push 0x13f0
call fcn.0042c564
push eax
push str.1__s
push 0x57a8a8
call sub.USER32.dll_wsprintfA
add esp, 0xc
jmp 0x505e5c
push 0
push 0x13f1
call fcn.0042c564
push eax
push dword [ebp - 0xc]
push str._d__s
push 0x57a8a8
call sub.USER32.dll_wsprintfA
add esp, 0x10
push 0x57a8a8
push 0
push 0xc
push 0x99
push dword [ebp + 8]
call sub.USER32.dll_SendDlgItemMessageA
cmp dword [ebp - 4], 0x3e8
jb 0x505e9c
mov eax, dword [ebp - 4]
mov ecx, 0x3e8
xor edx, edx
div ecx
push eax
push str._luk
push 0x57a8a8
call sub.USER32.dll_wsprintfA
add esp, 0xc
jmp 0x505ebe
push 0
push 0x13f4
call fcn.0042c564
push eax
push dword [ebp - 4]
push str._lu__s
push 0x57a8a8
call sub.USER32.dll_wsprintfA
add esp, 0x10
push 0x57a8a8
push 0
push 0xc
push 0x93
push dword [ebp + 8]
call sub.USER32.dll_SendDlgItemMessageA
xor eax, eax
mov dword [0x56bbc8], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8