Function at 0x507763
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 [0x56dcf8], 0
jne 0x507a27
mov dword [0x56dcf8], 1
push dword [ebp + 8]
call sub.USER32.dll_GetParent
mov dword [ebp - 8], eax
test edi, edi
je 0x5077a4
push 0x3e7
push 0x587c8c
call fcn.0042e6b1
push 0x587b0c
push 0x180
call sub.KERNEL32.dll_GetCurrentDirectoryA
push 0x587b0c
call fcn.0042e6d8
mov byte [0x57cddf], 0
push 0x57cddf
push 0x3dd
push 0x464
push dword [ebp - 8]
call sub.USER32.dll_SendMessageA
mov byte [0x57d1bc], 0
cmp byte [0x57cddf], 0
jne 0x50780b
push 0x57cddf
push 0x3dd
push 0xd
push 0x480
push dword [ebp - 8]
call sub.USER32.dll_SendDlgItemMessageA
mov byte [0x57d1bc], 0
xor eax, eax
mov dword [ebp - 0xc], eax
xor edx, edx
mov dword [ebp - 4], edx
mov esi, 0x57cddf
jmp 0x507946
inc esi
cmp byte [esi], 0x20
je 0x507821
cmp byte [esi], 0x22
jne 0x507847
inc esi
mov ebx, esi
jmp 0x507832
inc ebx
mov al, byte [ebx]
test al, al
je 0x50783c
cmp al, 0x22
jne 0x507831
cmp byte [ebx], 0x22
jne 0x507851
mov byte [ebx], 0
inc ebx
jmp 0x507851
mov ebx, esi
jmp 0x50784c
inc ebx
cmp byte [ebx], 0
jne 0x50784b
cmp byte [esi], 0
je 0x507944
test edi, edi
je 0x5078dd
push 0x587c8c
call fcn.0054e28c
pop ecx
push eax
push esi
call fcn.0054e28c
pop ecx
pop edx
add edx, eax
cmp edx, 0x3b5
jbe 0x5078bb
push 0x10
push 0
push 0x13ed
call fcn.0042c771
push eax
push 0
push 0x13ef
call fcn.0042c771
push eax
push dword [ebp - 8]
call sub.USER32.dll_MessageBoxA
push 0x3e7
push 0x587c8c
call fcn.0042e6b1
xor eax, eax
mov dword [0x56dcf8], eax
jmp 0x507a27
push esi
push 0x587c8c
call fcn.0054e1b0
add esp, 8
push 0x56dd32
push 0x587c8c
call fcn.0054e1b0
add esp, 8
jmp 0x507944
push esi
push edi
mov esi, 0x57c9f8
mov edi, 0x587b0c
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 0x57c9f8
call fcn.0054e1b0
add esp, 8
push 0
push 0x57c9f8
call sub.KERNEL32.dll__lopen
mov esi, eax
cmp esi, 0xffffffff
je 0x507944
push 2
push 0
push esi
call sub.KERNEL32.dll__llseek
cmp eax, 0xffffffff
je 0x50793b
add dword [ebp - 4], eax
push esi
call sub.KERNEL32.dll__lclose
inc dword [ebp - 0xc]
mov esi, ebx
cmp byte [esi], 0
jne 0x507822
test edi, edi
je 0x50795f
xor eax, eax
mov dword [0x56dcf8], eax
jmp 0x507a27
cmp dword [ebp - 0xc], 1
jne 0x507986
push 0
push 0x13f0
call fcn.0042c771
push eax
push str.1__s
push 0x57c9f8
call sub.USER32.dll_wsprintfA
add esp, 0xc
jmp 0x5079a8
push 0
push 0x13f1
call fcn.0042c771
push eax
push dword [ebp - 0xc]
push str._d__s
push 0x57c9f8
call sub.USER32.dll_wsprintfA
add esp, 0x10
push 0x57c9f8
push 0
push 0xc
push 0x99
push dword [ebp + 8]
call sub.USER32.dll_SendDlgItemMessageA
cmp dword [ebp - 4], 0x3e8
jb 0x5079e8
mov eax, dword [ebp - 4]
mov ecx, 0x3e8
xor edx, edx
div ecx
push eax
push str._luk
push 0x57c9f8
call sub.USER32.dll_wsprintfA
add esp, 0xc
jmp 0x507a0a
push 0
push 0x13f4
call fcn.0042c771
push eax
push dword [ebp - 4]
push str._lu__s
push 0x57c9f8
call sub.USER32.dll_wsprintfA
add esp, 0x10
push 0x57c9f8
push 0
push 0xc
push 0x93
push dword [ebp + 8]
call sub.USER32.dll_SendDlgItemMessageA
xor eax, eax
mov dword [0x56dcf8], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8